From 21d9e3f339659c82db950ff2b4c6b81956cfa917 Mon Sep 17 00:00:00 2001 From: Evgeny Vereshchagin Date: Wed, 6 Apr 2016 03:04:27 +0000 Subject: 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 --- src/test/test-udev.c | 2 +- test/sys.tar.xz | Bin 261380 -> 165116 bytes test/udev-test.pl | 22 +++++++++++----------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/test/test-udev.c b/src/test/test-udev.c index 64ef08652c..8522e9925c 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 052c77d182..49ee8027b2 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 3c8a480d0f..87041b1c36 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); -- cgit v1.2.3-54-g00ecf