xref: /freebsd/tests/sys/compat32/aarch64/swp_test.sh (revision 7ef62cebc2f965b0f640263e179276928885e33d)
1#!/bin/sh
2
3scriptdir=$(dirname $(realpath "$0"))
4
5. ${scriptdir}/common.sh
6
7# Ensure emul_swp is enabled just for this test; we'll turn it back off if
8# it wasn't enabled before the test.
9emul_swpval=$(sysctl -n compat.arm.emul_swp)
10sysctl compat.arm.emul_swp=1 >/dev/null
11${scriptdir}/swp_test_impl
12if [ "$emul_swpval" -ne 1 ]; then
13	sysctl compat.arm.emul_swp="$emul_swpval" >/dev/null
14fi
15