summaryrefslogtreecommitdiff
path: root/test/test-functions
AgeCommit message (Collapse)Author
2016-11-19test-functions: also add qemu define for ppc64Zbigniew Jędrzejewski-Szmek
2016-11-15tests: add UNIFIED_CGROUP_HIERARCHY=[default|hybrid] (#4675)Evgeny Vereshchagin
This will simplify testing a bit. Mainly for https://github.com/systemd/systemd/pull/4670
2016-11-11tests: fix kernel/initrd searching (Arch)Evgeny Vereshchagin
We can run sudo make run instead of the sudo make run KERNEL_BIN=/boot/vmlinuz-linux INITRD=/boot/initramfs-linux.img See https://github.com/systemd/systemd/issues/4607
2016-08-26tests: mount proc before `exec valgrind` (#4044)Evgeny Vereshchagin
Fixes: $ sudo make run QEMU_BIN=/usr/bin/qemu-system-x86_64 KERNEL_APPEND=systemd.unit=multi-user.target SKIP_INITRD=yes TEST RUN: Basic systemd setup + /usr/bin/qemu-system-x86_64 -smp 1 -net none -m 512M -nographic -kernel /boot/vmlinuz-4.6.7-200.fc23.x86_64 -drive format=raw,cache=unsafe,file=/var/tmp/systemd-test.izx99J/rootdisk.img -append 'root=/dev/sda1 raid=noautodetect loglevel=2 init=/usr/lib/systemd/systemd-under-valgrind rw console=ttyS0 selinux=0 systemd.unified_cgroup_hierarchy=no systemd.unit=multi-user.target ' valgrind: warning (non-fatal): readlink("/proc/self/exe") failed. valgrind: continuing, however --trace-children=yes will not work. --1:0: aspacem Valgrind: FATAL: can't open /proc/self/maps --1:0: aspacem Exiting now. [ 3.152367] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100 [ 3.152367] [ 3.152367] CPU: 0 PID: 1 Comm: memcheck-amd64- Not tainted 4.6.7-200.fc23.x86_64 #1 [ 3.152367] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.8.2-20150714_191134- 04/01/2014 [ 3.152367] 0000000000000086 0000000047ca1666 ffff88001ea43e00 ffffffff813d954e [ 3.152367] ffffffff81a205a0 ffff88001ea43e98 ffff88001ea43e88 ffffffff811b5557 [ 3.152367] ffffffff00000010 ffff88001ea43e98 ffff88001ea43e30 0000000047ca1666 [ 3.152367] Call Trace: [ 3.152367] [<ffffffff813d954e>] dump_stack+0x63/0x85 [ 3.152367] [<ffffffff811b5557>] panic+0xde/0x220 [ 3.152367] [<ffffffff810ab9c3>] do_exit+0xb43/0xb50 [ 3.152367] [<ffffffff810aba57>] do_group_exit+0x47/0xb0 [ 3.152367] [<ffffffff810abad4>] SyS_exit_group+0x14/0x20 [ 3.152367] [<ffffffff817dae72>] entry_SYSCALL_64_fastpath+0x1a/0xa4 [ 3.152367] Kernel Offset: disabled [ 3.152367] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100 [ 3.152367] QEMU: Terminated
2016-07-03tests: Install missing libraries for things installed in /usr tooFelipe Sateler
2016-07-03tests: follow RUNPATH when installing missing librariesFelipe Sateler
Fixes #3630
2016-06-24test: merge check_nspawn() into run_nspawn()Martin Pitt
This makes nspawn tests symmetric with run_qemu() which also exits with 1 if QEMU is not available.
2016-06-24tests: track and check for timeoutsMartin Pitt
If run_qemu() exits with non-zero, this either meant that QEMU was not available (which should be a SKIP) or that QEMU timed out if $QEMU_TIMEOUT was set (which then should be a FAIL). Limit the exit code of run_qemu() to QEMU availability only, and track timeouts separately through the new $TIMED_OUT variable, which is then checked in check_result_qemu(). Do the same for $NSPAWN_TIMEOUT and run_nspawn() so that nspawn and QEMU work similarly.
2016-06-03tests: introduce UNIFIED_CGROUP_HIERARCHY (#3419)Evgeny Vereshchagin
There are many cgroups-related changes (thanks, @htejun!) This commit will simplify testing a bit. Use: make run UNIFIED_CGROUP_HIERARCHY=yes to enable cgroup-v2 make run UNIFIED_CGROUP_HIERARCHY=no to enable cgroup-v1
2016-05-08tests: enable logging for pid1, disable for other systemd servicesZbigniew Jędrzejewski-Szmek
systemd-udev generated an insane amount of log output at debug level. It would break TEST-02-CRYPTSETUP by filling the overflowing the disk (which seems to be a bug in itself!).
2016-05-08tests: allow root to login with empty password to test imagesZbigniew Jędrzejewski-Szmek
2016-05-08tests: specify format=raw for qemu to avoid warningZbigniew Jędrzejewski-Szmek
WARNING: Image format was not specified for '/var/tmp/systemd-test.tGi3od/rootdisk.img' and probing guessed raw. Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. Specify the 'raw' format explicitly to remove the restrictions. Also use unsafe caching mode, we don't care about data integrity here.
2016-04-13tests: don't rely on the host's systemd-nspawn, don't register test machine ↵Evgeny Vereshchagin
(#3023) Fixes: $ cd test/TEST-07-ISSUE-1981/ $ sudo make clean setup run ... timeout: failed to run command ‘systemd-nspawn’: No such file or directory ... TEST RUN: https://github.com/systemd/systemd/issues/1981 [FAILED] Makefile:10: recipe for target 'run' failed make: *** [run] Error 1
2016-04-04basic: fallback to fstatat if entry->d_type is DT_UNKNOWNEvgeny Vereshchagin
* tests-functions: improve FSTYPE-support make clean setup FSTYPE=reiserfs is working fine now :) * basic: fallback to fstatat if entry->d_type is DT_UNKNOWN Fixes localectl on reiserfs: -bash-4.3# mkdir -p /usr/lib/locale -bash-4.3# stat -f /usr/lib/locale/ File: "/usr/lib/locale/" ID: bdb0322715b5366e Namelen: 255 Type: reiserfs Block size: 4096 Blocks: Total: 99835 Free: 60262 Available: 60262 Inodes: Total: 0 Free: 0 -bash-4.3# mkdir /usr/lib/locale/HeyHo -bash-4.3# localectl list-locales --no-pager -bash-4.3# mount -t tmpfs tmpfs /usr/lib/locale -bash-4.3# mkdir /usr/lib/locale/HeyHo -bash-4.3# localectl list-locales --no-pager HeyHo
2016-03-16Merge pull request #2797 from evverx/selinux-use-rawZbigniew Jędrzejewski-Szmek
selinux: use *_raw API from libselinux
2016-03-04tests: add create_strace_wrapperEvgeny Vereshchagin
Very handy for early-boot debugging See https://github.com/systemd/systemd/pull/2781#discussion_r54782628
2016-03-01tests: add test for https://github.com/systemd/systemd/issues/2730Evgeny Vereshchagin
2016-02-10tests: add test for https://github.com/systemd/systemd/issues/1981Evgeny Vereshchagin
2016-01-25tests: fix install_pamEvgeny Vereshchagin
* pam_unix depends on unix_chkpwd * selinux=1 -> pam_unix runs unix_chkpwd for root too https://git.fedorahosted.org/cgit/linux-pam.git/tree/modules/pam_unix/passverify.c?id=e89d4c97385ff8180e6e81e84c5aa745daf28a79#n202
2016-01-25tests: add setup_selinuxEvgeny Vereshchagin
2016-01-18tests: add STRIP_BINARIESEvgeny Vereshchagin
We need a beautiful stacktraces sometimes For example https://github.com/systemd/systemd/pull/2328
2016-01-18tests: fix TEST-02-CRYPTSETUP on Debian/UbuntuEvgeny Vereshchagin
2016-01-18tests: install fsck*Evgeny Vereshchagin
systemd-fsck depends on /sbin/fsck*
2016-01-18tests: remove unnecessary --bootEvgeny Vereshchagin
* Use $ROOTLIBDIR/systemd always * Don't pass $ROOTLIBDIR/systemd as the first argument: $ cat /proc/1/cmdline /lib/systemd/systemd/lib/systemd/systemd...
2016-01-15tests: add function for valgrind wrapper creationEvgeny Vereshchagin
I used it for d9814c7 and bffd87b
2016-01-14tests: add function for valgrind installationEvgeny Vereshchagin
I used it for d9814c76ec35e53a6b6448c0 Very handy:)
2016-01-14README, tests: remove /etc/mtabEvgeny Vereshchagin
This is a followup for 1d40ddb
2015-11-27Merge pull request #1937 from evverx/fix-stdout-parsingLennart Poettering
Fix stdout stream parsing
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: 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-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: 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-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-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-06-03remove gudev and gtk-docKay Sievers
The library moved to: https://git.gnome.org/browse/libgudev/
2015-02-03test-functions: search for the initrd and kernel according to the BLSHarald Hoyer
Also search for the initrd and kernel according to the boot loader specification.
2015-02-03test-functions: use sfdisk without cyl,head,sectorsHarald Hoyer
newer sfdisk implementations do not work with these anymore
2015-02-03test-functions:install_libnss() call dracut_install with all $NSS_LIBSHarald Hoyer
dracut_install() can cope with more than one file
2015-02-03tests: install ldconfig.real for Debian based distrosMartin Pitt
In Debian based distributions ldconfig is just a shell wrapper around ldconfig.real, for deferring it during package installation.
2015-02-03tests: install hostname debug toolMartin Pitt
This is mostly a vehicle to pull in libnsl.so which gets dlopen()ed by NSS under certain NSS configurations.
2015-02-03tests: install all required libnss modulesMartin Pitt
Don't assume "files" for everything in nsswitch. Instead, ask "getent passwd" about which libnss modules it dlopen()s, and install these.
2015-02-03tests: don't hardcode systemctl pathMartin Pitt
Get it from type -P instead, to support --enable-split-usr.