summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-01-17 10:47:22 -0700
committerTom Rini <trini@konsulko.com>2023-01-23 18:11:39 -0500
commitd94d9844bca9352b1e9888a70f12c79ec76cd313 (patch)
tree2ff1d5c7118bbeaa1e811c5df6b46cb4d0dcd3f2
parent9445d7a95395885a059519d300a803208516a0e8 (diff)
downloadu-boot-d94d9844bca9352b1e9888a70f12c79ec76cd313.tar.gz
u-boot-d94d9844bca9352b1e9888a70f12c79ec76cd313.tar.bz2
u-boot-d94d9844bca9352b1e9888a70f12c79ec76cd313.zip
dm: part: Update test to use mmc2
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>
-rw-r--r--test/dm/part.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/dm/part.c b/test/dm/part.c
index 5e4efa587c..b60687114f 100644
--- a/test/dm/part.c
+++ b/test/dm/part.c
@@ -43,7 +43,7 @@ static int dm_test_part(struct unit_test_state *uts)
},
};
- ut_asserteq(1, blk_get_device_by_str("mmc", "1", &mmc_dev_desc));
+ ut_asserteq(2, blk_get_device_by_str("mmc", "2", &mmc_dev_desc));
if (CONFIG_IS_ENABLED(RANDOM_UUID)) {
gen_rand_uuid_str(parts[0].uuid, UUID_STR_FORMAT_STD);
gen_rand_uuid_str(parts[1].uuid, UUID_STR_FORMAT_STD);
@@ -63,7 +63,7 @@ static int dm_test_part(struct unit_test_state *uts)
env_set("bootdevice", "0");
test(0, NULL, true);
test(0, "", true);
- env_set("bootdevice", "1");
+ env_set("bootdevice", "2");
test(1, NULL, false);
test(1, "", false);
test(1, "-", false);
@@ -74,8 +74,8 @@ static int dm_test_part(struct unit_test_state *uts)
test(0, ".0", true);
test(0, ".0:0", true);
test(-EINVAL, "#test1", true);
- test(1, "1", false);
- test(1, "1", true);
+ test(1, "2", false);
+ test(1, "2", true);
test(-ENOENT, "1:0", false);
test(0, "1:0", true);
test(1, "1:1", false);
@@ -85,8 +85,8 @@ static int dm_test_part(struct unit_test_state *uts)
test(1, "1.0:1", false);
test(2, "1.0:2", false);
test(-EINVAL, "1#bogus", false);
- test(1, "1#test1", false);
- test(2, "1#test2", false);
+ test(1, "2#test1", false);
+ test(2, "2#test2", false);
ret = 0;
env_set("bootdevice", oldbootdevice);