qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] iotests: Fixes to 156 and 186
@ 2017-07-25 15:56 Max Reitz
  2017-07-25 15:56 ` [Qemu-devel] [PATCH 1/2] iotests: Fix test 156 Max Reitz
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Max Reitz @ 2017-07-25 15:56 UTC (permalink / raw)
  To: qemu-block; +Cc: qemu-devel, Max Reitz, Kevin Wolf, Eric Blake

This series contains some small fixes for issues I stumbled upon when
preparing my pull request.


Max Reitz (2):
  iotests: Fix test 156
  iotests: Redirect stderr to stdout in 186

 tests/qemu-iotests/156     |  4 ++--
 tests/qemu-iotests/186     |  2 +-
 tests/qemu-iotests/186.out | 12 ++++++------
 3 files changed, 9 insertions(+), 9 deletions(-)

-- 
2.9.4

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Qemu-devel] [PATCH 1/2] iotests: Fix test 156
  2017-07-25 15:56 [Qemu-devel] [PATCH 0/2] iotests: Fixes to 156 and 186 Max Reitz
@ 2017-07-25 15:56 ` Max Reitz
  2017-07-25 17:26   ` Eric Blake
  2017-07-26 22:19   ` Jeff Cody
  2017-07-25 15:56 ` [Qemu-devel] [PATCH 2/2] iotests: Redirect stderr to stdout in 186 Max Reitz
  2017-07-27 12:24 ` [Qemu-devel] [PATCH 0/2] iotests: Fixes to 156 and 186 Kevin Wolf
  2 siblings, 2 replies; 8+ messages in thread
From: Max Reitz @ 2017-07-25 15:56 UTC (permalink / raw)
  To: qemu-block; +Cc: qemu-devel, Max Reitz, Kevin Wolf, Eric Blake

On one hand, the _make_test_img invocation for creating the target image
was missing a -u because its backing file is not supposed to exist at
that point.

On the other hand, nobody noticed probably because the backing file is
created later on and _cleanup failed to remove it: The quotation marks
were misplaced so bash tried to deleted a file literally called
"$TEST_IMG{,.target}..." instead of resolving the globs.  Thus, the
files stayed around after the first run and qemu-img create did not
complain about a missing backing file on any run but the first.

Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 tests/qemu-iotests/156 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/qemu-iotests/156 b/tests/qemu-iotests/156
index 2c4a06e..e75dc4d 100755
--- a/tests/qemu-iotests/156
+++ b/tests/qemu-iotests/156
@@ -38,7 +38,7 @@ status=1	# failure is the default!
 _cleanup()
 {
     _cleanup_qemu
-    rm -f "$TEST_IMG{,.target}{,.backing,.overlay}"
+    rm -f "$TEST_IMG"{,.target}{,.backing,.overlay}
 }
 trap "_cleanup; exit \$status" 0 1 2 3 15
 
@@ -83,7 +83,7 @@ _send_qemu_cmd $QEMU_HANDLE \
     'return'
 
 # Create target image
-TEST_IMG="$TEST_IMG.target.overlay" _make_test_img -b "$TEST_IMG.target" 1M
+TEST_IMG="$TEST_IMG.target.overlay" _make_test_img -u -b "$TEST_IMG.target" 1M
 
 # Mirror snapshot
 _send_qemu_cmd $QEMU_HANDLE \
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Qemu-devel] [PATCH 2/2] iotests: Redirect stderr to stdout in 186
  2017-07-25 15:56 [Qemu-devel] [PATCH 0/2] iotests: Fixes to 156 and 186 Max Reitz
  2017-07-25 15:56 ` [Qemu-devel] [PATCH 1/2] iotests: Fix test 156 Max Reitz
@ 2017-07-25 15:56 ` Max Reitz
  2017-07-25 17:50   ` Eric Blake
  2017-07-26 22:20   ` Jeff Cody
  2017-07-27 12:24 ` [Qemu-devel] [PATCH 0/2] iotests: Fixes to 156 and 186 Kevin Wolf
  2 siblings, 2 replies; 8+ messages in thread
From: Max Reitz @ 2017-07-25 15:56 UTC (permalink / raw)
  To: qemu-block; +Cc: qemu-devel, Max Reitz, Kevin Wolf, Eric Blake

Without redirecting qemu's stderr to stdout, _filter_qemu will not apply
to warnings.  This results in $QEMU_PROG not being replaced by QEMU_PROG
which is not great if your qemu executable is not called
qemu-system-x86_64 (e.g. qemu-system-i386).

Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 tests/qemu-iotests/186     |  2 +-
 tests/qemu-iotests/186.out | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/tests/qemu-iotests/186 b/tests/qemu-iotests/186
index ab83ee4..2b9f618 100755
--- a/tests/qemu-iotests/186
+++ b/tests/qemu-iotests/186
@@ -56,7 +56,7 @@ function do_run_qemu()
             done
         fi
         echo quit
-    ) | $QEMU -S -nodefaults -display none -device virtio-scsi-pci -monitor stdio "$@"
+    ) | $QEMU -S -nodefaults -display none -device virtio-scsi-pci -monitor stdio "$@" 2>&1
     echo
 }
 
diff --git a/tests/qemu-iotests/186.out b/tests/qemu-iotests/186.out
index b8bf9a2..c8377fe 100644
--- a/tests/qemu-iotests/186.out
+++ b/tests/qemu-iotests/186.out
@@ -442,28 +442,28 @@ ide0-cd0 (NODE_NAME): null-co:// (null-co, read-only)
     Cache mode:       writeback
 (qemu) quit
 
-qemu-system-x86_64: -drive if=scsi,driver=null-co: warning: bus=0,unit=0 is deprecated with this machine type
 Testing: -drive if=scsi,driver=null-co
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) info block
+(qemu) QEMU_PROG: -drive if=scsi,driver=null-co: warning: bus=0,unit=0 is deprecated with this machine type
+info block
 scsi0-hd0 (NODE_NAME): null-co:// (null-co)
     Attached to:      /machine/unattached/device[27]/scsi.0/legacy[0]
     Cache mode:       writeback
 (qemu) quit
 
-qemu-system-x86_64: -drive if=scsi,media=cdrom: warning: bus=0,unit=0 is deprecated with this machine type
 Testing: -drive if=scsi,media=cdrom
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) info block
+(qemu) QEMU_PROG: -drive if=scsi,media=cdrom: warning: bus=0,unit=0 is deprecated with this machine type
+info block
 scsi0-cd0: [not inserted]
     Attached to:      /machine/unattached/device[27]/scsi.0/legacy[0]
     Removable device: not locked, tray closed
 (qemu) quit
 
-qemu-system-x86_64: -drive if=scsi,driver=null-co,media=cdrom: warning: bus=0,unit=0 is deprecated with this machine type
 Testing: -drive if=scsi,driver=null-co,media=cdrom
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) info block
+(qemu) QEMU_PROG: -drive if=scsi,driver=null-co,media=cdrom: warning: bus=0,unit=0 is deprecated with this machine type
+info block
 scsi0-cd0 (NODE_NAME): null-co:// (null-co, read-only)
     Attached to:      /machine/unattached/device[27]/scsi.0/legacy[0]
     Removable device: not locked, tray closed
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] iotests: Fix test 156
  2017-07-25 15:56 ` [Qemu-devel] [PATCH 1/2] iotests: Fix test 156 Max Reitz
@ 2017-07-25 17:26   ` Eric Blake
  2017-07-26 22:19   ` Jeff Cody
  1 sibling, 0 replies; 8+ messages in thread
From: Eric Blake @ 2017-07-25 17:26 UTC (permalink / raw)
  To: Max Reitz, qemu-block; +Cc: qemu-devel, Kevin Wolf

[-- Attachment #1: Type: text/plain, Size: 1028 bytes --]

On 07/25/2017 10:56 AM, Max Reitz wrote:
> On one hand, the _make_test_img invocation for creating the target image
> was missing a -u because its backing file is not supposed to exist at
> that point.
> 
> On the other hand, nobody noticed probably because the backing file is
> created later on and _cleanup failed to remove it: The quotation marks
> were misplaced so bash tried to deleted a file literally called

s/deleted/delete/

> "$TEST_IMG{,.target}..." instead of resolving the globs.  Thus, the

Technically brace expansion, not globs.

> files stayed around after the first run and qemu-img create did not
> complain about a missing backing file on any run but the first.
> 
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
>  tests/qemu-iotests/156 | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH 2/2] iotests: Redirect stderr to stdout in 186
  2017-07-25 15:56 ` [Qemu-devel] [PATCH 2/2] iotests: Redirect stderr to stdout in 186 Max Reitz
@ 2017-07-25 17:50   ` Eric Blake
  2017-07-26 22:20   ` Jeff Cody
  1 sibling, 0 replies; 8+ messages in thread
From: Eric Blake @ 2017-07-25 17:50 UTC (permalink / raw)
  To: Max Reitz, qemu-block; +Cc: qemu-devel, Kevin Wolf

[-- Attachment #1: Type: text/plain, Size: 680 bytes --]

On 07/25/2017 10:56 AM, Max Reitz wrote:
> Without redirecting qemu's stderr to stdout, _filter_qemu will not apply
> to warnings.  This results in $QEMU_PROG not being replaced by QEMU_PROG
> which is not great if your qemu executable is not called
> qemu-system-x86_64 (e.g. qemu-system-i386).
> 
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
>  tests/qemu-iotests/186     |  2 +-
>  tests/qemu-iotests/186.out | 12 ++++++------
>  2 files changed, 7 insertions(+), 7 deletions(-)

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] iotests: Fix test 156
  2017-07-25 15:56 ` [Qemu-devel] [PATCH 1/2] iotests: Fix test 156 Max Reitz
  2017-07-25 17:26   ` Eric Blake
@ 2017-07-26 22:19   ` Jeff Cody
  1 sibling, 0 replies; 8+ messages in thread
From: Jeff Cody @ 2017-07-26 22:19 UTC (permalink / raw)
  To: Max Reitz; +Cc: qemu-block, Kevin Wolf, qemu-devel

On Tue, Jul 25, 2017 at 05:56:43PM +0200, Max Reitz wrote:
> On one hand, the _make_test_img invocation for creating the target image
> was missing a -u because its backing file is not supposed to exist at
> that point.
> 
> On the other hand, nobody noticed probably because the backing file is
> created later on and _cleanup failed to remove it: The quotation marks
> were misplaced so bash tried to deleted a file literally called
> "$TEST_IMG{,.target}..." instead of resolving the globs.  Thus, the
> files stayed around after the first run and qemu-img create did not
> complain about a missing backing file on any run but the first.
> 
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
>  tests/qemu-iotests/156 | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/qemu-iotests/156 b/tests/qemu-iotests/156
> index 2c4a06e..e75dc4d 100755
> --- a/tests/qemu-iotests/156
> +++ b/tests/qemu-iotests/156
> @@ -38,7 +38,7 @@ status=1	# failure is the default!
>  _cleanup()
>  {
>      _cleanup_qemu
> -    rm -f "$TEST_IMG{,.target}{,.backing,.overlay}"
> +    rm -f "$TEST_IMG"{,.target}{,.backing,.overlay}
>  }
>  trap "_cleanup; exit \$status" 0 1 2 3 15
>  
> @@ -83,7 +83,7 @@ _send_qemu_cmd $QEMU_HANDLE \
>      'return'
>  
>  # Create target image
> -TEST_IMG="$TEST_IMG.target.overlay" _make_test_img -b "$TEST_IMG.target" 1M
> +TEST_IMG="$TEST_IMG.target.overlay" _make_test_img -u -b "$TEST_IMG.target" 1M
>  
>  # Mirror snapshot
>  _send_qemu_cmd $QEMU_HANDLE \
> -- 
> 2.9.4
> 
> 

Reviewed-by: Jeff Cody <jcody@redhat.com>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH 2/2] iotests: Redirect stderr to stdout in 186
  2017-07-25 15:56 ` [Qemu-devel] [PATCH 2/2] iotests: Redirect stderr to stdout in 186 Max Reitz
  2017-07-25 17:50   ` Eric Blake
@ 2017-07-26 22:20   ` Jeff Cody
  1 sibling, 0 replies; 8+ messages in thread
From: Jeff Cody @ 2017-07-26 22:20 UTC (permalink / raw)
  To: Max Reitz; +Cc: qemu-block, Kevin Wolf, qemu-devel

On Tue, Jul 25, 2017 at 05:56:44PM +0200, Max Reitz wrote:
> Without redirecting qemu's stderr to stdout, _filter_qemu will not apply
> to warnings.  This results in $QEMU_PROG not being replaced by QEMU_PROG
> which is not great if your qemu executable is not called
> qemu-system-x86_64 (e.g. qemu-system-i386).
> 
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
>  tests/qemu-iotests/186     |  2 +-
>  tests/qemu-iotests/186.out | 12 ++++++------
>  2 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/tests/qemu-iotests/186 b/tests/qemu-iotests/186
> index ab83ee4..2b9f618 100755
> --- a/tests/qemu-iotests/186
> +++ b/tests/qemu-iotests/186
> @@ -56,7 +56,7 @@ function do_run_qemu()
>              done
>          fi
>          echo quit
> -    ) | $QEMU -S -nodefaults -display none -device virtio-scsi-pci -monitor stdio "$@"
> +    ) | $QEMU -S -nodefaults -display none -device virtio-scsi-pci -monitor stdio "$@" 2>&1
>      echo
>  }
>  
> diff --git a/tests/qemu-iotests/186.out b/tests/qemu-iotests/186.out
> index b8bf9a2..c8377fe 100644
> --- a/tests/qemu-iotests/186.out
> +++ b/tests/qemu-iotests/186.out
> @@ -442,28 +442,28 @@ ide0-cd0 (NODE_NAME): null-co:// (null-co, read-only)
>      Cache mode:       writeback
>  (qemu) quit
>  
> -qemu-system-x86_64: -drive if=scsi,driver=null-co: warning: bus=0,unit=0 is deprecated with this machine type
>  Testing: -drive if=scsi,driver=null-co
>  QEMU X.Y.Z monitor - type 'help' for more information
> -(qemu) info block
> +(qemu) QEMU_PROG: -drive if=scsi,driver=null-co: warning: bus=0,unit=0 is deprecated with this machine type
> +info block
>  scsi0-hd0 (NODE_NAME): null-co:// (null-co)
>      Attached to:      /machine/unattached/device[27]/scsi.0/legacy[0]
>      Cache mode:       writeback
>  (qemu) quit
>  
> -qemu-system-x86_64: -drive if=scsi,media=cdrom: warning: bus=0,unit=0 is deprecated with this machine type
>  Testing: -drive if=scsi,media=cdrom
>  QEMU X.Y.Z monitor - type 'help' for more information
> -(qemu) info block
> +(qemu) QEMU_PROG: -drive if=scsi,media=cdrom: warning: bus=0,unit=0 is deprecated with this machine type
> +info block
>  scsi0-cd0: [not inserted]
>      Attached to:      /machine/unattached/device[27]/scsi.0/legacy[0]
>      Removable device: not locked, tray closed
>  (qemu) quit
>  
> -qemu-system-x86_64: -drive if=scsi,driver=null-co,media=cdrom: warning: bus=0,unit=0 is deprecated with this machine type
>  Testing: -drive if=scsi,driver=null-co,media=cdrom
>  QEMU X.Y.Z monitor - type 'help' for more information
> -(qemu) info block
> +(qemu) QEMU_PROG: -drive if=scsi,driver=null-co,media=cdrom: warning: bus=0,unit=0 is deprecated with this machine type
> +info block
>  scsi0-cd0 (NODE_NAME): null-co:// (null-co, read-only)
>      Attached to:      /machine/unattached/device[27]/scsi.0/legacy[0]
>      Removable device: not locked, tray closed
> -- 
> 2.9.4
> 
> 

Reviewed-by: Jeff Cody <jcody@redhat.com>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH 0/2] iotests: Fixes to 156 and 186
  2017-07-25 15:56 [Qemu-devel] [PATCH 0/2] iotests: Fixes to 156 and 186 Max Reitz
  2017-07-25 15:56 ` [Qemu-devel] [PATCH 1/2] iotests: Fix test 156 Max Reitz
  2017-07-25 15:56 ` [Qemu-devel] [PATCH 2/2] iotests: Redirect stderr to stdout in 186 Max Reitz
@ 2017-07-27 12:24 ` Kevin Wolf
  2 siblings, 0 replies; 8+ messages in thread
From: Kevin Wolf @ 2017-07-27 12:24 UTC (permalink / raw)
  To: Max Reitz; +Cc: qemu-block, qemu-devel, Eric Blake

Am 25.07.2017 um 17:56 hat Max Reitz geschrieben:
> This series contains some small fixes for issues I stumbled upon when
> preparing my pull request.

Thanks, applied to the block branch.

Kevin

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-07-27 12:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-25 15:56 [Qemu-devel] [PATCH 0/2] iotests: Fixes to 156 and 186 Max Reitz
2017-07-25 15:56 ` [Qemu-devel] [PATCH 1/2] iotests: Fix test 156 Max Reitz
2017-07-25 17:26   ` Eric Blake
2017-07-26 22:19   ` Jeff Cody
2017-07-25 15:56 ` [Qemu-devel] [PATCH 2/2] iotests: Redirect stderr to stdout in 186 Max Reitz
2017-07-25 17:50   ` Eric Blake
2017-07-26 22:20   ` Jeff Cody
2017-07-27 12:24 ` [Qemu-devel] [PATCH 0/2] iotests: Fixes to 156 and 186 Kevin Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).