File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -272,12 +272,7 @@ run_test()
272
272
" " \
273
273
" ${isochron_dat} "
274
274
275
- # Count all received packets by looking at the non-zero RX timestamps
276
- received=$( isochron report \
277
- --input-file " ${isochron_dat} " \
278
- --printf-format " %u\n" --printf-args " R" | \
279
- grep -w -v ' 0' | wc -l)
280
-
275
+ received=$( isochron_report_num_received " ${isochron_dat} " )
281
276
if [ " ${received} " = " ${expected} " ]; then
282
277
RET=0
283
278
else
Original file line number Diff line number Diff line change @@ -247,3 +247,14 @@ isochron_do()
247
247
248
248
cpufreq_restore ${ISOCHRON_CPU}
249
249
}
250
+
251
+ isochron_report_num_received ()
252
+ {
253
+ local isochron_dat=$1 ; shift
254
+
255
+ # Count all received packets by looking at the non-zero RX timestamps
256
+ isochron report \
257
+ --input-file " ${isochron_dat} " \
258
+ --printf-format " %u\n" --printf-args " R" | \
259
+ grep -w -v ' 0' | wc -l
260
+ }
You can’t perform that action at this time.
0 commit comments