With current kernel+tracecmd combinations stdout is no longer purely trace
records and column "21" is no longer the vmfault_t result.

Drop, if present, the diagnostic print of how many CPUs are in the trace
and use the more universally compatible assumption that the fault result is
the last column rather than a specific column.

Signed-off-by: Dan Williams <dan.j.willi...@intel.com>
---
 test/dax.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test/dax.sh b/test/dax.sh
index 3ffbc8079eba..98faaf0eb9b2 100755
--- a/test/dax.sh
+++ b/test/dax.sh
@@ -37,13 +37,14 @@ run_test() {
        rc=1
        while read -r p; do
                [[ $p ]] || continue
+               [[ $p == cpus=* ]] && continue
                if [ "$count" -lt 10 ]; then
                        if [ "$p" != "0x100" ] && [ "$p" != "NOPAGE" ]; then
                                cleanup "$1"
                        fi
                fi
                count=$((count + 1))
-       done < <(trace-cmd report | awk '{ print $21 }')
+       done < <(trace-cmd report | awk '{ print $NF }')
 
        if [ $count -lt 10 ]; then
                cleanup "$1"
-- 
2.49.0


Reply via email to