test: Have tst.ucaller use a predictable trigger
PATCH 1/1 test: Have tst.ucaller use a predictable trigger
From: Eugene Loh <[email protected]>
Signed-off-by Eugene Loh <[email protected]>
--- test/unittest/vars/tst.ucaller.d | 16 ++++++++++++ test/unittest/vars/tst.ucaller.r | 2 +- test/unittest/vars/tst.ucaller.sh | 42 ------------------------------- test/unittest/vars/tst.ucaller.x | 1 - 4 files changed, 17 insertions(+), 44 deletions(-) create mode 100644 test/unittest/vars/tst.ucaller.d delete mode 100755 test/unittest/vars/tst.ucaller.sh delete mode 120000 test/unittest/vars/tst.ucaller.x
test/unittest/vars/tst.ucaller.d new file +16 -0
@@ -0,0 +1,16 @@ +/* + * Oracle Linux DTrace. + * Copyright (c) 2025, 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. + */ + +/* @@trigger: ustack-tst-basic */ + +#pragma D option quiet + +pid$target:a.out:myfunc_x:entry +{ + ufunc(ucaller); + exit(0); +}
test/unittest/vars/tst.ucaller.r +1 -1
@@ -1 +1 @@ - libc.so.6`strdup + ustack-tst-basic`myfunc_v
test/unittest/vars/tst.ucaller.sh deleted +0 -42
42 lines not on this page · raw message
test/unittest/vars/tst.ucaller.x deleted +0 -1
@@ -1 +0,0 @@ -../pid/test.x
Signature · 1 line
2.43.5
Quoted 3 lines · eugene.loh--- via DTrace-devel
From: Eugene Loh <[email protected]>
Signed-off-by Eugene Loh <[email protected]>
Reviewed-by Kris Van Hees <[email protected]>
Quoted 103 lines
--- test/unittest/vars/tst.ucaller.d | 16 ++++++++++++ test/unittest/vars/tst.ucaller.r | 2 +- test/unittest/vars/tst.ucaller.sh | 42 ------------------------------- test/unittest/vars/tst.ucaller.x | 1 - 4 files changed, 17 insertions(+), 44 deletions(-) create mode 100644 test/unittest/vars/tst.ucaller.d delete mode 100755 test/unittest/vars/tst.ucaller.sh delete mode 120000 test/unittest/vars/tst.ucaller.xtest/unittest/vars/tst.ucaller.d new file +16
-0@@ -0,0 +1,16 @@ +/* + * Oracle Linux DTrace. + * Copyright (c) 2025, 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. + */ + +/* @@trigger: ustack-tst-basic */ + +#pragma D option quiet + +pid$target:a.out:myfunc_x:entry +{ + ufunc(ucaller); + exit(0); +}test/unittest/vars/tst.ucaller.r +1
-1@@ -1 +1 @@ - libc.so.6`strdup + ustack-tst-basic`myfunc_vtest/unittest/vars/tst.ucaller.sh deleted +0
-42@@ -1,42 +0,0 @@ -#!/bin/bash -# -# Oracle Linux DTrace. -# Copyright (c) 2007, 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. -# -# This test is a bit naughty; it's assuming that libc.so has an implementation -# of strup(3), and that it's implemented in terms of the libc.so -# implementation of malloc(3). If you're reading this comment because -# those assumptions have become false, please accept my apologies... -# -# @@xfail: dtv2 - -if [ $# != 1 ]; then - echo expected one argument: '<'dtrace-path'>' - exit 2 -fi - -dtrace=$1 - -$dtrace $dt_flags -qs /dev/stdin -c "/bin/wc -l /dev/zero" <<EOF -pid\$target::strdup:entry -{ - self->strdup = 1; -} - -pid\$target:libc.so:malloc:entry -/self->strdup/ -{ - ufunc(ucaller); - exit(0); -} - -pid\$target::strdup:return -/self->strdup/ -{ - self->strdup = 0; -} -EOF - -exit 0test/unittest/vars/tst.ucaller.x deleted +0
-1@@ -1 +0,0 @@ -../pid/test.xSignature · 7 lines
2.43.5 _______________________________________________ DTrace-devel mailing list [email protected] https://oss.oracle.com/mailman/listinfo/dtrace-devel