Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,12 @@ Ethernet_Basic_Validation.results.tsv
```

The overall testcase passes when at least one detected Ethernet interface completes link, IPv4, and ping validation. It fails when interfaces are testable but none passes. It skips when no interface can be tested, for example when every port is disconnected.

## Failure diagnostics

Recorded failures automatically save read-only `ethtool` evidence for the
selected interfaces and replay bounded excerpts to stdout with `[ETH-DIAG]`
markers. No host commands, runtime package installation or new options are
required. The original verdict and cleanup behavior remain unchanged.
See [shared Ethernet failure diagnostics](../README_Ethernet_Diagnostics.md)
for collected queries, artifact locations, time bounds and unavailable-tool handling.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ fi

TESTNAME="Ethernet_Basic_Validation"
RES_FILE="./$TESTNAME.res"
ethv_failure_diagnostics_init "$SCRIPT_DIR/results/$TESTNAME/run-$(date '+%Y%m%d-%H%M%S')-$/failure_diagnostics"

test_path="$(find_test_case_by_name "$TESTNAME")"

Expand Down Expand Up @@ -194,6 +195,7 @@ if ! ethv_is_positive_integer "$LINK_TIMEOUT_S" \
|| ! ethv_is_positive_integer "$PING_RETRIES"; then

log_fail "$TESTNAME FAIL: timeout, count, and retry values must be positive integers"
ethv_failure_diagnostics "$TESTNAME failure"
echo "$TESTNAME FAIL" >"$RES_FILE"
exit 0
fi
Expand All @@ -218,6 +220,7 @@ ANY_FAIL=0
ANY_TESTED=0

for iface in $ETH_IFACES; do
ethv_failure_diagnostics_watch "$iface"
driver="$(ethv_get_driver "$iface")"
carrier="$(ethv_get_carrier "$iface")"
operstate="$(ethv_get_operstate "$iface")"
Expand Down Expand Up @@ -329,6 +332,7 @@ if [ "$ANY_PASS" -eq 1 ]; then
echo "$TESTNAME PASS" >"$RES_FILE"
elif [ "$ANY_TESTED" -eq 1 ] || [ "$ANY_FAIL" -eq 1 ]; then
log_fail "$TESTNAME FAIL"
ethv_failure_diagnostics "$TESTNAME failure"
echo "$TESTNAME FAIL" >"$RES_FILE"
else
log_skip "$TESTNAME SKIP"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,23 @@ shared discovery helper validates every detected physical Ethernet interface.

## Result

Driver statistics use the shared `lib_ethernet.sh` capture helper. It discovers
all unsigned counters reported by `ethtool -S`, without a driver-specific field
list. Full output and parsed values are retained under
`results/Ethernet_Capability_Validation/driver-*/`. Missing, unsupported, or
unusable optional driver statistics retain the existing `SKIP` policy for that
check and log the reason. No packages are installed.

```text
Ethernet_Capability_Validation.res
Ethernet_Capability_Validation.results.tsv
```

## Failure diagnostics

Recorded failures automatically save read-only `ethtool` evidence for the
selected interfaces and replay bounded excerpts to stdout with `[ETH-DIAG]`
markers. No host commands, runtime package installation or new options are
required. The original verdict and cleanup behavior remain unchanged.
See [shared Ethernet failure diagnostics](../README_Ethernet_Diagnostics.md)
for collected queries, artifact locations, time bounds and unavailable-tool handling.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ fi

TESTNAME="Ethernet_Capability_Validation"
RES_FILE="./$TESTNAME.res"
ethv_failure_diagnostics_init "$SCRIPT_DIR/results/$TESTNAME/run-$(date '+%Y%m%d-%H%M%S')-$/failure_diagnostics"

test_path="$(find_test_case_by_name "$TESTNAME")"

Expand Down Expand Up @@ -142,6 +143,7 @@ if ! ethv_is_boolean "$REQUIRE_FULL_DUPLEX" \
|| ! ethv_is_uint "$MIN_LINK_SPEED_MBPS"; then

log_fail "$TESTNAME FAIL: invalid configuration"
ethv_failure_diagnostics "$TESTNAME failure"
echo "$TESTNAME FAIL" >"$RES_FILE"
exit 0
fi
Expand All @@ -165,6 +167,7 @@ if [ -z "$ETH_IFACES" ]; then
fi

for iface in $ETH_IFACES; do
ethv_failure_diagnostics_watch "$iface"
driver="$(ethv_get_driver "$iface")"
carrier="$(ethv_get_carrier "$iface")"
speed="$(ethv_get_speed "$iface")"
Expand Down Expand Up @@ -236,23 +239,21 @@ for iface in $ETH_IFACES; do
"ethtool -k failed"
fi

if ethtool -S "$iface" >/dev/null 2>&1; then
stat_count="$(
ethtool -S "$iface" 2>/dev/null \
| awk -F: 'NF >= 2 {count++} END {print count + 0}'
)"
stats_prefix="$SCRIPT_DIR/results/$TESTNAME/driver-$$/$iface"
if ethv_capture_driver_statistics "$iface" "$stats_prefix"; then
stat_count="$(wc -l <"$stats_prefix.tsv" | tr -d '[:space:]')"

ethv_record_result \
"$RESULT_TABLE" \
"$iface driver statistics" \
"PASS" \
"$stat_count driver statistic(s) exposed"
"$stat_count driver statistic(s) exposed, artifact=$stats_prefix.tsv"
else
ethv_record_result \
"$RESULT_TABLE" \
"$iface driver statistics" \
"SKIP" \
"driver does not support ethtool -S"
"$ETHV_DRIVER_STATS_REASON"
fi

if ethtool -a "$iface" >/dev/null 2>&1; then
Expand Down Expand Up @@ -423,6 +424,7 @@ case "$OVERALL_RESULT" in
;;
FAIL)
log_fail "$TESTNAME FAIL"
ethv_failure_diagnostics "$TESTNAME failure"
echo "$TESTNAME FAIL" >"$RES_FILE"
;;
*)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,12 @@ The testcase skips when fewer than two physical Ethernet interfaces are present
Ethernet_Dual_Port_Validation.res
Ethernet_Dual_Port_Validation.results.tsv
```

## Failure diagnostics

Recorded failures automatically save read-only `ethtool` evidence for the
selected interfaces and replay bounded excerpts to stdout with `[ETH-DIAG]`
markers. No host commands, runtime package installation or new options are
required. The original verdict and cleanup behavior remain unchanged.
See [shared Ethernet failure diagnostics](../README_Ethernet_Diagnostics.md)
for collected queries, artifact locations, time bounds and unavailable-tool handling.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ fi

TESTNAME="Ethernet_Dual_Port_Validation"
RES_FILE="./$TESTNAME.res"
ethv_failure_diagnostics_init "$SCRIPT_DIR/results/$TESTNAME/run-$(date '+%Y%m%d-%H%M%S')-$/failure_diagnostics"

test_path="$(find_test_case_by_name "$TESTNAME")"

Expand Down Expand Up @@ -208,6 +209,7 @@ if ! ethv_is_positive_integer "$LINK_TIMEOUT_S" \
|| ! ethv_is_positive_integer "$PING_WAIT_S"; then

log_fail "$TESTNAME FAIL: numeric configuration values must be positive integers"
ethv_failure_diagnostics "$TESTNAME failure"
echo "$TESTNAME FAIL" >"$RES_FILE"
exit 0
fi
Expand All @@ -229,6 +231,7 @@ ETH_IFACE_LINES="$(

IFACE_A="$(printf '%s\n' "$ETH_IFACE_LINES" | sed -n '1p')"
IFACE_B="$(printf '%s\n' "$ETH_IFACE_LINES" | sed -n '2p')"
ethv_failure_diagnostics_watch "$IFACE_A" "$IFACE_B"

if [ -z "$IFACE_A" ] || [ -z "$IFACE_B" ]; then
ethv_record_result \
Expand All @@ -250,11 +253,13 @@ if [ "$IFACE_A" = "$IFACE_B" ]; then
"the selected interface names are identical: $IFACE_A"

ethv_print_summary "$RESULT_TABLE" "Ethernet Dual-Port Summary"
ethv_failure_diagnostics "$TESTNAME failure"
echo "$TESTNAME FAIL" >"$RES_FILE"
exit 0
fi

for iface in "$IFACE_A" "$IFACE_B"; do
ethv_failure_diagnostics_watch "$iface"
if [ ! -d "/sys/class/net/$iface" ]; then
ethv_record_result \
"$RESULT_TABLE" \
Expand Down Expand Up @@ -302,6 +307,7 @@ done

if [ "$(ethv_result_count "$RESULT_TABLE" FAIL)" -gt 0 ]; then
ethv_print_summary "$RESULT_TABLE" "Ethernet Dual-Port Summary"
ethv_failure_diagnostics "$TESTNAME failure"
echo "$TESTNAME FAIL" >"$RES_FILE"
exit 0
fi
Expand Down Expand Up @@ -426,6 +432,7 @@ case "$OVERALL_RESULT" in
;;
FAIL)
log_fail "$TESTNAME FAIL"
ethv_failure_diagnostics "$TESTNAME failure"
echo "$TESTNAME FAIL" >"$RES_FILE"
;;
*)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ testcase also correlates downstream TC956x driver functions with exported
Ethernet interfaces and verifies that `TC956X_Firmware_PCIeBridge.bin` remains
available from a standard firmware root. Images without QPS615 retain the
generic Ethernet inventory behavior.
The QPS615 summary separates outermost switch roots from matching bridge
functions, so one switch exposing four `1179:0623` functions is counted once.

When an enabled runtime DT node uses `pci1179,0623`, the inventory also
records the complete DT compatible, supply-property count, matching platform
device, and `pwrctrl-tc9563` binding. The platform driver is required only for
nodes that declare the public six-supply power-control contract. A partial
supply set is malformed, while integrations with no supply properties retain
their existing PCI runtime validation.

For each expected Toshiba `1179:0220` Ethernet function, the live log and TSV
include its PCI modalias, bound driver, exported netdevs, and availability of
Expand Down Expand Up @@ -98,7 +107,22 @@ On QPS615 systems, inspect the correlated PCIe, driver, and netdev evidence:
```sh
cat qps615_runtime/qps615_switches.log
cat qps615_runtime/qps615_runtime.tsv
cat qps615_runtime/qps615_dt_platform.tsv
```

The QPS615 files are empty or contain no switch records when the capability is
not present. That does not change the generic Ethernet result path.

Use the focused `QPS615_Interface_Validation` suite for optional EFI FIT
selection, runtime device-tree, power-control, and detailed dynamic interface
checks. Use
`QPS615_Traffic_Validation` only with a confirmed external peer fixture.

## Failure diagnostics

Recorded failures automatically save read-only `ethtool` evidence for the
selected interfaces and replay bounded excerpts to stdout with `[ETH-DIAG]`
markers. No host commands, runtime package installation or new options are
required. The original verdict and cleanup behavior remain unchanged.
See [shared Ethernet failure diagnostics](../README_Ethernet_Diagnostics.md)
for collected queries, artifact locations, time bounds and unavailable-tool handling.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ fi

TESTNAME="Ethernet_Inventory_Validation"
RES_FILE="./$TESTNAME.res"
ethv_failure_diagnostics_init "$SCRIPT_DIR/results/$TESTNAME/run-$(date '+%Y%m%d-%H%M%S')-$/failure_diagnostics"

test_path="$(find_test_case_by_name "$TESTNAME")"

Expand Down Expand Up @@ -141,7 +142,21 @@ case "$qps615_status" in
"$RESULT_TABLE" \
"QPS615 PCIe topology and firmware" \
"PASS" \
"bridge_functions=$QPS615_SWITCH_COUNT downstream=$QPS615_DOWNSTREAM_COUNT firmware=$QPS615_FIRMWARE_PATH"
"switches=$QPS615_SWITCH_COUNT bridge_functions=$QPS615_BRIDGE_COUNT downstream=$QPS615_DOWNSTREAM_COUNT firmware=$QPS615_FIRMWARE_PATH"
fi

if [ -n "$QPS615_PWRCTRL_FAILURE_REASON" ]; then
ethv_record_result \
"$RESULT_TABLE" \
"QPS615 PCIe power-control binding" \
"FAIL" \
"$QPS615_PWRCTRL_FAILURE_REASON"
elif [ "$QPS615_PWRCTRL_EXPECTED_COUNT" -gt 0 ]; then
ethv_record_result \
"$RESULT_TABLE" \
"QPS615 PCIe power-control binding" \
"PASS" \
"$QPS615_PWRCTRL_BOUND_COUNT supply-backed DT node(s) are bound to pwrctrl-tc9563"
fi

if [ -n "$QPS615_ETHERNET_FAILURE_REASON" ]; then
Expand Down Expand Up @@ -212,6 +227,7 @@ else
fi

for iface in $ETH_IFACES; do
ethv_failure_diagnostics_watch "$iface"
driver="$(ethv_get_driver "$iface")"
module="$(ethv_get_driver_module "$iface")"
device_path="$(ethv_get_device_path "$iface")"
Expand Down Expand Up @@ -328,6 +344,7 @@ case "$OVERALL_RESULT" in
;;
FAIL)
log_fail "$TESTNAME FAIL"
ethv_failure_diagnostics "$TESTNAME failure"
echo "$TESTNAME FAIL" >"$RES_FILE"
;;
*)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,26 @@ Use `./run.sh` to validate every detected physical interface, or select one:

## Result

Optional driver statistics are captured before and after interface-bound
traffic, including failed ping attempts, through shared `lib_ethernet.sh`
helpers. All runtime counter names and exact unsigned values are retained in
`results/Ethernet_Statistics_Validation/driver-*/` as raw `.log`, parsed `.tsv`,
and comparison `_changes.tsv` files. A bounded comparison excerpt is logged
on stdout. Counter ordering, added/removed fields, and 64-bit values are handled
without fixed driver counter lists. These fields remain diagnostic because
their reset/gauge semantics are driver-specific. Existing standard packet,
byte, error, and optional drop thresholds determine the result unchanged.

```text
Ethernet_Statistics_Validation.res
Ethernet_Statistics_Validation.results.tsv
```

## Failure diagnostics

Recorded failures automatically save read-only `ethtool` evidence for the
selected interfaces and replay bounded excerpts to stdout with `[ETH-DIAG]`
markers. No host commands, runtime package installation or new options are
required. The original verdict and cleanup behavior remain unchanged.
See [shared Ethernet failure diagnostics](../README_Ethernet_Diagnostics.md)
for collected queries, artifact locations, time bounds and unavailable-tool handling.
Loading
Loading