Commit graph

43829 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 70ce817ccb test: de-duplicate test_setup() functions
Now we will run setup_nspawn_root() in some case where do don't need to.
2020-03-28 11:51:11 +01:00
Zbigniew Jędrzejewski-Szmek bdfa9657d0 test: move TEST-47-* to static files 2020-03-28 11:50:53 +01:00
Zbigniew Jędrzejewski-Szmek 2c75449a38 test: move TEST-46-HOMED to static files 2020-03-28 11:50:53 +01:00
Zbigniew Jędrzejewski-Szmek e29e4d5742 test: convert TEST-45 to a normal meson test
On my laptop, it now takes 0.23 s. We don't need the overhead of creating
an image and spawning a machine to mangle a file in /tmp.
2020-03-28 11:50:38 +01:00
Zbigniew Jędrzejewski-Szmek 07d16f438a test: move TEST-44-* to static files 2020-03-28 11:46:48 +01:00
Zbigniew Jędrzejewski-Szmek d0ac89a1e8 test: move TEST-43-* setup to static files
Setup of lingering is dropped. I don't think it's necessary for anything,
because the unit is still pulled in from the testsuite service.
2020-03-28 11:46:48 +01:00
Zbigniew Jędrzejewski-Szmek bdfd515ad1 test: move TEST-42-EXECSTOPPOST setup to static files 2020-03-28 11:46:48 +01:00
Zbigniew Jędrzejewski-Szmek 0ac5dbf3ae test/TEST-41: use a file in /tmp and reset the contents
If the test was run a second time from the same root, it would fail.
2020-03-28 11:46:48 +01:00
Zbigniew Jędrzejewski-Szmek 2b2eefee06 test: move TEST-41-ONESHOT-RESTART setup to static files 2020-03-28 11:46:48 +01:00
Zbigniew Jędrzejewski-Szmek d48b27bffd test: move TEST-40-EXEC-COMMAND-EX setup to static files 2020-03-28 11:46:48 +01:00
Zbigniew Jędrzejewski-Szmek 7124ae207a test: move TEST-39-EXECRELOAD setup to static files 2020-03-28 11:46:48 +01:00
Zbigniew Jędrzejewski-Szmek 4db7d044b8 test: move TEST-37-RUNTIMEDIRECTORYPRESERVE setup to static files 2020-03-28 11:46:48 +01:00
Zbigniew Jędrzejewski-Szmek 534a42705b test/TEST-36: move the config files to /run
This way we always start with a clean slate when running the test
repeatedly.
2020-03-28 11:46:48 +01:00
Zbigniew Jędrzejewski-Szmek 097d8c6eb7 test: move TEST-36-NUMAPOLICY setup to static files
No need to call setup_nspawn_root() if we plan to only run under qemu.
2020-03-28 11:46:48 +01:00
Zbigniew Jędrzejewski-Szmek fbaa11372b test: convert TEST-35-NETWORK-GENERATOR into a unit test 2020-03-28 11:46:48 +01:00
Zbigniew Jędrzejewski-Szmek 01efa07960 test: move TEST-34-DYNAMICUSERMIGRATE setup to static files 2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek ff978cd24a test: move TEST-33-CLEAN-UNIT setup to static files 2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek c8937bed08 test: move TEST-32-OOMPOLICY setup to static files 2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek 048d52d51e test: move TEST-31-DEVICE-ENUMERATION setup to static files 2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek 7eeeab205d test: move TEST-30-ONCLOCKCHANGE setup to static files
The two timezone files are now installed in the global setup. I am not too
happy about this, but it still seems better than to create a completely
separate image just for this.
2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek e578ea4df4 test: move TEST-29-UDEV-ID_RENAMING setup to static files 2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek 94370e627f test: move TEST-28-PERCENTJ-WANTEDBY setup to static files 2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek 468874997a test: move TEST-27-STDOUTFILE setup to static files 2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek dfa633ca6a test: move TEST-26-SETENV setup to static files
Also run mask_supporting_services() here.
2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek 68e2dc0f91 test/TEST-25: remove all images at the end of the test
scratch5 would be left behind, and trying to run the test again on the same
image would fail.
2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek 6e796683df test: move TEST-25-IMPORT setup to static files
Also run mask_supporting_services() here.
2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek f4c40fd754 test: move TEST-24-UNIT-TESTS setup to static files
I picked the list of zone files to install by grepping through the code. This
is is a bit brittle, but installing all of them takes a while, and more
importantly, writes a lot of lines to the log.
2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek 30b84c78ea test-fileio: fix bogus error when /proc/cmdline contains newlines
The kernel does not sanitize /proc/cmdline. E.g. when running under qemu, it is
easy to pass a string with newline by mistake. We use read_one_line_file(), so
we would read only the first list of the file, and
write_string_file(WRITE_STRING_FILE_VERIFY_ON_FAILURE) would fail because the
target file is obviously different. Change to a kernel-generated file to avoid
the issue.

v2:
- use /proc/version instead of /proc/uptime for attempted writes, so the test
  test passes even if test_write_string_file_verify() takes more than 10 ms ;]
2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek b49325d028 test: move TEST-23-TYPE-EXEC setup to static files 2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek c0b97b0fc8 test: move TEST-22-TMPFILES setup to static files 2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek c1d6c135bc test: move TEST-20-MAINPIDGAMES setup to static files 2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek e67a2644a8 test: move TEST-19-DELEGATE setup to static files 2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek dce2b8ce48 test: move TEST-18-FAILUREACTION setup to static files 2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek 9911131a60 test: move TEST-17-WANTS setup to static files 2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek e5b0aaaf56 test/TEST-16: simplify how variables are set
The amount of lines doesn't change much, but I think it's much more
straightforward this way.
2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek 2b5981b40a test: move TEST-16-EXTEND-TIMEOUT setup to static files 2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek 1aa0f38491 test/TEST-15: call daemon-reload in two more places
Sometimes the test would fail there, nondeterministically. I'm not sure why,
but relying on PID1 not caching the file is clearly very brittle. Let's instead
call daemon-reload.
2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek 4e2ac45a83 test/TEST-15: remove all created unit files
We would miss anything created under a template instance.
2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek 2c7519c036 test: move TEST-15-DROPIN setup to static files
Unfortunately the services needed to be renamed because of conflicts with other
services that exist in the shared dir.
2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek afd9c55dcc test: move most of TEST-14-MACHINE-ID setup to static files 2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek e5badaf335 test: move most of TEST-13-NSPAWN-SMOKE setup to static files 2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek d10029bba4 test: move TEST-12-ISSUE-3171 setup to static files 2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek 3ac189d8aa test: move TEST-11-ISSUE-3166 setup to static files 2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek 8c6d58f65d test: move TEST-10-ISSUE-2467 setup to static files 2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek 4110a6deb9 test: use shell arrays and remove duplicates
The tool lists are obviously not empty, so let's remove the test if they are.
2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek e88302002f test: move TEST-09-ISSUE-2691 setup to static files 2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek c84752398b test: move TEST-08-ISSUE-2730 setup to static files and meson scripts
Unfortunately meson does not install symlinks, but copies the symlink
destination instead. So symlinks need to be created by a script.
This commit adds both symlinks in test/testsuite-08.units/ and meson
scriptlet calls. Strictly speaking, the first is not necessary, since nothing
reads stuff directly from the source tree.
2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek 58a1bdb467 test: move TEST-07-ISSUE-1981 setup to static files 2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek 4caa1ac794 test/TEST-06: make autorelabel.service a static file too 2020-03-28 11:46:47 +01:00
Zbigniew Jędrzejewski-Szmek 1c76b5b5bb test/TEST-06: skip test if no selinux
I put SELINUX=disabled on my laptop, and the test fails with ENOENT when trying
to write to /sys/fs/selinux/enforce. It's a bit of a special case, but let's
avoid the failure.
2020-03-28 11:46:47 +01:00