linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [udev] udev-test.pl - automatic testing script
@ 2003-11-23  3:54 Kay Sievers
  2003-11-23  5:49 ` Greg KH
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Kay Sievers @ 2003-11-23  3:54 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 1582 bytes --]

On Sat, Nov 22, 2003 at 03:41:10PM +0100, Kay Sievers wrote:
> 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.

Here is a slightly better version that runs 'tree' on error
and prints a description for every test.

thanks,
Kay



pim:/home/kay/src/udev.kay/test# ./udev-test.pl

udev-test will run 6 tests:

TEST: label test of scsi disc
method 'LABEL' for 'block/sda' expecting node 'boot_disk'
add: ok    remove: ok

TEST: label test of scsi partition
method 'LABEL' for 'block/sda/sda1' expecting node 'boot_disk1'
add: ok    remove: ok

TEST: replace kernel name
method 'REPLACE' for 'class/tty/ttyUSB0' expecting node 'visor'
add: ok    remove: ok

TEST: place on bus of scsi partition
method 'TOPOLOGY' for 'block/sda/sda3' expecting node 'first_disk2'
add: error
udev-root/
`-- first_disk3

0 directories, 1 file

TEST: test NAME substitution chars
method 'TOPOLOGY' for 'block/sda/sda3' expecting node 'Major:8:minor:3:kernelnumber:3:bus:0:0:0:0'
add: ok    remove: ok

TEST: callout result subtitution, only last should match
method 'CALLOUT' for 'block/sda/sda3' expecting node 'special-device-3'
add: ok    remove: ok

1 errors occured


[-- Attachment #2: udev-test.pl --]
[-- Type: application/x-perl, Size: 4410 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread
* [udev] udev-test.pl - automatic testing script
@ 2003-11-22 14:41 Kay Sievers
  0 siblings, 0 replies; 7+ messages in thread
From: Kay Sievers @ 2003-11-22 14:41 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 1397 bytes --]

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


[-- Attachment #2: udev-test.pl --]
[-- Type: application/x-perl, Size: 4435 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-11-24  5:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-23  3:54 [udev] udev-test.pl - automatic testing script Kay Sievers
2003-11-23  5:49 ` Greg KH
2003-11-24  1:33 ` Kay Sievers
2003-11-24  1:39 ` Greg KH
2003-11-24  3:04 ` Kay Sievers
2003-11-24  5:45 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2003-11-22 14:41 Kay Sievers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).