]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
config: Fix sysfs paths for partitions
authorMatthew Wilcox <willy@linux.intel.com>
Tue, 26 May 2015 02:51:57 +0000 (12:51 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 26 May 2015 02:51:57 +0000 (12:51 +1000)
commit78bbab93d8e8a90a2ed0d6cb036ddf36487afa08
treeafc932888e90f8df744569af6dff4ade6d3bc42b
parenta397d1aabe8b682f3e19257437c1d0a737019c8a
config: Fix sysfs paths for partitions

generic/019 was failing with:

./tests/generic/019: line 65: /sys/block/pmem0p2/make-it-fail: No such file or directory

When using a partition, the file needed is located at
/sys/block/pmem0/pmem0p2/make-it-fail.

Rather than attempt to deduce whether a block device is a partition
or not, use the symlinks located in /sys/dev/block/ to find the right
location for the make-it-fail file.

Also change btrfs/088 to use the new _sysfs_dev function.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
common/rc
tests/btrfs/088
tests/generic/019