QEMU-Devel Archive on lore.kernel.org
 help / color / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Max Reitz <mreitz@redhat.com>, qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH 00/23] iotests: Add and use $SOCK_DIR
Date: Fri, 11 Oct 2019 09:27:15 +0200
Message-ID: <5f346ee9-9ffe-7290-eb0e-50d2ab28d363@redhat.com> (raw)
In-Reply-To: <20191010152457.17713-1-mreitz@redhat.com>

On 10/10/2019 17.24, Max Reitz wrote:
> Hi,
> 
> Perhaps the main reason we cannot run important tests such as 041 in CI
> is that when they care Unix sockets in $TEST_DIR, the path may become
> too long to connect to them.
> 
> To get by this problem, this series lets the check script create a new
> temporary directory (mktemp -d) and then makes the iotests use it for
> all Unix sockets.

Thanks a lot for tackling this!

I gave it a try, and most tests work fine now indeed when I run them in
a directory with a veeeery long file name.

I still get an error with 028 though:


$ ./check -qcow2 028
QEMU          --
"/home/thuth/tmp/qemu-with-very-long-directory-name-01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789/tests/qemu-iotests/../../x86_64-softmmu/qemu-system-x86_64"
-nodefaults -display none -machine accel=qtest
QEMU_IMG      --
"/home/thuth/tmp/qemu-with-very-long-directory-name-01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789/tests/qemu-iotests/../../qemu-img"

QEMU_IO       --
"/home/thuth/tmp/qemu-with-very-long-directory-name-01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789/tests/qemu-iotests/../../qemu-io"
 --cache writeback -f qcow2
QEMU_NBD      --
"/home/thuth/tmp/qemu-with-very-long-directory-name-01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789/tests/qemu-iotests/../../qemu-nbd"

IMGFMT        -- qcow2 (compat=1.1)
IMGPROTO      -- file
PLATFORM      -- Linux/x86_64 thuth 4.18.0-80.11.2.el8_0.x86_64
TEST_DIR      --
/home/thuth/tmp/qemu-with-very-long-directory-name-01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789/tests/qemu-iotests/scratch
SOCK_DIR      -- /tmp/tmp.YEmubpCxRH
SOCKET_SCM_HELPER --
/home/thuth/tmp/qemu-with-very-long-directory-name-01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789/tests/qemu-iotests/socket_scm_helper

028      fail       [09:11:52] [09:11:53]                    output
mismatch (see 028.out.bad)
--- /home/thuth/devel/qemu/tests/qemu-iotests/028.out	2019-08-16
18:00:39.258741027 +0200
+++
/home/thuth/tmp/qemu-with-very-long-directory-name-01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789/tests/qemu-iotests/028.out.bad
2019-10-11 09:11:53.822111901 +0200
@@ -468,7 +468,8 @@

 block-backup

-Formatting 'TEST_DIR/t.IMGFMT.copy', fmt=IMGFMT size=4294968832
backing_file=TEST_DIR/t.IMGFMT.base backing_fmt=IMGFMT
+(qemu)
+Timeout waiting for Formatting on handle 0
 (qemu) info block-jobs
 No active jobs
 === IO: pattern 195
Failures: 028
Failed 1 of 1 iotests


028 works fine if I start it from a directory with a short filename.


I also saw an error with "./check -raw 055" once, but it does not seem
to be reproducible:


055      fail       [09:08:28] [09:10:57]                    output
mismatch (see 055.out.bad)
--- /home/thuth/devel/qemu/tests/qemu-iotests/055.out	2019-08-16
18:00:39.262741079 +0200
+++
/home/thuth/tmp/qemu-with-very-long-directory-name-01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789/tests/qemu-iotests/055.out.bad
2019-10-11 09:10:57.059254617 +0200
@@ -1,5 +1,35 @@
-..............................
+WARNING:qemu.machine:qemu received signal 9:
/home/thuth/tmp/qemu-with-very-long-directory-name-01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789/tests/qemu-iotests/../../x86_64-softmmu/qemu-system-x86_64
-chardev socket,id=mon,path=/tmp/tmp.3mKmQDU7Ft/qemu-24878-monitor.sock
-mon chardev=mon,mode=control -display none -vga none -qtest
unix:path=/tmp/tmp.3mKmQDU7Ft/qemu-24878-qtest.sock -accel qtest
-nodefaults -display none -machine accel=qtest -drive
if=virtio,id=drive0,file=blkdebug::/home/thuth/tmp/qemu-with-very-long-directory-name-01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789/tests/qemu-iotests/scratch/test.img,format=raw,cache=writeback
-drive
if=none,id=drive1,file=/home/thuth/tmp/qemu-with-very-long-directory-name-01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789/tests/qemu-iotests/scratch/blockdev-target.img,format=vmdk,cache=writeback
+E.............................
+======================================================================
+ERROR: test_complete_compress_blockdev_backup
(__main__.TestDriveCompression)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File
"/home/thuth/devel/qemu/tests/qemu-iotests/../../python/qemu/qmp.py",
line 122, in __get_events
+    ret = self.__json_read(only_event=True)
+  File
"/home/thuth/devel/qemu/tests/qemu-iotests/../../python/qemu/qmp.py",
line 82, in __json_read
+    data = self.__sockfile.readline()
+  File "/usr/lib64/python3.6/socket.py", line 586, in readinto
+    return self._sock.recv_into(b)
+socket.timeout: timed out
+
+During handling of the above exception, another exception occurred:
+
+Traceback (most recent call last):
+  File "055", line 499, in test_complete_compress_blockdev_backup
+    target='drive1')
+  File "055", line 484, in do_test_compress_complete
+    self.wait_until_completed()
+  File "/home/thuth/devel/qemu/tests/qemu-iotests/iotests.py", line
751, in wait_until_completed
+    for event in self.vm.get_qmp_events(wait=wait):
+  File
"/home/thuth/devel/qemu/tests/qemu-iotests/../../python/qemu/machine.py", line
406, in get_qmp_events
+    events = self._qmp.get_events(wait=wait)
+  File
"/home/thuth/devel/qemu/tests/qemu-iotests/../../python/qemu/qmp.py",
line 236, in get_events
+    self.__get_events(wait)
+  File
"/home/thuth/devel/qemu/tests/qemu-iotests/../../python/qemu/qmp.py",
line 124, in __get_events
+    raise QMPTimeoutError("Timeout waiting for event")
+qemu.qmp.QMPTimeoutError: Timeout waiting for event
+
 ----------------------------------------------------------------------
 Ran 30 tests

-OK
+FAILED (errors=1)

 Thomas


  parent reply index

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10 15:24 Max Reitz
2019-10-10 15:24 ` [PATCH 01/23] iotests: Introduce $SOCK_DIR Max Reitz
2019-10-10 18:18   ` Eric Blake
2019-10-11  7:51     ` Max Reitz
2019-10-10 15:24 ` [PATCH 02/23] iotests.py: Store socket files in $SOCK_DIR Max Reitz
2019-10-10 18:36   ` Eric Blake
2019-10-11  7:21   ` Thomas Huth
2019-10-10 15:24 ` [PATCH 03/23] iotests.py: Add @base_dir to FilePaths etc Max Reitz
2019-10-10 18:40   ` Eric Blake
2019-10-10 15:24 ` [PATCH 04/23] iotests: Filter $SOCK_DIR Max Reitz
2019-10-10 18:42   ` Eric Blake
2019-10-11  7:54     ` Max Reitz
2019-10-11  7:57       ` Thomas Huth
2019-10-10 19:50   ` Eric Blake
2019-10-11  7:57     ` Max Reitz
2019-10-10 15:24 ` [PATCH 05/23] iotests: Let common.nbd create socket in $SOCK_DIR Max Reitz
2019-10-10 18:59   ` Eric Blake
2019-10-10 15:24 ` [PATCH 06/23] iotests/083: Create " Max Reitz
2019-10-10 19:03   ` Eric Blake
2019-10-11  7:31   ` Thomas Huth
2019-10-10 15:24 ` [PATCH 07/23] iotests/140: " Max Reitz
2019-10-10 19:05   ` Eric Blake
2019-10-11  7:34   ` Thomas Huth
2019-10-10 15:24 ` [PATCH 08/23] iotests/143: " Max Reitz
2019-10-10 19:23   ` Eric Blake
2019-10-11  7:35   ` Thomas Huth
2019-10-10 15:24 ` [PATCH 09/23] iotests/147: " Max Reitz
2019-10-10 19:23   ` Eric Blake
2019-10-11  7:36   ` Thomas Huth
2019-10-10 15:24 ` [PATCH 10/23] iotests/181: " Max Reitz
2019-10-10 19:24   ` Eric Blake
2019-10-11  7:38   ` Thomas Huth
2019-10-10 15:24 ` [PATCH 11/23] iotests/182: " Max Reitz
2019-10-10 19:24   ` Eric Blake
2019-10-11  7:38   ` Thomas Huth
2019-10-10 15:24 ` [PATCH 12/23] iotests/183: " Max Reitz
2019-10-10 19:28   ` Eric Blake
2019-10-11  7:42   ` Thomas Huth
2019-10-10 15:24 ` [PATCH 13/23] iotests/192: " Max Reitz
2019-10-10 19:28   ` Eric Blake
2019-10-10 15:24 ` [PATCH 14/23] iotests/194: Create sockets " Max Reitz
2019-10-10 19:32   ` Eric Blake
2019-10-10 19:43   ` Eric Blake
2019-10-11  7:55     ` Max Reitz
2019-10-10 15:24 ` [PATCH 15/23] iotests/201: Create socket " Max Reitz
2019-10-10 19:39   ` Eric Blake
2019-10-10 15:24 ` [PATCH 16/23] iotests/205: " Max Reitz
2019-10-10 19:40   ` Eric Blake
2019-10-10 15:24 ` [PATCH 17/23] iotests/208: " Max Reitz
2019-10-10 19:41   ` Eric Blake
2019-10-10 15:24 ` [PATCH 18/23] iotests/209: " Max Reitz
2019-10-10 19:44   ` Eric Blake
2019-10-10 15:24 ` [PATCH 19/23] iotests/222: " Max Reitz
2019-10-10 19:45   ` Eric Blake
2019-10-10 15:24 ` [PATCH 20/23] iotests/223: " Max Reitz
2019-10-10 19:46   ` Eric Blake
2019-10-10 15:24 ` [PATCH 21/23] iotests/240: " Max Reitz
2019-10-10 19:46   ` Eric Blake
2019-10-10 15:24 ` [PATCH 22/23] iotests/267: " Max Reitz
2019-10-10 19:47   ` Eric Blake
2019-10-10 15:24 ` [PATCH 23/23] iotests: Drop TEST_DIR filter from _filter_nbd Max Reitz
2019-10-10 19:51   ` Eric Blake
2019-10-11  7:27 ` Thomas Huth [this message]
2019-10-11  8:03   ` [PATCH 00/23] iotests: Add and use $SOCK_DIR Max Reitz
2019-10-11  8:13     ` Thomas Huth
2019-10-11  8:54   ` Max Reitz

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5f346ee9-9ffe-7290-eb0e-50d2ab28d363@redhat.com \
    --to=thuth@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

QEMU-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/qemu-devel/0 qemu-devel/git/0.git
	git clone --mirror https://lore.kernel.org/qemu-devel/1 qemu-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 qemu-devel qemu-devel/ https://lore.kernel.org/qemu-devel \
		qemu-devel@nongnu.org
	public-inbox-index qemu-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.nongnu.qemu-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git