| Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
This reduces repetition in the function calls, since quite often we
write out strings with loop_write().
Noticed while reviewing #28077.
|
|
Fixes #26520
|
|
Fixes #28349
|
|
|
|
|
|
This allows using it with CLEANUP_ARRAY(). For the 2 call sites
where we don't need to free the array, we do a regular for loop
calling json_variant_unref() instead.
|
|
We currently concatenate ANSI_UNDERLINE to the color of our choice
in DEFINE_ANSI_FUNC_UNDERLINE() and DEFINE_ANSI_FUNC_UNDERLINE_256().
The first thing that ANSI_UNDERLINE does is reset all previous ansi
escape sequences, so you just get underlining without any colors.
Let's fix the issue by actually concatenating _UNDERLINE to the given
color macro name so this works properly.
Also add missing color macros that this uncovered.
|
|
|
|
Follow-up for 2a39b91459a4c27985d9a58309c0fda25f3cd397
The mentioned change makes all jobs in the transaction unmergeable
if mode == JOB_RESTART_DEPENDENCIES, but we only want the anchor job
to be re-enqueued.
|
|
There were a couple spelling/grammatical errors in the docs that made
it hard to read and understand parts of this doc. I cleaned up those
errors and reflowed the line breaks to keep to the 80 char limit.
|
|
Required for building kernel selftests
|
|
And drop it where not necessary.
|
|
Instead of relying on the post-test /failed file check.
|
|
|
|
|
|
Otherwise the get_testdata_dir() call fails if the source tree is under
/root (which is usually the case in CIs).
I got bitten by this after leaving the source tree under /root but moving the
$BUILD_DIR elsewhere. This used to work by accident, as load_testdata_env()
would try to read $BUILD_DIR/systemd-runtest.env, but would fail if the
$BUILD_DIR is also under /root and fall back to SYSTEMD_TEST_DATA
(/lib/systemd/tests/testdata), which usually exist as we install the just built
revision. However, if the $BUILD_DIR is outside of /root we'd read
$BUILD_DIR/systemd-runtest.env which contains
SYSTEMD_TEST_DATA=/path/to/source/tree/test and that source tree is not visible
once we overmount /root with tmpfs making the test fail:
/* test_run_tests_unprivileged */
Successfully forked off '(test-execute-unprivileged)' as PID 10672.
Changing mount flags / (MS_REMOUNT|MS_BIND "")...
Changing mount propagation / (MS_REC|MS_SHARED "")
Mounting tmpfs (tmpfs) on /dev/shm (MS_NOSUID|MS_NODEV "")...
Mounting tmpfs (tmpfs) on /root (MS_NOSUID|MS_NODEV "")...
Mounting tmpfs (tmpfs) on /tmp (MS_NOSUID|MS_NODEV "")...
Mounting tmpfs (tmpfs) on /var/tmp (MS_NOSUID|MS_NODEV "")...
Mounting tmpfs (tmpfs) on /var/lib (MS_NOSUID|MS_NODEV "")...
Mounting tmpfs (tmpfs) on /run/test-execute-unit-dir (MS_NOSUID|MS_NODEV "")...
ERROR: $SYSTEMD_TEST_DATA directory [/root/systemd/test] not accessible: No such file or directory
Assertion 'get_testdata_dir("test-execute/", &unit_dir) >= 0' failed at src/test/test-execute.c:1306, function prepare_ns(). Aborting.
(test-execute-unprivileged) terminated by signal ABRT.
|
|
|
|
|
|
|
|
|
|
Addresses https://github.com/systemd/systemd/pull/28321#discussion_r1257866179
When devnode_same() fails we only debug log about it, because
the device nodes might not have appeared by the time the generator
is run.
Fixes #28340
|
|
|
|
No functional change, just refactoring.
|
|
fadvise64 and fadvise64_64 are already in the group, but arm_ version
was not.
Fixes #28350.
|
|
Follow-up for c26d7837bb08508c8d906d849dff8f1bc465063e
waitpid() doesn't support WEXITED and returns -1 (EINVAL),
which results in the intermediate close process not getting
reaped.
Fixes https://github.com/systemd/systemd/issues/26744#issuecomment-1628240782
|
|
|
|
We generate this implicitly, hence we generally don't include it
explicitly.
|
|
We have this very similar code in various places, and it#s not entirely
obvious (since we want a prolonged timeout for the reload), hence unify
this at one place.
|
|
When running from the build directory systemd-detect-virt might not be installed,
so tell meson to set up the PATH accordingly to point to the build directory.
Fixes https://github.com/systemd/systemd/issues/28316
|
|
We already had the arch-specific UUIDs defined, but they were not wired up
|
|
So the multiple-machines tests run last to avoid a race where the
checked signal would get ignored while the stub init is still processing
the previous signals:
[ 17.380417] testsuite-13.sh[376]: + machinectl reboot long-running long-running long-running
[ 17.389888] systemd-nspawn[495]: ++ touch /reboot
[ 17.390904] testsuite-13.sh[376]: + rm -f /var/lib/machines/long-running/trap
[ 17.393937] testsuite-13.sh[376]: + machinectl kill --signal=SIGTRAP --kill-whom=leader long-running
[ 17.408905] testsuite-13.sh[376]: + timeout 10 bash -c 'while ! test -e /var/lib/machines/long-running/trap; do sleep .5; done'
[ 27.413210] testsuite-13.sh[376]: + at_exit
...
[ 27.993376] testsuite-13.sh[373]: + echo 'Subtest /usr/lib/systemd/tests/testdata/units/testsuite-13.machinectl.sh failed'
|
|
To provide tpm2_eventlog for PCR debugging.
|
|
|
|
|
|
log_level_ignored is used only inside the ifdef, so declare it there too
|
|
glibc does not provide clone() on ia64, only clone2. But only as a
symbol in the shared library, there's no prototype in the gblic
headers, so we have to define it, copied from the manpage.
|
|
st_dev is not the same as dev_t, and on O32 architectures like
mipsel it's an unsigned long, but dev_t is still unsigned long long,
so they don't match and compilation fails:
../src/journal/cat.c: In function ‘run’:
../src/basic/format-util.h:46:19: error: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘long unsigned int’ [-Werror=format=]
46 | # define DEV_FMT "%" PRIu64
| ^~~
../src/journal/cat.c:168:34: note: in expansion of macro ‘DEV_FMT’
168 | if (asprintf(&s, DEV_FMT ":" INO_FMT, st.st_dev, st.st_ino) < 0)
| ^~~~~~~
In file included from ../src/systemd/sd-journal.h:20,
from ../src/journal/cat.c:11:
/usr/include/inttypes.h:105:41: note: format string is defined here
105 | # define PRIu64 __PRI64_PREFIX "u"
|
|
|
|
|
|
When building on a x32 system we need to explicitly pass `-m64` to get
the right ABI as the kernel and EFI are still 64bit. For this to
actually work, a suitable multilib compiler, 32bit libc headers and
libgcc need to be installed (similar to ia32 builds on x86_64).
|
|
On some architectures (x32) ssize_t is int, not long int.
../src/basic/confidential-virt.c: In function ‘msr’:
../src/basic/confidential-virt.c:133:27: error: format ‘%ld’ expects argument of type ‘long int’, but argument 7 has type ‘ssize_t’ {aka ‘int’} [-Werror=format=]
133 | log_debug("Short read %ld bytes from MSR device %s (index %" PRIu64 "), ignoring",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
134 | rv,
| ~~
| |
| ssize_t {aka int}
../src/basic/log.h:214:86: note: in definition of macro ‘log_full_errno_zerook’
214 | ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
| ^~~~~~~~~~~
../src/basic/log.h:242:28: note: in expansion of macro ‘log_full’
242 | #define log_debug(...) log_full(LOG_DEBUG, __VA_ARGS__)
| ^~~~~~~~
../src/basic/confidential-virt.c:133:17: note: in expansion of macro ‘log_debug’
133 | log_debug("Short read %ld bytes from MSR device %s (index %" PRIu64 "), ignoring",
| ^~~~~~~~~
../src/basic/confidential-virt.c:133:41: note: format string is defined here
133 | log_debug("Short read %ld bytes from MSR device %s (index %" PRIu64 "), ignoring",
| ~~^
| |
| long int
| %d
|
|
supported
Don't fail test-mountpoint-util if we get EAGAIN as it's expected on old
kernels
|
|
On x32 efi_arch will be set as the kernel architecture is just x86_64,
but there's no userland support to build the EFI ABI. When -Dbootloader=false
is set, skip libefitest too.
|
|
Follow-up for 9deeca127520b1098c3dfab9cdfd3b9c6bf983a4
|
|
|
|
|
|
Follow-up for 254d1313ae5a69c08c9b93032aaaf3d6083cfc07
|
|
|