1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2015 Google, Inc
11 #include <test/test.h>
14 /* Test that sandbox SCSI works correctly */
15 static int dm_test_scsi_base(struct unit_test_state *uts)
17 const struct disk_partition *info;
18 const struct disk_part *part;
21 ut_assertok(scsi_scan(false));
24 * We expect some sort of partition on the disk image, created by
27 ut_assertok(uclass_first_device_err(UCLASS_PARTITION, &dev));
29 part = dev_get_uclass_plat(dev);
30 ut_asserteq(1, part->partnum);
32 info = &part->gpt_part_info;
33 ut_asserteq_str("sda1", info->name);
34 ut_asserteq_str("U-Boot", info->type);
35 ut_asserteq(0x83 /* linux */, info->sys_ind);
39 DM_TEST(dm_test_scsi_base, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);