udev-test.pl - automatic testing script
Hi,
here is a automatic udev test script. To test place it in the test/ directory of the current tree to find the sysfs tree copy and run it.
The whole test is self contained, it only needs a matching sysfs tree. To extend the test add a hash to the @tests array inside the script. The script checks the created node and prints a summary of all tests.
Please don't change $udev_root to something useful, its a temorary directory and will be removed after the test run.
thanks,
Kay
pim:/home/kay/src/udev.kay/test# ./udev-test.pl
udev-test will run 6 tests:
LABEL: for 'block/sda' add 'udev-root/boot_disk': ok
LABEL: for 'block/sda' remove 'udev-root/boot_disk': ok
LABEL: for 'block/sda/sda1' add 'udev-root/boot_disk1': ok
LABEL: for 'block/sda/sda1' remove 'udev-root/boot_disk1': ok
REPLACE: for 'class/tty/ttyUSB0' add 'udev-root/visor': ok
REPLACE: for 'class/tty/ttyUSB0' remove 'udev-root/visor': ok
TOPOLOGY: for 'block/sda/sda3' add 'udev-root/first_disk3': ok
TOPOLOGY: for 'block/sda/sda3' remove 'udev-root/first_disk3': ok
TOPOLOGY: for 'block/sda/sda3' add 'udev-root/Major:8:minor:3:kernelnumber:3:bus:0:0:0:0': ok
TOPOLOGY: for 'block/sda/sda3' remove 'udev-root/Major:8:minor:3:kernelnumber:3:bus:0:0:0:0': ok
CALLOUT: for 'block/sda/sda3' add 'udev-root/special-device-3': ok
CALLOUT: for 'block/sda/sda3' remove 'udev-root/special-device-3': ok
0 errors occured