daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
b9a53a
From 8239ecf0b4b8bbe5b3c17964d230d13cee4d900a Mon Sep 17 00:00:00 2001
b9a53a
From: Frantisek Sumsal <frantisek@sumsal.cz>
b9a53a
Date: Mon, 5 Aug 2019 14:38:45 +0200
be3800
Subject: [PATCH] test: add a simple sanity check for systems without NUMA
be3800
 support
b9a53a
b9a53a
(cherry picked from commit 92f8e978923f962a57d744c5f358520ac06f7892)
b9a53a
b9a53a
Related: #1808940
b9a53a
---
b9a53a
 test/TEST-36-NUMAPOLICY/testsuite.sh | 350 ++++++++++++++-------------
b9a53a
 1 file changed, 180 insertions(+), 170 deletions(-)
b9a53a
b9a53a
diff --git a/test/TEST-36-NUMAPOLICY/testsuite.sh b/test/TEST-36-NUMAPOLICY/testsuite.sh
b9a53a
index 1c8cf7e6b6..a5ac788178 100755
b9a53a
--- a/test/TEST-36-NUMAPOLICY/testsuite.sh
b9a53a
+++ b/test/TEST-36-NUMAPOLICY/testsuite.sh
b9a53a
@@ -50,11 +50,12 @@ startJournalctl() {
b9a53a
 }
b9a53a
 
b9a53a
 stopJournalctl() {
b9a53a
+    local unit="${1:-init.scope}"
b9a53a
     # Using journalctl --sync should be better than using SIGRTMIN+1, as
b9a53a
     # the --sync wait until the synchronization is complete
b9a53a
     echo "Force journald to write all queued messages"
b9a53a
     journalctl --sync
b9a53a
-    journalctl -u init.scope --cursor-file="$journalCursorFile" > "$journalLog"
b9a53a
+    journalctl -u $unit --cursor-file="$journalCursorFile" > "$journalLog"
b9a53a
 }
b9a53a
 
b9a53a
 checkNUMA() {
b9a53a
@@ -125,181 +126,190 @@ systemctlCheckNUMAProperties() {
b9a53a
     fi
b9a53a
 }
b9a53a
 
b9a53a
-if ! checkNUMA; then
b9a53a
-    echo >&2 "NUMA is not supported on this machine, skipping the test"
b9a53a
-
b9a53a
-    # FIXME: add some sanity checks to verify systemd behaves correctly with
b9a53a
-    #        NUMA disabled together with NUMAPolicy= and NUMAMask=
b9a53a
-
b9a53a
-    systemd-analyze log-level info
b9a53a
-    echo OK > /testok
b9a53a
-
b9a53a
-    exit 0
b9a53a
-fi
b9a53a
-
b9a53a
 writeTestUnit
b9a53a
 
b9a53a
 # Create systemd config drop-in directory
b9a53a
 confDir="/etc/systemd/system.conf.d/"
b9a53a
 mkdir -p "$confDir"
b9a53a
 
b9a53a
-echo "PID1 NUMAPolicy support - Default policy w/o mask"
b9a53a
-writePID1NUMAPolicy "default"
b9a53a
-pid1ReloadWithStrace
b9a53a
-# Kernel requires that nodemask argument is set to NULL when setting default policy
b9a53a
-grep "set_mempolicy(MPOL_DEFAULT, NULL" $straceLog
b9a53a
-
b9a53a
-echo "PID1 NUMAPolicy support - Default policy w/ mask"
b9a53a
-writePID1NUMAPolicy "default" "0"
b9a53a
-pid1ReloadWithStrace
b9a53a
-grep "set_mempolicy(MPOL_DEFAULT, NULL" $straceLog
b9a53a
-
b9a53a
-echo "PID1 NUMAPolicy support - Bind policy w/o mask"
b9a53a
-writePID1NUMAPolicy "bind"
b9a53a
-pid1ReloadWithJournal
b9a53a
-grep "Failed to set NUMA memory policy: Invalid argument" $journalLog
b9a53a
-
b9a53a
-echo "PID1 NUMAPolicy support - Bind policy w/ mask"
b9a53a
-writePID1NUMAPolicy "bind" "0"
b9a53a
-pid1ReloadWithStrace
b9a53a
-grep -P "set_mempolicy\(MPOL_BIND, \[0x0*1\]" $straceLog
b9a53a
-
b9a53a
-echo "PID1 NUMAPolicy support - Interleave policy w/o mask"
b9a53a
-writePID1NUMAPolicy "interleave"
b9a53a
-pid1ReloadWithJournal
b9a53a
-grep "Failed to set NUMA memory policy: Invalid argument" $journalLog
b9a53a
-
b9a53a
-echo "PID1 NUMAPolicy support - Interleave policy w/ mask"
b9a53a
-writePID1NUMAPolicy "interleave" "0"
b9a53a
-pid1ReloadWithStrace
b9a53a
-grep -P "set_mempolicy\(MPOL_INTERLEAVE, \[0x0*1\]" $straceLog
b9a53a
-
b9a53a
-echo "PID1 NUMAPolicy support - Preferred policy w/o mask"
b9a53a
-writePID1NUMAPolicy "preferred"
b9a53a
-pid1ReloadWithJournal
b9a53a
-# Preferred policy with empty node mask is actually allowed and should reset allocation policy to default
b9a53a
-! grep "Failed to set NUMA memory policy: Invalid argument" $journalLog
b9a53a
-
b9a53a
-echo "PID1 NUMAPolicy support - Preferred policy w/ mask"
b9a53a
-writePID1NUMAPolicy "preferred" "0"
b9a53a
-pid1ReloadWithStrace
b9a53a
-grep -P "set_mempolicy\(MPOL_PREFERRED, \[0x0*1\]" $straceLog
b9a53a
-
b9a53a
-echo "PID1 NUMAPolicy support - Local policy w/o mask"
b9a53a
-writePID1NUMAPolicy "local"
b9a53a
-pid1ReloadWithStrace
b9a53a
-# Kernel requires that nodemask argument is set to NULL when setting default policy
b9a53a
-# The unpatched versions of strace don't recognize the MPOL_LOCAL constant and
b9a53a
-# return a numerical constant instead (with a comment):
b9a53a
-#   set_mempolicy(0x4 /* MPOL_??? */, NULL, 0) = 0
b9a53a
-# Let's cover this scenario as well
b9a53a
-grep -E "set_mempolicy\((MPOL_LOCAL|0x4 [^,]*), NULL" $straceLog
b9a53a
-
b9a53a
-echo "PID1 NUMAPolicy support - Local policy w/ mask"
b9a53a
-writePID1NUMAPolicy "local" "0"
b9a53a
-pid1ReloadWithStrace
b9a53a
-grep -E "set_mempolicy\((MPOL_LOCAL|0x4 [^,]*), NULL" $straceLog
b9a53a
-
b9a53a
-echo "Unit file NUMAPolicy support - Default policy w/o mask"
b9a53a
-writeTestUnitNUMAPolicy "default"
b9a53a
-pid1StartUnitWithStrace $testUnit
b9a53a
-systemctlCheckNUMAProperties $testUnit "default"
b9a53a
-pid1StopUnit $testUnit
b9a53a
-grep "set_mempolicy(MPOL_DEFAULT, NULL" $straceLog
b9a53a
-
b9a53a
-echo "Unit file NUMAPolicy support - Default policy w/ mask"
b9a53a
-writeTestUnitNUMAPolicy "default" "0"
b9a53a
-pid1StartUnitWithStrace $testUnit
b9a53a
-systemctlCheckNUMAProperties $testUnit "default" "0"
b9a53a
-pid1StopUnit $testUnit
b9a53a
-# Maks must be ignored
b9a53a
-grep "set_mempolicy(MPOL_DEFAULT, NULL" $straceLog
b9a53a
-
b9a53a
-echo "Unit file NUMAPolicy support - Bind policy w/o mask"
b9a53a
-writeTestUnitNUMAPolicy "bind"
b9a53a
-pid1StartUnitWithJournal $testUnit
b9a53a
-pid1StopUnit $testUnit
b9a53a
-grep "numa-test.service: Main process exited, code=exited, status=242/NUMA" $journalLog
b9a53a
-
b9a53a
-echo "Unit file NUMAPolicy support - Bind policy w/ mask"
b9a53a
-writeTestUnitNUMAPolicy "bind" "0"
b9a53a
-pid1StartUnitWithStrace $testUnit
b9a53a
-systemctlCheckNUMAProperties $testUnit "bind" "0"
b9a53a
-pid1StopUnit $testUnit
b9a53a
-grep -P "set_mempolicy\(MPOL_BIND, \[0x0*1\]" $straceLog
b9a53a
-
b9a53a
-echo "Unit file NUMAPolicy support - Interleave policy w/o mask"
b9a53a
-writeTestUnitNUMAPolicy "interleave"
b9a53a
-pid1StartUnitWithStrace $testUnit
b9a53a
-pid1StopUnit $testUnit
b9a53a
-grep "numa-test.service: Main process exited, code=exited, status=242/NUMA" $journalLog
b9a53a
-
b9a53a
-echo "Unit file NUMAPolicy support - Interleave policy w/ mask"
b9a53a
-writeTestUnitNUMAPolicy "interleave" "0"
b9a53a
-pid1StartUnitWithStrace $testUnit
b9a53a
-systemctlCheckNUMAProperties $testUnit "interleave" "0"
b9a53a
-pid1StopUnit $testUnit
b9a53a
-grep -P "set_mempolicy\(MPOL_INTERLEAVE, \[0x0*1\]" $straceLog
b9a53a
-
b9a53a
-echo "Unit file NUMAPolicy support - Preferred policy w/o mask"
b9a53a
-writeTestUnitNUMAPolicy "preferred"
b9a53a
-pid1StartUnitWithJournal $testUnit
b9a53a
-systemctlCheckNUMAProperties $testUnit "preferred"
b9a53a
-pid1StopUnit $testUnit
b9a53a
-! grep "numa-test.service: Main process exited, code=exited, status=242/NUMA" $journalLog
b9a53a
-
b9a53a
-echo "Unit file NUMAPolicy support - Preferred policy w/ mask"
b9a53a
-writeTestUnitNUMAPolicy "preferred" "0"
b9a53a
-pid1StartUnitWithStrace $testUnit
b9a53a
-systemctlCheckNUMAProperties $testUnit "preferred" "0"
b9a53a
-pid1StopUnit $testUnit
b9a53a
-grep -P "set_mempolicy\(MPOL_PREFERRED, \[0x0*1\]" $straceLog
b9a53a
-
b9a53a
-echo "Unit file NUMAPolicy support - Local policy w/o mask"
b9a53a
-writeTestUnitNUMAPolicy "local"
b9a53a
-pid1StartUnitWithStrace $testUnit
b9a53a
-systemctlCheckNUMAProperties $testUnit "local"
b9a53a
-pid1StopUnit $testUnit
b9a53a
-grep -E "set_mempolicy\((MPOL_LOCAL|0x4 [^,]*), NULL" $straceLog
b9a53a
-
b9a53a
-echo "Unit file NUMAPolicy support - Local policy w/ mask"
b9a53a
-writeTestUnitNUMAPolicy "local" "0"
b9a53a
-pid1StartUnitWithStrace $testUnit
b9a53a
-systemctlCheckNUMAProperties $testUnit "local" "0"
b9a53a
-pid1StopUnit $testUnit
b9a53a
-# Maks must be ignored
b9a53a
-grep -E "set_mempolicy\((MPOL_LOCAL|0x4 [^,]*), NULL" $straceLog
b9a53a
-
b9a53a
-echo "systemd-run NUMAPolicy support"
b9a53a
-runUnit='numa-systemd-run-test.service'
b9a53a
-
b9a53a
-systemd-run -p NUMAPolicy=default --unit $runUnit sleep 1000
b9a53a
-systemctlCheckNUMAProperties $runUnit "default"
b9a53a
-pid1StopUnit $runUnit
b9a53a
-
b9a53a
-systemd-run -p NUMAPolicy=default -p NUMAMask=0 --unit $runUnit sleep 1000
b9a53a
-systemctlCheckNUMAProperties $runUnit "default" ""
b9a53a
-pid1StopUnit $runUnit
b9a53a
-
b9a53a
-systemd-run -p NUMAPolicy=bind -p NUMAMask=0 --unit $runUnit sleep 1000
b9a53a
-systemctlCheckNUMAProperties $runUnit "bind" "0"
b9a53a
-pid1StopUnit $runUnit
b9a53a
-
b9a53a
-systemd-run -p NUMAPolicy=interleave -p NUMAMask=0 --unit $runUnit sleep 1000
b9a53a
-systemctlCheckNUMAProperties $runUnit "interleave" "0"
b9a53a
-pid1StopUnit $runUnit
b9a53a
-
b9a53a
-systemd-run -p NUMAPolicy=preferred -p NUMAMask=0 --unit $runUnit sleep 1000
b9a53a
-systemctlCheckNUMAProperties $runUnit "preferred" "0"
b9a53a
-pid1StopUnit $runUnit
b9a53a
-
b9a53a
-systemd-run -p NUMAPolicy=local --unit $runUnit sleep 1000
b9a53a
-systemctlCheckNUMAProperties $runUnit "local"
b9a53a
-pid1StopUnit $runUnit
b9a53a
-
b9a53a
-systemd-run -p NUMAPolicy=local -p NUMAMask=0 --unit $runUnit sleep 1000
b9a53a
-systemctlCheckNUMAProperties $runUnit "local" ""
b9a53a
-pid1StopUnit $runUnit
b9a53a
+if ! checkNUMA; then
b9a53a
+    echo >&2 "NUMA is not supported on this machine, switching to a simple sanity check"
b9a53a
+
b9a53a
+    echo "PID1 NUMAPolicy=default && NUMAMask=0 check without NUMA support"
b9a53a
+    writePID1NUMAPolicy "default" "0"
b9a53a
+    startJournalctl
b9a53a
+    systemctl daemon-reload
b9a53a
+    stopJournalctl
b9a53a
+    grep "NUMA support not available, ignoring" "$journalLog"
b9a53a
+
b9a53a
+    echo "systemd-run NUMAPolicy=default && NUMAMask=0 check without NUMA support"
b9a53a
+    runUnit='numa-systemd-run-test.service'
b9a53a
+    startJournalctl
b9a53a
+    systemd-run -p NUMAPolicy=default -p NUMAMask=0 --unit $runUnit sleep 1000
b9a53a
+    sleep $sleepAfterStart
b9a53a
+    pid1StopUnit $runUnit
b9a53a
+    stopJournalctl $runUnit
b9a53a
+    grep "NUMA support not available, ignoring" "$journalLog"
b9a53a
+
b9a53a
+else
b9a53a
+    echo "PID1 NUMAPolicy support - Default policy w/o mask"
b9a53a
+    writePID1NUMAPolicy "default"
b9a53a
+    pid1ReloadWithStrace
b9a53a
+    # Kernel requires that nodemask argument is set to NULL when setting default policy
b9a53a
+    grep "set_mempolicy(MPOL_DEFAULT, NULL" $straceLog
b9a53a
+
b9a53a
+    echo "PID1 NUMAPolicy support - Default policy w/ mask"
b9a53a
+    writePID1NUMAPolicy "default" "0"
b9a53a
+    pid1ReloadWithStrace
b9a53a
+    grep "set_mempolicy(MPOL_DEFAULT, NULL" $straceLog
b9a53a
+
b9a53a
+    echo "PID1 NUMAPolicy support - Bind policy w/o mask"
b9a53a
+    writePID1NUMAPolicy "bind"
b9a53a
+    pid1ReloadWithJournal
b9a53a
+    grep "Failed to set NUMA memory policy: Invalid argument" $journalLog
b9a53a
+
b9a53a
+    echo "PID1 NUMAPolicy support - Bind policy w/ mask"
b9a53a
+    writePID1NUMAPolicy "bind" "0"
b9a53a
+    pid1ReloadWithStrace
b9a53a
+    grep -P "set_mempolicy\(MPOL_BIND, \[0x0*1\]" $straceLog
b9a53a
+
b9a53a
+    echo "PID1 NUMAPolicy support - Interleave policy w/o mask"
b9a53a
+    writePID1NUMAPolicy "interleave"
b9a53a
+    pid1ReloadWithJournal
b9a53a
+    grep "Failed to set NUMA memory policy: Invalid argument" $journalLog
b9a53a
+
b9a53a
+    echo "PID1 NUMAPolicy support - Interleave policy w/ mask"
b9a53a
+    writePID1NUMAPolicy "interleave" "0"
b9a53a
+    pid1ReloadWithStrace
b9a53a
+    grep -P "set_mempolicy\(MPOL_INTERLEAVE, \[0x0*1\]" $straceLog
b9a53a
+
b9a53a
+    echo "PID1 NUMAPolicy support - Preferred policy w/o mask"
b9a53a
+    writePID1NUMAPolicy "preferred"
b9a53a
+    pid1ReloadWithJournal
b9a53a
+    # Preferred policy with empty node mask is actually allowed and should reset allocation policy to default
b9a53a
+    ! grep "Failed to set NUMA memory policy: Invalid argument" $journalLog
b9a53a
+
b9a53a
+    echo "PID1 NUMAPolicy support - Preferred policy w/ mask"
b9a53a
+    writePID1NUMAPolicy "preferred" "0"
b9a53a
+    pid1ReloadWithStrace
b9a53a
+    grep -P "set_mempolicy\(MPOL_PREFERRED, \[0x0*1\]" $straceLog
b9a53a
+
b9a53a
+    echo "PID1 NUMAPolicy support - Local policy w/o mask"
b9a53a
+    writePID1NUMAPolicy "local"
b9a53a
+    pid1ReloadWithStrace
b9a53a
+    # Kernel requires that nodemask argument is set to NULL when setting default policy
b9a53a
+    # The unpatched versions of strace don't recognize the MPOL_LOCAL constant and
b9a53a
+    # return a numerical constant instead (with a comment):
b9a53a
+    #   set_mempolicy(0x4 /* MPOL_??? */, NULL, 0) = 0
b9a53a
+    # Let's cover this scenario as well
b9a53a
+    grep -E "set_mempolicy\((MPOL_LOCAL|0x4 [^,]*), NULL" $straceLog
b9a53a
+
b9a53a
+    echo "PID1 NUMAPolicy support - Local policy w/ mask"
b9a53a
+    writePID1NUMAPolicy "local" "0"
b9a53a
+    pid1ReloadWithStrace
b9a53a
+    grep -E "set_mempolicy\((MPOL_LOCAL|0x4 [^,]*), NULL" $straceLog
b9a53a
+
b9a53a
+    echo "Unit file NUMAPolicy support - Default policy w/o mask"
b9a53a
+    writeTestUnitNUMAPolicy "default"
b9a53a
+    pid1StartUnitWithStrace $testUnit
b9a53a
+    systemctlCheckNUMAProperties $testUnit "default"
b9a53a
+    pid1StopUnit $testUnit
b9a53a
+    grep "set_mempolicy(MPOL_DEFAULT, NULL" $straceLog
b9a53a
+
b9a53a
+    echo "Unit file NUMAPolicy support - Default policy w/ mask"
b9a53a
+    writeTestUnitNUMAPolicy "default" "0"
b9a53a
+    pid1StartUnitWithStrace $testUnit
b9a53a
+    systemctlCheckNUMAProperties $testUnit "default" "0"
b9a53a
+    pid1StopUnit $testUnit
b9a53a
+    # Maks must be ignored
b9a53a
+    grep "set_mempolicy(MPOL_DEFAULT, NULL" $straceLog
b9a53a
+
b9a53a
+    echo "Unit file NUMAPolicy support - Bind policy w/o mask"
b9a53a
+    writeTestUnitNUMAPolicy "bind"
b9a53a
+    pid1StartUnitWithJournal $testUnit
b9a53a
+    pid1StopUnit $testUnit
b9a53a
+    grep "numa-test.service: Main process exited, code=exited, status=242/NUMA" $journalLog
b9a53a
+
b9a53a
+    echo "Unit file NUMAPolicy support - Bind policy w/ mask"
b9a53a
+    writeTestUnitNUMAPolicy "bind" "0"
b9a53a
+    pid1StartUnitWithStrace $testUnit
b9a53a
+    systemctlCheckNUMAProperties $testUnit "bind" "0"
b9a53a
+    pid1StopUnit $testUnit
b9a53a
+    grep -P "set_mempolicy\(MPOL_BIND, \[0x0*1\]" $straceLog
b9a53a
+
b9a53a
+    echo "Unit file NUMAPolicy support - Interleave policy w/o mask"
b9a53a
+    writeTestUnitNUMAPolicy "interleave"
b9a53a
+    pid1StartUnitWithStrace $testUnit
b9a53a
+    pid1StopUnit $testUnit
b9a53a
+    grep "numa-test.service: Main process exited, code=exited, status=242/NUMA" $journalLog
b9a53a
+
b9a53a
+    echo "Unit file NUMAPolicy support - Interleave policy w/ mask"
b9a53a
+    writeTestUnitNUMAPolicy "interleave" "0"
b9a53a
+    pid1StartUnitWithStrace $testUnit
b9a53a
+    systemctlCheckNUMAProperties $testUnit "interleave" "0"
b9a53a
+    pid1StopUnit $testUnit
b9a53a
+    grep -P "set_mempolicy\(MPOL_INTERLEAVE, \[0x0*1\]" $straceLog
b9a53a
+
b9a53a
+    echo "Unit file NUMAPolicy support - Preferred policy w/o mask"
b9a53a
+    writeTestUnitNUMAPolicy "preferred"
b9a53a
+    pid1StartUnitWithJournal $testUnit
b9a53a
+    systemctlCheckNUMAProperties $testUnit "preferred"
b9a53a
+    pid1StopUnit $testUnit
b9a53a
+    ! grep "numa-test.service: Main process exited, code=exited, status=242/NUMA" $journalLog
b9a53a
+
b9a53a
+    echo "Unit file NUMAPolicy support - Preferred policy w/ mask"
b9a53a
+    writeTestUnitNUMAPolicy "preferred" "0"
b9a53a
+    pid1StartUnitWithStrace $testUnit
b9a53a
+    systemctlCheckNUMAProperties $testUnit "preferred" "0"
b9a53a
+    pid1StopUnit $testUnit
b9a53a
+    grep -P "set_mempolicy\(MPOL_PREFERRED, \[0x0*1\]" $straceLog
b9a53a
+
b9a53a
+    echo "Unit file NUMAPolicy support - Local policy w/o mask"
b9a53a
+    writeTestUnitNUMAPolicy "local"
b9a53a
+    pid1StartUnitWithStrace $testUnit
b9a53a
+    systemctlCheckNUMAProperties $testUnit "local"
b9a53a
+    pid1StopUnit $testUnit
b9a53a
+    grep -E "set_mempolicy\((MPOL_LOCAL|0x4 [^,]*), NULL" $straceLog
b9a53a
+
b9a53a
+    echo "Unit file NUMAPolicy support - Local policy w/ mask"
b9a53a
+    writeTestUnitNUMAPolicy "local" "0"
b9a53a
+    pid1StartUnitWithStrace $testUnit
b9a53a
+    systemctlCheckNUMAProperties $testUnit "local" "0"
b9a53a
+    pid1StopUnit $testUnit
b9a53a
+    # Maks must be ignored
b9a53a
+    grep -E "set_mempolicy\((MPOL_LOCAL|0x4 [^,]*), NULL" $straceLog
b9a53a
+
b9a53a
+    echo "systemd-run NUMAPolicy support"
b9a53a
+    runUnit='numa-systemd-run-test.service'
b9a53a
+
b9a53a
+    systemd-run -p NUMAPolicy=default --unit $runUnit sleep 1000
b9a53a
+    systemctlCheckNUMAProperties $runUnit "default"
b9a53a
+    pid1StopUnit $runUnit
b9a53a
+
b9a53a
+    systemd-run -p NUMAPolicy=default -p NUMAMask=0 --unit $runUnit sleep 1000
b9a53a
+    systemctlCheckNUMAProperties $runUnit "default" ""
b9a53a
+    pid1StopUnit $runUnit
b9a53a
+
b9a53a
+    systemd-run -p NUMAPolicy=bind -p NUMAMask=0 --unit $runUnit sleep 1000
b9a53a
+    systemctlCheckNUMAProperties $runUnit "bind" "0"
b9a53a
+    pid1StopUnit $runUnit
b9a53a
+
b9a53a
+    systemd-run -p NUMAPolicy=interleave -p NUMAMask=0 --unit $runUnit sleep 1000
b9a53a
+    systemctlCheckNUMAProperties $runUnit "interleave" "0"
b9a53a
+    pid1StopUnit $runUnit
b9a53a
+
b9a53a
+    systemd-run -p NUMAPolicy=preferred -p NUMAMask=0 --unit $runUnit sleep 1000
b9a53a
+    systemctlCheckNUMAProperties $runUnit "preferred" "0"
b9a53a
+    pid1StopUnit $runUnit
b9a53a
+
b9a53a
+    systemd-run -p NUMAPolicy=local --unit $runUnit sleep 1000
b9a53a
+    systemctlCheckNUMAProperties $runUnit "local"
b9a53a
+    pid1StopUnit $runUnit
b9a53a
+
b9a53a
+    systemd-run -p NUMAPolicy=local -p NUMAMask=0 --unit $runUnit sleep 1000
b9a53a
+    systemctlCheckNUMAProperties $runUnit "local" ""
b9a53a
+    pid1StopUnit $runUnit
b9a53a
+fi
b9a53a
 
b9a53a
 # Cleanup
b9a53a
 rm -rf $testDir