public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: fstests@vger.kernel.org
Cc: xfs@oss.sgi.com
Subject: [PATCH 1/2] xfstests/common: don't assume sysfs attrs all reside under test dev
Date: Tue,  2 Sep 2014 10:22:40 -0400	[thread overview]
Message-ID: <1409667761-50248-2-git-send-email-bfoster@redhat.com> (raw)
In-Reply-To: <1409667761-50248-1-git-send-email-bfoster@redhat.com>

_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>
---
 common/rc     | 3 +--
 tests/xfs/011 | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/common/rc b/common/rc
index 16da898..01f573e 100644
--- a/common/rc
+++ b/common/rc
@@ -1224,13 +1224,12 @@ _require_xfs_sysfs()
 {
 	attr=$1
 	sysfsdir=/sys/fs/xfs
-	testdev=`_short_dev $TEST_DEV`
 
 	if [ ! -e $sysfsdir ]; then
 		_notrun "no kernel support for XFS sysfs attributes"
 	fi
 
-	if [ ! -z $1 ] && [ ! -e $sysfsdir/$testdev/$attr ]; then
+	if [ ! -z $1 ] && [ ! -e $sysfsdir/$attr ]; then
 		_notrun "sysfs attribute '$attr' is not supported"
 	fi
 }
diff --git a/tests/xfs/011 b/tests/xfs/011
index 658a822..197752c 100755
--- a/tests/xfs/011
+++ b/tests/xfs/011
@@ -85,7 +85,7 @@ _supported_os Linux
 
 _require_scratch
 _require_freeze
-_require_xfs_sysfs log
+_require_xfs_sysfs $(_short_dev $TEST_DEV)/log
 
 rm -f $seqres.full
 
-- 
1.8.3.1

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2014-09-02 14:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-02 14:22 [PATCH 0/2] xfs buf I/O error race test Brian Foster
2014-09-02 14:22 ` Brian Foster [this message]
2014-09-02 14:22 ` [PATCH 2/2] xfs/051: test buffer use after free race on I/O failure in XFS log recovery Brian Foster
2014-09-08 10:47   ` Dave Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1409667761-50248-2-git-send-email-bfoster@redhat.com \
    --to=bfoster@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox