Hi Tom, On Mon, 23 Jan 2023 at 18:39, Tom Rini <tr...@konsulko.com> wrote: > > 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 <s...@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 > =>
Oh dear. I believe this is an ordering problem. These two patches need to be applied together because the first one changes mmc1.img and the second one relies on that change: part: Add a function to find the first bootable partition dm: part: Update test to use mmc2 I have them quite far apart in the series. I can merge them into one commit, perhaps? > > And further tests down the series also fail / introduce failures, but > this is the first one, and why I thought v2 had more problems. For some reason I'm not seeing this, but it could be another ordering thing. I don't see failures on CI but it only tests the whole. Let me know what you'd like me to do. I don't currently have a way to run tests on every commit, so my testing there is a bit random. I normally just build-test the series and then check with CI. Regards, Simon