On Fri, Jun 20, 2025 at 01:11:00PM -0700, Vishal Verma wrote: > On Wed, 2025-06-18 at 18:06 -0700, Alison Schofield wrote: > > On Wed, Jun 18, 2025 at 03:21:28PM -0700, Dan Williams wrote: > > > 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 > > remove above line > > > 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 }') > > replace above line w > > done < <(trace-cmd report | grep dax_pmd_fault_done | awk '{ print $NF > > }') > > Very minor nit, but since you're already using awk, no need to grep > first, instead you can use awk's 'first part' to do the filtering - > > done < <(trace-cmd report | awk '/dax_pmd_fault_done/{ print $NF }') > > You can stick any regex between the /../ and it will only act on lines > matching that.
Thanks Vishal! I hope to remember that for 'next time' I see grep and awk used together. Not rev'ing this one.