anitazha / rpms / systemd

Forked from rpms/systemd 3 years ago
Clone
5d2ee9
From ad3e4a0f010c9497b01d89de54213af982f8afd2 Mon Sep 17 00:00:00 2001
5d2ee9
From: Frantisek Sumsal <frantisek@sumsal.cz>
5d2ee9
Date: Tue, 2 Jul 2019 09:52:45 +0200
4cad4c
Subject: [PATCH] test: skip the test on systems without NUMA support
5d2ee9
5d2ee9
(cherry picked from commit b030847163e9bd63d3dd6eec6ac7f336411faba6)
5d2ee9
5d2ee9
Related: #1808940
5d2ee9
---
5d2ee9
 test/TEST-36-NUMAPOLICY/testsuite.sh | 13 ++++++++++++-
5d2ee9
 1 file changed, 12 insertions(+), 1 deletion(-)
5d2ee9
5d2ee9
diff --git a/test/TEST-36-NUMAPOLICY/testsuite.sh b/test/TEST-36-NUMAPOLICY/testsuite.sh
5d2ee9
index daed8fcc1c..4b715d305a 100755
5d2ee9
--- a/test/TEST-36-NUMAPOLICY/testsuite.sh
5d2ee9
+++ b/test/TEST-36-NUMAPOLICY/testsuite.sh
5d2ee9
@@ -123,7 +123,18 @@ systemctlCheckNUMAProperties() {
5d2ee9
     fi
5d2ee9
 }
5d2ee9
 
5d2ee9
-checkNUMA
5d2ee9
+if ! checkNUMA; then
5d2ee9
+    echo >&2 "NUMA is not supported on this machine, skipping the test"
5d2ee9
+
5d2ee9
+    # FIXME: add some sanity checks to verify systemd behaves correctly with
5d2ee9
+    #        NUMA disabled together with NUMAPolicy= and NUMAMask=
5d2ee9
+
5d2ee9
+    systemd-analyze log-level info
5d2ee9
+    echo OK > /testok
5d2ee9
+
5d2ee9
+    exit 0
5d2ee9
+fi
5d2ee9
+
5d2ee9
 writeTestUnit
5d2ee9
 
5d2ee9
 # Create systemd config drop-in directory