You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added a new test case for the DualNICBC in HA mode. The test case
implements this sequence:
- Turn down the slave interface in the primary BC.
- Wait for phc2sys logs that reflect the selection of the secondary
BC's slave interface.
- Turn up the original slave interface in the primary BC.
- Wait for ph2sys logs that reflect the selection of the original slave
interface of the primary BC.
In order for this test case to work, I've done some modifications in the
test framework:
- Added a function to create a separate third config for DualNIC Boundary
Clocks working in HA mode. This extra config has phc2sys config opts and
haProfiles in the ptpSettings field.
- Updated the discovery mechanism to detect the DualNICBC HA mode when
two BC configs and the extra HA config for ph2sys are found.
- Refactored GetPodLogsRegex and created GetPodLogsRegexSince and moved
the regex detection to a separate func findRegexInStream().
Copy file name to clipboardExpand all lines: scripts/run-ci-github.sh
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -39,5 +39,7 @@ PTP_TEST_MODE=oc ginkgo --skip=".*The interfaces supporting ptp can be discovere
39
39
PTP_TEST_MODE=bc ginkgo --skip=".*The interfaces supporting ptp can be discovered correctly.*" --skip="Negative - run pmc in a new unprivileged pod on the slave node.*" -v --keep-going --output-dir=$JUNIT_OUTPUT_DIR --junit-report=$JUNIT_OUTPUT_FILE -v "$SUITE"/serial
40
40
# Dual NIC BC
41
41
PTP_TEST_MODE=dualnicbc ginkgo --skip=".*The interfaces supporting ptp can be discovered correctly.*" --skip="Negative - run pmc in a new unprivileged pod on the slave node.*" -v --keep-going --output-dir=$JUNIT_OUTPUT_DIR --junit-report=$JUNIT_OUTPUT_FILE -v "$SUITE"/serial
42
+
# Dual NIC BC HA
43
+
PTP_TEST_MODE=dualnicbcha ginkgo --skip=".*The interfaces supporting ptp can be discovered correctly.*" --skip="Negative - run pmc in a new unprivileged pod on the slave node.*" -v --keep-going --output-dir=$JUNIT_OUTPUT_DIR --junit-report=$JUNIT_OUTPUT_FILE -v "$SUITE"/serial
42
44
# Dual port
43
45
PTP_TEST_MODE=dualfollower ginkgo --skip=".*The interfaces supporting ptp can be discovered correctly.*" --skip="Negative - run pmc in a new unprivileged pod on the slave node.*" -v --keep-going --output-dir=$JUNIT_OUTPUT_DIR --junit-report=$JUNIT_OUTPUT_FILE -v "$SUITE"/serial
Fail(fmt.Sprintf("Selected interface %s does not belong to the primary boundary clock config. Primary interfaces: %v", selectedInterface, primaryBCSlaveInterfaces))
618
+
}
619
+
620
+
// Wait for some time to ensure the regex won't match the previous log entry
621
+
time.Sleep(2*time.Second)
622
+
ifDownTime:=time.Now()
623
+
By("Taking down the selected interface "+selectedInterface)
624
+
625
+
// Use the PortEngine to turn down the interface so phc2sys will switch to the slave interface in the secondary boundary clock
626
+
portEngine.TurnPortDown(selectedInterface)
627
+
628
+
// Wait for the interface to be down and ptp4l to report freerun
Fail(fmt.Sprintf("Selected interface %s does not belong to the secondary boundary clock config. Secondary interfaces: %v", newSelectedInterface, secondaryBCSlaveInterfaces))
655
+
}
656
+
657
+
time.Sleep(2*time.Second)
658
+
ifUpTime:=time.Now()
659
+
By("Restoring the primary BC's slave interface "+primaryInterface)
660
+
// Bring the interface back up
661
+
portEngine.TurnPortUp(primaryInterface)
662
+
663
+
// Wait for the interface to recover to SLAVE state
0 commit comments