TESTS: drop /dev/sg device path check for iSCSI

When run against an iSCSI target sd->sgio_dev may be NULL, so the
strncmp() coredumps.

Fixes: 698ae7a649

Signed-off-by: David Disseldorp <ddiss@suse.de>
This commit is contained in:
David Disseldorp
2016-10-05 14:57:04 +02:00
parent 698ae7a649
commit 4694c4ec95

View File

@@ -1446,7 +1446,7 @@ main(int argc, char *argv[])
* of sectors here. Just force it to 120k and let us get on with
* our lives.
*/
if (!strncmp(sd->sgio_dev, "/dev/sg", 7)) {
if (sd->sgio_dev && !strncmp(sd->sgio_dev, "/dev/sg", 7)) {
printf("Looks like a /dev/sg device. Force max iosize "
"to 120k as BLKSECTGET is just broken and can "
"not be used for discovery.\n");