xref: /freebsd/tests/sys/compat32/aarch64/swp_test.sh (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
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