Evgeny Vereshchagin
4f4d6ee4be
tests: add test for coredump handler hanging at shutdown ( #3101 )
...
Test for #2691 .
2016-04-24 20:24:41 -04:00
Evgeny Vereshchagin
43bbb8f005
tests: don't rely on the host's systemd-nspawn, don't register test machine ( #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-13 09:57:06 -04:00
Martin Pitt
bf8f7583ee
test: udev: Check tags
...
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
)
2016-04-06 23:30:10 +02:00
Martin Pitt
efc9f70325
test: udev: check exit code of test-udev
...
We expect test-udev to succeed. Verify that its exit code is zero, particularly
to spot crashes (e. g. a segfault would be error code 139).
2016-04-06 23:30:10 +02:00
Evgeny Vereshchagin
21d9e3f339
tests: don't rely on the underlying fs in test-udev (v2)
...
* This reverts commit 646048b40a
.
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-06 04:08:39 +00:00
Evgeny Vereshchagin
2ce8d27b1f
tests: don't rely on underlying fs in udev-test, use tmpfs instead
...
Fixes : #457
2016-04-05 10:38:09 +00:00
Evgeny Vereshchagin
331fb4ca51
basic: fallback to fstatat if entry->d_type is DT_UNKNOWN
...
* 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-04-04 13:07:56 +02:00
Daniel Mack
68de79d6a4
Merge pull request #2760 from ronnychevalier/rc/core_no_new_privileges_seccompv3
...
core: set NoNewPrivileges for seccomp if we don't have CAP_SYS_ADMIN
2016-03-21 12:57:43 +01:00
Zbigniew Jędrzejewski-Szmek
fdbf7b554e
Merge pull request #2797 from evverx/selinux-use-raw
...
selinux: use *_raw API from libselinux
2016-03-16 01:13:29 -04:00
Evgeny Vereshchagin
45dbd7b6cb
tests: add create_strace_wrapper
...
Very handy for early-boot debugging
See https://github.com/systemd/systemd/pull/2781#discussion_r54782628
2016-03-04 01:55:46 +00:00
Evgeny Vereshchagin
91f9f8f1ba
tests: add test for https://github.com/systemd/systemd/issues/2730
2016-03-01 03:12:24 +00:00
Ronny Chevalier
50f130c286
test-execute: add nfsnobody alternative as a nobody user
2016-02-28 15:00:18 +01:00
Ronny Chevalier
19c0b0b9a5
core: set NoNewPrivileges for seccomp if we don't have CAP_SYS_ADMIN
...
The manpage of seccomp specify that using seccomp with
SECCOMP_SET_MODE_FILTER will return EACCES if the caller do not have
CAP_SYS_ADMIN set, or if the no_new_privileges bit is not set. Hence,
without NoNewPrivilege set, it is impossible to use a SystemCall*
directive with a User directive set in system mode.
Now, NoNewPrivileges is set if we are in user mode, or if we are in
system mode and we don't have CAP_SYS_ADMIN, and SystemCall*
directives are used.
2016-02-28 14:44:26 +01:00
Zbigniew Jędrzejewski-Szmek
587751eb66
udev-test.pl: add --strace option
...
It's useful when trying to see what the tests are doing.
I hardcoded '-efile' as the option to strace, but in the future
it might be useful to make this configurable.
2016-02-22 13:21:32 -05:00
Evgeny Vereshchagin
252549990f
tests: add test for https://github.com/systemd/systemd/issues/2637
...
+ perl -e 'exit(!(qq{0} eq qq{\x25U}))'
exec-spec-interpolation.service: Main process exited, code=exited, status=1/FAILURE
exec-spec-interpolation.service: Unit entered failed state.
exec-spec-interpolation.service: Failed with result 'exit-code'.
PID: 11270
Start Timestamp: Wed 2016-02-17 22:21:31 UTC
Exit Timestamp: Wed 2016-02-17 22:21:31 UTC
Exit Code: exited
Exit Status: 1
Assertion 'service->main_exec_status.status == status_expected' failed at src/test/test-execute.c:65, function check(). Aborting.
2016-02-17 22:40:26 +00:00
Evgeny Vereshchagin
09f6f45a29
tests: add test for https://github.com/systemd/systemd/issues/1981
2016-02-10 18:19:08 +00:00
Lennart Poettering
9e7454e0e2
Merge pull request #2535 from PhillipSz/remove-exit-0
...
test: remove exit 0 at the end
2016-02-08 17:27:18 +01:00
Evgeny Vereshchagin
646048b40a
tests: fix #457
...
There are some limits on XFS:
major_max=511
minor_max=262143
see https://github.com/torvalds/linux/blob/master/fs/xfs/xfs_iops.c
if (S_ISCHR(mode) || S_ISBLK(mode)) {
if (unlikely(!sysv_valid_dev(rdev) || MAJOR(rdev) & ~0x1ff))
return -EINVAL;
2016-02-08 11:23:18 +00:00
Phillip Sz
e3ceb75be3
test: remove exit 0 at the end
...
We don't need that at the end, as it will always exit with 0 if
everything is okey.
2016-02-05 11:38:58 +01:00
Evgeny Vereshchagin
5c7290b195
tests: add test-selinux-checks
2016-01-31 09:02:51 +00:00
Evgeny Vereshchagin
d5172c7913
tests: fix install_pam
...
* 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-25 05:30:19 +00:00
Evgeny Vereshchagin
e3ce42e705
tests: add setup_selinux
2016-01-25 05:30:06 +00:00
Lukas Nykryn
c584ffc0b7
sysv-generator: do not join dependencies on one line, split them
...
If there is a lot of initscripts and dependencies between them we might
end generating After= (and similar) lines which are longer then LINE_MAX
and thus rejected by parser in systemd.
Fixes #2099
2016-01-21 12:53:14 +01:00
Evgeny Vereshchagin
5a613464fa
tests: add STRIP_BINARIES
...
We need a beautiful stacktraces sometimes
For example https://github.com/systemd/systemd/pull/2328
2016-01-18 07:27:49 +00:00
Evgeny Vereshchagin
b46f4ef107
tests: fix TEST-03-JOBS
...
We have
JOB UNIT TYPE STATE
1 testsuite.target start waiting
81 end.service start waiting
187 sleep.service start waiting
136 hello.service start waiting
82 testsuite.service start running
135 hello-after-sleep.target start waiting
sometimes
2016-01-18 03:56:51 +00:00
Evgeny Vereshchagin
98ca53dac2
tests: remove unnecessary setup_nspawn_root
...
we don't run nspawn in TEST-02-CRYPTSETUP
2016-01-18 03:56:51 +00:00
Evgeny Vereshchagin
ac289ce3f5
tests: fix TEST-02-CRYPTSETUP on Debian/Ubuntu
2016-01-18 03:56:51 +00:00
Evgeny Vereshchagin
9974ff63b1
tests: install fsck*
...
systemd-fsck depends on /sbin/fsck*
2016-01-18 03:56:51 +00:00
Evgeny Vereshchagin
24be78d72b
tests: remove unnecessary --boot
...
* 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-18 03:56:51 +00:00
Evgeny Vereshchagin
cb2f9d3f29
tests: add function for valgrind wrapper creation
...
I used it for d9814c7
and bffd87b
2016-01-15 02:53:47 +00:00
Evgeny Vereshchagin
a2fbff31c9
tests: add function for valgrind installation
...
I used it for d9814c76ec
Very handy:)
2016-01-14 08:11:17 +00:00
Evgeny Vereshchagin
75f63f0640
README, tests: remove /etc/mtab
...
This is a followup for 1d40ddb
2016-01-14 00:11:07 +00:00
Ismo Puustinen
70d7aea5c7
tests: test ambient capabilities.
...
The ambient capability tests are only run if the kernel has support for
ambient capabilities.
2016-01-12 12:14:50 +02:00
Evgeny Vereshchagin
3889613ec6
tests: add regression test for systemctl restart systemd-journald
...
See https://github.com/systemd/systemd/issues/2236
2015-12-30 05:00:14 +00:00
Lennart Poettering
e4b0e86225
Merge pull request #2056 from evverx/expose-soft-limits-on-the-bus
...
Expose soft limits on the bus
2015-12-10 11:20:03 +01:00
Tom Gundersen
5fa3be82e5
Merge pull request #1934 from martinpitt/master
...
tests: add networkd integration test
2015-12-03 18:22:06 +01:00
Evgeny Vereshchagin
68a8f17775
tests: add basic rlimits test
2015-11-28 16:47:56 +00:00
Evgeny Vereshchagin
e8e5a6e255
tests: use sync instead of flush
...
flush doesn't sync a journal -> tests sometimes fail
2015-11-27 13:55:23 +00:00
Evgeny Vereshchagin
c7bb28732f
tests: don't run test on incomplete setup
...
This is a follow-up commit for
https://github.com/systemd/systemd/pull/1937
See https://github.com/systemd/systemd/pull/2030
2015-11-27 13:29:51 +00:00
Lennart Poettering
d353a16d1f
Merge pull request #1937 from evverx/fix-stdout-parsing
...
Fix stdout stream parsing
2015-11-27 14:03:49 +01:00
Martin Pitt
4ddb85b18b
tests: add networkd integration test
...
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-27 11:53:07 +01:00
Evgeny Vereshchagin
cd949ee734
tests: don't run tests on incomplete setup
2015-11-25 17:51:17 +00:00
Evgeny Vereshchagin
55161d41eb
tests: remove unnecessary /sys/fs/cgroup/systemd checking
...
A unified hierarchy obsoletes this checking
2015-11-25 11:43:58 +00:00
Evgeny Vereshchagin
2c393ed761
tests: don't rely on system's machined
...
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-24 14:33:16 +00:00
Lennart Poettering
8c191eecd4
Merge pull request #1957 from zonque/qemu-test
...
test: make QEMU tests work on Semaphore
2015-11-24 15:02:20 +01:00
Evgeny Vereshchagin
61fea35e14
tests: fix initrd searching on Debian/Ubuntu
2015-11-20 12:10:12 +00:00
Daniel Mack
6f9d3b08cf
test: 01-basic: mask some services that currently don't run in qemu
2015-11-19 17:15:26 +01:00
Daniel Mack
3f5c306d38
test: disable nspawn checks if machine wasn't booted with systemd
...
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-19 17:14:44 +01:00
Evgeny Vereshchagin
278d511547
tests: fix ls: cannot access /var/tmp/systemd-test.*/journal/*/*.journal
...
don't lose logs from the test machine too
2015-11-19 14:52:41 +00:00
Daniel Mack
dbf43a42b8
test: make qemu use kvm if available
...
If we're running in a KVM virtualized environment (such as Semaphore's
Docker enabled platform), pass '-cpu host' to QEMU.
2015-11-19 14:25:32 +01:00