From bfb490799e72406cc4831e440f5536da3620850d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Mon, 24 Mar 2025 11:52:15 +0000 Subject: [PATCH] support/testing: make time setting portable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The busybox date applet accepts the following: date @1234567 but this confuses the coreutils version which doesn't implicitly set time. As some tests might need coreutils binaries we should ensure the emulator login will work with both. Fix this by passing the -s (set) option to the command. Signed-off-by: Alex Bennée Signed-off-by: Julien Olivain --- support/testing/infra/emulator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/testing/infra/emulator.py b/support/testing/infra/emulator.py index 9be1143944..3702ee2d48 100644 --- a/support/testing/infra/emulator.py +++ b/support/testing/infra/emulator.py @@ -153,7 +153,7 @@ class Emulator(object): self.connect_shell() - output, exit_code = self.run(f"date @{int(time.time())}") + output, exit_code = self.run(f"date -s @{int(time.time())}") if exit_code: raise SystemError("Cannot set date in virtual machine")