Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions daq/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,10 @@ def _analyse_and_write_results(self):

# The device overall fails if any result is unexpected
if result_dict["result"] != required_result:
passes = False
if required_result == 'notfail' and result_dict["result"] != 'fail':
pass
else:
passes = False

if result_dict["result"] == 'gone':
gone = True
Expand Down Expand Up @@ -308,7 +311,7 @@ def _write_category_table(self):
total = 0

results = [[0, 0, 0] for _ in range(len(self._expected_headers))]
result = self._NO_REQUIRED # Overall category result
result = self._NO_REQUIRED # Overall category result is n/a if no tests

for test_name, result_dict in self._results.items():
test_info = self._get_test_info(test_name)
Expand All @@ -335,6 +338,9 @@ def _write_category_table(self):
# TODO remove when info tests are removed
if result_dict["result"] == 'info':
result_dict["result"] = 'pass'
elif (result_dict["result"] == 'skip' and
test_info['required'] == 'notfail'):
result = 'pass'
else:
result = "fail"
else:
Expand Down
7 changes: 7 additions & 0 deletions docker/include/bin/start_faux
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,13 @@ if [ -n "${options[ntpv4]}" ]; then
java -jar NTPClient/build/libs/NTPClient-1.0-SNAPSHOT.jar $ntp_server 123 4 > ntp.log
sleep 8
done) &
elif [ -n "${options[ntpv4dns]}" ]; then
ntp_server=ntp.daqlocal
echo Transmitting NTP query to $ntp_server using NTPv4
(while true; do
java -jar NTPClient/build/libs/NTPClient-1.0-SNAPSHOT.jar $ntp_server 123 4 > ntp.log
sleep 8
done) &
elif [ -n "${options[ntpv3]}" ]; then
STATIC_NTP_SERVER=216.239.35.8
echo Transmitting NTP query to $STATIC_NTP_SERVER using NTPv3
Expand Down
19 changes: 13 additions & 6 deletions docs/device_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Overall device result FAIL
|Base|2|FAIL|1/0/1|0/0/0|0/0/0|0/0/0|0/0/0|0/0/0|
|Connection|12|FAIL|3/5/4|0/0/0|0/0/0|0/0/0|0/0/0|0/0/0|
|Security|13|FAIL|2/4/4|0/0/0|0/0/1|0/0/0|0/2/0|0/0/0|
|NTP|2|PASS|2/0/0|0/0/0|0/0/0|0/0/0|0/0/0|0/0/0|
|NTP|3|PASS|2/0/1|0/0/0|0/0/0|0/0/0|0/0/0|0/0/0|
|DNS|1|SKIP|0/0/1|0/0/0|0/0/0|0/0/0|0/0/0|0/0/0|
|Communication|2|PASS|2/0/0|0/0/0|0/0/0|0/0/0|0/0/0|0/0/0|
|Protocol|2|FAIL|0/0/0|0/0/0|0/1/1|0/0/0|0/0/0|0/0/0|
Expand All @@ -64,7 +64,7 @@ Syntax: Pass / Fail / Skip

|Expectation|pass|fail|skip|gone|
|---|---|---|---|---|
|Required Pass|10|1|10|8|
|Required Pass|10|1|11|8|
|Required Pass for PoE Devices|0|0|1|0|
|Required Pass for BACnet Devices|0|1|2|0|
|Required Pass for IoT Devices|0|0|1|0|
Expand Down Expand Up @@ -97,7 +97,8 @@ Syntax: Pass / Fail / Skip
|skip|dns.network.hostname_resolution|DNS|Required Pass|Device did not send any DNS requests|
|pass|dot1x.dot1x|Other|Other|Authentication for 9a:02:57:1e:8f:01 succeeded.|
|pass|ntp.network.ntp_support|NTP|Required Pass|Using NTPv4.|
|pass|ntp.network.ntp_update|NTP|Required Pass|Device clock synchronized.|
|pass|ntp.network.ntp_update_dhcp|NTP|Required Pass|Device clock synchronized.|
|skip|ntp.network.ntp_update_dns|NTP|Required Pass|Device not configured for NTP via DNS|
|skip|poe.switch.power|PoE|Required Pass for PoE Devices|No local IP has been set, check system config|
|fail|protocol.bacext.pic|Protocol|Required Pass for BACnet Devices|PICS file defined however a BACnet device was not found.|
|skip|protocol.bacext.version|Protocol|Required Pass for BACnet Devices|Bacnet device not found.|
Expand Down Expand Up @@ -557,11 +558,17 @@ Device supports NTP version 4.
--------------------
RESULT pass ntp.network.ntp_support Using NTPv4.
--------------------
ntp.network.ntp_update
ntp.network.ntp_update_dhcp
--------------------
Device synchronizes its time to the NTP server.
Device synchronizes its time to the NTP server using DHCP
--------------------
RESULT pass ntp.network.ntp_update Device clock synchronized.
RESULT pass ntp.network.ntp_update_dhcp Device clock synchronized.
--------------------
ntp.network.ntp_update_dns
--------------------
Device synchronizes its time to the NTP server using DNS
--------------------
RESULT skip ntp.network.ntp_update_dns Device not configured for NTP via DNS
--------------------
connection.network.mac_oui
--------------------
Expand Down
9 changes: 7 additions & 2 deletions resources/setups/common/tests_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,14 @@
"required": "pass",
"expected": "Required Pass"
},
"ntp.network.ntp_update": {
"ntp.network.ntp_update_dhcp": {
"category": "NTP",
"required": "pass",
"required": "notfail",
"expected": "Required Pass"
},
"ntp.network.ntp_update_dns": {
"category": "NTP",
"required": "notfail",
"expected": "Required Pass"
},
"communication.network.min_send": {
Expand Down
4 changes: 2 additions & 2 deletions subset/network/Dockerfile.test_network
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ RUN $AG update && $AG install openjdk-8-jre

RUN $AG update && $AG install openjdk-8-jdk git

RUN $AG update && $AG install python python-setuptools python-pip netcat
RUN $AG update && $AG install python3.8 python3-setuptools python3-pip netcat

RUN $AG update && $AG install curl

RUN pip install scapy
RUN python3.8 -m pip install scapy

COPY subset/network/ .

Expand Down
Empty file added subset/network/__init__.py
Empty file.
Loading