[Automated-testing] Functional.logrotate use of ntpdate

Wang, Mingyu wangmy at cn.fujitsu.com
Tue Nov 19 17:56:15 PST 2019


Hi Tim,

Indeed, in this test, ntpdate is not required, and it will cause some problems. 

So I have deleted the test of ntpdate and I will submit the change.

--Wang

-----Original Message-----
From: Tim.Bird at sony.com [mailto:Tim.Bird at sony.com] 
Sent: Tuesday, November 19, 2019 9:56 PM
To: Wang, Mingyu/王 鸣瑜 <wangmy at cn.fujitsu.com>
Cc: automated-testing at yoctoproject.org
Subject: Functional.logrotate use of ntpdate

Wang,

I was trying to test Functional.logrotate in my lab, and ran into some difficulties.
The sub-test tests/logrotate_rotation.sh uses ntpdate, and there is an 'assert_has_program ntpdate' in fuego_test.sh.

I have a few machines in my lab that have logrotate, but not ntpdate.
Because of the assertion, and the use of ntpdate, I can't run this test.

What is ntpdate being used for in logrotate_rotations.sh?

It's not clear.  it is used with $test_host, which is set from $SRV_IP in fuego_test.sh.  Does this imply that the Fuego host is supposed to act as an ntp host?  I don't know if that's going to be true or not.  Are most Linux machine's ntp hosts by default?  Is this a normal thing?

It looks like maybe this is to synchronize the time between the host and the target.  I'm not sure why this is needed.  Also, if a test changes the date and time on a target board, it should restore the original date and time when it completes.  The goal of every test is to leave the system in the same (or as close to the same) condition as when it started.  I have a few boards that don't have realtime clocks, and so always start with a date of Janary 1, 2000 (or something like that).
It's probably uncommon for a machine to act weirdly when configured with the correct time, but there are time-based operations which might be disturbed if there are big jumps in system time, or if system time on a board is wildly different for one set of tests versus another.

Based on my current understanding, I'm inclined to just remove the call to ntpdate (and the related assert_has_program), but let me know what you think.
 -- Tim










More information about the automated-testing mailing list