summaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)Author
2016-04-13test-strv: add a test that extending empty strv works as expectedZbigniew Jędrzejewski-Szmek
Just making sure :)
2016-04-12tests: override XDG_RUNTIME_DIR where we use the user runtime dirLennart Poettering
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.
2016-04-12core,systemctl: add new "systemctl revert" commandLennart Poettering
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.
2016-04-12basic: remove rbtree code, it's unusedLennart Poettering
it's unused, and should we need it one day we can always resurrect it from git history.
2016-04-12systemctl: don't confuse sysv code with generated unitsLennart Poettering
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.
2016-04-12install: rename generator_paths() → generator_binary_paths()Lennart Poettering
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.
2016-04-12tests: make sure test-path-lookup can run even when no units are installed ↵Lennart Poettering
on test system
2016-04-12test: bump up log level for install root testLennart Poettering
2016-04-12core: rework logic to drop duplicate and non-existing items from search pathLennart Poettering
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.
2016-04-12core: remove ManagerRunningAs enumLennart Poettering
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.
2016-04-12core: rework generator dir logic, move the dirs into LookupPaths structureLennart Poettering
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.
2016-04-11tests: port udev-test to log_*_errno (#3015)Evgeny Vereshchagin
SYSTEMD_LOG_LEVEL=debug test/udev-test.pl is working now Also, fixes CID 1354602
2016-04-10tests: don't silently skip `test-namespace`Evgeny Vereshchagin
2016-04-10tests: ignore some mount errors in test-udevEvgeny Vereshchagin
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
2016-04-06Merge pull request #2969 from evverx/udev-test-dont-rely-on-underlying-fs-2Martin Pitt
tests: don't rely on the underlying fs in test-udev (v2)
2016-04-06Merge pull request #2947 from keszybz/test-nssLennart Poettering
Add a test for nss modules and some related fixes
2016-04-06tests: don't rely on the underlying fs in test-udev (v2)Evgeny Vereshchagin
* 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
2016-04-05test-nss: test the resolution of various namesZbigniew Jędrzejewski-Szmek
nss-dns is also "tested". It should be almost always available, and provides a reference for comparison.
2016-04-05tests: don't rely on underlying fs in udev-test, use tmpfs insteadEvgeny Vereshchagin
Fixes: #457
2016-03-22Merge pull request #2880 from keszybz/more-testsDaniel Mack
Add some simple tests for env_value_is_valid and env_assignment_is_valid
2016-03-21test-env-util: test env_{value,assignment}_is_validZbigniew Jędrzejewski-Szmek
Just to make sure everything works as expected in relation to https://bugzilla.redhat.com/show_bug.cgi?id=1312384.
2016-03-21tests: rename test-env-replace to test-env-utilZbigniew Jędrzejewski-Szmek
2016-03-21test-execute: fix execution of AmbientCapabilities testsRonny Chevalier
Wrong tests were executed
2016-03-21test-copy: use correct data type for max_bytesMartin Pitt
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.
2016-03-21Merge pull request #2760 from ronnychevalier/rc/core_no_new_privileges_seccompv3Daniel Mack
core: set NoNewPrivileges for seccomp if we don't have CAP_SYS_ADMIN
2016-03-15test-copy: test with different max_bytes valuesZbigniew Jędrzejewski-Szmek
2016-03-15test-copy: add a test shuffling bytes between normal filesZbigniew Jędrzejewski-Szmek
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.
2016-03-10test-ipcrm: fix log messageLukas Nykryn
2016-03-09Merge pull request #2792 from ronnychevalier/rc/tests_movev2Zbigniew Jędrzejewski-Szmek
tests: move out unrelated tests from test-util to their own file
2016-03-04test-selinux: use yes_no() and strnull()Zbigniew Jędrzejewski-Szmek
2016-03-04test-libudev: disable monitor mode by default and add to automatic testsZbigniew Jędrzejewski-Szmek
2016-03-04test-libudev: modernizationZbigniew Jędrzejewski-Szmek
2016-03-04Enable test-ipcrm, test-hostname in unsafe testsZbigniew Jędrzejewski-Szmek
2016-03-04Enable test-daemon, test-log, test-watchdog by defaultZbigniew Jędrzejewski-Szmek
Those should be safe to run, resulting in some messages in logs.
2016-03-04shared/acpi-fpdt: use ENODATA for missing data and skip testZbigniew Jędrzejewski-Szmek
This data is simply missing on non-UEFI systems, and it is useful to distinguish that from corrupted data.
2016-03-04Rename test-boot-timestamp to test-boot-timestamps and enable by defaultZbigniew Jędrzejewski-Szmek
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.
2016-03-04Move test-loopback to normal testsZbigniew Jędrzejewski-Szmek
In the normal case lo should be already configured and this should be a noop, even when run under root.
2016-03-03test-util: remove now unused includesRonny Chevalier
2016-03-03tests: move xattr-util related tests to test-xattr-util.cRonny Chevalier
2016-03-03tests: move glob-util related tests to test-glob-util.cRonny Chevalier
2016-03-03tests: move io-util related tests to test-io-utilRonny Chevalier
2016-03-03tests: move proc-cmdline related tests to test-proc-cmdline.cRonny Chevalier
2016-03-03tests: move fstab-util related tests to test-fstab-util.cRonny Chevalier
2016-03-03tests: move fs-util related tests to test-fs-util.cRonny Chevalier
2016-03-03tests: move conf-parser related tests to test-conf-parser.cRonny Chevalier
2016-03-03tests: move fd-util related tests to test-fd-util.cRonny Chevalier
2016-03-03tests: move user-util related tests to test-user-util.cRonny Chevalier
2016-03-03tests: move path-util related tests to test-path-util.cRonny Chevalier
2016-03-03tests: move fileio related tests to test-fileio.cRonny Chevalier
2016-03-03tests: move stat-util related tests to test-stat-util.cRonny Chevalier