dtrace tests: Fix nits in some test programs

Otherwise these tests fail spuriously, depending on which compiler is
installed as cc.

MFC after:	2 weeks
Sponsored by:	Innovate UK
This commit is contained in:
Mark Johnston 2025-06-04 20:52:16 +00:00
parent 8e1e989c77
commit fdaba0128c
2 changed files with 7 additions and 5 deletions

View file

@ -40,8 +40,8 @@ echo '#pragma D option aggsortkey' >> test.d
cat > test.c <<EOF
#include <unistd.h>
void
main()
int
main(void)
{
EOF
@ -52,7 +52,7 @@ for oogle in doogle bagnoogle; do
#include <sys/sdt.h>
void
$oogle()
$oogle(void)
{
DTRACE_PROBE($oogle, knows);
}
@ -79,6 +79,7 @@ EOF
fi
objs="$objs $oogle.o $oogle.d.o"
echo "extern void $oogle(void);" >> test.c
echo $oogle'();' >> test.c
echo $oogle'$target:::{@[probefunc] = count()}' >> test.d
done

View file

@ -35,8 +35,8 @@ cd $DIR
cat > test.c <<EOF
#include <unistd.h>
void
main()
int
main(void)
{
EOF
@ -74,6 +74,7 @@ EOF
fi
objs="$objs $oogle.o $oogle.d.o"
echo "extern void $oogle(void);" >> test.c
echo $oogle'();' >> test.c
done