Messages in this thread | | | Date | Thu, 20 Sep 2007 17:46:10 +0900 | From | Tejun Heo <> | Subject | testing module and script for new sysfs interface |
| |
Hello,
The tarball attached to this mail contains module source and scripts to test new sysfs interface.
* sysfs-interpreter : kernel module to call sysfs interface functions as directed via debugfs file /sys/kernel/debug/sysfs-interpreter. It keeps internal list which maps path name to sysfs_dirent pointer.
Note that userland is perfectly capable of causing oops using this module. Other than usage of pathnaem instead of pointer, most functionalities are exported verbatim.
All test nodes are created under /sys/test which is created on module load and removed on unload.
* si-runcmd.pl : perl script to execute sysfs commands using sysfs-interpreter. It reads from stdin line-by-line and executes them. For example "echo remove test-dir | si-rumcmd.pl" removes /sys/test/test-dir.
* si files : these files are to be fed to si-runcmd.pl and test certain features of sysfs. For batch-error.si to work, you need to modify sysfs_new_dirent() such that it fails allocation if mode contains invalid bits.
Thanks.
-- tejun [unhandled content-type:application/octet-stream] | |