Skip to content

Commit

Permalink
test: check goodkey results
Browse files Browse the repository at this point in the history
This test was failing due to lack of support for aggregation keys.
The test was tagged XFAIL.

Support for aggregation keys would cause the test to XPASS.
Unfortunately, the crucial probe action does not even execute since it
depends on vtimestamp, which is not yet implemented.  The XPASS would
be spurious since results were simply not being checked.

Add .r and .r.p files for a sanity check on results.

Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
  • Loading branch information
euloh authored and kvanhees committed Aug 4, 2022
1 parent 69a5549 commit f92b1ac
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/unittest/aggs/tst.goodkey.r
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
number number number number number
number number number number number
number number number number number
number number number number number
number number number number number
24 changes: 24 additions & 0 deletions test/unittest/aggs/tst.goodkey.r.p
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/gawk -f

# skip blank lines
NF == 0 { next; }

# expect every line to have 7 fields
NF != 7 { exit(1); }

{
# check last column
# (We expect the five probe firings to have different
# aggregation keys since at least vtimestamp is likely
# to vary among them.)
if ($7 != 1) { print "last column expected to be 1";
exit(1);
}

# we do not care what the other numbers are
gsub(/ -?[0-9]+ /, " number ");

# ignore the first column (which can be anything)
# ignore the last column (which we already checked)
print $2, $3, $4, $5, $6;
}

0 comments on commit f92b1ac

Please sign in to comment.