diff options
| author | Gabor Juhos <j4g8y7@gmail.com> | 2025-07-23 13:28:41 +0200 |
|---|---|---|
| committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2025-11-28 20:13:56 +0100 |
| commit | b139f3ccd1521071aab29420f417abb937d021ce (patch) | |
| tree | 764dd4bfee8c45f3c1643254278d099948019868 /tests | |
| parent | 09e151c895326824383258469f5c6f85652f19cd (diff) | |
mtd-tests: flash_speed: really skip destructive tests
Although both the 'multi-block erase' and the 'read-while-write latency'
tests are destructive, but those are executed irregardless of whether
destructive mode is enabled or not.
Change the code to skip these tests if the DESTRUCTIVE flag is not set
to avoid unexpected behaviour.
Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/mtd-tests/flash_speed.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/mtd-tests/flash_speed.c b/tests/mtd-tests/flash_speed.c index 11f396c..ee16289 100644 --- a/tests/mtd-tests/flash_speed.c +++ b/tests/mtd-tests/flash_speed.c @@ -490,7 +490,7 @@ int main(int argc, char **argv) } /* Multi-block erase all eraseblocks */ - if (!skip) { + if (flags & DESTRUCTIVE && !skip) { for (k = 1; k < 7; ++k) { blocks = 1 << k; printf("Testing %dx multi-block erase speed\n", blocks); @@ -518,7 +518,7 @@ int main(int argc, char **argv) /* Write a page and immediately after try to read another page. Report * the latency difference when performed on different banks (NOR only). */ - if (speb >= 0 && mtd.subpage_size == 1) { + if (flags & DESTRUCTIVE && speb >= 0 && mtd.subpage_size == 1) { long rww_duration_w, rww_latency_end; long rww_duration_rnw, rww_duration_r_end; bool rww_r_end_first; |
