mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
esp_timer: fix "esp_timer orders timers correctly" headerline handling
Discard header lines from esp_timer_dump that comes before the actual timer info. "esp_timer orders timers correctly" would crash when reading the header lines.
This commit is contained in:
parent
8e7db81ce8
commit
451465ff8c
@ -87,8 +87,13 @@ TEST_CASE("esp_timer orders timers correctly", "[esp_timer]")
|
||||
}
|
||||
fflush(stream);
|
||||
fseek(stream, 0, SEEK_SET);
|
||||
|
||||
/* Discard header lines */
|
||||
char line[128];
|
||||
TEST_ASSERT_NOT_NULL(fgets(line, sizeof(line), stream));
|
||||
TEST_ASSERT_NOT_NULL(fgets(line, sizeof(line), stream));
|
||||
|
||||
for (size_t i = 0; i < num_timers; ++i) {
|
||||
char line[128];
|
||||
TEST_ASSERT_NOT_NULL(fgets(line, sizeof(line), stream));
|
||||
#if WITH_PROFILING
|
||||
int timer_id;
|
||||
|
Loading…
Reference in New Issue
Block a user