On wifi-disconnect (after all retries), we signal to the IP semaphores
and delete them immediately, while the wait thread might be still
holding on them causing:
```
I (1682) example_connect: Waiting for IP(s)
I (4092) example_connect: Wi-Fi disconnected 201, trying to reconnect...
I (6502) example_connect: WiFi Connect failed 2 times, stop reconnect.
assert failed: spinlock_acquire spinlock.h:142 (lock->count == 0)
```
The rom function on the s2 and s3 only counts one page for any pages
which are mapped to page 0 of flash as the Cache_Flash_To_SPIRAM_Copy
function attempts to map all flash page 0 mapped pages to one PSRAM
page.
As this function can be called for multiple regions, it needs to track
if a page mapped to page 0 has previously been accounted for by a
previous call. It does this using the page0_mapped in-out parameter.
This logic contains an error:
```
if (*page0_mapped == 0) {
// BUG: If page0_count is 0, 1 is still added
count = valid_flash_count + 1 - page0_count;
} else {
count = valid_flash_count - page0_count;
}
*page0_mapped += page0_count;
return count;
```
The current Cache_Count_Flash_Pages wrapper in the idf attempts to
compensate for this bug by checking if the page0_mapped parameter was
changed by a call to the function and reducing the count if it has not.
This, however, will incorrectly over-compensate in situations where the
initial value of page0_mapped was not zero as the code above only
miscounts when it was zero.
This patch addresses the issue in this wrapper function by correctly
compensating for the bug only in cases where the final page0_mapped
value is 0.
ci: add python_func attribute and fix C testcase path resolution in JUnit reports
Closes RDT-1013, IDFCI-1990, IDFCI-1964, and IDFCI-1429
See merge request espressif/esp-idf!35058
The Linux build was broken after IDF flash API was updated without updating
the Linux stub library in the example. This commit updates the spi_flash stub
library such that:
- The API now matches same API as IDF's spi_flash component
- Links the stub_esp32 library to pull in basic types and defines
Example linux build of the example demonstrates "esp32" and "spi_flash" stub
libraries (roughly analogous to "esp_system" and "spi_flash" components).
This commit moves the "flash_ops.c" file to the "spi_flash" stub library as it
is a flash related funciton.
Also renamed the header to "esp_flash.h" (in order to match current header name
in IDF). This is a prerequisite to fixing the linux build of this example.
The build-esp32p4.sh and run-esp32p4.sh scripts are not symbolic links to the
base scripts, leading to a "permission denied" error. This commit changes their
types to symbolic links, in line with the other targets.
An IPv6 IP that occurs in the 'Host:' header of an HTTP request must be enclosed
in square brackets (RFC3986 section 3.2.2).
Searches for ':' in the host string to efficiently determine if the host is an
IPv6 IP address.