Skip to contentSkip to conversation

xfsqa: call _notrun in common.dump if dump utils not found

PATCH In review Eric Sandeen 3 participants 9 messages Mar 23, 2008 – Mar 25, 2008 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfsqa: call _notrun in common.dump if dump utils not found

it may not always be obvious to outsiders that xfsdump is packaged separately from xfsprogs... is it worth checking for the binaries rather than spewing verbose failures if it's not installed?

(and are the locations ok for irix/bsd/whatnot too...?)

... also abort if bc not found (common.filter requires this, my minimal testing root didn't have it and much error spew ensued... nicer to check up front IMHO)

-Eric

common.dump +4 -0
Index: xfstests/common.dump
===================================================================
@@ -41,6 +41,10 @@ do_quota_check=true # do quota check if 
 
 _need_to_be_root
 
+[ -x /usr/sbin/xfsdump ] || _notrun "xfsdump executable not found"
+[ -x /usr/sbin/xfsrestore ] || _notrun "xfsrestore executable not found"
+[ -x /usr/sbin/xfsinvutil ] || _notrun "xfsinvutil executable not found"
+
 # install our cleaner
 trap "_cleanup; exit \$status" 0 1 2 3 15
 
common.config +3 -0
Index: xfstests/common.config
===================================================================
@@ -114,6 +114,9 @@ export AWK_PROG="`set_prog_path awk`"
 export SED_PROG="`set_prog_path sed`"
 [ "$SED_PROG" = "" ] && _fatal "sed not found"
 
+export BC_PROG="`set_prog_path bc`"
+[ "$BC_PROG" = "" ] && _fatal "bc not found"
+
 export PS_ALL_FLAGS="-ef"
 
 export DF_PROG="`set_prog_path df`"

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

#2 lore raw
Quoted 8 lines · Chris Wedgwood
Quoted 3 lines · Eric Sandeen

it may not always be obvious to outsiders that xfsdump is packaged separately from xfsprogs... is it worth checking for the binaries rather than spewing verbose failures if it's not installed?

I really think xfsdump & fsr should be moved to xfsprogs.

wouldn't bother me...

tests should probably require the executable either way :)

-Eric

#3 lore raw
In reply to Eric Sandeen

Thanks, Eric.

On IRIX:

Quoted 1 line

where xfsdump xfsrestore xfsinvutil

/sbin/xfsdump
/usr/sbin/xfsdump
/sbin/xfsrestore
/usr/sbin/xfsinvutil

Quoted 1 line

ls -l /sbin/xfsdump

lrwxr-xr-x ... /sbin/xfsdump -> ../usr/sbin/xfsdump*

I'll add the IRIX xfsrestore path and wait for Russell or whoever to complain about BSD :)

--Tim

Quoted 43 lines · Eric Sandeen

it may not always be obvious to outsiders that xfsdump is packaged separately from xfsprogs... is it worth checking for the binaries rather than spewing verbose failures if it's not installed?

(and are the locations ok for irix/bsd/whatnot too...?)

... also abort if bc not found (common.filter requires this, my minimal testing root didn't have it and much error spew ensued... nicer to check up front IMHO)

-Eric

Index: xfstests/common.dump
===================================================================

common.dump +4 -0
@@ -41,6 +41,10 @@ do_quota_check=true # do quota check if 
 
 _need_to_be_root
 
+[ -x /usr/sbin/xfsdump ] || _notrun "xfsdump executable not found"
+[ -x /usr/sbin/xfsrestore ] || _notrun "xfsrestore executable not found"
+[ -x /usr/sbin/xfsinvutil ] || _notrun "xfsinvutil executable not found"
+
 # install our cleaner
 trap "_cleanup; exit \$status" 0 1 2 3 15
 

Index: xfstests/common.config
===================================================================

common.config +3 -0
@@ -114,6 +114,9 @@ export AWK_PROG="`set_prog_path awk`"
 export SED_PROG="`set_prog_path sed`"
 [ "$SED_PROG" = "" ] && _fatal "sed not found"
 
+export BC_PROG="`set_prog_path bc`"
+[ "$BC_PROG" = "" ] && _fatal "bc not found"
+
 export PS_ALL_FLAGS="-ef"
 
 export DF_PROG="`set_prog_path df`"
#4 lore raw
Quoted 8 lines · Timothy Shimmin

Thanks, Eric.

On IRIX:

Quoted 1 line

where xfsdump xfsrestore xfsinvutil

/sbin/xfsdump
/usr/sbin/xfsdump
/sbin/xfsrestore
/usr/sbin/xfsinvutil

Quoted 5 lines
Quoted 1 line

ls -l /sbin/xfsdump

lrwxr-xr-x ... /sbin/xfsdump -> ../usr/sbin/xfsdump*

I'll add the IRIX xfsrestore path and wait for Russell or whoever to complain about BSD :)

common.config sets up environment variables for the various tools used and can handle these paths. It has them for the xfsprogs tools (XFS_REPAIR_PROG, XFS_DB_PROG, etc) but nothing for the xfsdump tools.

Quoted 40 lines

--Tim

Quoted 35 lines · Eric Sandeen

it may not always be obvious to outsiders that xfsdump is packaged separately from xfsprogs... is it worth checking for the binaries rather than spewing verbose failures if it's not installed?
(and are the locations ok for irix/bsd/whatnot too...?) ... also abort if bc not found (common.filter requires this,
my minimal testing root didn't have it and much error spew ensued... nicer to check up front IMHO)
-Eric
Index: xfstests/common.dump
===================================================================

common.dump +1 -0
@@ -41,6 +41,10 @@ do_quota_check=true # do quota check if   
 _need_to_be_root
 +[ -x /usr/sbin/xfsdump ] || _notrun "xfsdump executable not found"
+[ -x /usr/sbin/xfsrestore ] || _notrun "xfsrestore executable not  

found"
+[ -x /usr/sbin/xfsinvutil ] || _notrun "xfsinvutil executable not found"
+

 # install our cleaner
 trap "_cleanup; exit \$status" 0 1 2 3 15
 Index: xfstests/common.config
===================================================================
common.config +2 -0
@@ -114,6 +114,9 @@ export AWK_PROG="`set_prog_path awk`"
 export SED_PROG="`set_prog_path sed`"
 [ "$SED_PROG" = "" ] && _fatal "sed not found"
 +export BC_PROG="`set_prog_path bc`"
+[ "$BC_PROG" = "" ] && _fatal "bc not found"
+
 export PS_ALL_FLAGS="-ef"
  export DF_PROG="`set_prog_path df`"
 
#5 lore raw
Quoted 13 lines · Barry Naujok
Quoted 11 lines · Timothy Shimmin

Thanks, Eric.

On IRIX:

Quoted 1 line

where xfsdump xfsrestore xfsinvutil

/sbin/xfsdump
/usr/sbin/xfsdump
/sbin/xfsrestore
/usr/sbin/xfsinvutil

Quoted 1 line

ls -l /sbin/xfsdump

lrwxr-xr-x ... /sbin/xfsdump -> ../usr/sbin/xfsdump*

Quoted 7 lines
Quoted 2 lines

I'll add the IRIX xfsrestore path and wait for Russell or whoever to complain about BSD :)

common.config sets up environment variables for the various tools used and can handle these paths. It has them for the xfsprogs tools (XFS_REPAIR_PROG, XFS_DB_PROG, etc) but nothing for the xfsdump tools.

yeah, that may be better...

-Eric

#6 lore raw
Quoted 14 lines · Eric Sandeen
Quoted 13 lines · Barry Naujok
Quoted 11 lines · Timothy Shimmin

Thanks, Eric.

On IRIX:

Quoted 1 line

where xfsdump xfsrestore xfsinvutil

/sbin/xfsdump
/usr/sbin/xfsdump
/sbin/xfsrestore
/usr/sbin/xfsinvutil

Quoted 1 line

ls -l /sbin/xfsdump

lrwxr-xr-x ... /sbin/xfsdump -> ../usr/sbin/xfsdump*

Quoted 9 lines
Quoted 6 lines
Quoted 2 lines

I'll add the IRIX xfsrestore path and wait for Russell or whoever to complain about BSD :)

common.config sets up environment variables for the various tools used and can handle these paths. It has them for the xfsprogs tools (XFS_REPAIR_PROG, XFS_DB_PROG, etc) but nothing for the xfsdump tools.

yeah, that may be better...

Okay. Fair point.
I'll change common.dump to use the XFSDUMP_PROG etc.... and common.config to set the PROG vars.

--Tim

#7 lore raw
Quoted 22 lines · Timothy Shimmin
Quoted 21 lines · Eric Sandeen
Quoted 19 lines · Barry Naujok
Quoted 8 lines · Timothy Shimmin

Thanks, Eric.

On IRIX:

Quoted 1 line

where xfsdump xfsrestore xfsinvutil

/sbin/xfsdump
/usr/sbin/xfsdump
/sbin/xfsrestore
/usr/sbin/xfsinvutil

Quoted 5 lines
Quoted 1 line

ls -l /sbin/xfsdump

lrwxr-xr-x ... /sbin/xfsdump -> ../usr/sbin/xfsdump*

I'll add the IRIX xfsrestore path and wait for Russell or whoever to complain about BSD :)

common.config sets up environment variables for the various tools used and can handle these paths. It has them for the xfsprogs tools (XFS_REPAIR_PROG, XFS_DB_PROG, etc) but nothing for the xfsdump tools.

Quoted 9 lines
Quoted 2 lines

yeah, that may be better...

Okay. Fair point.
I'll change common.dump to use the XFSDUMP_PROG etc.... and common.config to set the PROG vars.

--Tim

Okay, something like below then.
Note, I only test for failure in common.dump and I need to filter out the fullpaths for the commands now as they output their full path.
Oh and I changed a bit for the DEBUGDUMP which can use binaries in xfstests for debugging.
Ughhh.

--Tim

===========================================================================
Index: xfstests/common.config
===========================================================================

xfstests/common.config +6 -0
@@ -114,6 +114,9 @@ export AWK_PROG="`set_prog_path awk`"
 export SED_PROG="`set_prog_path sed`"
 [ "$SED_PROG" = "" ] && _fatal "sed not found"
 
+export BC_PROG="`set_prog_path bc`"
+[ "$BC_PROG" = "" ] && _fatal "bc not found"
+
 export PS_ALL_FLAGS="-ef"
 
 export DF_PROG="`set_prog_path df`"
@@ -128,6 +131,9 @@ export XFS_GROWFS_PROG=`set_prog_path xf
 export XFS_IO_PROG="`set_prog_path xfs_io`"
 export XFS_PARALLEL_REPAIR_PROG="`set_prog_path xfs_prepair`"
 export XFS_PARALLEL_REPAIR64_PROG="`set_prog_path xfs_prepair64`"
+export XFSDUMP_PROG="`set_prog_path xfsdump`"
+export XFSRESTORE_PROG="`set_prog_path xfsrestore`"
+export XFSINVUTIL_PROG="`set_prog_path xfsinvutil`"
 
 # Generate a comparable xfsprogs version number in the form of
 # major * 10000 + minor * 100 + release

===========================================================================
Index: xfstests/common.dump
===========================================================================

xfstests/common.dump +32 -23

152 lines not on this page · raw message

#8 lore raw
Quoted 33 lines · Timothy Shimmin
Quoted 22 lines · Timothy Shimmin
Quoted 21 lines · Eric Sandeen
Quoted 19 lines · Barry Naujok
Quoted 8 lines · Timothy Shimmin

Thanks, Eric.

On IRIX:

Quoted 1 line

where xfsdump xfsrestore xfsinvutil

/sbin/xfsdump
/usr/sbin/xfsdump
/sbin/xfsrestore
/usr/sbin/xfsinvutil

Quoted 5 lines
Quoted 1 line

ls -l /sbin/xfsdump

lrwxr-xr-x ... /sbin/xfsdump -> ../usr/sbin/xfsdump*

I'll add the IRIX xfsrestore path and wait for Russell or whoever to complain about BSD :)

common.config sets up environment variables for the various tools used and can handle these paths. It has them for the xfsprogs tools (XFS_REPAIR_PROG, XFS_DB_PROG, etc) but nothing for the xfsdump tools.

Quoted 9 lines
Quoted 2 lines

yeah, that may be better...

Okay. Fair point.
I'll change common.dump to use the XFSDUMP_PROG etc.... and common.config to set the PROG vars.

--Tim

Quoted 7 lines

Okay, something like below then.
Note, I only test for failure in common.dump and I need to filter out the fullpaths for the commands now as they output their full path.
Oh and I changed a bit for the DEBUGDUMP which can use binaries in xfstests for debugging.
Ughhh.

well, I don't want to make this too much work... it's not critical.

-eric

#9 lore raw
Quoted 42 lines · Eric Sandeen
Quoted 33 lines · Timothy Shimmin
Quoted 22 lines · Timothy Shimmin
Quoted 21 lines · Eric Sandeen
Quoted 19 lines · Barry Naujok
Quoted 8 lines · Timothy Shimmin

Thanks, Eric.

On IRIX:

Quoted 1 line

where xfsdump xfsrestore xfsinvutil

/sbin/xfsdump
/usr/sbin/xfsdump
/sbin/xfsrestore
/usr/sbin/xfsinvutil

Quoted 5 lines
Quoted 1 line

ls -l /sbin/xfsdump

lrwxr-xr-x ... /sbin/xfsdump -> ../usr/sbin/xfsdump*

I'll add the IRIX xfsrestore path and wait for Russell or whoever to complain about BSD :)

common.config sets up environment variables for the various tools used and can handle these paths. It has them for the xfsprogs tools (XFS_REPAIR_PROG, XFS_DB_PROG, etc) but nothing for the xfsdump tools.

Quoted 9 lines
Quoted 2 lines

yeah, that may be better...

Okay. Fair point.
I'll change common.dump to use the XFSDUMP_PROG etc.... and common.config to set the PROG vars.

--Tim

Quoted 7 lines

Okay, something like below then.
Note, I only test for failure in common.dump and I need to filter out the fullpaths for the commands now as they output their full path.
Oh and I changed a bit for the DEBUGDUMP which can use binaries in xfstests for debugging.
Ughhh.

Quoted 2 lines

well, I don't want to make this too much work... it's not critical.

:)
That's cool. It's Barry's fault ;-)

--Tim