summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2015-12-03Merge pull request #1934 from martinpitt/masterTom Gundersen
tests: add networkd integration test
2015-11-27tests: use sync instead of flushEvgeny Vereshchagin
flush doesn't sync a journal -> tests sometimes fail
2015-11-27tests: don't run test on incomplete setupEvgeny Vereshchagin
This is a follow-up commit for https://github.com/systemd/systemd/pull/1937 See https://github.com/systemd/systemd/pull/2030
2015-11-27Merge pull request #1937 from evverx/fix-stdout-parsingLennart Poettering
Fix stdout stream parsing
2015-11-27tests: add networkd integration testMartin Pitt
This uses temporary configuration in /run and temporary veth devices, and does not write anything on disk or change any system configuration; but it assumes (and checks at the beginning) that networkd is not currently running. This can be run on a normal installation, in QEMU, nspawn, or LXC. As this requires root privileges, this is not integrated into "make check".
2015-11-25tests: don't run tests on incomplete setupEvgeny Vereshchagin
2015-11-25tests: remove unnecessary /sys/fs/cgroup/systemd checkingEvgeny Vereshchagin
A unified hierarchy obsoletes this checking
2015-11-24tests: don't rely on system's machinedEvgeny Vereshchagin
Fixes backward/forward incompatibility errors on spawning. For example: $ sudo make run ... Failed to register machine: Cannot set property TasksMax, or unknown property. $ ../../systemd-nspawn --version systemd 228 $ systemd-nspawn --version systemd 225
2015-11-24Merge pull request #1957 from zonque/qemu-testLennart Poettering
test: make QEMU tests work on Semaphore
2015-11-20tests: fix initrd searching on Debian/UbuntuEvgeny Vereshchagin
2015-11-19test: 01-basic: mask some services that currently don't run in qemuDaniel Mack
2015-11-19test: disable nspawn checks if machine wasn't booted with systemdDaniel Mack
Sempaphore containers are not booted with systemd, so machined is not available, which makes nspawn bail. Just skip nspawn tests in such environments. [ -d /run/systemd/system ] is esentially what sd_booted(3) is doing, but on Ubuntu 15.05, without 'systemd-container' installed, we also need to check for the presence of the systemd-machined binary.
2015-11-19tests: fix ls: cannot access /var/tmp/systemd-test.*/journal/*/*.journalEvgeny Vereshchagin
don't lose logs from the test machine too
2015-11-19test: make qemu use kvm if availableDaniel Mack
If we're running in a KVM virtualized environment (such as Semaphore's Docker enabled platform), pass '-cpu host' to QEMU.
2015-11-19test: increase loop device size to 400MBDaniel Mack
It turns out the full OS tree which is assembled into the loop-dev mount point is bigger than 300MB. Increase the size.
2015-11-17tests: journal-stdout-stream: add cases for leading and trailing spacesEvgeny Vereshchagin
2015-11-17tests: add basic journal testEvgeny Vereshchagin
2015-11-17tests: copy /etc/pam.d/systemd-user from the host on Debian, UbuntuEvgeny Vereshchagin
Fixes: systemd-testsuite systemd[34]: PAM _pam_load_conf_file: unable to open /etc/pam.d/system-auth systemd-testsuite systemd[34]: PAM _pam_load_conf_file: unable to open /etc/pam.d/system-auth systemd-testsuite systemd[34]: user@0.service: Failed at step PAM spawning /lib/systemd/systemd: Operation not permitted ... on Debian, Ubuntu
2015-11-16tests: intsall /etc/login.defsEvgeny Vereshchagin
Fixes: systemd-testsuite login[31]: cannot open login definitions /etc/login.defs [No such file or directory] systemd-testsuite systemd[1]: Received SIGCHLD from PID 31 (login). systemd-testsuite systemd[1]: Child 31 (login) died (code=exited, status=1/FAILURE) systemd-testsuite systemd[1]: console-getty.service: Child 31 belongs to console-getty.service systemd-testsuite systemd[1]: console-getty.service: Main process exited, code=exited, status=1/FAILURE systemd-testsuite systemd[1]: console-getty.service: Changed running -> dead on Debian/Ubuntu Useful on other distros
2015-11-15tests: fix pam_modules installation on Debian (and Debian-like systems)Evgeny Vereshchagin
libpam_modules installs modules into /lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/security on Debian Fixes: systemd-testsuite login[36]: PAM unable to dlopen(pam_group.so): /lib/security/pam_group.so: cannot open shared object file: No such file or directory systemd-testsuite login[36]: PAM adding faulty module: pam_group.so systemd-testsuite login[36]: PAM unable to dlopen(pam_limits.so): /lib/security/pam_limits.so: cannot open shared object file: No such file or directory systemd-testsuite login[36]: PAM adding faulty module: pam_limits.so ... etc
2015-11-15tests: install execs from user units tooEvgeny Vereshchagin
Fixes: systemd[39]: systemd-exit.service: Executing: /bin/kill -s 58 29 systemd[39]: systemd-exit.service: Failed at step EXEC spawning /bin/kill: No such file or directory systemd[29]: Received SIGCHLD from PID 39 ((kill)). systemd[29]: Child 39 ((kill)) died (code=exited, status=203/EXEC)
2015-11-12tests: fix unstoppable serviceEvgeny Vereshchagin
[/etc/systemd/system/unstoppable.service:4] Unbalanced quoting, ignoring: "/bin/echo 'I'm unstoppable!'"
2015-11-11test-execute: Add tests for new PassEnvironment= directiveFilipe Brandenburger
Check the base case, plus erasing the list, listing the same variable name more than once and when variables are absent from the manager execution environment. Confirmed that `sudo ./test-execute` passes and that modifying the test cases (or the values of the set variables in test-execute.c) is enough to make the test cases fail.
2015-11-10Merge pull request #1834 from filbranden/testexecute2Lennart Poettering
test-execute: Fix systemd escaping and shell issues (v2)
2015-11-10tests: various fixesEvgeny Vereshchagin
* remove journal flushing (systemd-journal-flush.service runs journalctl --flush on boot) * use sh -c and PATH instead of @SYSTEMCTL@ expansion * remove unnecessary semicolons etc
2015-11-10test-execute: Fix systemd escaping and shell issuesFilipe Brandenburger
In most cases, systemd requires escaping $ (for systemd variable substitution) and % (for specifiers) by doubling them. This was somewhat of an issue in tests like exec-environment*.service where systemd was doing the substitutions and we were not really checking that those were available in the actual environment of the command. Fix that. Expressions such as `exit $(test ...)` are incorrect. They only work because $(test ...) will produce no output, so the command will become a bare "exit" which will exit with the status of the latest executed command which turns out to be the test... The direct approach is simply calling "test" as the last command, for which the shell will propagate the exit status. One situation where this was breaking tests was on `exit $(test ...) && $(test ...) && $(test ...)` where the second and third tests were not really executing, since the first command is actually `exit` so && was doing nothing there. Fixed it by just using `test ... && test ... && test ...` as it was initially intended. Pass -x to all shell executions for them to produce useful debugging output to stderr. Consequently, removed most of the explicit `echo`s that are no longer needed. Mark all units as Type=oneshot explicitly. Also made sure all shell variables are properly quoted. v2: Added an explicit LC_ALL=C to ionice invocations since some locales (such as French) will add a space before the colon in the output. Tested by running `sudo ./test-execute` and confirming all tests enabled on my system (essentially all of them except for the s390 one) passed. Tweaked the variables or options or expected values and confirmed the tests do indeed fail when the values are not exactly the expected ones. v2: Also tested with `LANG=fr_FR.UTF-8 sudo ./test-execute` to confirm it still works in a different locale.
2015-11-06test: Fix typo in TEST-03-JOBS/test-jobs.shJesus Ornelas Aguayo
Fix typo s/enqueueing/enqueuing/ Signed-off-by: Jesus Ornelas Aguayo <jesus.ornelas.aguayo@intel.com>
2015-11-06test-execute: don't use /usr/bin/uname. use sh and PATHEvgeny Vereshchagin
2015-11-04test-functions: fix dbus-1 installationEvgeny Vereshchagin
The basic setup for the well-known system and session buses is now done in read-only files in ${datadir} (normally /usr/share). See the NEWS entry for 1.9.18 for details. http://cgit.freedesktop.org/dbus/dbus/tree/NEWS
2015-10-31test-path: move all related test files to a specific directoryRonny Chevalier
To avoid polluting test/
2015-10-31test-execute: move all files related to a specific directoryRonny Chevalier
To avoid polluting test/
2015-10-31test-execute: add tests for IOSchedulingClassRonny Chevalier
2015-10-31test-execute: add tests for OOMScoreAdjustRonny Chevalier
2015-10-31test-execute: add test for EnvironmentFileRonny Chevalier
2015-10-31test-execute: add test for PrivateNetworkRonny Chevalier
2015-10-29test: add tests to ensure that the capabilities are properly setRonny Chevalier
2015-09-24s390: add personality supportHendrik Brueckner
Introduce personality support for Linux on z Systems to run particular services with a 64-bit or 31-bit personality.
2015-09-21core: fix group ownership when Group is setRonny Chevalier
When Group is set in the unit, the runtime directories are owned by this group and not the default group of the user (same for cgroup paths and standard outputs) Fix #1231
2015-09-21test-execute: add tests for RuntimeDirectoryRonny Chevalier
2015-08-30test: udev - Signal that test was skipped when running as non-rootFilipe Brandenburger
It is more accurate to report that the test was skipped rather than succeeded if we did not get to run it because it requires root. Tested by running `make check` and inspecting the log file: $ cat test/udev-test.pl.log Must have root permissions to run properly. SKIP test/udev-test.pl (exit status: 77) The `make check` output also reported: SKIP: test/udev-test.pl
2015-07-01sysv-generator test: Fix random ordering failureMartin Pitt
test_simple_escaped() sometimes fails with AssertionError: Lists differ: ['foo\\x2b.service', 'foo-admin.service'] != ['foo-admin.service', 'foo\\x2b.service'] We don't need to assume any order here, so compare them as a set, not a list.
2015-06-30udev: remove WAIT_FOR keyKay Sievers
This facility was never a proper solution, but only papered over real bugs in the kernel. There are no known sysfs "timing bugs" since a long time.
2015-06-29sysv-generator: escape names when translating from sysv nameFelipe Sateler
While the LSB suggests only [A-Za-z0-9], that doesn't prevent admins from doing the wrong thing. Lets not generate invalid names in that case.
2015-06-15sysv-generator test: always log to consoleMartin Pitt
Set $SYSTEMD_LOG_TARGET so that the output always goes to stdout/stderr. This fixes running the test as root, as that logged to the journal previously. https://github.com/systemd/systemd/issues/195
2015-06-03remove gudev and gtk-docKay Sievers
The library moved to: https://git.gnome.org/browse/libgudev/
2015-05-18Use "new" --job-mode= option in more placesZbigniew Jędrzejewski-Szmek
--irreversible/--ignore-dependencies/--fail are deprececated since 4dc5b821ae737914499119e29811fc3346e3d97c. Also add shell completions for --jobs-mode.
2015-04-28sysv-generator test: Fix assertionAlberto Fanjul Alonso
2015-04-03test: udev, valgrind - track origins of uninitiaziled memoryTom Gundersen
2015-03-27test: udev - add gdb supportTom Gundersen
2015-02-26boot: efi - remove custom splash supportKay Sievers