Skip to content

Commit

Permalink
update comments, documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
noursaidi committed May 9, 2021
1 parent eda9c1c commit b8e7943
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions docker/include/bin/start_faux
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ elif [ -n "${options[bacnetfail]}" ]; then
FauxDeviceEngine.EntryPoint $local_ip $broadcast_ip "Faux-Device-Fail.json" &
fi

# NTPv4 query to the NTP server learnt from DHCP.
# NTPv4 query to the local NTP server
# NTPv3 query to the IP of time.google.com (since resolv.conf is modified by other tests)
if [ -n "${options[ntpv4]}" ]; then
ntp_server=ntp.daqlocal
Expand All @@ -174,7 +174,8 @@ elif [ -n "${options[ntpv3]}" ]; then
done) &
fi

# ntp_pass queries the NTP server learnt from DHCP. ntp_fail sends to time.google.com
# ntp_pass queries the local NTP server by hostname.
# ntp_fail sends to time.google.com
if [ -n "${options[ntp_pass]}" -o -n "${options[ntp_fail]}" ]; then
(while date; do
if [ -n "${options[ntp_pass]}" ]; then
Expand Down
4 changes: 2 additions & 2 deletions docker/include/network/scripts/start_networking
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ subnet=${IP_SUBNET:-$random_subnet}
echo Configuring with subnet 10.20.$subnet.XX
echo dhcp-range=10.20.$subnet.100,10.20.$subnet.254 >> /etc/dnsmasq.conf

# Use ourself as the DNS and NTP server explicitly specified
# Use ourself as the DNS server explicitly specified
ip addr add 10.20.$subnet.2 dev $LOCAL_IF
#echo dhcp-option=6,10.20.$subnet.2 >> /etc/dnsmasq.conf
echo dhcp-option=6,10.20.$subnet.2 >> /etc/dnsmasq.conf

# Define hostname used by NTP clients as the NTP server
echo 10.20.$subnet.2 ntp.daqlocal >> /etc/hosts

if ! ip addr show dev $LOCAL_IF | fgrep -q 'inet '; then
Expand Down
6 changes: 4 additions & 2 deletions subset/network/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ This is an 'info' test, it does not have a pass/fail/skip case.


## NTP Tests
The NTP tests inspect the client NTP version and the device's ability to update its clock precisely.
The NTP tests inspect the client NTP version, the device's ability to update its clock precisely,
and the device's ability to use an NTP server configured by hostname

### Note for test developers
The functional test code is included in the `ntp_tests.py` file.
Expand All @@ -40,7 +41,8 @@ The version of NTP used by the client is extracted from the first client (outbou

#### NTP Update ####
The following criteria are used to determine whether a DUT has synced its clock with the NTP server provided by DAQ:
- A minimum of 2 NTP packets have been exchanged between the DUT and the DAQ-provided NTP server.
- The DUT only queries the NTP server provided by DAQ, which must be configured using setting the server to `ntp.daqlocal`
- A minimum of 2 NTP packets have been exchanged between the DUT and the NTP Server
- A valid NTP poll is present. Consisting of a client-server exchange.
- The calculated offset is less than 0.128 seconds and the final poll does not have a leap indicator of 3 (unsynchronized).

Expand Down

0 comments on commit b8e7943

Please sign in to comment.