]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Merge pull request #13265 from keszybz/timedated-ntp-logging
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 6 Aug 2019 23:07:57 +0000 (08:07 +0900)
committerGitHub <noreply@github.com>
Tue, 6 Aug 2019 23:07:57 +0000 (08:07 +0900)
Timedated logging and service priority

13 files changed:
man/resolvectl.xml
src/core/meson.build
src/login/logind-action.c
src/login/logind-button.c
src/shared/exit-status.c
src/systemctl/systemctl.c
src/test/test-exit-status.c
src/udev/udev-rules.c
test/TEST-36-NUMAPOLICY/Makefile [new symlink]
test/TEST-36-NUMAPOLICY/test.sh [new file with mode: 0755]
test/TEST-36-NUMAPOLICY/testsuite.sh [new file with mode: 0755]
test/test-functions
units/systemd-random-seed.service.in

index a59fa4c66d2e5ca0fa0b2125a3b93527e0c0472e..ccc1b378f8ceb00e39d595acd602b10c349432ba 100644 (file)
       <varlistentry>
         <term><option>status [<replaceable>LINK</replaceable>…]</option></term>
 
-        <listitem><para>Shows the global and per-link DNS settings in currently in effect. If no command is specified,
+        <listitem><para>Shows the global and per-link DNS settings currently in effect. If no command is specified,
         this is the implied default.</para></listitem>
       </varlistentry>
 
index 267d65a3b229d66134d9a0948a60169b304c0a01..fb6820e109a9e0c2faab21123a512f305ea6e09b 100644 (file)
@@ -212,7 +212,6 @@ meson.add_install_script('sh', '-c', mkdir_p.format(systemsleepdir))
 meson.add_install_script('sh', '-c', mkdir_p.format(systemgeneratordir))
 meson.add_install_script('sh', '-c', mkdir_p.format(usergeneratordir))
 
-meson.add_install_script('sh', '-c',
-                         mkdir_p.format(join_paths(pkgsysconfdir, 'user')))
-meson.add_install_script('sh', '-c',
-                         mkdir_p.format(join_paths(sysconfdir, 'xdg/systemd')))
+meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(pkgsysconfdir, 'system')))
+meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(pkgsysconfdir, 'user')))
+meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(sysconfdir, 'xdg/systemd')))
index fa92f4870a29090d400ed3f68d29ee5ef694de64..140953eec104afe107b581f6be3e961634d16bef 100644 (file)
@@ -61,8 +61,12 @@ int manager_handle_action(
         int r;
 
         assert(m);
-        /* We should be called only with valid actions different than HANDLE_IGNORE. */
-        assert(handle > HANDLE_IGNORE && handle < _HANDLE_ACTION_MAX);
+
+        /* If the key handling is turned off, don't do anything */
+        if (handle == HANDLE_IGNORE) {
+                log_debug("Refusing operation, as it is turned off.");
+                return 0;
+        }
 
         if (inhibit_key == INHIBIT_HANDLE_LID_SWITCH) {
                 /* If the last system suspend or startup is too close,
index 86c9121f270bdd90f40f57d141053cd07fbfe3ba..5598fb2c0b30e6187008779533aafdc256b310a8 100644 (file)
@@ -339,7 +339,7 @@ int button_open(Button *b) {
                 return log_error_errno(errno, "Failed to get input name for %s: %m", p);
 
         (void) button_set_mask(b->name, fd);
-        
+
         b->io_event_source = sd_event_source_unref(b->io_event_source);
         r = sd_event_add_io(b->manager->event, &b->io_event_source, fd, EPOLLIN, button_dispatch, b);
         if (r < 0)
index 44b1c9b749e457f48b88d1c34b789c05888ddd76..82b1422b2d16a8f08f769001298f158613e03a09 100644 (file)
@@ -18,8 +18,8 @@ const ExitStatusMapping exit_status_mappings[256] = {
          *   8…63  │ (Currently unmapped)
          *  64…78  │ BSD defined exit codes
          *  79…199 │ (Currently unmapped)
-         * 200…241 │ systemd's private error codes (might be extended to 254 in future development)
-         * 242…254 │ (Currently unmapped, but see above)
+         * 200…242 │ systemd's private error codes (might be extended to 254 in future development)
+         * 243…254 │ (Currently unmapped, but see above)
          *
          *   255   │ EXIT_EXCEPTION (We use this to propagate exit-by-signal events. It's frequently used by others apps (like bash)
          *         │ to indicate exit reason that cannot really be expressed in a single exit status value — such as a propagated
@@ -99,7 +99,7 @@ const ExitStatusMapping exit_status_mappings[256] = {
 const char* exit_status_to_string(int code, ExitStatusClass class) {
         if (code < 0 || (size_t) code >= ELEMENTSOF(exit_status_mappings))
                 return NULL;
-        return FLAGS_SET(exit_status_mappings[code].class, class) ? exit_status_mappings[code].name : NULL;
+        return class & exit_status_mappings[code].class ? exit_status_mappings[code].name : NULL;
 }
 
 const char* exit_status_class(int code) {
index ec3e2a31dd433689f3a5f0a9c61348d4972e5d9e..d3c643bfad42f1daffab3a83f936c50ca2bc7114 100644 (file)
@@ -83,6 +83,7 @@
 #include "terminal-util.h"
 #include "tmpfile-util.h"
 #include "unit-def.h"
+#include "unit-file.h"
 #include "unit-name.h"
 #include "user-util.h"
 #include "utf8.h"
@@ -7903,6 +7904,10 @@ static void help_states(void) {
                 puts("\nAvailable unit active states:");
         DUMP_STRING_TABLE(unit_active_state, UnitActiveState, _UNIT_ACTIVE_STATE_MAX);
 
+        if (!arg_no_legend)
+                puts("\nAvailable unit file states:");
+        DUMP_STRING_TABLE(unit_file_state, UnitFileState, _UNIT_FILE_STATE_MAX);
+
         if (!arg_no_legend)
                 puts("\nAvailable automount unit substates:");
         DUMP_STRING_TABLE(automount_state, AutomountState, _AUTOMOUNT_STATE_MAX);
index 3bcebd06a481d87ac3e978fc9d4796c2c9a8581e..a007bda5c414ea8f965881e41633a585131cb7b4 100644 (file)
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
 #include "exit-status.h"
+#include "string-util.h"
 #include "tests.h"
 
 static void test_exit_status_to_string(void) {
@@ -31,11 +32,21 @@ static void test_exit_status_from_string(void) {
         assert_se(exit_status_from_string("FAILURE") == 1);
 }
 
+static void test_exit_status_NUMA_POLICY(void) {
+        log_info("/* %s */", __func__);
+
+        assert_se(streq(exit_status_to_string(EXIT_NUMA_POLICY, EXIT_STATUS_FULL), "NUMA_POLICY"));
+        assert_se(streq(exit_status_to_string(EXIT_NUMA_POLICY, EXIT_STATUS_SYSTEMD), "NUMA_POLICY"));
+        assert_se(!exit_status_to_string(EXIT_NUMA_POLICY, EXIT_STATUS_BSD));
+        assert_se(!exit_status_to_string(EXIT_NUMA_POLICY, EXIT_STATUS_LSB));
+}
+
 int main(int argc, char *argv[]) {
         test_setup_logging(LOG_DEBUG);
 
         test_exit_status_to_string();
         test_exit_status_from_string();
+        test_exit_status_NUMA_POLICY();
 
         return 0;
 }
index 3473a7eb7e5bc1ca2f7e2cde267dcf5d2079d927..1642f105354674746b899f9072332d2ddbb49391 100644 (file)
@@ -1401,8 +1401,10 @@ static int get_property_from_string(char *line, char **ret_key, char **ret_value
         key = skip_leading_chars(line, NULL);
 
         /* comment or empty line */
-        if (IN_SET(key[0], '#', '\0'))
+        if (IN_SET(key[0], '#', '\0')) {
+                *ret_key = *ret_value = NULL;
                 return 0;
+        }
 
         /* split key/value */
         val = strchr(key, '=');
@@ -1429,7 +1431,7 @@ static int get_property_from_string(char *line, char **ret_key, char **ret_value
 
         *ret_key = key;
         *ret_value = val;
-        return 0;
+        return 1;
 }
 
 static int import_parent_into_properties(sd_device *dev, const char *filter) {
@@ -1681,6 +1683,8 @@ static int udev_rule_apply_token_to_event(
                                                      line);
                                 continue;
                         }
+                        if (r == 0)
+                                continue;
 
                         r = device_add_property(dev, key, value);
                         if (r < 0)
@@ -1719,6 +1723,8 @@ static int udev_rule_apply_token_to_event(
                                                      line);
                                 continue;
                         }
+                        if (r == 0)
+                                continue;
 
                         r = device_add_property(dev, key, value);
                         if (r < 0)
diff --git a/test/TEST-36-NUMAPOLICY/Makefile b/test/TEST-36-NUMAPOLICY/Makefile
new file mode 120000 (symlink)
index 0000000..e9f93b1
--- /dev/null
@@ -0,0 +1 @@
+../TEST-01-BASIC/Makefile
\ No newline at end of file
diff --git a/test/TEST-36-NUMAPOLICY/test.sh b/test/TEST-36-NUMAPOLICY/test.sh
new file mode 100755 (executable)
index 0000000..f0a321e
--- /dev/null
@@ -0,0 +1,51 @@
+#!/bin/bash
+set -e
+TEST_DESCRIPTION="test MUMAPolicy= and NUMAMask= options"
+TEST_NO_NSPAWN=1
+QEMU_OPTIONS="-numa node,nodeid=0"
+
+. $TEST_BASE_DIR/test-functions
+
+test_setup() {
+    create_empty_image
+    mkdir -p $TESTDIR/root
+    mount ${LOOPDEV}p1 $TESTDIR/root
+
+    (
+        LOG_LEVEL=5
+        eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
+
+        setup_basic_environment
+        dracut_install mktemp
+
+        # mask some services that we do not want to run in these tests
+        ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
+        ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
+        ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
+        ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
+        ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
+        ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
+
+        # setup the testsuite service
+        cat >$initdir/etc/systemd/system/testsuite.service <<EOF
+[Unit]
+Description=Testsuite service
+
+[Service]
+ExecStart=/bin/bash -x /testsuite.sh
+Type=oneshot
+StandardOutput=tty
+StandardError=tty
+NotifyAccess=all
+EOF
+        cp testsuite.sh $initdir/
+
+        setup_testsuite
+    ) || return 1
+    setup_nspawn_root
+
+    ddebug "umount $TESTDIR/root"
+    umount $TESTDIR/root
+}
+
+do_test "$@"
diff --git a/test/TEST-36-NUMAPOLICY/testsuite.sh b/test/TEST-36-NUMAPOLICY/testsuite.sh
new file mode 100755 (executable)
index 0000000..a5ac788
--- /dev/null
@@ -0,0 +1,323 @@
+#!/bin/bash
+set -ex
+set -o pipefail
+
+at_exit() {
+    if [ $? -ne 0 ]; then
+        # We're exiting with a non-zero EC, let's dump test artifacts
+        # for easier debugging
+        [ -f "$straceLog" ] && cat "$straceLog"
+        [ -f "$journalLog" ] && cat "$journalLog"
+    fi
+}
+
+trap at_exit EXIT
+
+systemd-analyze log-level debug
+systemd-analyze log-target journal
+
+# Log files
+straceLog='strace.log'
+journalLog='journal.log'
+
+# Systemd config files
+testUnit='numa-test.service'
+testUnitFile="/etc/systemd/system/$testUnit"
+testUnitNUMAConf="$testUnitFile.d/numa.conf"
+
+# Sleep constants (we should probably figure out something better but nothing comes to mind)
+journalSleep=5
+sleepAfterStart=1
+
+# Journal cursor for easier navigation
+journalCursorFile="jounalCursorFile"
+
+startStrace() {
+    coproc strace -qq -p 1 -o $straceLog -e set_mempolicy -s 1024 $1
+    # Wait for strace to properly "initialize"
+    sleep $sleepAfterStart
+}
+
+stopStrace() {
+    kill -s TERM $COPROC_PID
+    # Make sure the strace process is indeed dead
+    while kill -0 $COPROC_PID 2>/dev/null; do sleep 0.1; done
+}
+
+startJournalctl() {
+    # Save journal's cursor for later navigation
+    journalctl --no-pager --cursor-file="$journalCursorFile" -n0 -ocat
+}
+
+stopJournalctl() {
+    local unit="${1:-init.scope}"
+    # Using journalctl --sync should be better than using SIGRTMIN+1, as
+    # the --sync wait until the synchronization is complete
+    echo "Force journald to write all queued messages"
+    journalctl --sync
+    journalctl -u $unit --cursor-file="$journalCursorFile" > "$journalLog"
+}
+
+checkNUMA() {
+    # NUMA enabled system should have at least NUMA node0
+    test -e /sys/devices/system/node/node0
+}
+
+writePID1NUMAPolicy() {
+    echo [Manager] > $confDir/numa.conf
+    echo NUMAPolicy=$1 >> $confDir/numa.conf
+    echo NUMAMask=$2>> $confDir/numa.conf
+}
+
+writeTestUnit() {
+    echo [Service] > $testUnitFile
+    echo ExecStart=/bin/sleep 3600 >> $testUnitFile
+    mkdir -p $testUnitFile.d/
+}
+
+writeTestUnitNUMAPolicy() {
+    echo [Service] > $testUnitNUMAConf
+    echo NUMAPolicy=$1 >> $testUnitNUMAConf
+    echo NUMAMask=$2>> $testUnitNUMAConf
+    systemctl daemon-reload
+}
+
+pid1ReloadWithStrace() {
+    startStrace
+    systemctl daemon-reload
+    sleep $sleepAfterStart
+    stopStrace
+}
+
+pid1ReloadWithJournal() {
+    startJournalctl
+    systemctl daemon-reload
+    stopJournalctl
+}
+
+pid1StartUnitWithStrace() {
+    startStrace '-f'
+    systemctl start $1
+    sleep $sleepAfterStart
+    stopStrace
+}
+
+pid1StartUnitWithJournal() {
+    startJournalctl
+    systemctl start $1
+    sleep $sleepAfterStart
+    stopJournalctl
+}
+
+pid1StopUnit() {
+    systemctl stop $1
+}
+
+systemctlCheckNUMAProperties() {
+    local LOGFILE="$(mktemp)"
+    systemctl show -p NUMAPolicy $1 > "$LOGFILE"
+    grep "NUMAPolicy=$2" "$LOGFILE"
+
+    > "$LOGFILE"
+
+    if [ -n $3 ]; then
+        systemctl show -p NUMAMask $1 > "$LOGFILE"
+        grep "NUMAMask=$3" "$LOGFILE"
+    fi
+}
+
+writeTestUnit
+
+# Create systemd config drop-in directory
+confDir="/etc/systemd/system.conf.d/"
+mkdir -p "$confDir"
+
+if ! checkNUMA; then
+    echo >&2 "NUMA is not supported on this machine, switching to a simple sanity check"
+
+    echo "PID1 NUMAPolicy=default && NUMAMask=0 check without NUMA support"
+    writePID1NUMAPolicy "default" "0"
+    startJournalctl
+    systemctl daemon-reload
+    stopJournalctl
+    grep "NUMA support not available, ignoring" "$journalLog"
+
+    echo "systemd-run NUMAPolicy=default && NUMAMask=0 check without NUMA support"
+    runUnit='numa-systemd-run-test.service'
+    startJournalctl
+    systemd-run -p NUMAPolicy=default -p NUMAMask=0 --unit $runUnit sleep 1000
+    sleep $sleepAfterStart
+    pid1StopUnit $runUnit
+    stopJournalctl $runUnit
+    grep "NUMA support not available, ignoring" "$journalLog"
+
+else
+    echo "PID1 NUMAPolicy support - Default policy w/o mask"
+    writePID1NUMAPolicy "default"
+    pid1ReloadWithStrace
+    # Kernel requires that nodemask argument is set to NULL when setting default policy
+    grep "set_mempolicy(MPOL_DEFAULT, NULL" $straceLog
+
+    echo "PID1 NUMAPolicy support - Default policy w/ mask"
+    writePID1NUMAPolicy "default" "0"
+    pid1ReloadWithStrace
+    grep "set_mempolicy(MPOL_DEFAULT, NULL" $straceLog
+
+    echo "PID1 NUMAPolicy support - Bind policy w/o mask"
+    writePID1NUMAPolicy "bind"
+    pid1ReloadWithJournal
+    grep "Failed to set NUMA memory policy: Invalid argument" $journalLog
+
+    echo "PID1 NUMAPolicy support - Bind policy w/ mask"
+    writePID1NUMAPolicy "bind" "0"
+    pid1ReloadWithStrace
+    grep -P "set_mempolicy\(MPOL_BIND, \[0x0*1\]" $straceLog
+
+    echo "PID1 NUMAPolicy support - Interleave policy w/o mask"
+    writePID1NUMAPolicy "interleave"
+    pid1ReloadWithJournal
+    grep "Failed to set NUMA memory policy: Invalid argument" $journalLog
+
+    echo "PID1 NUMAPolicy support - Interleave policy w/ mask"
+    writePID1NUMAPolicy "interleave" "0"
+    pid1ReloadWithStrace
+    grep -P "set_mempolicy\(MPOL_INTERLEAVE, \[0x0*1\]" $straceLog
+
+    echo "PID1 NUMAPolicy support - Preferred policy w/o mask"
+    writePID1NUMAPolicy "preferred"
+    pid1ReloadWithJournal
+    # Preferred policy with empty node mask is actually allowed and should reset allocation policy to default
+    ! grep "Failed to set NUMA memory policy: Invalid argument" $journalLog
+
+    echo "PID1 NUMAPolicy support - Preferred policy w/ mask"
+    writePID1NUMAPolicy "preferred" "0"
+    pid1ReloadWithStrace
+    grep -P "set_mempolicy\(MPOL_PREFERRED, \[0x0*1\]" $straceLog
+
+    echo "PID1 NUMAPolicy support - Local policy w/o mask"
+    writePID1NUMAPolicy "local"
+    pid1ReloadWithStrace
+    # Kernel requires that nodemask argument is set to NULL when setting default policy
+    # The unpatched versions of strace don't recognize the MPOL_LOCAL constant and
+    # return a numerical constant instead (with a comment):
+    #   set_mempolicy(0x4 /* MPOL_??? */, NULL, 0) = 0
+    # Let's cover this scenario as well
+    grep -E "set_mempolicy\((MPOL_LOCAL|0x4 [^,]*), NULL" $straceLog
+
+    echo "PID1 NUMAPolicy support - Local policy w/ mask"
+    writePID1NUMAPolicy "local" "0"
+    pid1ReloadWithStrace
+    grep -E "set_mempolicy\((MPOL_LOCAL|0x4 [^,]*), NULL" $straceLog
+
+    echo "Unit file NUMAPolicy support - Default policy w/o mask"
+    writeTestUnitNUMAPolicy "default"
+    pid1StartUnitWithStrace $testUnit
+    systemctlCheckNUMAProperties $testUnit "default"
+    pid1StopUnit $testUnit
+    grep "set_mempolicy(MPOL_DEFAULT, NULL" $straceLog
+
+    echo "Unit file NUMAPolicy support - Default policy w/ mask"
+    writeTestUnitNUMAPolicy "default" "0"
+    pid1StartUnitWithStrace $testUnit
+    systemctlCheckNUMAProperties $testUnit "default" "0"
+    pid1StopUnit $testUnit
+    # Maks must be ignored
+    grep "set_mempolicy(MPOL_DEFAULT, NULL" $straceLog
+
+    echo "Unit file NUMAPolicy support - Bind policy w/o mask"
+    writeTestUnitNUMAPolicy "bind"
+    pid1StartUnitWithJournal $testUnit
+    pid1StopUnit $testUnit
+    grep "numa-test.service: Main process exited, code=exited, status=242/NUMA" $journalLog
+
+    echo "Unit file NUMAPolicy support - Bind policy w/ mask"
+    writeTestUnitNUMAPolicy "bind" "0"
+    pid1StartUnitWithStrace $testUnit
+    systemctlCheckNUMAProperties $testUnit "bind" "0"
+    pid1StopUnit $testUnit
+    grep -P "set_mempolicy\(MPOL_BIND, \[0x0*1\]" $straceLog
+
+    echo "Unit file NUMAPolicy support - Interleave policy w/o mask"
+    writeTestUnitNUMAPolicy "interleave"
+    pid1StartUnitWithStrace $testUnit
+    pid1StopUnit $testUnit
+    grep "numa-test.service: Main process exited, code=exited, status=242/NUMA" $journalLog
+
+    echo "Unit file NUMAPolicy support - Interleave policy w/ mask"
+    writeTestUnitNUMAPolicy "interleave" "0"
+    pid1StartUnitWithStrace $testUnit
+    systemctlCheckNUMAProperties $testUnit "interleave" "0"
+    pid1StopUnit $testUnit
+    grep -P "set_mempolicy\(MPOL_INTERLEAVE, \[0x0*1\]" $straceLog
+
+    echo "Unit file NUMAPolicy support - Preferred policy w/o mask"
+    writeTestUnitNUMAPolicy "preferred"
+    pid1StartUnitWithJournal $testUnit
+    systemctlCheckNUMAProperties $testUnit "preferred"
+    pid1StopUnit $testUnit
+    ! grep "numa-test.service: Main process exited, code=exited, status=242/NUMA" $journalLog
+
+    echo "Unit file NUMAPolicy support - Preferred policy w/ mask"
+    writeTestUnitNUMAPolicy "preferred" "0"
+    pid1StartUnitWithStrace $testUnit
+    systemctlCheckNUMAProperties $testUnit "preferred" "0"
+    pid1StopUnit $testUnit
+    grep -P "set_mempolicy\(MPOL_PREFERRED, \[0x0*1\]" $straceLog
+
+    echo "Unit file NUMAPolicy support - Local policy w/o mask"
+    writeTestUnitNUMAPolicy "local"
+    pid1StartUnitWithStrace $testUnit
+    systemctlCheckNUMAProperties $testUnit "local"
+    pid1StopUnit $testUnit
+    grep -E "set_mempolicy\((MPOL_LOCAL|0x4 [^,]*), NULL" $straceLog
+
+    echo "Unit file NUMAPolicy support - Local policy w/ mask"
+    writeTestUnitNUMAPolicy "local" "0"
+    pid1StartUnitWithStrace $testUnit
+    systemctlCheckNUMAProperties $testUnit "local" "0"
+    pid1StopUnit $testUnit
+    # Maks must be ignored
+    grep -E "set_mempolicy\((MPOL_LOCAL|0x4 [^,]*), NULL" $straceLog
+
+    echo "systemd-run NUMAPolicy support"
+    runUnit='numa-systemd-run-test.service'
+
+    systemd-run -p NUMAPolicy=default --unit $runUnit sleep 1000
+    systemctlCheckNUMAProperties $runUnit "default"
+    pid1StopUnit $runUnit
+
+    systemd-run -p NUMAPolicy=default -p NUMAMask=0 --unit $runUnit sleep 1000
+    systemctlCheckNUMAProperties $runUnit "default" ""
+    pid1StopUnit $runUnit
+
+    systemd-run -p NUMAPolicy=bind -p NUMAMask=0 --unit $runUnit sleep 1000
+    systemctlCheckNUMAProperties $runUnit "bind" "0"
+    pid1StopUnit $runUnit
+
+    systemd-run -p NUMAPolicy=interleave -p NUMAMask=0 --unit $runUnit sleep 1000
+    systemctlCheckNUMAProperties $runUnit "interleave" "0"
+    pid1StopUnit $runUnit
+
+    systemd-run -p NUMAPolicy=preferred -p NUMAMask=0 --unit $runUnit sleep 1000
+    systemctlCheckNUMAProperties $runUnit "preferred" "0"
+    pid1StopUnit $runUnit
+
+    systemd-run -p NUMAPolicy=local --unit $runUnit sleep 1000
+    systemctlCheckNUMAProperties $runUnit "local"
+    pid1StopUnit $runUnit
+
+    systemd-run -p NUMAPolicy=local -p NUMAMask=0 --unit $runUnit sleep 1000
+    systemctlCheckNUMAProperties $runUnit "local" ""
+    pid1StopUnit $runUnit
+fi
+
+# Cleanup
+rm -rf $testDir
+rm -rf $confDir
+systemctl daemon-reload
+
+systemd-analyze log-level info
+
+echo OK > /testok
+
+exit 0
index 37bdfd58dce7b623c4c1347c454f6e7c943bd1bf..6523db01b96e98f019c878e20f9fe22fbe03b53e 100644 (file)
@@ -209,6 +209,7 @@ $KERNEL_APPEND \
 -nographic \
 -kernel $KERNEL_BIN \
 -drive format=raw,cache=unsafe,file=${TESTDIR}/rootdisk.img \
+$QEMU_OPTIONS \
 "
 
     if [[ "$INITRD" && "$SKIP_INITRD" != "yes" ]]; then
index 5a490420e908f1dafb9400bfe2ecffabeb1e6a25..c64e8a909137ab75f3e74cf3ce67363992219cae 100644 (file)
@@ -14,7 +14,7 @@ DefaultDependencies=no
 RequiresMountsFor=@RANDOM_SEED@
 Conflicts=shutdown.target
 After=systemd-remount-fs.service
-Before=sysinit.target shutdown.target
+Before=shutdown.target
 ConditionVirtualization=!container
 
 [Service]