From: "Denis V. Lunev" <den@openvz.org>
To: qemu-devel@nongnu.org, qemu-block@nongnu.org
Cc: den@openvz.org, Kevin Wolf <kwolf@redhat.com>,
Hanna Reitz <hreitz@redhat.com>, Eric Blake <eblake@redhat.com>,
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Subject: [PATCH 1/3] iotests: use TEST_IMG_FILE instead of TEST_IMG in _require_large_file
Date: Wed, 6 Sep 2023 16:09:15 +0200 [thread overview]
Message-ID: <20230906140917.559129-2-den@openvz.org> (raw)
In-Reply-To: <20230906140917.559129-1-den@openvz.org>
We need to check that we are able to create large enough file which is
used as an export base rather than connection URL. Unfortunately, there
are cases when the TEST_IMG_FILE is not defined. We should fallback to
TEST_IMG in that case.
This problem has been detected when running
./check -nbd 5
The test should be able to run while it does not.
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Kevin Wolf <kwolf@redhat.com>
CC: Hanna Reitz <hreitz@redhat.com>
CC: Eric Blake <eblake@redhat.com>
CC: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
---
tests/qemu-iotests/common.rc | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index d145f08201..95c12577dd 100644
--- a/tests/qemu-iotests/common.rc
+++ b/tests/qemu-iotests/common.rc
@@ -979,10 +979,15 @@ _require_drivers()
#
_require_large_file()
{
- if ! truncate --size="$1" "$TEST_IMG"; then
+ if [ -z "$TEST_IMG_FILE" ]; then
+ FILENAME="$TEST_IMG"
+ else
+ FILENAME="$TEST_IMG_FILE"
+ fi
+ if ! truncate --size="$1" "$FILENAME"; then
_notrun "file system on $TEST_DIR does not support large enough files"
fi
- rm "$TEST_IMG"
+ rm "$FILENAME"
}
# Check that a set of devices is available in the QEMU binary
--
2.34.1
next prev parent reply other threads:[~2023-09-06 14:09 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-06 14:09 [PATCH 0/3] separated wanted and unwanted skips in QEMU iotests Denis V. Lunev
2023-09-06 14:09 ` Denis V. Lunev [this message]
2023-09-13 14:56 ` [PATCH 1/3] iotests: use TEST_IMG_FILE instead of TEST_IMG in _require_large_file Eric Blake
2023-09-06 14:09 ` [PATCH 2/3] iotests: improve 'not run' message for nbd-multiconn test Denis V. Lunev
2023-09-12 19:35 ` Vladimir Sementsov-Ogievskiy
2023-09-13 15:09 ` Eric Blake
2023-09-06 14:09 ` [PATCH 3/3] iotests: distinguish 'skipped' and 'not run' states Denis V. Lunev
2023-09-12 20:03 ` Vladimir Sementsov-Ogievskiy
2023-09-12 22:22 ` Denis V. Lunev
2023-09-13 15:36 ` Eric Blake
2023-09-14 14:10 ` Eric Blake
2023-09-14 14:57 ` Denis V. Lunev
2023-09-13 15:47 ` Daniel P. Berrangé
2023-09-13 16:31 ` Eric Blake
2023-09-14 12:28 ` Kevin Wolf
2023-09-14 12:32 ` Peter Maydell
Reply instructions:
You may reply publicly 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=20230906140917.559129-2-den@openvz.org \
--to=den@openvz.org \
--cc=eblake@redhat.com \
--cc=hreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=vsementsov@yandex-team.ru \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).