/
githubmirror
/
swtpm
Обзор
Документация
Войти
/
githubmirror
/
swtpm
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
tests/test_cuse
30 строк
634 B
Stefan Berger
tests: Derive support for CUSE from SWTPM_EXE help screen
27 авг 2024, 03:00
27 авг 2024, 03:00
0da1dcc
Код
Авторство
О чём код?
# shellcheck shell=bash # For the license, see the LICENSE file in the root directory. if ! [[ "$(uname -s)" =~ 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 [ -z "${SWTPM_EXE}" ]; then echo "Error: SWTPM_EXE must be set" exit 1 fi if ! ${SWTPM_EXE} --help | grep -q cuse; then echo "Skipping test: swtpm was not compiled with CUSE interface" exit 77 fi if [ ! -c /dev/cuse ]; then if ! modprobe cuse; then echo "Skipping test using CUSE module: module not available" exit 77 fi fi