From 53899a171ea862124b49c75b7511b7eb30742ef9 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Thu, 10 Nov 2005 01:50:06 +0100 Subject: fix tests and remove no longer useful stuff Signed-off-by: Kay Sievers --- test/devd_test | 37 ------------------------------------- test/net_test | 35 ----------------------------------- test/replace_test | 33 --------------------------------- test/show_all_devices.sh | 27 --------------------------- test/test.all | 41 ----------------------------------------- test/test.block | 29 ----------------------------- test/test.tty | 20 -------------------- test/testd.block | 36 ------------------------------------ test/udev-test.pl | 5 +++-- 9 files changed, 3 insertions(+), 260 deletions(-) delete mode 100755 test/devd_test delete mode 100755 test/net_test delete mode 100755 test/replace_test delete mode 100755 test/show_all_devices.sh delete mode 100755 test/test.all delete mode 100755 test/test.block delete mode 100755 test/test.tty delete mode 100755 test/testd.block (limited to 'test') diff --git a/test/devd_test b/test/devd_test deleted file mode 100755 index 534e787f24..0000000000 --- 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 9daf8da082..0000000000 --- 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 6e01f28ed5..0000000000 --- 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 921b8e6163..0000000000 --- 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 527569bd43..0000000000 --- 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 " - echo "where 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 294c47c0be..0000000000 --- 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 " - echo "where 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 b89ad5a6d8..0000000000 --- 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 " - echo "where 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 ca9ac8c1ac..0000000000 --- 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 " - echo "where 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 44bc483cf1..2549c7ee69 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 => <$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; -- cgit v1.2.3-54-g00ecf