
On Tue, Jan 17, 2023 at 10:47:22AM -0700, Simon Glass wrote:
At present this test sets up a partition table on mmc1. But this is used by the bootstd tests, so it is not possible to run those after this test has run, without restarting the Python test harness.
This is inconvenient when running tests repeatedly with 'ut dm'. Move the test to use mmc2, which is not used by anything.
Signed-off-by: Simon Glass sjg@chromium.org
When I run tests like this: TEST="not sleep and not event_dump and not bootmgr and not extension" ./tools/buildman/buildman -o /tmp/sandbox -P --board sandbox ./test/py/test.py --bd $ARGS --build-dir /tmp/sandbox -k "$TEST" -ra I get: ========================================== FAILURES =========================================== _________________________________ test_ut[ut_dm_dm_test_part] _________________________________ test/py/tests/test_ut.py:341: in test_ut assert output.endswith('Failures: 0') E assert False E + where False = <built-in method endswith of str object at 0x2776470>('Failures: 0') E + where <built-in method endswith of str object at 0x2776470> = 'Test: dm_test_part: part.c\r\r\n** No device specified **\r\r\nCouldn't find partition mmc <NULL>\r\r\n** No device ...: 0 == do_test(uts, 2, "1:2", 0): Expected 0x0 (0), got 0x1 (1)\r\r\nTest dm_test_part failed 4 times\r\r\nFailures: 4'.endswith ------------------------------------ Captured stdout call ------------------------------------- => ut dm dm_test_part Test: dm_test_part: part.c ** No device specified ** Couldn't find partition mmc <NULL> ** No device specified ** Couldn't find partition mmc ** No partition table - mmc 0 ** Couldn't find partition mmc 0 Could not find "test1" partition ** Bad device specification mmc #test1 ** ** Bad device specification mmc #test1 ** Couldn't find partition mmc #test1 ** Bad partition specification mmc 1:0 ** Couldn't find partition mmc 1:0 ** Invalid partition 2 ** Couldn't find partition mmc 1:2 test/dm/part.c:20, do_test(): expected == part_get_info_by_dev_and_name_or_num("mmc", part_str, &mmc_dev_desc, &part_info, whole): Expected 0x2 (2), got 0xfffffffe (-2) test/dm/part.c:82, dm_test_part(): 0 == do_test(uts, 2, "1:2", 0): Expected 0x0 (0), got 0x1 (1) Test: dm_test_part: part.c (flat tree) ** No device specified ** Couldn't find partition mmc <NULL> ** No device specified ** Couldn't find partition mmc ** No partition table - mmc 0 ** Couldn't find partition mmc 0 Could not find "test1" partition ** Bad device specification mmc #test1 ** ** Bad device specification mmc #test1 ** Couldn't find partition mmc #test1 ** Bad partition specification mmc 1:0 ** Couldn't find partition mmc 1:0 ** Invalid partition 2 ** Couldn't find partition mmc 1:2 test/dm/part.c:20, do_test(): expected == part_get_info_by_dev_and_name_or_num("mmc", part_str, &mmc_dev_desc, &part_info, whole): Expected 0x2 (2), got 0xfffffffe (-2) test/dm/part.c:82, dm_test_part(): 0 == do_test(uts, 2, "1:2", 0): Expected 0x0 (0), got 0x1 (1) Test dm_test_part failed 4 times Failures: 4 =>
And further tests down the series also fail / introduce failures, but this is the first one, and why I thought v2 had more problems.