Message ID | 20220318203655.676907-11-jsnow@redhat.com |
---|---|
State | New |
Headers | show |
Series | iotests: add enhanced debugging info to qemu-io failures | expand |
On Fri, Mar 18, 2022 at 04:36:50PM -0400, John Snow wrote: > (Merge with prior patch.) > > Signed-off-by: John Snow <jsnow@redhat.com> > --- > tests/qemu-iotests/242 | 2 +- > tests/qemu-iotests/245 | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > Okay, now that I've looked at the fixups, and played a bit more with applying the patches locally to this point, you can give the squashed patch: Reviewed-by: Eric Blake <eblake@redhat.com> Tested-by: Eric Blake <eblake@redhat.com>
On 18.03.22 21:36, John Snow wrote: > (Merge with prior patch.) > > Signed-off-by: John Snow <jsnow@redhat.com> > --- > tests/qemu-iotests/242 | 2 +- > tests/qemu-iotests/245 | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tests/qemu-iotests/242 b/tests/qemu-iotests/242 > index 4b7ec16af6..ecc851582a 100755 > --- a/tests/qemu-iotests/242 > +++ b/tests/qemu-iotests/242 > @@ -22,7 +22,7 @@ > import iotests > import json > import struct > -from iotests import qemu_img_create, qemu_io, qemu_img_info, \ > +from iotests import qemu_img_create, qemu_io_log, qemu_img_info, \ > file_path, img_info_log, log, filter_qemu_io > > iotests.script_initialize(supported_fmts=['qcow2'], > diff --git a/tests/qemu-iotests/245 b/tests/qemu-iotests/245 > index 8cbed7821b..efdad1a0c4 100755 > --- a/tests/qemu-iotests/245 > +++ b/tests/qemu-iotests/245 > @@ -217,7 +217,7 @@ class TestBlockdevReopen(iotests.QMPTestCase): > # Reopen an image several times changing some of its options > def test_reopen(self): > # Check whether the filesystem supports O_DIRECT > - if 'O_DIRECT' in qemu_io('-f', 'raw', '-t', 'none', '-c', 'quit', hd_path[0]): > + if 'O_DIRECT' in qemu_io('-f', 'raw', '-t', 'none', '-c', 'quit', hd_path[0]).stdout: This is to verify that O_DIRECT works or not. If it doesn’t work, this will fail, so we need to pass check=False here. (Or this test fails on tmpfs.) Hanna > supports_direct = False > else: > supports_direct = True
On Tue, Mar 22, 2022, 12:30 PM Hanna Reitz <hreitz@redhat.com> wrote: > On 18.03.22 21:36, John Snow wrote: > > (Merge with prior patch.) > > > > Signed-off-by: John Snow <jsnow@redhat.com> > > --- > > tests/qemu-iotests/242 | 2 +- > > tests/qemu-iotests/245 | 2 +- > > 2 files changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/tests/qemu-iotests/242 b/tests/qemu-iotests/242 > > index 4b7ec16af6..ecc851582a 100755 > > --- a/tests/qemu-iotests/242 > > +++ b/tests/qemu-iotests/242 > > @@ -22,7 +22,7 @@ > > import iotests > > import json > > import struct > > -from iotests import qemu_img_create, qemu_io, qemu_img_info, \ > > +from iotests import qemu_img_create, qemu_io_log, qemu_img_info, \ > > file_path, img_info_log, log, filter_qemu_io > > > > iotests.script_initialize(supported_fmts=['qcow2'], > > diff --git a/tests/qemu-iotests/245 b/tests/qemu-iotests/245 > > index 8cbed7821b..efdad1a0c4 100755 > > --- a/tests/qemu-iotests/245 > > +++ b/tests/qemu-iotests/245 > > @@ -217,7 +217,7 @@ class TestBlockdevReopen(iotests.QMPTestCase): > > # Reopen an image several times changing some of its options > > def test_reopen(self): > > # Check whether the filesystem supports O_DIRECT > > - if 'O_DIRECT' in qemu_io('-f', 'raw', '-t', 'none', '-c', > 'quit', hd_path[0]): > > + if 'O_DIRECT' in qemu_io('-f', 'raw', '-t', 'none', '-c', > 'quit', hd_path[0]).stdout: > > This is to verify that O_DIRECT works or not. If it doesn’t work, this > will fail, so we need to pass check=False here. > > (Or this test fails on tmpfs.) > > Hanna > Oh, I didn't realize a solitary "quit" command could still fail. Thanks for the tip.
On 22.03.22 17:36, John Snow wrote: > > > On Tue, Mar 22, 2022, 12:30 PM Hanna Reitz <hreitz@redhat.com> wrote: > > On 18.03.22 21:36, John Snow wrote: > > (Merge with prior patch.) > > > > Signed-off-by: John Snow <jsnow@redhat.com> > > --- > > tests/qemu-iotests/242 | 2 +- > > tests/qemu-iotests/245 | 2 +- > > 2 files changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/tests/qemu-iotests/242 b/tests/qemu-iotests/242 > > index 4b7ec16af6..ecc851582a 100755 > > --- a/tests/qemu-iotests/242 > > +++ b/tests/qemu-iotests/242 > > @@ -22,7 +22,7 @@ > > import iotests > > import json > > import struct > > -from iotests import qemu_img_create, qemu_io, qemu_img_info, \ > > +from iotests import qemu_img_create, qemu_io_log, qemu_img_info, \ > > file_path, img_info_log, log, filter_qemu_io > > > > iotests.script_initialize(supported_fmts=['qcow2'], > > diff --git a/tests/qemu-iotests/245 b/tests/qemu-iotests/245 > > index 8cbed7821b..efdad1a0c4 100755 > > --- a/tests/qemu-iotests/245 > > +++ b/tests/qemu-iotests/245 > > @@ -217,7 +217,7 @@ class TestBlockdevReopen(iotests.QMPTestCase): > > # Reopen an image several times changing some of its options > > def test_reopen(self): > > # Check whether the filesystem supports O_DIRECT > > - if 'O_DIRECT' in qemu_io('-f', 'raw', '-t', 'none', > '-c', 'quit', hd_path[0]): > > + if 'O_DIRECT' in qemu_io('-f', 'raw', '-t', 'none', > '-c', 'quit', hd_path[0]).stdout: > > This is to verify that O_DIRECT works or not. If it doesn’t work, > this > will fail, so we need to pass check=False here. > > (Or this test fails on tmpfs.) > > Hanna > > > Oh, I didn't realize a solitary "quit" command could still fail. > Thanks for the tip. > What’s being tested is the implicit `open`. :) Hanna
On Fri, Mar 18, 2022 at 4:37 PM John Snow <jsnow@redhat.com> wrote: > > (Merge with prior patch.) > > Signed-off-by: John Snow <jsnow@redhat.com> > --- > tests/qemu-iotests/242 | 2 +- ^ Oh, there's the stray import changes that needed to be folded into patch #1. Fixed for v2.
diff --git a/tests/qemu-iotests/242 b/tests/qemu-iotests/242 index 4b7ec16af6..ecc851582a 100755 --- a/tests/qemu-iotests/242 +++ b/tests/qemu-iotests/242 @@ -22,7 +22,7 @@ import iotests import json import struct -from iotests import qemu_img_create, qemu_io, qemu_img_info, \ +from iotests import qemu_img_create, qemu_io_log, qemu_img_info, \ file_path, img_info_log, log, filter_qemu_io iotests.script_initialize(supported_fmts=['qcow2'], diff --git a/tests/qemu-iotests/245 b/tests/qemu-iotests/245 index 8cbed7821b..efdad1a0c4 100755 --- a/tests/qemu-iotests/245 +++ b/tests/qemu-iotests/245 @@ -217,7 +217,7 @@ class TestBlockdevReopen(iotests.QMPTestCase): # Reopen an image several times changing some of its options def test_reopen(self): # Check whether the filesystem supports O_DIRECT - if 'O_DIRECT' in qemu_io('-f', 'raw', '-t', 'none', '-c', 'quit', hd_path[0]): + if 'O_DIRECT' in qemu_io('-f', 'raw', '-t', 'none', '-c', 'quit', hd_path[0]).stdout: supports_direct = False else: supports_direct = True
(Merge with prior patch.) Signed-off-by: John Snow <jsnow@redhat.com> --- tests/qemu-iotests/242 | 2 +- tests/qemu-iotests/245 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)