]> git.ipfire.org Git - thirdparty/systemd.git/blame - test/topo_test
[PATCH] a bug in linefeed removal
[thirdparty/systemd.git] / test / topo_test
CommitLineData
a38c862f
GKH
1#!/bin/bash
2
72ffa78d
GKH
3RULES=replace_test.rules
4CONFIG=replace_test.conf
5
a38c862f
GKH
6export UDEV_TEST=yes
7export SYSFS_PATH=$PWD/sys/
72ffa78d
GKH
8export UDEV_CONFIG_FILE=$PWD/$CONFIG
9
10cat > $RULES << EOF
11TOPOLOGY, BUS="scsi", place="0:0:0:0", NAME="first_disk%n"
12EOF
13
14cat > $CONFIG << EOF
15udev_root="$PWD/udev/"
16udev_db="$PWD/udev/.udev.tdb"
17udev_rules="$PWD/$RULES"
18udev_permissions="$PWD/udev.permissions"
19EOF
a38c862f
GKH
20
21export ACTION=add
22export DEVPATH=block/sda
23
24../udev block
1ac52047 25ls udev
a38c862f
GKH
26
27export DEVPATH=block/sda/sda3
28
29../udev block
1ac52047 30ls udev
a38c862f 31
1ac52047
GKH
32export ACTION=remove
33export DEVPATH=block/sda
34
35../udev block
36ls udev
37
38export DEVPATH=block/sda/sda3
39
40../udev block
41ls udev
a38c862f 42
72ffa78d
GKH
43rm $RULES
44rm $CONFIG