From ea4046a607cddef588b5eb061f1df1e602a497bf Mon Sep 17 00:00:00 2001 From: David Steele Date: Wed, 18 Apr 2018 18:47:43 -0400 Subject: [PATCH] Try tweaking time sync settings to prevent clock drift rather than restarting VBoxService on every test run. --- doc/xml/release.xml | 4 ++++ test/Vagrantfile | 8 +++++--- test/test.pl | 10 ---------- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/doc/xml/release.xml b/doc/xml/release.xml index 98ababade..3052cdc2f 100644 --- a/doc/xml/release.xml +++ b/doc/xml/release.xml @@ -167,6 +167,10 @@

Rename Perl tests so they don't conflict with their C counterparts.

+ + +

Try tweaking time sync settings to prevent clock drift rather than restarting VBoxService on every test run.

+
diff --git a/test/Vagrantfile b/test/Vagrantfile index 1b8a705d9..86df97cf0 100644 --- a/test/Vagrantfile +++ b/test/Vagrantfile @@ -40,10 +40,12 @@ Vagrant.configure(2) do |config| echo 'supersede domain-name-servers 8.8.8.8;' >> /etc/dhcp/dhclient.conf /etc/init.d/networking restart - # If builds fail with 'modification time in the future', the following command will sync the vm clock with the host + # Set time sync settings so builds don't fail with clock drift errors #--------------------------------------------------------------------------------------------------------------------------- - echo 'Start Time Sync Service' && date - sudo /usr/sbin/VBoxService --timesync-set-start + echo 'Time Sync Settings' && date + /etc/init.d/virtualbox-guest-utils stop + /usr/sbin/VBoxService --timesync-set-on-restore 1 --timesync-interval 5000 --timesync-set-threshold 1 + /etc/init.d/virtualbox-guest-utils start #--------------------------------------------------------------------------------------------------------------------------- echo 'Install Perl Modules' && date diff --git a/test/test.pl b/test/test.pl index 456191514..75c92c87d 100755 --- a/test/test.pl +++ b/test/test.pl @@ -396,16 +396,6 @@ eval exit 0; } - # Sync time to prevent build failures when running on VirtualBox. - &log(INFO, "sync vbox time"); - my $strVBoxService = '/usr/sbin/VBoxService'; - - if ($oStorageTest->exists($strVBoxService)) - { - executeTest("sudo killall VBoxService"); - executeTest("sudo ${strVBoxService} --timesync-set-start"); - } - # Build CI configuration if (!$bNoCiConfig) {