mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-05 04:25:19 +00:00
tests: Modify the scsi util tests
Add tests/virscsidata/sg0 and tests/virscsidata/sg8 as the test input for constructing scsi->sg_path. And change the scsi generic number of "1:0:0:0", because it's easy to hide the problem (assuming most machines have a CDROM drive). Signed-off-by: Osier Yang <jyang@redhat.com>
This commit is contained in:
parent
b1b81efe9a
commit
14177ebc24
0
tests/virscsidata/sg0
Normal file
0
tests/virscsidata/sg0
Normal file
0
tests/virscsidata/sg8
Normal file
0
tests/virscsidata/sg8
Normal file
@ -43,7 +43,7 @@ test1(const void *data ATTRIBUTE_UNUSED)
|
|||||||
"scsi_host1", 0, 0, 0)))
|
"scsi_host1", 0, 0, 0)))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (STRNEQ(name, "sr0"))
|
if (STRNEQ(name, "sdh"))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
@ -72,7 +72,7 @@ test2(const void *data ATTRIBUTE_UNUSED)
|
|||||||
sgname = virSCSIDeviceGetSgName(virscsi_prefix,
|
sgname = virSCSIDeviceGetSgName(virscsi_prefix,
|
||||||
"scsi_host1", 0, 0, 0);
|
"scsi_host1", 0, 0, 0);
|
||||||
|
|
||||||
if (!sgname || STRNEQ(sgname, "sg1"))
|
if (!sgname || STRNEQ(sgname, "sg8"))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(dev = virSCSIDeviceNew(virscsi_prefix, "scsi_host1",
|
if (!(dev = virSCSIDeviceNew(virscsi_prefix, "scsi_host1",
|
||||||
|
Loading…
Reference in New Issue
Block a user