]> git.proxmox.com Git - swtpm.git/blame - tests/test_cuse
tests: Support filenames with spaces in some functions
[swtpm.git] / tests / test_cuse
CommitLineData
96038cdf
SB
1
2# For the license, see the LICENSE file in the root directory.
3
415bf556 4if ! [[ "$(uname -s)" =~ Linux ]]; then
01aa2ed3
SB
5 echo "Need Linux to run test with CUSE interface."
6 exit 77
7fi
8
9if [ "$(id -u)" -ne 0 ]; then
10 echo "Need to be root to run test with CUSE interface."
11 exit 77
12fi
13
03e5abef
SB
14if [ -z "$(grep -E '#[[:blank:]]*define[[:blank:]]+WITH_CUSE[[:blank:]]+1[[:blank:]]*$' \
15 ${PWD}/../config.h)" ]; then
16 echo "Skipping test: swtpm was not compiled with CUSE interface"
17 exit 77
18fi
19
96038cdf
SB
20if [ ! -c /dev/cuse ]; then
21 modprobe cuse
22 if [ $? -ne 0 ]; then
cde5f608
SB
23 echo "Skipping test using CUSE module: module not availabe"
24 exit 77
96038cdf
SB
25 fi
26fi