From: Luis Chamberlain <mcgrof@kernel.org>
To: shinichiro.kawasaki@wdc.com, martin.wilck@suse.com
Cc: linux-block@vger.kernel.org, patches@lists.linux.dev,
gost.dev@samsung.com, mcgrof@kernel.org
Subject: [PATCH blktests] nvme/053: provide time extension alternative
Date: Wed, 18 Dec 2024 03:13:40 -0800 [thread overview]
Message-ID: <20241218111340.3912034-1-mcgrof@kernel.org> (raw)
I get this failure when I run this test:
awk: ...rescan.awk:2: warning: The time extension is obsolete.
Use the timex extension from gawkextlib
I can't find this extension either, so just use systime() and
use system(sleep) for the sleep command.
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
tests/nvme/053 | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/tests/nvme/053 b/tests/nvme/053
index 3ade8d368be6..65a7b86519bc 100755
--- a/tests/nvme/053
+++ b/tests/nvme/053
@@ -27,13 +27,14 @@ rescan_controller() {
create_rescan_script() {
cat >"$TMPDIR/rescan.awk" <<EOF
-@load "time"
-
BEGIN {
srand(seed);
- finish = gettimeofday() + strtonum(timeout);
- while (gettimeofday() < finish) {
- sleep(0.1 + 5 * rand());
+ start_time = systime();
+ finish = start_time + strtonum(timeout);
+ while (systime() < finish) {
+ sleep_time = 0.1 + 5 * rand();
+ cmd = "sleep " sleep_time;
+ system(cmd);
printf("1\n") > path;
close(path);
}
--
2.43.0
next reply other threads:[~2024-12-18 11:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-18 11:13 Luis Chamberlain [this message]
2024-12-20 11:37 ` [PATCH blktests] nvme/053: provide time extension alternative Shinichiro Kawasaki
2025-01-04 4:05 ` Luis Chamberlain
2025-01-08 20:12 ` Martin Wilck
2025-01-16 7:17 ` Shinichiro Kawasaki
2025-01-08 20:37 ` Martin Wilck
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=20241218111340.3912034-1-mcgrof@kernel.org \
--to=mcgrof@kernel.org \
--cc=gost.dev@samsung.com \
--cc=linux-block@vger.kernel.org \
--cc=martin.wilck@suse.com \
--cc=patches@lists.linux.dev \
--cc=shinichiro.kawasaki@wdc.com \
/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