]> git.ipfire.org Git - thirdparty/systemd.git/blob - test/TEST-36-NUMAPOLICY/test.sh
test: add function to reduce copied setup boilerplate
[thirdparty/systemd.git] / test / TEST-36-NUMAPOLICY / test.sh
1 #!/bin/bash
2 set -e
3
4 TEST_DESCRIPTION="test MUMAPolicy= and NUMAMask= options"
5 TEST_NO_NSPAWN=1
6 QEMU_OPTIONS="-numa node,nodeid=0"
7
8 . $TEST_BASE_DIR/test-functions
9
10 test_setup() {
11 create_empty_image_rootdir
12
13 (
14 LOG_LEVEL=5
15 eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
16
17 setup_basic_environment
18 mask_supporting_services
19 dracut_install mktemp
20
21 # setup the testsuite service
22 cat >$initdir/etc/systemd/system/testsuite.service <<EOF
23 [Unit]
24 Description=Testsuite service
25
26 [Service]
27 ExecStart=/bin/bash -x /testsuite.sh
28 Type=oneshot
29 EOF
30 cp testsuite.sh $initdir/
31
32 setup_testsuite
33 )
34 setup_nspawn_root
35 }
36
37 do_test "$@"