hwdb: fix screen rotation for EXO Wings 2in1 w1125 (#36283)
[systemd.io.git] / test / units / TEST-07-PID1.aux-scope.sh
blob8e2a99ce027b2f0ea71dbfc376f423e543ddc8c1
1 #!/usr/bin/env bash
2 # SPDX-License-Identifier: LGPL-2.1-or-later
3 set -ex
4 set -o pipefail
6 export SYSTEMD_PAGER=cat
8 if ! grep -q pidfd_open /proc/kallsyms; then
9 echo "pidfds not available, skipping the test..."
10 exit 0
13 systemd-run --unit test-aux-scope.service \
14 --service-type notify -p Slice=aux.slice -p TasksMax=99 -p CPUWeight=199 -p IPAccounting=yes \
15 /usr/lib/systemd/tests/unit-tests/manual/test-aux-scope
16 kill -s USR1 "$(systemctl show --value --property MainPID test-aux-scope.service)"
18 timeout 30s bash -xec 'until systemctl is-active test-aux-scope.scope; do sleep 1; done'
20 systemctl status test-aux-scope.service
21 # shellcheck disable=SC2009
22 test "$(ps -eo pid,unit | grep -c test-aux-scope.service)" = 1
24 systemctl status test-aux-scope.scope
25 # shellcheck disable=SC2009
26 test "$(ps -eo pid,unit | grep -c test-aux-scope.scope)" = 10
28 test "$(systemctl show -p Slice --value test-aux-scope.scope)" = aux.slice
29 test "$(systemctl show -p TasksMax --value test-aux-scope.scope)" = 99
30 test "$(systemctl show -p CPUWeight --value test-aux-scope.scope)" = 199
31 test "$(systemctl show -p IPAccounting --value test-aux-scope.scope)" = yes
33 systemctl stop test-aux-scope.scope
34 systemctl stop test-aux-scope.service