aboutsummaryrefslogtreecommitdiff
path: root/tools/test
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test')
-rw-r--r--tools/test/stress2/misc/all.exclude8
-rwxr-xr-xtools/test/stress2/misc/killpg5.sh19
-rwxr-xr-xtools/test/stress2/misc/syzkaller59.sh9
-rwxr-xr-xtools/test/stress2/misc/syzkaller82.sh4
-rwxr-xr-xtools/test/stress2/misc/syzkaller84.sh1
5 files changed, 30 insertions, 11 deletions
diff --git a/tools/test/stress2/misc/all.exclude b/tools/test/stress2/misc/all.exclude
index 0658bfdc0c1b..9851496f8839 100644
--- a/tools/test/stress2/misc/all.exclude
+++ b/tools/test/stress2/misc/all.exclude
@@ -66,19 +66,11 @@ systrace.sh WiP 20200227
systrace2.sh WiP 20200227
syzkaller16.sh zonelimit issue 20210722
syzkaller28.sh panic: About to free ctl:0x... so:0x... and its in 1 20201120
-syzkaller31.sh panic: Bad tailq NEXT(0xfffffe01a0899430->tqh_last) != NULL 20220420
syzkaller55.sh https://people.freebsd.org/~pho/stress/log/log0533.txt 20240702
syzkaller59.sh Page fault 20220625
-syzkaller65.sh panic: in_pcblookup_hash_locked: invalid local address 20230318
-syzkaller66.sh panic: in_pcbconnect: inp is already connected 20230621
-syzkaller67.sh panic: ASan: Invalid access, 8-byte read at ... 20230621
syzkaller80.sh panic 20250711
-syzkaller81.sh panic 20250711
syzkaller82.sh panic: m_apply, length > size of mbuf chain 20250724
-syzkaller84.sh panic: Assertion !(sb->sb_state & SBS_CANTRCVMORE) 20250810
syzkaller85.sh panic: Assertion uio->uio_resid < 0 failed 20250928
-syzkaller86.sh Fatal trap 12: page fault while in kernel mode 20251001
-write2.sh panic: sndbuf_acquire: count 255 > free 0 20251003
quota3.sh https://people.freebsd.org/~pho/stress/log/log0604.txt 20250728
quota6.sh https://people.freebsd.org/~pho/stress/log/log0456.txt 20240707
truss3.sh WiP 20200915
diff --git a/tools/test/stress2/misc/killpg5.sh b/tools/test/stress2/misc/killpg5.sh
new file mode 100755
index 000000000000..4b98d30487d4
--- /dev/null
+++ b/tools/test/stress2/misc/killpg5.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+# Test scenario from:
+# Bug 290843 - killpg deadlock against a stopped interrupted fork
+# By : Bryan Drewery <bdrewery@FreeBSD.org>
+
+# Seen:
+# 0 70877 3650 7 0 0 14856 3680 sigsusp I+ 0 0:00.00 sh -x ./killpg5.sh
+# 0 70881 70877 10 0 0 14856 3688 killpg r D+ 0 0:00.07 sh -c trap "kill -9 %1; exit" INT; foo() { unset cmd; cmd=$(/sbin/sysctl -n vm.loadavg|/u
+
+sh -c 'trap "kill -9 %1; exit" INT; foo() { unset cmd; cmd=$(/sbin/sysctl -n vm.loadavg|/usr/bin/awk "{print \$2,\$3,\$4}"); case "${cmd:+set}" in set) ;; *) exit 99 ;; esac }; runner() { while foo; do :; done }; launch() { local -; set -m; PS4="child+ " runner & }; set -x; while :; do launch; sleep 0.1; kill -STOP %1; kill -TERM %1; kill -CONT %1; ret=0; wait; if [ $ret -eq 99 ]; then exit 99; fi; done;' > /dev/null 2>&1 &
+sleep 60
+kill -9 $!
+sleep .2
+killpgpid=`ps -lUroot | grep -v grep | grep ' killpg ' | awk '{print $2}'`
+[ -n "$killpgpid" ] && { ps -lp$killpgpid; exit 1; } # The bug
+pgrep -f 'foo()' | xargs kill > /dev/null 2>&1 # Cleanup
+wait
+exit 0
diff --git a/tools/test/stress2/misc/syzkaller59.sh b/tools/test/stress2/misc/syzkaller59.sh
index 1644ce627934..24cfbfd23278 100755
--- a/tools/test/stress2/misc/syzkaller59.sh
+++ b/tools/test/stress2/misc/syzkaller59.sh
@@ -147,7 +147,14 @@ int main(void)
EOF
mycc -o /tmp/syzkaller59 -Wall -Wextra -O0 /tmp/syzkaller59.c || exit 1
-(cd /tmp; timeout 3m ./syzkaller59)
+(cd /tmp; ./syzkaller59) &
+start=`date +%s`
+while [ $((`date +%s` - start)) -lt 180 ]; do
+ sleep 10
+ kill -0 $! > /dev/null 2>&1 || break
+done
+while pkill syzkaller59; do sleep .1; done
+wait
rm -rf /tmp/syzkaller59 /tmp/syzkaller59.c /tmp/syzkaller59.core \
/tmp/syzkaller.??????
diff --git a/tools/test/stress2/misc/syzkaller82.sh b/tools/test/stress2/misc/syzkaller82.sh
index c810942eb060..557d52d269c0 100755
--- a/tools/test/stress2/misc/syzkaller82.sh
+++ b/tools/test/stress2/misc/syzkaller82.sh
@@ -114,9 +114,9 @@ work=/tmp/$prog.dir
rm -rf $work
mkdir $work
cd /tmp/$prog.dir
-kldstat | grep -q sctp || { kldload sctp.ko && loaded=1; }
+kldstat | grep -q sctp && loaded=0 || { kldload sctp.ko && loaded=1; }
timeout 3m /tmp/$prog > /dev/null 2>&1
rm -rf /tmp/$prog /tmp/$prog.c /tmp/$prog.core /tmp/$prog.?????? $work
-[ $loaded ] && kldunload sctp.ko
+[ $loaded -eq 1 ] && kldunload sctp.ko
exit 0
diff --git a/tools/test/stress2/misc/syzkaller84.sh b/tools/test/stress2/misc/syzkaller84.sh
index a7976be2eeb6..631dd6e2dd6f 100755
--- a/tools/test/stress2/misc/syzkaller84.sh
+++ b/tools/test/stress2/misc/syzkaller84.sh
@@ -398,5 +398,6 @@ kldstat | grep -q sctp || { kldload sctp.ko && loaded=1; }
timeout 3m /tmp/$prog > /dev/null 2>&1
rm -rf /tmp/$prog /tmp/$prog.c /tmp/$prog.core $work
+set +u
[ $loaded ] && kldunload sctp.ko
exit 0