From 6048cca135c9b40b484ab1f1b36a21fede49cd4e Mon Sep 17 00:00:00 2001 From: Justin M. Forbes Date: Jul 09 2021 16:26:43 +0000 Subject: Disable leap-second on virtualbox guests Signed-off-by: Justin M. Forbes --- diff --git a/default/insert_leap_second/runtest.sh b/default/insert_leap_second/runtest.sh index 54403ac..37d5f03 100755 --- a/default/insert_leap_second/runtest.sh +++ b/default/insert_leap_second/runtest.sh @@ -12,6 +12,17 @@ if [ "$is_root" -ne "0" ]; then exit 3 fi +#VirtualBox syncs time with the host and makes this test fail +if [ ! -f /usr/sbin/dmidecode ]; then + echo "dmidecode was not installed, skipping." + exit 3 +fi +dmi=$(LANG=C /usr/sbin/dmidecode 2>&1) +if echo "$dmi" | grep -q 'Manufacturer: innotek GmbH'; then + echo "This test does not work on Virtualbox guests" + exit 3 +fi + # build the test source (upstream is git://github.com/johnstultz-work/timetests.git) if [ ! -f ./leap-a-day ]; then gcc -o leap-a-day leap-a-day.c