public inbox for dtrace@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH 3/4] test: fix tst.depth.sh to use proper trigger
@ 2025-11-10 15:27 Kris Van Hees
  2025-11-11  0:10 ` Eugene Loh
  0 siblings, 1 reply; 7+ messages in thread
From: Kris Van Hees @ 2025-11-10 15:27 UTC (permalink / raw)
  To: dtrace, dtrace-devel

The test used 'date' as its trigger but that caused the test to XFAIL
for the wrong reason: date does not have symbols and therefore dtrace
failed to enable probes for it.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
---
 test/unittest/ustack/tst.depth.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/test/unittest/ustack/tst.depth.sh b/test/unittest/ustack/tst.depth.sh
index dec16a3a..977d1b42 100755
--- a/test/unittest/ustack/tst.depth.sh
+++ b/test/unittest/ustack/tst.depth.sh
@@ -16,7 +16,7 @@ dtrace=$1
 
 rm -f $file
 
-$dtrace $dt_flags -o $file -c date -s /dev/stdin <<EOF
+$dtrace $dt_flags -o $file -c test/triggers/delaydie -s /dev/stdin <<EOF
 
 	#pragma D option quiet
 	#pragma D option bufsize=1M
@@ -45,7 +45,7 @@ $dtrace $dt_flags -o $file -c date -s /dev/stdin <<EOF
 EOF
 
 status=$?
-if [ "$status" -ne 0 ]; then
+if [ $status -ne 0 ]; then
 	echo $tst: dtrace failed
 	rm -f $file
 	exit $status
@@ -78,8 +78,8 @@ EOF
 
 status=$?
 
-count=`wc -l $file | cut -f1 -do`
-if [ "$count" -lt 1000 ]; then
+count=`wc -l $file | cut -f1 -d' '`
+if [ $count -lt 1000 ]; then
 	echo $tst: output was too short
 	status=1
 fi
-- 
2.43.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-11-11 23:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-10 15:27 [PATCH 3/4] test: fix tst.depth.sh to use proper trigger Kris Van Hees
2025-11-11  0:10 ` Eugene Loh
2025-11-11  3:00   ` Kris Van Hees
2025-11-11 20:50     ` Eugene Loh
2025-11-11 22:13       ` Kris Van Hees
2025-11-11 22:55         ` Eugene Loh
2025-11-11 23:09           ` Kris Van Hees

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox