[PATCH 3/4] test: fix tst.depth.sh to use proper trigger

Kris Van Hees <[email protected]>
Newsgroups dev.linux.lists.dtrace
Message-ID <BY5PR10MB3987726AB973C7AE7CB6D4BDC2CEA@BY5PR10MB3987.namprd10.prod.outlook.com>
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 <[email protected]>
---
 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.