teknoraver / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone

Blame SOURCES/0337-test-skip-the-test-on-systems-without-NUMA-support.patch

c2dfb7
From ad3e4a0f010c9497b01d89de54213af982f8afd2 Mon Sep 17 00:00:00 2001
c2dfb7
From: Frantisek Sumsal <frantisek@sumsal.cz>
c2dfb7
Date: Tue, 2 Jul 2019 09:52:45 +0200
c2dfb7
Subject: [PATCH] test: skip the test on systems without NUMA support
c2dfb7
c2dfb7
(cherry picked from commit b030847163e9bd63d3dd6eec6ac7f336411faba6)
c2dfb7
c2dfb7
Related: #1808940
c2dfb7
---
c2dfb7
 test/TEST-36-NUMAPOLICY/testsuite.sh | 13 ++++++++++++-
c2dfb7
 1 file changed, 12 insertions(+), 1 deletion(-)
c2dfb7
c2dfb7
diff --git a/test/TEST-36-NUMAPOLICY/testsuite.sh b/test/TEST-36-NUMAPOLICY/testsuite.sh
c2dfb7
index daed8fcc1c..4b715d305a 100755
c2dfb7
--- a/test/TEST-36-NUMAPOLICY/testsuite.sh
c2dfb7
+++ b/test/TEST-36-NUMAPOLICY/testsuite.sh
c2dfb7
@@ -123,7 +123,18 @@ systemctlCheckNUMAProperties() {
c2dfb7
     fi
c2dfb7
 }
c2dfb7
 
c2dfb7
-checkNUMA
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