runInLinuxVM: remove hwclock -s invocation

Commit 97ed6b4565 broke the systemd-boot
tests (among others) because of the `hwclock -s` invocation. This was
broken for a while, but not noticed because we didn't have a `set -e`
before.

The error

    hwclock: select() to /dev/rtc0 to wait for clock tick timed out

MAY be related to an open QEMU bug[1]: I can't reproduce the error on
aarch64-linux and x86_64-linux with `partitionTableType = "legacy";`.
Also, the issue disappears on x86_64-linux when adding `--directisa`.

However, the invocation was added in f73ff0529e
10 years ago which didn't give any reasoning or pointer to what KVM bug
this may be. Given that this must have happened on an ancient version,
we agreed on removing it altogether[2].

[1] https://gitlab.com/qemu-project/qemu/-/issues/1762
[2] https://github.com/NixOS/nixpkgs/pull/354535#issuecomment-2500791222
This commit is contained in:
Maximilian Bosch
2024-11-26 15:51:11 +01:00
parent 096ede7f2b
commit 6f3d8a72ea
-4
View File
@@ -176,10 +176,6 @@ rec {
fi
source $stdenv/setup
# Set the system time from the hardware clock. Works around an
# apparent KVM > 1.5.2 bug.
${util-linux}/bin/hwclock -s
export NIX_STORE=${storeDir}
export NIX_BUILD_TOP=/tmp
export TMPDIR=/tmp