chiark / gitweb /
udevd: fix udevd read() calls to leave room for null byte
[elogind.git] / test / devd_test
1 #!/bin/bash
2
3 RULES=label_test.rules
4 CONFIG=label_test.conf
5
6 export SYSFS_PATH=$PWD/sys/
7 export UDEV_CONFIG_FILE=$PWD/$CONFIG
8
9 cat > $RULES << EOF
10 BUS="scsi", SYSFS{vendor}="IBM-ESXS", SYSFS{model}="ST336605LW   !#", NAME="boot_diskX%n"
11 BUS="scsi", SYSFS{vendor}="IBM-ESXS", SYSFS{model}="ST336605LW    !#", NAME="a/nice/place/to/put/a/boot_disk%n"
12 EOF
13
14 cat > $CONFIG << EOF
15 udev_root="$PWD/udev/"
16 udev_db="$PWD/udev/.udevdb"
17 udev_rules="$PWD/$RULES"
18 EOF
19
20 mkdir udev
21
22 export ACTION=add
23 export DEVPATH=block/sda
24
25 ../udev block
26 ls -l udev
27
28 export ACTION=remove
29 export DEVPATH=block/sda
30
31 ../udev block
32 ls -l udev
33
34
35 rm $RULES
36 rm $CONFIG
37 rm -rf udev