1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 09:21:26 +03:00
Commit Graph

22 Commits

Author SHA1 Message Date
Dan Streetman
9cd7b1287b tests: add tests for SYMLINK containing whitespace in variable (#5158)
add udev-test.pl tests for whitespace in a substituted variable,
to verify the variable whitespace is replaced with underscores.

Tests for the change made by commit 0a10235ed4 ("udev-rules:
perform whitespace replacement for symlink subst values")
2017-01-25 20:24:52 -05:00
Lennart Poettering
d3fc8bf43f tests: let's stick to 8ch indenting, in perl code too 2016-08-19 16:01:17 +02:00
Zbigniew Jędrzejewski-Szmek
ce5fcc695e Merge pull request 3821 from davide125/fix-tests 2016-07-31 22:06:09 -04:00
Davide Cavalca
e4d214efc2 tests: skip udev-test if running inside a chroot 2016-07-29 09:20:11 -07: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
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
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
Filipe Brandenburger
4d55fc5b21 test: udev - Signal that test was skipped when running as non-root
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-08-30 22:10:30 -07:00
Tom Gundersen
b3f2490072 test: udev, valgrind - track origins of uninitiaziled memory 2015-04-03 17:27:45 +02:00
Tom Gundersen
333e07b793 test: udev - add gdb support 2015-03-27 16:23:46 +01:00
Tom Gundersen
02cd084db7 tests: udev - assume /etc/machine-id rather than /etc/hosts
On todays machines /etc/hosts is not mandatory. /etc/machine-id is though, so let's rely on that instead.

This makes the udev tests pass again for me.
2014-12-11 14:17:35 +01:00
Jan Synacek
0eb3cc8850 test: fix some tests when running inside a container 2014-12-10 13:36:10 +01:00
Tom Gundersen
9158d03e40 test: udev - restrict nemuric uid's to existing ones
We now verify the existence of uid's before applying them to devicenodes, so change the
test accordingly. We assume that both uid/gid 1 and 2 exist on the test system.
2014-09-20 18:12:53 +02:00
Anatol Pomozov
ab06eef810 Fix spelling errors using 'codespell' tool 2013-04-15 08:40:05 -04:00
Kay Sievers
1298001ec5 use the same email address everywhere 2012-11-12 19:47:43 +01:00
Kay Sievers
8a1733871f udev: remove SYMLINK "unique" option 2012-10-08 21:54:39 +02:00
Kay Sievers
4cb72937d3 udev: get rid of TEST_PREFIX and use unshare() to fake /sys, /dev, /run 2012-07-15 22:10:46 +02:00
Kay Sievers
6ada823a9a udev: remove configuration options for /dev, /sys, /run directories 2012-04-16 19:20:57 +02:00
Kay Sievers
0b87a07761 udev: test - move test/ and src/test/ 2012-04-14 19:36:47 +02:00