swtpm/tests/test_cuse
Stefan Berger 01aa2ed3af tests: Run tests also on socket interfaces
Refactor the tests so that they all run on socket interfaces as well.

Use socket ports in the range of 65400-65499 for TPM 1.2 tests.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2017-07-11 14:04:40 -04:00

21 lines
415 B
Plaintext

# For the license, see the LICENSE file in the root directory.
if ! [[ "$(uname -o)" =~ Linux ]]; then
echo "Need Linux to run test with CUSE interface."
exit 77
fi
if [ "$(id -u)" -ne 0 ]; then
echo "Need to be root to run test with CUSE interface."
exit 77
fi
if [ ! -c /dev/cuse ]; then
modprobe cuse
if [ $? -ne 0 ]; then
echo "Skipping test using CUSE module: module not availabe"
exit 77
fi
fi