From: Evgeny Vereshchagin Date: Wed, 6 Apr 2016 03:04:27 +0000 (+0000) Subject: tests: don't rely on the underlying fs in test-udev (v2) X-Git-Tag: v230~207^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2969%2Fhead;p=thirdparty%2Fsystemd.git tests: don't rely on the underlying fs in test-udev (v2) * This reverts commit 646048b40a7b62c4e9bc59024ef6133613cda01b. 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 --- diff --git a/src/test/test-udev.c b/src/test/test-udev.c index 64ef08652c4..8522e9925cf 100644 --- a/src/test/test-udev.c +++ b/src/test/test-udev.c @@ -41,7 +41,7 @@ static int fake_filesystems(void) { const char *error; } fakefss[] = { { "test/tmpfs/sys", "/sys", "failed to mount test /sys" }, - { "test/dev", "/dev", "failed to mount test /dev" }, + { "test/tmpfs/dev", "/dev", "failed to mount test /dev" }, { "test/run", "/run", "failed to mount test /run" }, { "test/run", "/etc/udev/rules.d", "failed to mount empty /etc/udev/rules.d" }, { "test/run", UDEVLIBEXECDIR "/rules.d","failed to mount empty " UDEVLIBEXECDIR "/rules.d" }, diff --git a/test/sys.tar.xz b/test/sys.tar.xz index 052c77d182a..49ee8027b2e 100644 Binary files a/test/sys.tar.xz and b/test/sys.tar.xz differ diff --git a/test/udev-test.pl b/test/udev-test.pl index 3c8a480d0f3..87041b1c367 100755 --- a/test/udev-test.pl +++ b/test/udev-test.pl @@ -27,9 +27,10 @@ my $strace = 0; my $udev_bin_valgrind = "valgrind --tool=memcheck --leak-check=yes --track-origins=yes --quiet $udev_bin"; my $udev_bin_gdb = "gdb --args $udev_bin"; my $udev_bin_strace = "strace -efile $udev_bin"; -my $udev_dev = "test/dev"; my $udev_run = "test/run"; my $udev_tmpfs = "test/tmpfs"; +my $udev_sys = "${udev_tmpfs}/sys"; +my $udev_dev = "${udev_tmpfs}/dev"; my $udev_rules_dir = "$udev_run/udev/rules.d"; my $udev_rules = "$udev_rules_dir/udev-test.rules"; my $EXIT_TEST_SKIP = 77; @@ -703,7 +704,7 @@ EOF desc => "big major number test", devpath => "/devices/virtual/misc/misc-fake1", exp_name => "node", - exp_majorminor => "511:1", + exp_majorminor => "4095:1", rules => < "big major and big minor number test", devpath => "/devices/virtual/misc/misc-fake89999", exp_name => "node", - exp_majorminor => "511:89999", + exp_majorminor => "4095:89999", rules => < 0) { exit(1);