summaryrefslogtreecommitdiff
path: root/test/udev-test.pl
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2004-11-06 14:28:01 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 22:16:40 -0700
commit2b41e68a08548ce44b4d145900dab2bb04cd34f7 (patch)
treef2e96c9f150775e3673891d38a5af23d4246c826 /test/udev-test.pl
parent482b0ecd8fcc2651c003c6f1ae9a2d3301ecf34a (diff)
[PATCH] replace tdb database by simple lockless file database
This makes the udev operation completely lockless by storing a file for every node in /dev/.udevdb/* This solved the problem with deadlocking concurrent udev processes waiting for each other to release the file lock under heavy load.
Diffstat (limited to 'test/udev-test.pl')
-rw-r--r--test/udev-test.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/udev-test.pl b/test/udev-test.pl
index e8ce0b44dd..2ba63fe83f 100644
--- a/test/udev-test.pl
+++ b/test/udev-test.pl
@@ -30,7 +30,7 @@ my $PWD = $ENV{PWD};
my $sysfs = "sys/";
my $udev_bin = "../udev";
my $udev_root = "udev-root/"; # !!! directory will be removed !!!
-my $udev_db = ".udev.tdb";
+my $udev_db = ".udevdb";
my $perm = "udev.permissions";
my $main_conf = "udev-test.conf";
my $conf_tmp = "udev-test.rules";
@@ -1268,7 +1268,7 @@ sub run_test {
}
if (defined($config->{option}) && $config->{option} eq "clear") {
- unlink($udev_db);
+ system("rm -rf $udev_db");
system("rm -rf $udev_root");
mkdir($udev_root) || die "unable to create udev_root: $udev_root\n";
}
@@ -1319,7 +1319,7 @@ if ($ARGV[0]) {
print "$error errors occured\n\n";
# cleanup
-unlink($udev_db);
+system("rm -rf $udev_db");
system("rm -rf $udev_root");
unlink($conf_tmp);
unlink($main_conf);