dcavalca / rpms / systemd

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