Skip to contentSkip to conversation

xfstests: fix to build src/realpath and the correct the existence of target devices

PATCH In review [email protected] 2 participants 3 messages Nov 21, 2012 – Nov 23, 2012 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 xfstests: fix to build src/realpath and the correct the existence of target devices

Hi Rich, Eric

Quoted 24 lines · Rich Johnston

common.config

Quoted 20 lines · Eric Sandeen

If you try running xfstests on lvm volumes which are symlinks, it'll fail to run several tests because our _require_scratch framework ultimately uses lstat not stat, and does not think the lvm device (which is usually a symlink to a dm-X device) is a block device. Sigh.

Last try at this - just resolve any symlinked devicenames into their realpath(3) in common.config.

This actually seems to work.

---

common.config +0 -0
index 926846b..e5b2483 100644

Looks good

Quoted 5 lines

Eric,

This patch has been committed to git://oss.sgi.com/xfs/cmds/xfstests, master branch, commit ID d5ea873f.

From: Satoru Takeuchi <[email protected]>

Commit d5ea873f is not the same as the the following original Eric's patch.

http://oss.sgi.com/archives/xfs/2010-06/msg00080.html

It does not modify src/Makefile and realpath is never compiled.

In addition, [ -L $TEST_DEV ]' and [ -L $SCRATCH_DEV ]' always returns 0 if $TEST_DEV or $SCRATCH_DEV are not defined.

---
common.config | 4 ++--

 common.config |    4 ++--
 src/Makefile  |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
common.config +2 -2
Index: b/common.config
===================================================================
@@ -221,11 +221,11 @@ else
 fi
 
 # Scripts just don't deal well with symlinked devices
-if [ -L $TEST_DEV ]; then
+if [ -L "$TEST_DEV" ]; then
         TEST_DEV=`src/realpath $TEST_DEV`
 fi
 
-if [ -L $SCRATCH_DEV ]; then
+if [ -L "$SCRATCH_DEV" ]; then
         SCRATCH_DEV=`src/realpath $SCRATCH_DEV`
 fi
 
src/Makefile +1 -1
Index: b/src/Makefile
===================================================================
@@ -11,7 +11,7 @@ TARGETS = dirstress fill fill2 getpagesi
 	devzero feature alloc fault fstest t_access_root \
 	godown resvtest writemod makeextents itrash rename \
 	multi_open_unlink dmiperf unwritten_sync genhashnames t_holes \
-	t_mmap_writev
+	t_mmap_writev realpath
 
 LINUX_TARGETS = xfsctl bstat t_mtab getdevicesize preallo_rw_pattern_reader \
 	preallo_rw_pattern_writer ftrunc trunc fs_perms testx looptest \

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Reviewed-by on v1 1/1
#3 lore raw
In reply to [email protected]
Quoted 6 lines · On Wed, Nov 21, 2012 at 07:51:24AM -0600, [email protected] wrote:

From: Satoru Takeuchi <[email protected]>

Commit d5ea873f is not the same as the the following original Eric's patch.

http://oss.sgi.com/archives/xfs/2010-06/msg00080.html

Quoted 7 lines

It does not modify src/Makefile and realpath is never compiled.

In addition, [ -L $TEST_DEV ]' and [ -L $SCRATCH_DEV ]' always returns 0 if $TEST_DEV or $SCRATCH_DEV are not defined.

Cc Eric Sandeen <[email protected]>
Cc Rich Johnston <[email protected]>

Thanks for the fixes, this looks good.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs