aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2005-11-10 01:50:06 +0100
committerKay Sievers <kay.sievers@suse.de>2005-11-10 01:50:06 +0100
commit53899a171ea862124b49c75b7511b7eb30742ef9 (patch)
tree6552376fba823d79c2f84c9a38b67244b9ed2437 /test
parentf5f8f316aa66251d0ccf71b940182a9d00dbd040 (diff)
downloadudev-53899a171ea862124b49c75b7511b7eb30742ef9.tar.gz
fix tests and remove no longer useful stuff
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Diffstat (limited to 'test')
-rwxr-xr-xtest/devd_test37
-rwxr-xr-xtest/net_test35
-rwxr-xr-xtest/replace_test33
-rwxr-xr-xtest/show_all_devices.sh27
-rwxr-xr-xtest/test.all41
-rwxr-xr-xtest/test.block29
-rwxr-xr-xtest/test.tty20
-rwxr-xr-xtest/testd.block36
-rwxr-xr-xtest/udev-test.pl5
9 files changed, 3 insertions, 260 deletions
diff --git a/test/devd_test b/test/devd_test
deleted file mode 100755
index 534e787f..00000000
--- a/test/devd_test
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/bash
-
-RULES=label_test.rules
-CONFIG=label_test.conf
-
-export SYSFS_PATH=$PWD/sys/
-export UDEV_CONFIG_FILE=$PWD/$CONFIG
-
-cat > $RULES << EOF
-BUS="scsi", SYSFS{vendor}="IBM-ESXS", SYSFS{model}="ST336605LW !#", NAME="boot_diskX%n"
-BUS="scsi", SYSFS{vendor}="IBM-ESXS", SYSFS{model}="ST336605LW !#", NAME="a/nice/place/to/put/a/boot_disk%n"
-EOF
-
-cat > $CONFIG << EOF
-udev_root="$PWD/udev/"
-udev_db="$PWD/udev/.udevdb"
-udev_rules="$PWD/$RULES"
-EOF
-
-mkdir udev
-
-export ACTION=add
-export DEVPATH=block/sda
-
-../udev block
-ls -l udev
-
-export ACTION=remove
-export DEVPATH=block/sda
-
-../udev block
-ls -l udev
-
-
-rm $RULES
-rm $CONFIG
-rm -rf udev
diff --git a/test/net_test b/test/net_test
deleted file mode 100755
index 9daf8da0..00000000
--- a/test/net_test
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/bash
-
-RULES=label_test.rules
-CONFIG=label_test.conf
-
-export SYSFS_PATH=$PWD/sys/
-export UDEV_CONFIG_FILE=$PWD/$CONFIG
-
-cat > $RULES << EOF
-SYSFS{address}="00:e0:00:8d:9f:25", NAME="wireless"
-EOF
-
-cat > $CONFIG << EOF
-udev_root="$PWD/udev/"
-udev_db="$PWD/udev/.udevdb"
-udev_rules="$PWD/$RULES"
-EOF
-
-mkdir udev
-
-export ACTION=add
-export DEVPATH=class/net/eth1
-
-../udevtest class/net/eth1 net
-ls -l udev
-
-export ACTION=remove
-export DEVPATH=class/net/eth1
-
-../udevtest class/net/eth1 net
-ls -l udev
-
-rm $RULES
-rm $CONFIG
-rm -rf udev
diff --git a/test/replace_test b/test/replace_test
deleted file mode 100755
index 6e01f28e..00000000
--- a/test/replace_test
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/bash
-
-RULES=replace_test.rules
-CONFIG=replace_test.conf
-
-export SYSFS_PATH=$PWD/sys/
-export UDEV_CONFIG_FILE=$PWD/$CONFIG
-
-cat > $RULES << EOF
-KERNEL="ttyUSB0", NAME="visor"
-EOF
-
-cat > $CONFIG << EOF
-udev_root="$PWD/udev/"
-udev_db="$PWD/udev/.udevdb"
-udev_rules="$PWD/$RULES"
-EOF
-
-mkdir udev
-
-export DEVPATH=class/tty/ttyUSB0
-export ACTION=add
-
-../udev tty
-ls -l udev
-
-export ACTION=remove
-../udev tty
-ls -l udev
-
-rm $RULES
-rm $CONFIG
-rm -rf udev
diff --git a/test/show_all_devices.sh b/test/show_all_devices.sh
deleted file mode 100755
index 921b8e61..00000000
--- a/test/show_all_devices.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#! /bin/bash
-#
-# Directory where sysfs is mounted
-SYSFS_DIR=/sys
-
-# handle block devices and their partitions
-for i in ${SYSFS_DIR}/block/*; do
- # each drive
- echo ${i#${SYSFS_DIR}/block/}
-
- # each partition, on each device
- for j in $i/*; do
- if [ -f $j/dev ]; then
- echo ${j#${SYSFS_DIR}} | cut --delimiter='/' --fields=4-
- fi
- done
-done
-
-# all other device classes
-for i in ${SYSFS_DIR}/class/*; do
- for j in $i/*; do
- if [ -f $j/dev ]; then
- echo ${j#${SYSFS_DIR}} | cut --delimiter='/' --fields=4-
- fi
- done
-done
-
diff --git a/test/test.all b/test/test.all
deleted file mode 100755
index 527569bd..00000000
--- a/test/test.all
+++ /dev/null
@@ -1,41 +0,0 @@
-#! /bin/sh
-#
-# test.block - run udev(8) on each block device in /sys/block
-
-if [ $# = "0" ] ; then
- echo
- echo "usage: $0 <action>"
- echo "where <action> is \"add\" or \"remove\""
- echo
- exit 1
-fi
-
-SYSFSDIR=/sys # change this for a nonstand sysfs mount point
-BIN=../udev # location of your udev binary
-export ACTION=$1 # 'add' or 'remove'
-
-# do the block devices first
-for i in ${SYSFSDIR}/block/*; do
- # add each drive
- export DEVPATH=${i#${SYSFSDIR}}
- $BIN block
-
- # add each partition, on each device
- for j in $i/*; do
- if [ -f $j/dev ]; then
- export DEVPATH=${j#${SYSFSDIR}}
- $BIN block
- fi
- done
-done
-
-# now all the devices in the class directories
-for i in ${SYSFSDIR}/class/*; do
- for j in $i/*; do
- if [ -f $j/dev ]; then
- export DEVPATH=${j#${SYSFSDIR}}
- CLASS=`echo ${i#${SYSFSDIR}} | cut --delimiter='/' --fields=3-`
- $BIN $CLASS
- fi
- done
-done
diff --git a/test/test.block b/test/test.block
deleted file mode 100755
index 294c47c0..00000000
--- a/test/test.block
+++ /dev/null
@@ -1,29 +0,0 @@
-#! /bin/sh
-#
-# test.block - run udev(8) on each block device in /sys/block
-
-if [ $# = "0" ] ; then
- echo
- echo "usage: $0 <action>"
- echo "where <action> is \"add\" or \"remove\""
- echo
- exit 1
-fi
-
-SYSFSDIR=/sys # change this for a nonstand sysfs mount point
-BIN=../udev # location of your udev binary
-export ACTION=$1 # 'add' or 'remove'
-
-for i in ${SYSFSDIR}/block/*; do
- # add each drive
- export DEVPATH=${i#${SYSFSDIR}}
- $BIN block
-
- # add each partition, on each device
- for j in $i/*; do
- if [ -f $j/dev ]; then
- export DEVPATH=${j#${SYSFSDIR}}
- $BIN block
- fi
- done
-done
diff --git a/test/test.tty b/test/test.tty
deleted file mode 100755
index b89ad5a6..00000000
--- a/test/test.tty
+++ /dev/null
@@ -1,20 +0,0 @@
-#! /bin/sh
-#
-# test.tty - run udev(8) on each tty device in /sys/class/tty
-
-if [ $# = "0" ] ; then
- echo
- echo "usage: $0 <action>"
- echo "where <action> is \"add\" or \"remove\""
- echo
- exit 1
-fi
-
-SYSFSDIR=/sys # change this for a nonstand sysfs mount point
-BIN=../udev # location of your udev binary
-export ACTION=$1 # 'add' or 'remove'
-
-for i in ${SYSFSDIR}/class/tty/*; do
- export DEVPATH=${i#${SYSFSDIR}}
- $BIN tty
-done
diff --git a/test/testd.block b/test/testd.block
deleted file mode 100755
index ca9ac8c1..00000000
--- a/test/testd.block
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/bash
-#
-# test.block - run udev(8) on each block device in /sys/block
-
-if [ $# = "0" ] ; then
- echo
- echo "usage: $0 <action>"
- echo "where <action> is \"add\" or \"remove\""
- echo
- exit 1
-fi
-
-killall udevd
-
-SYSFSDIR=/sys # change this for a nonstand sysfs mount point
-BIN=./udevsend # location of your udev binary
-export ACTION=$1 # 'add' or 'remove'
-seq=1
-
-for i in ${SYSFSDIR}/block/*; do
- # add each drive
- export DEVPATH=${i#${SYSFSDIR}}
- export SEQNUM=$seq
- $BIN block
- x=$((seq++))
-
- # add each partition, on each device
- for j in $i/*; do
- if [ -f $j/dev ]; then
- export DEVPATH=${j#${SYSFSDIR}}
- export SEQNUM=$seq
- $BIN block
- x=$((seq++))
- fi
- done
-done
diff --git a/test/udev-test.pl b/test/udev-test.pl
index 44bc483c..2549c7ee 100755
--- a/test/udev-test.pl
+++ b/test/udev-test.pl
@@ -262,9 +262,9 @@ EOF
desc => "import of shell-value file",
subsys => "block",
devpath => "/block/sda",
- exp_name => "subdir/sys/node" ,
+ exp_name => "subdir/info/node" ,
rules => <<EOF
-BUS=="scsi", IMPORT{file}="test.all", NAME="subdir%E{SYSFSDIR}/node"
+BUS=="scsi", IMPORT{file}="udev-test.conf", NAME="subdir/%E{udev_log}/node"
KERNEL=="ttyUSB0", NAME="visor"
EOF
},
@@ -1763,6 +1763,7 @@ open CONF, ">$udev_conf" || die "unable to create config file: $udev_conf";
print CONF "udev_root=\"$udev_root\"\n";
print CONF "udev_db=\"$udev_db\"\n";
print CONF "udev_rules=\"$udev_rules\"\n";
+print CONF "udev_log=\"info\"\n";
close CONF;
my $test_num = 1;