Age | Commit message (Collapse) | Author |
|
The advice string didn't talk about template units at all. Extend
it and print when trying to enable a template unit without install info.
Fixes #2345.
|
|
|
|
Fixes #3047.
|
|
|
|
If the error code ever leaks (we print the strerror error instead of providing
our own), the message for ESHUTDOWN is "Cannot send after transport endpoint
shutdown", which can be misleading. In particular it suggest that some
mishandling of the dbus connection occured. Let's change that to ERFKILL which
has the advantage that a) it sounds implausible as actual error, b) has the
connotation of disabling something manually.
|
|
Just making sure :)
|
|
We don#t really support systems where XDG_RUNTIME_DIR is not supported for
systemd --user. Hence, let's always set our own XDG_RUNTIME_DIR for tests that
involve systemd --user, so that we know it is set, and that it doesn't polute
the user's actual runtime dir.
|
|
This allows dropping all user configuration and reverting back to the vendor
default of a unit file. It basically undoes what "systemctl edit", "systemctl
set-property" and "systemctl mask" do.
|
|
it's unused, and should we need it one day we can always resurrect it from git
history.
|
|
The SysV compat code checks whether there's a native unit file before looking
for a SysV init script. Since the newest rework generated units will show up in
the unit path, and hence the checks ended up assuming that there always was a
native unit file for each init script: the generated one.
With this change the generated unit file directory is suppressed from the
search path when this check is done, to avoid the confusion.
|
|
This is too confusing, as this funciton returns the paths to the generator
binaries, while usually when we refer to the just the "generator path" we mean
the generated unit files. Let's clean this up.
|
|
on test system
|
|
|
|
Move this into a function of its own, so that we can run it after we ran the
generators, so that it takes into account removed generator dirs.
|
|
Previously, we had two enums ManagerRunningAs and UnitFileScope, that were
mostly identical and converted from one to the other all the time. The latter
had one more value UNIT_FILE_GLOBAL however.
Let's simplify things, and remove ManagerRunningAs and replace it by
UnitFileScope everywhere, thus making the translation unnecessary. Introduce
two new macros MANAGER_IS_SYSTEM() and MANAGER_IS_USER() to simplify checking
if we are running in one or the user context.
|
|
A long time ago – when generators where first introduced – the directories for
them were randomly created via mkdtemp(). This was changed later so that they
use fixed name directories now. Let's make use of this, and add the genrator
dirs to the LookupPaths structure and into the unit file search path maintained
in it. This has the benefit that the generator dirs are now normal part of the
search path for all tools, and thus are shown in "systemctl list-unit-files"
too.
|
|
SYSTEMD_LOG_LEVEL=debug test/udev-test.pl is working now
Also, fixes CID 1354602
|
|
|
|
Fixes:
$ sudo make distcheck
...
FAIL: test/udev-test.pl
...
$ vi systemd-229/_build/sub/test/udev-test.pl.log
...
failed to mount empty
/home/ubuntu/systemd/systemd-229/_inst/lib/udev/rules.d No such file or directory
...
failed to mount empty
/home/ubuntu/systemd/systemd-229/_inst/lib/udev/rules.d No such file or directory
...
414 errors occurred
|
|
tests: don't rely on the underlying fs in test-udev (v2)
|
|
Add a test for nss modules and some related fixes
|
|
* This reverts commit 646048b40a7b62c4e9bc59024ef6133613cda01b.
Let's test really big numbers again
* Don't be so brutal: use rmdir instead of rm -rf
As suggested https://github.com/systemd/systemd/pull/2966#issuecomment-205751680
|
|
nss-dns is also "tested". It should be almost always available,
and provides a reference for comparison.
|
|
Fixes: #457
|
|
Add some simple tests for env_value_is_valid and env_assignment_is_valid
|
|
Just to make sure everything works as expected in relation
to https://bugzilla.redhat.com/show_bug.cgi?id=1312384.
|
|
|
|
Wrong tests were executed
|
|
copy_bytes() and the comparisons in test_copy_bytes_regular_file() expect an
uint64_t, not a size_t. On 32 bit architectures the latter is 32 bit, leading
to truncation errors.
Fixes regression from commit 7a827fcb.
|
|
core: set NoNewPrivileges for seccomp if we don't have CAP_SYS_ADMIN
|
|
|
|
I started looking into adding copy_file_range support, and discovered
that we can improve the way we call sendfile:
- sendfile(2) man page is missing an important bit: the number of bytes to
copy cannot be too big (SSIZE_MAX actually), and the description of EINVAL
return code does not mention this either,
- our implementation works but calls sendfile over and over with a small
size, which seems suboptimal.
First add a test which (under strace) can be used to see current behaviour.
|
|
|
|
tests: move out unrelated tests from test-util to their own file
|
|
|
|
|
|
|
|
|
|
Those should be safe to run, resulting in some messages in logs.
|
|
This data is simply missing on non-UEFI systems, and it is useful
to distinguish that from corrupted data.
|
|
The source file name and the binary name were mismatched.
Rename binary to match.
Make the test exit with TEST_SKIP if the data is missing or we
have no permissions. Otherwise, the data will be printed, which
should be safe to enable by default.
|
|
In the normal case lo should be already configured and this should be
a noop, even when run under root.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|