summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2005-04-26[PATCH] remove the device node only if the major/minor number matcheskay.sievers@vrfy.org
2005-04-26[PATCH] introduce OPTIONS=ignore_device, ignore_remove, all_partitions" keykay.sievers@vrfy.org
Here we move all possible options into a own key to make it possible to have options-only rules. The options on the NAME key are removed from the man page and will be removed from a future version of udev. For ignore rules, OPTIONS="ignore" should be used. The rule: SUBSYSTEM="block", SYSFS{removable}="1", OPTIONS="all_partitions" will create all partitions for a block device which is known to have removable media (a check for cdrom drives would be needed too).
2005-04-26[PATCH] allow simple-build-check.sh to go faster if MAKEOPTS is setgregkh@suse.de
This lets my multiprocessor boxes do the testing quicker...
2005-04-26[PATCH] fix test for temporary nodespatmans@us.ibm.com
2005-04-26[PATCH] fix special file mode mask for temporary device nodekay.sievers@vrfy.org
2005-04-26[PATCH] udevstart: simplify "dev" file searchingkay.sievers@vrfy.org
Just stat() the "dev" file in the device directory instead of opening the directory and iterating over all entries. Make udevstart work with the settings in with udev.conf so we can run a test program. Add a test for udevstart. Remove changelog stuff from code. We should never start with this silly thing.
2005-04-26[PATCH] add %P modifier to query the node name of the parent devicekay.sievers@vrfy.org
Events for partition devies may want to read the main block device name to compose it's own name or read a disklabel from the main device. SUBSYSTEM="block", KERNEL="*[1-9]", NAME="%P-p%n" will append the partition number to the name of the main block device.
2005-04-26[PATCH] provide temporary device node for callouts to access the devicekay.sievers@vrfy.org
%N will create a temporary node for a callout a be sustituted with the name of the node.
2005-04-26[PATCH] simple_build_check: make it possible to pass KERNEL_DIRkay.sievers@vrfy.org
2005-04-26[PATCH] remove default_* permissions from udev.conf filekay.sievers@vrfy.org
With the "permissions only rules" we can just place: MODE="0660", OWNER="root", GROUP="root" at the beginning of the rules file and get exactly the same behavior. If no values are given the compiled-in defaults are used.
2005-04-26[PATCH] update Fedora config files and add some more testskay.sievers@vrfy.org
2005-04-26[PATCH] allow permissions only ruleskay.sievers@vrfy.org
On Mon, 2004-12-20 at 15:03 +0100, Marco d'Itri wrote: > +# all block devices > > +SUBSYSTEM="block", NAME="%k", GROUP="disk" > > + > NAME="%k" here and in similar rules does not add any new information, > what about making it optional, like it is for SYMLINK-only rules?
2005-04-26[PATCH] add SUBSYSTEM rule to catch all block devices and apply the disk ↵kay.sievers@vrfy.org
permissions
2005-04-26[PATCH] allow multiline rules by backslash at the end of the linekay.sievers@vrfy.org
On Sun, 2004-12-19 at 18:31 +0100, Marco d'Itri wrote: > > On Dec 19, Kay Sievers <kay.sievers@vrfy.org> wrote: > > > (Feature request: would it be possible to extend the rules files parser > > to support continuation lines? I'd like it to consider lines starting > > with white space as part of the previous line.) > > How about the usual backslash at the end of the line. Here is a simple > patch.
2005-04-26[PATCH] simplify rules file by setting default mode to 0660kay.sievers@vrfy.org
On Sun, 2004-12-19 at 18:31 +0100, Marco d'Itri wrote: > It may be better to use default_mode="0660", I do not think that there > are any mode 600 devices. This would allow setting only the group for > most of them.
2005-04-26[PATCH] I broke the extras/ again. Add simple build test script now.kay.sievers@vrfy.org
2005-04-26[PATCH] complete removal of explicit udev permissions config filekay.sievers@vrfy.org
2005-04-26bleah, more merge fixes...Greg KH
2005-04-26[PATCH] udevd-test.pl: remove wrong date calculationkay.sievers@vrfy.org
A hour wrap during the test run does not work :) Just remove all the useless date conversions as we are only interested in the seconds it takes to process. [root@pim udevd-test]# ./udevd-test.pl 9 ... device: /class/tty/console, action: remove forking udev time: Sat Dec 11 18:59:57 2004 the delay time is: 3 s device: /class/tty/ptmx, action: remove forking udev time: Sat Dec 11 19:00:07 2004 the delay time is: 4013 s the delay time is: 4013 udevd doesn't act properly.
2005-04-26[PATCH] delete a bunch of files no longer needed.greg@kroah.com
Thanks to Kay for pointing it out.
2005-04-26[PATCH] fix udev-test/udev-test.pl to work with againkay.sievers@vrfy.org
2005-04-26[PATCH] don't call the hotplug scripts with a test runkay.sievers@vrfy.org
2005-04-26fixups to get back to proper patch orderGreg KH
Damm, it's hard to merge a multi-line tree into one flat line at times...
2005-04-26[PATCH] comment out ability to run udev-test.pl with valgrindgreg@kroah.com
2005-04-26[PATCH] add NAME{ignore_remove} attributekay.sievers@vrfy.org
Some broken ide drivers are generating high event traffic, with add/remove events. With this attribute, it can be specified, that the node is always available. It may be used in conjunction with the new DRIVER= match to catch specific kernel device drivers.
2005-04-26[PATCH] support DRIVER as a rule keykay.sievers@vrfy.org
Match with a rule against a device with a specific kernel driver.
2005-04-26[PATCH] support SUBSYSTEM as a rule keykay.sievers@vrfy.org
This should make it easier to catch e.g all block or net devices with a single rule.
2005-04-26[PATCH] replace tdb database by simple lockless file databasekay.sievers@vrfy.org
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.
2005-04-26[PATCH] make udev-test.pl test for root permissions before runninggreg@kroah.com
Should prevent false error reports from happening.
2005-04-26[PATCH] Apply the default permissions even if we found a entry inkay.sievers@vrfy.org
2005-04-26[PATCH] add test for format chars in multiple symlinks to replacekay.sievers@vrfy.org
2005-04-26[PATCH] add dumb script to show all sysfs devices in the system.greg@kroah.com
2005-04-26[PATCH] big cleanup of internal udev apikay.sievers@vrfy.org
Here is the first patch to cleanup the internal processing of the various stages of an udev event. It should not change any behavior, but if your system depends on udev, please always test it before reboot :) We pass only one generic structure around between add, remove, namedev, db and dev_d handling and make all relevant data available to all internal stages. All udev structures are renamed to "udev". We replace the fake parameter by a flag in the udev structure. We open the class device in the main binaries and not in udev_add, to make it possible to use libsysfs for udevstart directory crawling. The last sleep parameters are removed.
2005-04-26[PATCH] fix up the wait_for_sysfs_test script a bit.greg@kroah.com
We also emit the same things the -mm tree does now, so to make that easier to test for.
2005-04-26[PATCH] take out & from wait_for_sysfs_test that I previously missed.greg@kroah.com
2005-04-26[PATCH] add wait_for_sysfs test script to the tarball to help people debug ↵greg@kroah.com
their boxes.
2005-04-26[PATCH] fix problems using scsi_id with udevstartkay.sievers@vrfy.org
when udevstart was running we didn't set the environment and the subsystem argument for the callouts the dev.d/ scripts. Here is a fix, that sets that with every udevstart iteration, corrects argv[0] to be the basename() only not the whole path and adds a test for invoking callouts without arguments.
2005-04-26[PATCH] add enum testskay.sievers@vrfy.org
On Fri, Sep 10, 2004 at 01:09:07PM -0700, Greg KH wrote: > On Tue, Sep 07, 2004 at 01:19:34PM +0200, David Zeuthen wrote: > > > > KERNEL="sr*", NAME="%k", SYMLINK="cdrom%e" > > KERNEL="scd*", NAME="%k", SYMLINK="cdrom%e" > > KERNEL="pcd*", NAME="%k", SYMLINK="cdrom%e" > > KERNEL="hd[a-z]", PROGRAM="/bin/cat /proc/ide/%k/media", RESULT="cdrom", NAME="\%k", SYMLINK="cdrom%e" > > KERNEL="fd[0-9]", NAME="%k", SYMLINK="floppy%e" > > KERNEL="hd[a-z]", PROGRAM="/bin/cat /proc/ide/%k/media", RESULT="floppy", NAME=\"%k", SYMLINK="floppy%e" > > > > New patch is attached. > > Nice, I've applied this. > > How about sending a patch for the test/udev-test.pl script that adds a > test for this new paramater, so we make sure to not break it in the > future. Here are the tests for the enumeration character %e. I've added a option string to be able to do a whole sequence of tests without node removal, so we can skip the "remove" event and get an increasing number to append to the name. After the sequence test the whole directory is cleaned for the next tests.
2005-04-26[PATCH] fix udev segfaults with bad permissions filekay.sievers@vrfy.org
On Tue, Sep 14, 2004 at 02:53:12PM +0200, Loleslaw wrote: > Hi, > Since I started using udev-031 on my gentoo udevstart would just segfault > (udev-030 worked). As it turned out I had a file in /etc/udev/permissions.d > with a single space in one line. I've cleaned the file and it works all > right, but I thought you could be interested. > I've traced it to function namedev_init_permissions in namedev_parse.c > I don't know C well enough to suggest a patch. Yeah, thanks for pointing that out. It only happens if the file ends with whitespace-only lines. Here is a fix and a test for udev-test.pl to cover that case.
2005-04-26[PATCH] add test for ! in partition namegreg@kroah.com
2005-04-26[PATCH] add devd_test script.greg@kroah.com
2005-04-26[PATCH] udevd test scriptkay.sievers@vrfy.org
Thanks to Yin, Hu <hu.yin@intel.com>, who made a nice perl script to test the expected behavior of the udevd sequence number handling. The test sends different SEQNUM sequences to udevd, while analyzing the reordering and timeout handling of udevd.
2005-04-26[PATCH] Added expanded tests to the test framework from Leann Ogasawara ↵greg@kroah.com
<ogasawara@osdl.org>
2005-04-26[PATCH] tweak net_test a bit.greg@kroah.com
2005-04-26[PATCH] make a net_test test script using udevtest.greg@kroah.com
2005-04-26[PATCH] add hotplug.dev script to handle renamed network devices.greg@kroah.com
2005-04-26[PATCH] add a bunch of network class devices to the test sysfs treegreg@kroah.com
2005-04-26[PATCH] netdev - udevdb+dev.d changeskay.sievers@vrfy.org
Here is a patch to change the netdev handling in the database and for the dev.d/ calls. I applies on top of the udevd.patch, cause klibc has no sysinfo(). o netdev's are also put into our database now. I want this for the udevruler gui to get a list of all handled devices. All devices in the db are stamped with the system uptime value at the creation time. 'udevinfo -d' prints it. o the DEVPATH value is the key for udevdb, but if we rename a netdev, the name is replaced in the kernel, so we add the changed name to the db to match with the remove event. NOTE: The dev.d/ scripts still get the original name from the hotplug call. Should we replace DEVPATH with the new name too? o We now only add a device to the db, if we have successfully created the main node or successfully renamed a netdev. This is the main part of the patch, cause I needed to clean the retval passing trough all the functions used for node creation. o DEVNODE sounds a bit ugly for netdev's so I exported DEVNAME too. Can we change the name? o I've added a UDEV_NO_DEVD to possibly skip the script execution and used it in udev-test.pl. udevstart is the same horror now, if you have scripts with logging statements in dev.d/ it takes minutes to finish, can we skip the scripts here too? o The get_device_type() function is changed to be more strict, cause 'udevinfo -a -p /block/' gets a class device for it and tries to print the major/minor values. o bugfix, the RESULT value has now a working newline removal and a test for this case.
2005-04-26[PATCH] hmm, handle net devices with udev?kay.sievers@vrfy.org
Hmm, Arndt Bergmann sent a patch like this one a few weeks ago and I want to bring the question back, if we want to handle net device naming with udev. With this patch it is actually possible to specify something like this in udev.rules: KERNEL="dummy*", SYSFS{address}="00:00:00:00:00:00", SYSFS{features}="0x0", NAME="blind%n" KERNEL="eth*", SYSFS{address}="00:0d:60:77:30:91", NAME="private" and you will get: [root@pim udev.kay]# cat /proc/net/dev Inter-| Receive | Transmit face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed lo: 1500 30 0 0 0 0 0 0 1500 30 0 0 0 0 0 0 private: 278393 1114 0 0 0 0 0 0 153204 1468 0 0 0 0 0 0 sit0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 blind0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 The udevinfo program is also working: [root@pim udev.kay]# ./udevinfo -a -p /sys/class/net/private looking at class device '/sys/class/net/private': SYSFS{addr_len}="6" SYSFS{address}="00:0d:60:77:30:91" SYSFS{broadcast}="ff:ff:ff:ff:ff:ff" SYSFS{features}="0x3a9" SYSFS{flags}="0x1003" SYSFS{ifindex}="2" SYSFS{iflink}="2" SYSFS{mtu}="1500" SYSFS{tx_queue_len}="1000" SYSFS{type}="1" follow the class device's "device" looking at the device chain at '/sys/devices/pci0000:00/0000:00:1e.0/0000:02:01.0': BUS="pci" ID="0000:02:01.0" SYSFS{class}="0x020000" SYSFS{detach_state}="0" SYSFS{device}="0x101e" SYSFS{irq}="11" SYSFS{subsystem_device}="0x0549" SYSFS{subsystem_vendor}="0x1014" SYSFS{vendor}="0x8086" The matching device will be renamed to the given name. The device name will not be put into the udev database, cause the kernel renames the device and the sysfs name disappears. I like it, cause it plugs in nicely. We have all the naming features and sysfs queries and walks inside of udev. The sysfs timing races are already solved and the management tools are working for net devices too. nameif can only match the MAC address now. udev can match any sysfs value of the device tree the net device is connected to. But right, net devices do not have device nodes :)
2005-04-26[PATCH] udev-test.pl cleanupkay.sievers@vrfy.org
Here is a small name change, so all expected values are named exp_*