]> git.baikalelectronics.ru Git - kernel.git/commit
wireguard: selftests: set fake real time in init
authorJason A. Donenfeld <Jason@zx2c4.com>
Thu, 7 Jul 2022 00:31:52 +0000 (02:31 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 7 Jul 2022 03:04:05 +0000 (20:04 -0700)
commit709b0fd228267790f98726b59dd8f9ba56113099
tree19662199b7474b9d028205189be005bf26979813
parent8dc2507825c77fe021739bf1c1712881c5ab9328
wireguard: selftests: set fake real time in init

Not all platforms have an RTC, and rather than trying to force one into
each, it's much easier to just set a fixed time. This is necessary
because WireGuard's latest handshakes parameter is returned in wallclock
time, and if the system time isn't set, and the system is really fast,
then this returns 0, which trips the test.

Turning this on requires setting CONFIG_COMPAT_32BIT_TIME=y, as musl
doesn't support settimeofday without it.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/wireguard/qemu/arch/arm.config
tools/testing/selftests/wireguard/qemu/arch/armeb.config
tools/testing/selftests/wireguard/qemu/arch/i686.config
tools/testing/selftests/wireguard/qemu/arch/m68k.config
tools/testing/selftests/wireguard/qemu/arch/mips.config
tools/testing/selftests/wireguard/qemu/arch/mipsel.config
tools/testing/selftests/wireguard/qemu/arch/powerpc.config
tools/testing/selftests/wireguard/qemu/init.c