Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/sys/tools/gdb/selftest.sh
39476 views
1
#
2
# Copyright (c) 2025 Mark Johnston <[email protected]>
3
#
4
# SPDX-License-Identifier: BSD-2-Clause
5
#
6
7
set -e
8
9
n=$(sysctl -n hw.ncpu)
10
if [ $n -lt 2 ]; then
11
echo "This test requires at least 2 CPUs"
12
exit 1
13
fi
14
15
# Set up some things expected by selftest.py.
16
kldload -n pf siftr
17
pfctl -e || true
18
jail -c name=gdbselftest vnet persist
19
20
echo "I'm about to panic your system, ctrl-C now if that's not what you want."
21
sleep 10
22
sysctl debug.debugger_on_panic=0
23
sysctl debug.kdb.panic=1
24
25