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