Skip to content

Commit 62222a9

Browse files
weiny2AlisonSchofield
authored andcommitted
test/cxl-events.sh: do not fail test until event counts are reported
Testing revealed that a failed cxl-event test lacked details on the event counts. This was because the greps were failing the test rather than the check against the counts. Suppress the grep failure and rely on event count checks for pass/fail of the test. [ alison: rm reference to DCD in commit log ] Signed-off-by: Ira Weiny <[email protected]> Reviewed-by: Dave Jiang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alison Schofield <[email protected]>
1 parent 7225fd2 commit 62222a9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/cxl-events.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ echo 0 > /sys/kernel/tracing/tracing_on
7171
echo "TEST: Events seen"
7272
trace_out=$(cat /sys/kernel/tracing/trace)
7373

74-
num_overflow=$(grep -c "cxl_overflow" <<< "${trace_out}")
75-
num_fatal=$(grep -c "log=Fatal" <<< "${trace_out}")
76-
num_failure=$(grep -c "log=Failure" <<< "${trace_out}")
77-
num_info=$(grep -c "log=Informational" <<< "${trace_out}")
74+
num_overflow=$(grep -c "cxl_overflow" <<< "${trace_out}" || true)
75+
num_fatal=$(grep -c "log=Fatal" <<< "${trace_out}" || true)
76+
num_failure=$(grep -c "log=Failure" <<< "${trace_out}" || true)
77+
num_info=$(grep -c "log=Informational" <<< "${trace_out}" || true)
7878
echo " LOG (Expected) : (Found)"
7979
echo " overflow ($num_overflow_expected) : $num_overflow"
8080
echo " Fatal ($num_fatal_expected) : $num_fatal"

0 commit comments

Comments
 (0)