Skip to content

Commit

Permalink
Allow for changing number of syscalls
Browse files Browse the repository at this point in the history
DTrace reports how many probes were matched.  Since the number of
syscalls can depend on the kernel, the number of matched syscalls
expected should not be hardcoded in our test result files.  This
problem seems to impact only test/unittest/syscall/tst.entry.d .

Add a .r.p post-processing file to mask out the exact number of
matched probes for this test.

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 Dec 10, 2020
1 parent 2590c80 commit b3e21df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/unittest/syscall/tst.entry.r
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
mmap:entry

-- @@stderr --
dtrace: script 'test/unittest/syscall/tst.entry.d' matched 333 probes
dtrace: script 'test/unittest/syscall/tst.entry.d' matched NNN probes
8 changes: 8 additions & 0 deletions test/unittest/syscall/tst.entry.r.p
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/gawk -f
# Oracle Linux DTrace.
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at
# http://oss.oracle.com/licenses/upl.

/^dtrace: script .* matched [0-9]* probes/ { $(NF-1) = "NNN" }
{print}

0 comments on commit b3e21df

Please sign in to comment.