Re: [Qemu-devel] [PATCH v2 2/4] qemu-iotests: s390x: fix test 051
Hi Max: On 11/25/2015 11:41 PM, Max Reitz wrote: On 24.11.2015 22:17, Sascha Silbe wrote: This PC/s390x-only hunk looks like an oversight to me. Not really, see http://lists.nongnu.org/archive/html/qemu-devel/2015-02/msg01906.html and http://lists.nongnu.org/archive/html/qemu-devel/2015-04/msg02851.html I noticed, but I am fine with it since the tests probably won't run on anything but x86/pc and s390 anyway (without modifications; most of the changes this series is making to make the iotests work on s390 are necessary for other non-pc platforms as well, and that shows to me that apparently nobody tried to run the iotests on non-pc platforms before s390, or didn't care enough about them to fix them). We should make one of the options the default. I'd prefer defaulting to virtio (see below), but since the test previously hard-coded IDE that would be fine, too. In my first reply above, I noted that virtio0 may not be available on all platforms either. Therefore, I'd rather have an explicit list of platforms there than an asterisk where it does not belong. However, my second reply above spawned a bit of a discussion, where Kevin simply proposed to change the ID of the drive to something known, i.e. just set the ID by adding an id=drive0 or something to the -drive parameter. Thanks for reminding me of the above, I had already forgotten. Indeed, we should just add id=drive0 to the -drive parameter and use drive0. A similar solution may be possible in most other places as well where PC and s390 differ due to the names of the default devices available. thanks for the reminder :-) Yes, Kevin mentioned that we can use "id=testdisk" because it's the same on all platforms. Please refer this link: http://lists.nongnu.org/archive/html/qemu-devel/2015-04/msg03715.html For test 130, I used "qemu -drive id=testdisk" for both pc and s390x. For test 051, I didn't find a way to do the same thing for qemu-io.
Re: [Qemu-devel] [PATCH v2 2/4] qemu-iotests: s390x: fix test 051
On 24.11.2015 22:17, Sascha Silbe wrote: > Dear Max, Hi! :-) > Max Reitz writes: > >> OK, so it is expected for s390x; however, this is strictly speaking not >> the output file for s390x but for any platform but PC. That's why I'd >> rather not have it in this “generic” reference output. >> >> This patch already assumes that the iotests only support s390 and PC >> (hunk @@ -251,28 +273,37 @@ in 051 adds a case statement which knows >> only these two cases). Therefore, I would be fine with renaming this >> reference output file to "051.s390.out" with a copy >> "051.s390-ccw-virtio.out" and just removing the generic "051.out". Then >> you can keep the warnings in. >> >> (Or you filter the warnings out and keep it as "051.out".) > > This PC/s390x-only hunk looks like an oversight to me. Not really, see http://lists.nongnu.org/archive/html/qemu-devel/2015-02/msg01906.html and http://lists.nongnu.org/archive/html/qemu-devel/2015-04/msg02851.html I noticed, but I am fine with it since the tests probably won't run on anything but x86/pc and s390 anyway (without modifications; most of the changes this series is making to make the iotests work on s390 are necessary for other non-pc platforms as well, and that shows to me that apparently nobody tried to run the iotests on non-pc platforms before s390, or didn't care enough about them to fix them). >We should make > one of the options the default. I'd prefer defaulting to virtio (see > below), but since the test previously hard-coded IDE that would be fine, > too. In my first reply above, I noted that virtio0 may not be available on all platforms either. Therefore, I'd rather have an explicit list of platforms there than an asterisk where it does not belong. However, my second reply above spawned a bit of a discussion, where Kevin simply proposed to change the ID of the drive to something known, i.e. just set the ID by adding an id=drive0 or something to the -drive parameter. Thanks for reminding me of the above, I had already forgotten. Indeed, we should just add id=drive0 to the -drive parameter and use drive0. A similar solution may be possible in most other places as well where PC and s390 differ due to the names of the default devices available. > For the other cases, IIRC it's really PC that's the odd one out, that's > why I suggested adding a PC-specific output file and patching the > generic output file to look like the output on most other architectures. Actually, I remember it was me: http://lists.nongnu.org/archive/html/qemu-devel/2015-02/msg00862.html ;-) (Not that it really matters, of course) > But I'm fine with anything that gets the job done on both PC and s390x > today. As am I. >I'll have a closer look again once things settle down a > bit. While the support for one output file per architecture is a very > useful generic solution, we should make use of it only sparingly. The > git log already shows that people forget to update test output > files. This will get worse with multiple output files. Well, maintaining the iotests for s390 may be a difficult task in itself. Most people (including myself) don't have an s390 machine, so we can't test whether modifications or additions we make to the iotests work there. > One of the things I'm considering is splitting off the IDE tests to a > separate test case and skipping it entirely on machines that do not > support IDE. Another is using virtio-blk on all architectures whenever > the test case doesn't care about the device type. (I doubt the tests > currently work on architectures that don't support virtio, but will of > course check this). The question is whether we really do have IDE test cases in the iotests. I don't think so, the actual IDE tests should be part of qtest. The iotests only test the block layer itself, so as I noted above we should most of the time get around the issues addressed in this series by simply manually setting the ID of the drive we are creating (instead of relying on a certain default name like ide0-hd0 or virtio0). Max signature.asc Description: OpenPGP digital signature
Re: [Qemu-devel] [PATCH v2 2/4] qemu-iotests: s390x: fix test 051
Dear Max, Max Reitz writes: > OK, so it is expected for s390x; however, this is strictly speaking not > the output file for s390x but for any platform but PC. That's why I'd > rather not have it in this “generic” reference output. > > This patch already assumes that the iotests only support s390 and PC > (hunk @@ -251,28 +273,37 @@ in 051 adds a case statement which knows > only these two cases). Therefore, I would be fine with renaming this > reference output file to "051.s390.out" with a copy > "051.s390-ccw-virtio.out" and just removing the generic "051.out". Then > you can keep the warnings in. > > (Or you filter the warnings out and keep it as "051.out".) This PC/s390x-only hunk looks like an oversight to me. We should make one of the options the default. I'd prefer defaulting to virtio (see below), but since the test previously hard-coded IDE that would be fine, too. For the other cases, IIRC it's really PC that's the odd one out, that's why I suggested adding a PC-specific output file and patching the generic output file to look like the output on most other architectures. But I'm fine with anything that gets the job done on both PC and s390x today. I'll have a closer look again once things settle down a bit. While the support for one output file per architecture is a very useful generic solution, we should make use of it only sparingly. The git log already shows that people forget to update test output files. This will get worse with multiple output files. One of the things I'm considering is splitting off the IDE tests to a separate test case and skipping it entirely on machines that do not support IDE. Another is using virtio-blk on all architectures whenever the test case doesn't care about the device type. (I doubt the tests currently work on architectures that don't support virtio, but will of course check this). Sascha -- Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg https://se-silbe.de/ USt-IdNr. DE281696641
Re: [Qemu-devel] [PATCH v2 2/4] qemu-iotests: s390x: fix test 051
Hi Max, Sascha: On 11/21/2015 12:24 AM, Max Reitz wrote: On 19.11.2015 08:28, tu bo wrote: Hi Max: On 11/19/2015 12:52 AM, Max Reitz wrote: On 04.11.2015 03:26, Bo Tu wrote: The tests for device type "ide_cd" should only be tested for the pc platform. The default device id of hard disk on the s390 platform differs to that of the x86 platform. A new variable device_id is defined and "virtio0" set for the s390 platform. A x86 platform specific output file is also needed. Warning message expected for s390x when drive without device. Reviewed-by: Sascha Silbe Signed-off-by: Bo Tu --- tests/qemu-iotests/051| 99 ++ tests/qemu-iotests/051.out| 143 +++--- tests/qemu-iotests/051.pc.out | 422 ++ 3 files changed, 515 insertions(+), 149 deletions(-) create mode 100644 tests/qemu-iotests/051.pc.out [...] diff --git a/tests/qemu-iotests/051.out b/tests/qemu-iotests/051.out index 7765aa0..d17c969 100644 --- a/tests/qemu-iotests/051.out +++ b/tests/qemu-iotests/051.out [...] @@ -109,20 +109,23 @@ QEMU X.Y.Z monitor - type 'help' for more information Testing: -drive if=floppy QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K +(qemu) Warning: Orphaned drive without device: id=floppy0,file=,if=floppy,bus=0,unit=0 +q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K I'd still like these warnings to be filtered out (as I wrote in my reply to the original RFC's v4, and as was done in later versions of that RFC (the _filter_orphan function e.g. in http://lists.nongnu.org/archive/html/qemu-devel/2015-05/msg04816.html). I did more investigation about this. "Warning: Orphaned drive without device:.*" is expected for s390x, when we define a drive without device, also this drive is not default and interface is not "none". Please refer line 228,229 in blockdev.c: 218 bool drive_check_orphaned(void) 219 { 220 BlockBackend *blk; 221 DriveInfo *dinfo; 222 bool rs = false; 223 224 for (blk = blk_next(NULL); blk; blk = blk_next(blk)) { 225 dinfo = blk_legacy_dinfo(blk); 226 /* If dinfo->bdrv->dev is NULL, it has no device attached. */ 227 /* Unless this is a default drive, this may be an oversight. */ 228 if (!blk_get_attached_dev(blk) && !dinfo->is_default && 229 dinfo->type != IF_NONE) { 230 fprintf(stderr, "Warning: Orphaned drive without device: " 231 "id=%s,file=%s,if=%s,bus=%d,unit=%d\n", 232 blk_name(blk), blk_bs(blk)->filename, if_name[dinfo->type], 233 dinfo->bus, dinfo->unit); 234 rs = true; 235 } 236 } For example, "run_qemu -drive if=scsi" will generate orphan warning message for s390x, but "run_qemu -drive if=virtio" will not generate orphan warning message, since virtio is a default drive. so I removed _filter_orphan() in common.filter, and added orphan warning message(ie: for the output of "run_qemu -drive if=scsi") in output file for s390x. thanks OK, so it is expected for s390x; however, this is strictly speaking not the output file for s390x but for any platform but PC. That's why I'd rather not have it in this “generic” reference output. This patch already assumes that the iotests only support s390 and PC (hunk @@ -251,28 +273,37 @@ in 051 adds a case statement which knows only these two cases). Therefore, I would be fine with renaming this reference output file to "051.s390.out" with a copy "051.s390-ccw-virtio.out" and just removing the generic "051.out". Then you can keep the warnings in. It looks good to me. thanks Hi Sascha: This change is to rename 051.out to "051.s390.out" with a copy "051.s390-ccw-virtio.out" and just to remove the generic "051.out". Is this fine to you? thanks (Or you filter the warnings out and keep it as "051.out".) Max
Re: [Qemu-devel] [PATCH v2 2/4] qemu-iotests: s390x: fix test 051
On 19.11.2015 08:28, tu bo wrote: > Hi Max: > > On 11/19/2015 12:52 AM, Max Reitz wrote: >> On 04.11.2015 03:26, Bo Tu wrote: >>> The tests for device type "ide_cd" should only be tested for the pc >>> platform. >>> The default device id of hard disk on the s390 platform differs to that >>> of the x86 platform. A new variable device_id is defined and "virtio0" >>> set for the s390 platform. A x86 platform specific output file is also >>> needed. >>> Warning message expected for s390x when drive without device. >>> >>> Reviewed-by: Sascha Silbe >>> Signed-off-by: Bo Tu >>> --- >>> tests/qemu-iotests/051| 99 ++ >>> tests/qemu-iotests/051.out| 143 +++--- >>> tests/qemu-iotests/051.pc.out | 422 >>> ++ >>> 3 files changed, 515 insertions(+), 149 deletions(-) >>> create mode 100644 tests/qemu-iotests/051.pc.out >>> >> >> [...] >> >>> diff --git a/tests/qemu-iotests/051.out b/tests/qemu-iotests/051.out >>> index 7765aa0..d17c969 100644 >>> --- a/tests/qemu-iotests/051.out >>> +++ b/tests/qemu-iotests/051.out >> >> [...] >> >>> @@ -109,20 +109,23 @@ QEMU X.Y.Z monitor - type 'help' for more >>> information >>> >>> Testing: -drive if=floppy >>> QEMU X.Y.Z monitor - type 'help' for more information >>> -(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K >>> +(qemu) Warning: Orphaned drive without device: >>> id=floppy0,file=,if=floppy,bus=0,unit=0 >>> +q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K >> >> I'd still like these warnings to be filtered out (as I wrote in my reply >> to the original RFC's v4, and as was done in later versions of that RFC >> (the _filter_orphan function e.g. in >> http://lists.nongnu.org/archive/html/qemu-devel/2015-05/msg04816.html). >> > > I did more investigation about this. > "Warning: Orphaned drive without device:.*" is expected for s390x, when > we define a drive without device, also this drive is not default > and interface is not "none". Please refer line 228,229 in blockdev.c: > 218 bool drive_check_orphaned(void) > 219 { > 220 BlockBackend *blk; > 221 DriveInfo *dinfo; > 222 bool rs = false; > 223 > 224 for (blk = blk_next(NULL); blk; blk = blk_next(blk)) { > 225 dinfo = blk_legacy_dinfo(blk); > 226 /* If dinfo->bdrv->dev is NULL, it has no device > attached. */ > 227 /* Unless this is a default drive, this may be an > oversight. */ > 228 if (!blk_get_attached_dev(blk) && !dinfo->is_default && > 229 dinfo->type != IF_NONE) { > 230 fprintf(stderr, "Warning: Orphaned drive without > device: " > 231 "id=%s,file=%s,if=%s,bus=%d,unit=%d\n", > 232 blk_name(blk), blk_bs(blk)->filename, > if_name[dinfo->type], > 233 dinfo->bus, dinfo->unit); > 234 rs = true; > 235 } > 236 } > > For example, "run_qemu -drive if=scsi" will generate orphan warning > message for s390x, but "run_qemu -drive if=virtio" will not generate > orphan warning message, since virtio is a default drive. > > so I removed _filter_orphan() in common.filter, and added orphan > warning message(ie: for the output of "run_qemu -drive if=scsi") in > output file for s390x. thanks OK, so it is expected for s390x; however, this is strictly speaking not the output file for s390x but for any platform but PC. That's why I'd rather not have it in this “generic” reference output. This patch already assumes that the iotests only support s390 and PC (hunk @@ -251,28 +273,37 @@ in 051 adds a case statement which knows only these two cases). Therefore, I would be fine with renaming this reference output file to "051.s390.out" with a copy "051.s390-ccw-virtio.out" and just removing the generic "051.out". Then you can keep the warnings in. (Or you filter the warnings out and keep it as "051.out".) Max signature.asc Description: OpenPGP digital signature
Re: [Qemu-devel] [PATCH v2 2/4] qemu-iotests: s390x: fix test 051
Hi Max: On 11/19/2015 12:52 AM, Max Reitz wrote: On 04.11.2015 03:26, Bo Tu wrote: The tests for device type "ide_cd" should only be tested for the pc platform. The default device id of hard disk on the s390 platform differs to that of the x86 platform. A new variable device_id is defined and "virtio0" set for the s390 platform. A x86 platform specific output file is also needed. Warning message expected for s390x when drive without device. Reviewed-by: Sascha Silbe Signed-off-by: Bo Tu --- tests/qemu-iotests/051| 99 ++ tests/qemu-iotests/051.out| 143 +++--- tests/qemu-iotests/051.pc.out | 422 ++ 3 files changed, 515 insertions(+), 149 deletions(-) create mode 100644 tests/qemu-iotests/051.pc.out [...] diff --git a/tests/qemu-iotests/051.out b/tests/qemu-iotests/051.out index 7765aa0..d17c969 100644 --- a/tests/qemu-iotests/051.out +++ b/tests/qemu-iotests/051.out [...] @@ -109,20 +109,23 @@ QEMU X.Y.Z monitor - type 'help' for more information Testing: -drive if=floppy QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K +(qemu) Warning: Orphaned drive without device: id=floppy0,file=,if=floppy,bus=0,unit=0 +q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K I'd still like these warnings to be filtered out (as I wrote in my reply to the original RFC's v4, and as was done in later versions of that RFC (the _filter_orphan function e.g. in http://lists.nongnu.org/archive/html/qemu-devel/2015-05/msg04816.html). I did more investigation about this. "Warning: Orphaned drive without device:.*" is expected for s390x, when we define a drive without device, also this drive is not default and interface is not "none". Please refer line 228,229 in blockdev.c: 218 bool drive_check_orphaned(void) 219 { 220 BlockBackend *blk; 221 DriveInfo *dinfo; 222 bool rs = false; 223 224 for (blk = blk_next(NULL); blk; blk = blk_next(blk)) { 225 dinfo = blk_legacy_dinfo(blk); 226 /* If dinfo->bdrv->dev is NULL, it has no device attached. */ 227 /* Unless this is a default drive, this may be an oversight. */ 228 if (!blk_get_attached_dev(blk) && !dinfo->is_default && 229 dinfo->type != IF_NONE) { 230 fprintf(stderr, "Warning: Orphaned drive without device: " 231 "id=%s,file=%s,if=%s,bus=%d,unit=%d\n", 232 blk_name(blk), blk_bs(blk)->filename, if_name[dinfo->type], 233 dinfo->bus, dinfo->unit); 234 rs = true; 235 } 236 } For example, "run_qemu -drive if=scsi" will generate orphan warning message for s390x, but "run_qemu -drive if=virtio" will not generate orphan warning message, since virtio is a default drive. so I removed _filter_orphan() in common.filter, and added orphan warning message(ie: for the output of "run_qemu -drive if=scsi") in output file for s390x. thanks Looks good other than that. Max
Re: [Qemu-devel] [PATCH v2 2/4] qemu-iotests: s390x: fix test 051
On 04.11.2015 03:26, Bo Tu wrote: > The tests for device type "ide_cd" should only be tested for the pc > platform. > The default device id of hard disk on the s390 platform differs to that > of the x86 platform. A new variable device_id is defined and "virtio0" > set for the s390 platform. A x86 platform specific output file is also > needed. > Warning message expected for s390x when drive without device. > > Reviewed-by: Sascha Silbe > Signed-off-by: Bo Tu > --- > tests/qemu-iotests/051| 99 ++ > tests/qemu-iotests/051.out| 143 +++--- > tests/qemu-iotests/051.pc.out | 422 > ++ > 3 files changed, 515 insertions(+), 149 deletions(-) > create mode 100644 tests/qemu-iotests/051.pc.out > [...] > diff --git a/tests/qemu-iotests/051.out b/tests/qemu-iotests/051.out > index 7765aa0..d17c969 100644 > --- a/tests/qemu-iotests/051.out > +++ b/tests/qemu-iotests/051.out [...] > @@ -109,20 +109,23 @@ QEMU X.Y.Z monitor - type 'help' for more information > > Testing: -drive if=floppy > QEMU X.Y.Z monitor - type 'help' for more information > -(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K > +(qemu) Warning: Orphaned drive without device: > id=floppy0,file=,if=floppy,bus=0,unit=0 > +q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K I'd still like these warnings to be filtered out (as I wrote in my reply to the original RFC's v4, and as was done in later versions of that RFC (the _filter_orphan function e.g. in http://lists.nongnu.org/archive/html/qemu-devel/2015-05/msg04816.html). Looks good other than that. Max signature.asc Description: OpenPGP digital signature
[Qemu-devel] [PATCH v2 2/4] qemu-iotests: s390x: fix test 051
The tests for device type "ide_cd" should only be tested for the pc platform. The default device id of hard disk on the s390 platform differs to that of the x86 platform. A new variable device_id is defined and "virtio0" set for the s390 platform. A x86 platform specific output file is also needed. Warning message expected for s390x when drive without device. Reviewed-by: Sascha Silbe Signed-off-by: Bo Tu --- tests/qemu-iotests/051| 99 ++ tests/qemu-iotests/051.out| 143 +++--- tests/qemu-iotests/051.pc.out | 422 ++ 3 files changed, 515 insertions(+), 149 deletions(-) create mode 100644 tests/qemu-iotests/051.pc.out diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051 index 17dbf04..2bc2193 100755 --- a/tests/qemu-iotests/051 +++ b/tests/qemu-iotests/051 @@ -148,33 +148,49 @@ run_qemu -drive if=ide run_qemu -drive if=virtio run_qemu -drive if=scsi -run_qemu -drive if=none,id=disk -device ide-cd,drive=disk -run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-cd,drive=disk - -run_qemu -drive if=none,id=disk -device ide-drive,drive=disk -run_qemu -drive if=none,id=disk -device ide-hd,drive=disk -run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-disk,drive=disk -run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-hd,drive=disk +case "$QEMU_DEFAULT_MACHINE" in +pc) +run_qemu -drive if=none,id=disk -device ide-cd,drive=disk +run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-cd,drive=disk +run_qemu -drive if=none,id=disk -device ide-drive,drive=disk +run_qemu -drive if=none,id=disk -device ide-hd,drive=disk +run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-disk,drive=disk +run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-hd,drive=disk +;; + *) +;; +esac echo echo === Read-only === echo -run_qemu -drive file="$TEST_IMG",if=floppy,readonly=on -run_qemu -drive file="$TEST_IMG",if=ide,media=cdrom,readonly=on -run_qemu -drive file="$TEST_IMG",if=scsi,media=cdrom,readonly=on +case "$QEMU_DEFAULT_MACHINE" in +pc) +run_qemu -drive file="$TEST_IMG",if=floppy,readonly=on +run_qemu -drive file="$TEST_IMG",if=ide,media=cdrom,readonly=on +run_qemu -drive file="$TEST_IMG",if=scsi,media=cdrom,readonly=on +run_qemu -drive file="$TEST_IMG",if=ide,readonly=on +;; + *) +;; +esac -run_qemu -drive file="$TEST_IMG",if=ide,readonly=on run_qemu -drive file="$TEST_IMG",if=virtio,readonly=on run_qemu -drive file="$TEST_IMG",if=scsi,readonly=on -run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-cd,drive=disk -run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-cd,drive=disk - -run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-drive,drive=disk -run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-hd,drive=disk -run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-disk,drive=disk -run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-hd,drive=disk +case "$QEMU_DEFAULT_MACHINE" in +pc) +run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-cd,drive=disk +run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-cd,drive=disk +run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-drive,drive=disk +run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-hd,drive=disk +run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-disk,drive=disk +run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-hd,drive=disk +;; + *) +;; +esac echo echo === Cache modes === @@ -183,12 +199,18 @@ echo # Cannot use the test image because cache=none might not work on the host FS # Use cdrom so that we won't get errors about missing media -run_qemu -drive media=cdrom,cache=none -run_qemu -drive media=cdrom,cache=directsync -run_qemu -drive media=cdrom,cache=writeback -run_qemu -drive media=cdrom,cache=writethrough -run_qemu -drive media=cdrom,cache=unsafe -run_qemu -drive media=cdrom,cache=invalid_value +case "$QEMU_DEFAULT_MACHINE" in +pc) +run_qemu -drive media=cdrom,cache=none +run_qemu -drive media=cdrom,cache=directsync +run_qemu -drive media=cdrom,cache=writeback +run_qemu -drive media=cdrom,cache=writethrough +run_qemu -drive media=cdrom,cache=unsafe +run_qemu -drive media=cdrom,cache=invalid_value +;; + *) +;; +esac echo echo === Specifying the protocol layer === @@ -251,28 +273,37 @@ echo echo === Snapshot mode === echo +case "$QEMU_DEF