diff mbox

Add testcase for scsi-hd devices without drive property

Message ID 54F5C276.4030908@de.ibm.com
State New
Headers show

Commit Message

Christian Borntraeger March 3, 2015, 2:17 p.m. UTC
Am 03.03.2015 um 09:15 schrieb Christian Borntraeger:
> CC: Max Reitz <mreitz@redhat.com> 
> Suggested-by: Kevin Wolf <kwolf@redhat.com>
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
>  tests/qemu-iotests/051     |    9 +++++++++
>  tests/qemu-iotests/051.out |    8 ++++++++
>  2 files changed, 17 insertions(+), 0 deletions(-)
> 
> diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051
> index 11c858f..1eec350 100755
> --- a/tests/qemu-iotests/051
> +++ b/tests/qemu-iotests/051
> @@ -95,6 +95,15 @@ run_qemu -drive file="$TEST_IMG",driver=foo
>  run_qemu -drive file="$TEST_IMG",driver=raw,format=qcow2
> 
>  echo
> +echo === Device without drive ===
> +echo
> +
> +# virtio-scsi-pci, virtio-scsi-ccw, virtio-scsi-s390...
> +VIRTSCSIDEV=`${QEMU} -device help 2>&1 | grep -v virtio-scsi-device | grep -m 1 virtio-scsi | cut -d \" -f 2`
> +

Hmmm. Doesnt work reliably on s390.


> +run_qemu -device ${VIRTSCSIDEV} -device scsi-hd 

Maybe we can just use virtio-scsi-pci hardcoded and fixup s390 later on as
there are other io tests in here that need some special s390 changes as well.
(We are working on it)

So something like


plus the test  output. Makes sense?

Christian

Comments

Max Reitz March 3, 2015, 2:31 p.m. UTC | #1
On 2015-03-03 at 09:17, Christian Borntraeger wrote:
> Am 03.03.2015 um 09:15 schrieb Christian Borntraeger:
>> CC: Max Reitz <mreitz@redhat.com>
>> Suggested-by: Kevin Wolf <kwolf@redhat.com>
>> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
>> ---
>>   tests/qemu-iotests/051     |    9 +++++++++
>>   tests/qemu-iotests/051.out |    8 ++++++++
>>   2 files changed, 17 insertions(+), 0 deletions(-)
>>
>> diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051
>> index 11c858f..1eec350 100755
>> --- a/tests/qemu-iotests/051
>> +++ b/tests/qemu-iotests/051
>> @@ -95,6 +95,15 @@ run_qemu -drive file="$TEST_IMG",driver=foo
>>   run_qemu -drive file="$TEST_IMG",driver=raw,format=qcow2
>>
>>   echo
>> +echo === Device without drive ===
>> +echo
>> +
>> +# virtio-scsi-pci, virtio-scsi-ccw, virtio-scsi-s390...
>> +VIRTSCSIDEV=`${QEMU} -device help 2>&1 | grep -v virtio-scsi-device | grep -m 1 virtio-scsi | cut -d \" -f 2`
>> +
> Hmmm. Doesnt work reliably on s390.
>
>
>> +run_qemu -device ${VIRTSCSIDEV} -device scsi-hd
> Maybe we can just use virtio-scsi-pci hardcoded and fixup s390 later on as
> there are other io tests in here that need some special s390 changes as well.
> (We are working on it)
>
> So something like
>
> diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051
> index 11c858f..6ab40e2 100755
> --- a/tests/qemu-iotests/051
> +++ b/tests/qemu-iotests/051
> @@ -95,6 +95,12 @@ run_qemu -drive file="$TEST_IMG",driver=foo
>   run_qemu -drive file="$TEST_IMG",driver=raw,format=qcow2
>   
>   echo
> +echo === Device without drive ===
> +echo
> +
> +run_qemu -device virtio-scsi-pci -device scsi-hd
> +
> +echo
>   echo === Overriding backing file ===
>   echo
>
>
> plus the test  output. Makes sense?

Fine with me.

Max
diff mbox

Patch

diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051
index 11c858f..6ab40e2 100755
--- a/tests/qemu-iotests/051
+++ b/tests/qemu-iotests/051
@@ -95,6 +95,12 @@  run_qemu -drive file="$TEST_IMG",driver=foo
 run_qemu -drive file="$TEST_IMG",driver=raw,format=qcow2
 
 echo
+echo === Device without drive ===
+echo
+
+run_qemu -device virtio-scsi-pci -device scsi-hd
+
+echo
 echo === Overriding backing file ===
 echo