summaryrefslogtreecommitdiff
path: root/test
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
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')
-rw-r--r--test/devd_test2
-rw-r--r--test/ignore_test2
-rw-r--r--test/label_test2
-rw-r--r--test/modifier_test2
-rw-r--r--test/net_test2
-rw-r--r--test/replace_test2
-rw-r--r--test/topo_test2
-rw-r--r--test/udev-test.pl6
8 files changed, 10 insertions, 10 deletions
diff --git a/test/devd_test b/test/devd_test
index 007a0bec90..6e4c206352 100644
--- a/test/devd_test
+++ b/test/devd_test
@@ -14,7 +14,7 @@ EOF
cat > $CONFIG << EOF
udev_root="$PWD/udev/"
-udev_db="$PWD/udev/.udev.tdb"
+udev_db="$PWD/udev/.udevdb"
udev_rules="$PWD/$RULES"
udev_permissions="$PWD/udev.permissions"
EOF
diff --git a/test/ignore_test b/test/ignore_test
index ca51e9a1ab..d22a4d7b5f 100644
--- a/test/ignore_test
+++ b/test/ignore_test
@@ -13,7 +13,7 @@ EOF
cat > $CONFIG << EOF
udev_root="$PWD/udev/"
-udev_db="$PWD/udev/.udev.tdb"
+udev_db="$PWD/udev/.udevdb"
udev_rules="$PWD/$RULES"
udev_permissions="$PWD/udev.permissions"
udev_log="true"
diff --git a/test/label_test b/test/label_test
index b99a4acd54..fbb7309045 100644
--- a/test/label_test
+++ b/test/label_test
@@ -14,7 +14,7 @@ EOF
cat > $CONFIG << EOF
udev_root="$PWD/udev/"
-udev_db="$PWD/udev/.udev.tdb"
+udev_db="$PWD/udev/.udevdb"
udev_rules="$PWD/$RULES"
udev_permissions="$PWD/udev.permissions"
EOF
diff --git a/test/modifier_test b/test/modifier_test
index 7ffc7b16a1..c2b5ec6830 100644
--- a/test/modifier_test
+++ b/test/modifier_test
@@ -13,7 +13,7 @@ EOF
cat > $CONFIG << EOF
udev_root="$PWD/udev/"
-udev_db="$PWD/udev/.udev.tdb"
+udev_db="$PWD/udev/.udevdb"
udev_rules="$PWD/$RULES"
udev_permissions="$PWD/udev.permissions"
EOF
diff --git a/test/net_test b/test/net_test
index 56a6847d19..ec0dea4642 100644
--- a/test/net_test
+++ b/test/net_test
@@ -13,7 +13,7 @@ EOF
cat > $CONFIG << EOF
udev_root="$PWD/udev/"
-udev_db="$PWD/udev/.udev.tdb"
+udev_db="$PWD/udev/.udevdb"
udev_rules="$PWD/$RULES"
udev_permissions="$PWD/udev.permissions"
EOF
diff --git a/test/replace_test b/test/replace_test
index 10215b0f24..9445b7262a 100644
--- a/test/replace_test
+++ b/test/replace_test
@@ -13,7 +13,7 @@ EOF
cat > $CONFIG << EOF
udev_root="$PWD/udev/"
-udev_db="$PWD/udev/.udev.tdb"
+udev_db="$PWD/udev/.udevdb"
udev_rules="$PWD/$RULES"
udev_permissions="$PWD/udev.permissions"
EOF
diff --git a/test/topo_test b/test/topo_test
index 18b2549b97..77333a978c 100644
--- a/test/topo_test
+++ b/test/topo_test
@@ -13,7 +13,7 @@ EOF
cat > $CONFIG << EOF
udev_root="$PWD/udev/"
-udev_db="$PWD/udev/.udev.tdb"
+udev_db="$PWD/udev/.udevdb"
udev_rules="$PWD/$RULES"
udev_permissions="$PWD/udev.permissions"
EOF
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);