2021-10-11 07:25:20 +00:00
|
|
|
#!/usr/bin/env bash
|
2021-10-17 16:13:06 +00:00
|
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
2021-10-11 07:25:20 +00:00
|
|
|
set -eux
|
|
|
|
set -o pipefail
|
|
|
|
|
2024-05-11 17:17:13 +00:00
|
|
|
RESULTS_FILE=/tmp/TEST-66-DEVICE-ISOLATION.serviceresults
|
2021-10-11 07:25:20 +00:00
|
|
|
|
|
|
|
systemd-analyze log-level debug
|
|
|
|
|
2024-05-11 17:17:13 +00:00
|
|
|
systemctl start TEST-66-DEVICE-ISOLATION-device-isolation.service
|
2021-10-11 07:25:20 +00:00
|
|
|
|
|
|
|
sleep 5
|
|
|
|
grep -q "Operation not permitted" "$RESULTS_FILE"
|
|
|
|
|
|
|
|
systemctl daemon-reload
|
|
|
|
systemctl daemon-reexec
|
|
|
|
|
2024-05-11 17:17:13 +00:00
|
|
|
systemctl stop TEST-66-DEVICE-ISOLATION-device-isolation.service
|
2021-10-11 07:25:20 +00:00
|
|
|
|
|
|
|
grep -q "thisshouldnotbehere" "$RESULTS_FILE" && exit 42
|
|
|
|
|
|
|
|
systemd-analyze log-level info
|
|
|
|
|
2023-07-12 13:49:55 +00:00
|
|
|
touch /testok
|