Archive-only list for patches
 help / color / mirror / Atom feed
* [PATCH blktests] nvme/053: provide time extension alternative
@ 2024-12-18 11:13 Luis Chamberlain
  2024-12-20 11:37 ` Shinichiro Kawasaki
  2025-01-08 20:37 ` Martin Wilck
  0 siblings, 2 replies; 6+ messages in thread
From: Luis Chamberlain @ 2024-12-18 11:13 UTC (permalink / raw)
  To: shinichiro.kawasaki, martin.wilck; +Cc: linux-block, patches, gost.dev, mcgrof

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


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

end of thread, other threads:[~2025-01-16  7:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-18 11:13 [PATCH blktests] nvme/053: provide time extension alternative Luis Chamberlain
2024-12-20 11:37 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox