Skip to content

Commit b8b253d

Browse files
committed
[nrf fromlist] tests: zms: Minor improvements
Upstream PR #: 94330 * Explicitly skip tests that depend on CONFIG_ZMS_LOOKUP_CACHE. * In `testcase.yaml`, use `extra_configs` instead of `extra_args` for setting Kconfigs. Signed-off-by: Grzegorz Swiderski <[email protected]> (cherry picked from commit bde68d15bb6e017f75dcec2b99d9cac642361661)
1 parent 49a2df0 commit b8b253d

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

tests/subsys/fs/zms/src/main.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,8 @@ ZTEST_F(zms, test_zms_cache_init)
752752

753753
num = num_matching_cache_entries(ate_addr, false, &fixture->fs);
754754
zassert_equal(num, 1, "invalid cache entry after restart");
755+
#else
756+
ztest_test_skip();
755757
#endif
756758
}
757759

@@ -780,6 +782,8 @@ ZTEST_F(zms, test_zms_cache_collission)
780782
zassert_equal(err, sizeof(data), "zms_read call failure: %d", err);
781783
zassert_equal(data, id, "incorrect data read");
782784
}
785+
#else
786+
ztest_test_skip();
783787
#endif
784788
}
785789

@@ -829,6 +833,8 @@ ZTEST_F(zms, test_zms_cache_gc)
829833

830834
num = num_matching_cache_entries(2ULL << ADDR_SECT_SHIFT, true, &fixture->fs);
831835
zassert_equal(num, 2, "invalid cache content after gc");
836+
#else
837+
ztest_test_skip();
832838
#endif
833839
}
834840

@@ -886,6 +892,7 @@ ZTEST_F(zms, test_zms_cache_hash_quality)
886892
TC_PRINT("Cache occupancy: %u\n", (unsigned int)num);
887893
zassert_between_inclusive(num, MIN_CACHE_OCCUPANCY, CONFIG_ZMS_LOOKUP_CACHE_SIZE,
888894
"too low cache occupancy - poor hash quality");
889-
895+
#else
896+
ztest_test_skip();
890897
#endif
891898
}

tests/subsys/fs/zms/testcase.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,21 @@ tests:
88
extra_args: DTC_OVERLAY_FILE=boards/qemu_x86_ev_0x00.overlay
99
platform_allow: qemu_x86
1010
filesystem.zms.sim.no_erase:
11-
extra_args: CONFIG_FLASH_SIMULATOR_EXPLICIT_ERASE=n
11+
extra_configs:
12+
- CONFIG_FLASH_SIMULATOR_EXPLICIT_ERASE=n
1213
platform_allow: qemu_x86
1314
filesystem.zms.sim.corrupt_close:
14-
extra_args:
15+
extra_configs:
1516
- CONFIG_FLASH_SIMULATOR_EXPLICIT_ERASE=y
1617
- CONFIG_FLASH_SIMULATOR_DOUBLE_WRITES=y
1718
platform_allow: qemu_x86
1819
filesystem.zms.cache:
19-
extra_args:
20+
extra_configs:
2021
- CONFIG_ZMS_LOOKUP_CACHE=y
2122
- CONFIG_ZMS_LOOKUP_CACHE_SIZE=64
2223
platform_allow: native_sim
2324
filesystem.zms.data_crc:
24-
extra_args:
25+
extra_configs:
2526
- CONFIG_ZMS_DATA_CRC=y
2627
platform_allow:
2728
- native_sim

0 commit comments

Comments
 (0)