summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2016-10-24test: lets add more tests to cover SupplementaryGroups= cases.Djalal Harouni
2016-10-23Merge pull request #4372 from evverx/fix-synced-cgroup-hierarchy-permsZbigniew Jędrzejewski-Szmek
2016-10-23tests/TEST-13-NSPAWN-SMOKE: remove an expected failure checkEvgeny Vereshchagin
https://github.com/systemd/systemd/issues/4352 has been fixed So, we don't need this workaround anymore
2016-10-23test: add more tests for SupplementaryGroups=Djalal Harouni
2016-10-23test: Add simple test for supplementary groupsDjalal Harouni
2016-10-17tests: add smoke test for systemd-nspawnEvgeny Vereshchagin
Basically, this test runs: ``` systemd-nspawn --register=no -D "$_root" -b systemd-nspawn --register=no -D "$_root" --private-network -b systemd-nspawn --register=no -D "$_root" -U -b systemd-nspawn --register=no -D "$_root" --private-network -U -b ``` and exports the `UNIFIED_CGROUP_HIERARCHY=[yes|no]`, `SYSTEMD_NSPAWN_USE_CGNS=[yes|no]` Inspired by * systemd#3589 (comment) * systemd#4372 (comment) * systemd#4223 (comment) * systemd#1555 and so on :-)
2016-10-12test: add test to make sure that ProtectKernelModules=yes disconnect mount ↵Djalal Harouni
propagation
2016-10-12test: add test to make sure that CAP_SYS_RAWIO was removed on PrivateDevices=yesDjalal Harouni
2016-10-12test: add capability tests for ProtectKernelModules=Djalal Harouni
This just adds capabilities test.
2016-10-01systemctl: Add --wait option to wait until started units terminate againMartin Pitt
Fixes #3830
2016-09-30resolved: don't query domain-limited DNS servers for other domains (#3621)Martin Pitt
DNS servers which have route-only domains should only be used for the specified domains. Routing queries about other domains there is a privacy violation, prone to fail (as that DNS server was not meant to be used for other domains), and puts unnecessary load onto that server. Introduce a new helper function dns_server_limited_domains() that checks if the DNS server should only be used for some selected domains, i. e. has some route-only domains without "~.". Use that when determining whether to query it in the scope, and when writing resolv.conf. Extend the test_route_only_dns() case to ensure that the DNS server limited to ~company does not appear in resolv.conf. Add test_route_only_dns_all_domains() to ensure that a server that also has ~. does appear in resolv.conf as global name server. These reproduce #3420. Add a new test_resolved_domain_restricted_dns() test case that verifies that domain-limited DNS servers are only being used for those domains. This reproduces #3421. Clarify what a "routing domain" is in the manpage. Fixes #3420 Fixes #3421
2016-09-27test: make sure that {readonly|inaccessible|readwrite}paths disconnect mount ↵Djalal Harouni
propagation Better safe.
2016-09-27test: add tests for simple ReadOnlyPaths= caseDjalal Harouni
2016-09-25test: add CAP_MKNOD tests for PrivateDevices=Djalal Harouni
2016-09-16networkd: support drop-in directories for .network filesJean-Sébastien Bour
Fixes #3655. [zj: Fix the tests.]
2016-09-16networkd-test: add a helper function to always clean up temporary config filesZbigniew Jędrzejewski-Szmek
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-08-19tests: let's stick to 8ch indenting, in perl code tooLennart Poettering
2016-08-02test: fix test-execute personality tests on ppc64 and aarch64 (#3825)Jan Synacek
2016-07-31Merge pull request 3821 from davide125/fix-testsZbigniew Jędrzejewski-Szmek
2016-07-29tests: skip udev-test if running inside a chrootDavide Cavalca
2016-07-21bootctl: Always use upper case for "/EFI/BOOT" and "/EFI/BOOT/BOOT*.EFI".Alexander Kurtz
If the ESP is not mounted with "iocharset=ascii", but with "iocharset=utf8" (which is for example the default in Debian), the file system becomes case sensitive. This means that a file created as "FooBarBaz" cannot be accessed as "foobarbaz" since those are then considered different files. Moreover, a file created as "FooBar" can then also not be accessed as "foobar", and it also prevents such a file from being created, as both would use the same 8.3 short name "FOOBAR". Even though the UEFI specification [0] does give the canonical spelling for the files mentioned above, not all implementations completely conform to that, so it's possible that those files would already exist, but with a different spelling, causing subtle bugs when scanning or modifying the ESP. While the proper fix would of course be that everybody conformed to the standard, we can work around this problem by just referencing the files by their 8.3 short names, i.e. using upper case. Fixes: #3740 [0] <http://www.uefi.org/specifications>, version 2.6, section 3.5.1.1
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-30test: check resolved generated resolv.conf in networkd-test (#3628)Martin Pitt
* test: check resolved generated resolv.conf in networkd-test Directly verify the contents of /run/systemd/resolve/resolv.conf instead of /etc/resolv.conf. The latter might be a plain file or a symlink to something else (like Debian's resolvconf output), and in these cases we cannot make strong assumptions about the contents. Drop the "/etc/resolv.conf is a symlink" conditions and the "resolv.conf can have at most three nameservers" alternatives, as we know that resolved always adds all nameservers. Explicitly start resolved at the start of a test to ensure that it is running. * test: get along with existing system search domains in resolv.conf The previous change has uncovered a bug in the tests: Existing search domains can exist in resolv.conf which test_search_domains{,_too_long} didn't take into account. As existing domains take some of the "max 6 domains" and "max 255 chars" limit, don't expect that the last items from our test data actually appears in the output, just the first few.
2016-06-28resolved: add test for route-only domain filtering (#3609)Martin Pitt
With commit 6f7da49d00 route-only domains do not get put into resolv.conf's "search" list any more. Add a comment about the tri-state, to clarify its semantics and why we are passing a bool parameter into an int type. Also add a test case for it.
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-24tests: make TEST-12-ISSUE-3171 nspawn invocation consistent with other testsMartin Pitt
The result of check_nspawn does not mean much, and this forgot to ask check_nspawn() whether nspawn can be used at all. This brings TEST-12-ISSUE-3171 in line with other nspawn tests.
2016-06-24tests: don't fail if QEMU is not availableMartin Pitt
Fix TEST-{08,09,10,11} to properly skip the test if QEMU is not available instead of failing, like in the other tests.
2016-06-24tests: force booting the kernel with SELinuxMartin Pitt
selinux=1 is not sufficient when running on a kernel which also has another LSM (such as AppArmor) enabled and defaults to that.
2016-06-07networkd: rename IPv6AcceptRouterAdvertisements to IPv6AcceptRALennart Poettering
The long name is just too hard to type. We generally should avoid using acronyms too liberally, if they aren't established enough, but it appears that "RA" is known well enough. Internally we call the option "ipv6_accept_ra" anyway, and the kernel also exposes it under this name. Hence, let's rename the IPv6AcceptRouterAdvertisements= setting and the [IPv6AcceptRouterAdvertisements] section to IPv6AcceptRA= and [IPv6AcceptRA]. The old setting IPv6AcceptRouterAdvertisements= is kept for compatibility with older configuration. (However the section [IPv6AcceptRouterAdvertisements] is not, as it was never available in a published version of systemd.
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-06-03resolved: fix comments in resolve.conf for search domain overflows (#3422)Martin Pitt
Write comments about "too many search domains" and "Total length of all search domains is too long" just once. Also put it on a separate line, as resolv.conf(5) only specifies comments in a line by themselves. This is ugly to do if write_resolv_conf_search() gets called once for every search domain. So change it to receive the complete OrderedSet instead and do the iteration by itself. Add test cases to networkd-test.py. https://launchpad.net/bugs/1588229
2016-05-18core: translate between IO and BlockIO settings to ease transitionTejun Heo
Due to the substantial interface changes in cgroup unified hierarchy, new IO settings are introduced. Currently, IO settings apply only to unified hierarchy and BlockIO to legacy. While the transition is necessary, it's painful for users to have to provide configs for both. This patch implements translation from one config set to another for configs which make sense. * The translation takes place during application of the configs. Users won't see IO or BlockIO settings appearing without being explicitly created. * The translation takes place only if there is no config for the matching cgroup hierarchy type at all. While this doesn't provide comprehensive compatibility, it should considerably ease transition to the new IO settings which are a superset of BlockIO settings. v2: - Update test-cgroup-mask.c so that it accounts for the fact that CGROUP_MASK_IO and CGROUP_MASK_BLKIO move together. Also, test/parent.slice now sets IOWeight instead of BlockIOWeight.
2016-05-08TEST-08: make sure / is remounted rwZbigniew Jędrzejewski-Szmek
In this test /etc/fstab is replaced by -.mount unit. This causes systemd-remount-fs.service to not remount / rw, which in turn causes various failures becuase /var is not writable. In particular systemd-tmpfiles-setup.service reports many failures. This is something to possibly fix on its own (see https://github.com/systemd/systemd/issues/791); in the meanwhile let's fix this test so that it doesn't fail, since the point of the test is to check aliases on mount units, and not a ro root.
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-08tree-wide: remove uses of --failedZbigniew Jędrzejewski-Szmek
It has been replaced by --state=failed.
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-05-06tests: add test for #3171 (#3206)Evgeny Vereshchagin
2016-05-03tests: add test for #3166 (#3180)Evgeny Vereshchagin
2016-05-02tests: add test for https://github.com/systemd/systemd/issues/2467 (#3168)Evgeny Vereshchagin
2016-05-01tests: use symlink to MakefileEvgeny Vereshchagin
2016-04-29path-util: also support ".old" and ".new" suffixes and recommend themZbigniew Jędrzejewski-Szmek
~ suffix works fine, but looks to much like it the file is supposed to be automatically cleaned up. For new versions of configuration files installers might want to using something that looks more permanent like foobar.new. So let's add treat ".old" and ".new" as special. Update test to match.
2016-04-28test: chmod +x sysv-generator-testZbigniew Jędrzejewski-Szmek
Just for convenience.
2016-04-26tests: document requirements of networkd integration tests (#3125)Martin Pitt
Document the necessary dependencies and nspawn/lxd options to run test/networkd-test.py.
2016-04-24tests: add test for coredump handler hanging at shutdown (#3101)Evgeny Vereshchagin
Test for #2691.
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-06test: udev: Check tagsMartin Pitt
Add two more tests: - Add a single tag, match on it, don't match on another. - Add 10.000 tags to a device, ensure that udev survives this. (Reproduces crash fixed by commit 1d88a271a)