xfstests/common: don't assume sysfs attrs all reside under test dev
authorBrian Foster <bfoster@redhat.com>
Mon, 8 Sep 2014 12:26:53 +0000 (22:26 +1000)
committerDave Chinner <david@fromorbit.com>
Mon, 8 Sep 2014 12:26:53 +0000 (22:26 +1000)
commit7746b99a525e2781cfb556aff4ff081cec5caa54
tree1b9a795b0d5609f3e28de38d37f260f85dadd999
parent1a2858960b7ca0d187cde33ecbd251329ac8fd4a
xfstests/common: don't assume sysfs attrs all reside under test dev

_require_xfs_sysfs() currently assumes that all sysfs attributes reside
under a device-specific subdirectory in the XFS sysfs hierarchy. It is
hardcoded to use the TEST_DEV mount and expect the relative attribute
path as a parameter.

Not all sysfs attributes are associated with specific devices or mount
points, however. Remove the hardcoded device name part of the attribute
path from _require_xfs_sysfs() and let the caller construct the relative
path based on the sysfs XFS root directory.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
common/rc
tests/xfs/011