mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
Get xfstests building on irix using root/toolroot.
Merge of xfs-cmds-melb:slinx:19868a by kenmcd. Simplify instructions to use make_irix script.
This commit is contained in:
@@ -6,10 +6,9 @@ Building Linux:
|
|||||||
- cd into the xfstests directory and run make.
|
- cd into the xfstests directory and run make.
|
||||||
|
|
||||||
Building IRIX:
|
Building IRIX:
|
||||||
- Note gmake must be used. FSQA will not build with IRIX make.
|
- cd into the xfstests directory
|
||||||
- fw_gcc, fw_make, fw_autoconf, fw_libtool and compiler_dev
|
- set the ROOT and TOOLROOT env variables for IRIX appropriately
|
||||||
and all their prerequisites must be installed.
|
- run ./make_irix
|
||||||
- cd into the xfstests directory and run gmake.
|
|
||||||
|
|
||||||
______________________
|
______________________
|
||||||
USING THE FSQA SUITE
|
USING THE FSQA SUITE
|
||||||
|
|||||||
@@ -47,19 +47,6 @@ _setenvironment
|
|||||||
|
|
||||||
check=${check-true}
|
check=${check-true}
|
||||||
|
|
||||||
if $check
|
|
||||||
then
|
|
||||||
if $MAKE_PROG >/tmp/$$.gmake 2>&1
|
|
||||||
then
|
|
||||||
:
|
|
||||||
else
|
|
||||||
cat /tmp/$$.gmake
|
|
||||||
echo "Warning: $MAKE_PROG failed -- some tests may be missing"
|
|
||||||
warn=1
|
|
||||||
fi
|
|
||||||
rm -f /tmp/$$.gmake
|
|
||||||
fi
|
|
||||||
|
|
||||||
diff=diff
|
diff=diff
|
||||||
if [ ! -z "$DISPLAY" ]
|
if [ ! -z "$DISPLAY" ]
|
||||||
then
|
then
|
||||||
@@ -69,7 +56,6 @@ then
|
|||||||
which xxdiff >/dev/null 2>&1 && diff=xxdiff
|
which xxdiff >/dev/null 2>&1 && diff=xxdiff
|
||||||
fi
|
fi
|
||||||
verbose=false
|
verbose=false
|
||||||
quick=${quick-false}
|
|
||||||
group=false
|
group=false
|
||||||
xgroup=false
|
xgroup=false
|
||||||
showme=false
|
showme=false
|
||||||
@@ -156,7 +142,7 @@ check options
|
|||||||
-g group[,group...] include tests from these groups
|
-g group[,group...] include tests from these groups
|
||||||
-l line mode diff [xdiff]
|
-l line mode diff [xdiff]
|
||||||
-n show me, do not run tests
|
-n show me, do not run tests
|
||||||
-q quick, no checks (you are on your own)
|
-q quick [deprecated]
|
||||||
-T output timestamps
|
-T output timestamps
|
||||||
-x group[,group...] exclude tests from these groups
|
-x group[,group...] exclude tests from these groups
|
||||||
-r randomize order
|
-r randomize order
|
||||||
@@ -189,8 +175,7 @@ check options
|
|||||||
xpand=false
|
xpand=false
|
||||||
;;
|
;;
|
||||||
|
|
||||||
-q) # "quick", no checks (you are on your own)
|
-q) # "quick", no longer used - always quick :-)
|
||||||
quick=true
|
|
||||||
xpand=false
|
xpand=false
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -291,25 +276,6 @@ fi
|
|||||||
list=`sort $tmp.list`
|
list=`sort $tmp.list`
|
||||||
rm -f $tmp.list $tmp.tmp $tmp.sed
|
rm -f $tmp.list $tmp.tmp $tmp.sed
|
||||||
|
|
||||||
if $quick
|
|
||||||
then
|
|
||||||
:
|
|
||||||
else
|
|
||||||
|
|
||||||
if ( cd src; $MAKE_PROG -is)
|
|
||||||
then
|
|
||||||
:
|
|
||||||
else
|
|
||||||
echo
|
|
||||||
echo ":----------------------------------------------"
|
|
||||||
echo ": Warning: $MAKE_PROG failed in src -- some tests may fail as a result"
|
|
||||||
echo ":----------------------------------------------"
|
|
||||||
echo
|
|
||||||
warn=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$FSTYP" in
|
case "$FSTYP" in
|
||||||
xfs)
|
xfs)
|
||||||
[ "$XFS_LOGPRINT_PROG" = "" ] && _fatal "xfs_logprint not found"
|
[ "$XFS_LOGPRINT_PROG" = "" ] && _fatal "xfs_logprint not found"
|
||||||
@@ -323,4 +289,4 @@ case "$FSTYP" in
|
|||||||
;;
|
;;
|
||||||
nfs)
|
nfs)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@@ -74,9 +74,6 @@ MODULAR=0 # using XFS as a module or not
|
|||||||
BOOT="/boot" # install target for kernels
|
BOOT="/boot" # install target for kernels
|
||||||
export EXTRA=${EXTRA:=xfs-qa}
|
export EXTRA=${EXTRA:=xfs-qa}
|
||||||
|
|
||||||
MAKE=make
|
|
||||||
[ "$HOSTOS" == "IRIX" ] && MAKE=gmake
|
|
||||||
|
|
||||||
# general parameters (mainly for auto-qa)
|
# general parameters (mainly for auto-qa)
|
||||||
SOAK_PROC=3 # -p option to fsstress
|
SOAK_PROC=3 # -p option to fsstress
|
||||||
SOAK_STRESS=10000 # -n option to fsstress
|
SOAK_STRESS=10000 # -n option to fsstress
|
||||||
@@ -144,9 +141,6 @@ export PERL_PROG="`set_prog_path perl`"
|
|||||||
export SED_PROG="`set_prog_path sed`"
|
export SED_PROG="`set_prog_path sed`"
|
||||||
[ "$SED_PROG" = "" ] && _fatal "sed not found"
|
[ "$SED_PROG" = "" ] && _fatal "sed not found"
|
||||||
|
|
||||||
export MAKE_PROG="`set_prog_path $MAKE`"
|
|
||||||
[ "$MAKE_PROG" = "" ] && _fatal "$MAKE not found"
|
|
||||||
|
|
||||||
export PS_ALL_FLAGS="-ef"
|
export PS_ALL_FLAGS="-ef"
|
||||||
|
|
||||||
export DF_PROG="`set_prog_path df`"
|
export DF_PROG="`set_prog_path df`"
|
||||||
|
|||||||
@@ -84,8 +84,13 @@ ifeq ($(PKG_PLATFORM),darwin)
|
|||||||
PCFLAGS = -traditional-cpp
|
PCFLAGS = -traditional-cpp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(PKG_PLATFORM),irix)
|
||||||
|
CFLAGS += $(OPTIMIZER) $(DEBUG) -nostdinc -I$(ROOT)/usr/include \
|
||||||
|
-I$(TOPDIR)/include -DVERSION=\"$(PKG_VERSION)\" -D_REENTRANT
|
||||||
|
else
|
||||||
CFLAGS += -O1 $(OPTIMIZER) $(DEBUG) -funsigned-char -fno-strict-aliasing -Wall \
|
CFLAGS += -O1 $(OPTIMIZER) $(DEBUG) -funsigned-char -fno-strict-aliasing -Wall \
|
||||||
-I$(TOPDIR)/include -DVERSION=\"$(PKG_VERSION)\" -D_REENTRANT
|
-I$(TOPDIR)/include -DVERSION=\"$(PKG_VERSION)\" -D_REENTRANT
|
||||||
|
endif
|
||||||
|
|
||||||
# Global, Platform, Local CFLAGS
|
# Global, Platform, Local CFLAGS
|
||||||
CFLAGS += $(GCFLAGS) $(PCFLAGS) $(LCFLAGS)
|
CFLAGS += $(GCFLAGS) $(PCFLAGS) $(LCFLAGS)
|
||||||
|
|||||||
@@ -863,7 +863,7 @@ usage(void)
|
|||||||
int
|
int
|
||||||
getnum(char *s, char **e)
|
getnum(char *s, char **e)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
int ret;
|
||||||
|
|
||||||
*e = (char *) 0;
|
*e = (char *) 0;
|
||||||
ret = strtol(s, e, 0);
|
ret = strtol(s, e, 0);
|
||||||
@@ -1033,7 +1033,7 @@ main(int argc, char **argv)
|
|||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
progressinterval = getnum(optarg, &endp);
|
progressinterval = getnum(optarg, &endp);
|
||||||
if (progressinterval < 0)
|
if (progressinterval == 0)
|
||||||
usage();
|
usage();
|
||||||
break;
|
break;
|
||||||
case 'q':
|
case 'q':
|
||||||
|
|||||||
@@ -0,0 +1,107 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Do a build using the IRIX TOOLROOT
|
||||||
|
# Use "-f" to force a configure.
|
||||||
|
#
|
||||||
|
# Copyright (c) 2004 Silicon Graphics, Inc. All Rights Reserved.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify it
|
||||||
|
# under the terms of version 2 of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it would be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
#
|
||||||
|
# Further, this software is distributed without any warranty that it is
|
||||||
|
# free of the rightful claim of any third person regarding infringement
|
||||||
|
# or the like. Any license provided herein, whether implied or
|
||||||
|
# otherwise, applies only to this software file. Patent licenses, if
|
||||||
|
# any, provided herein do not apply to combinations of this program with
|
||||||
|
# other software, or any other product whatsoever.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License along
|
||||||
|
# with this program; if not, write the Free Software Foundation, Inc., 59
|
||||||
|
# Temple Place - Suite 330, Boston MA 02111-1307, USA.
|
||||||
|
#
|
||||||
|
# Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
|
||||||
|
# Mountain View, CA 94043, or:
|
||||||
|
#
|
||||||
|
# http://www.sgi.com
|
||||||
|
#
|
||||||
|
# For further information regarding this notice, see:
|
||||||
|
#
|
||||||
|
# http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
|
||||||
|
#
|
||||||
|
#
|
||||||
|
|
||||||
|
# check have root/toolroot set
|
||||||
|
error=false
|
||||||
|
if [ -z "$TOOLROOT" ]; then
|
||||||
|
echo "TOOLROOT needs to be set to a populated IRIX toolroot"
|
||||||
|
error=true
|
||||||
|
fi
|
||||||
|
if [ -z "$ROOT" ]; then
|
||||||
|
echo "ROOT needs to be set to a populated IRIX root"
|
||||||
|
error=true
|
||||||
|
fi
|
||||||
|
$error && exit 1
|
||||||
|
|
||||||
|
# root/toolroot paths
|
||||||
|
fw_bin=$TOOLROOT/usr/freeware/bin
|
||||||
|
fw_tools=$TOOLROOT/usr/fw_tools
|
||||||
|
fw_share=$ROOT/usr/freeware/share
|
||||||
|
irix_bin=$TOOLROOT/usr/bin
|
||||||
|
|
||||||
|
# env vars
|
||||||
|
export AC_MACRODIR=$fw_share/autoconf
|
||||||
|
export M4=$irix_bin/gnum4
|
||||||
|
export CC=$irix_bin/cc
|
||||||
|
export LIBTOOL=$fw_bin/libtool
|
||||||
|
export MAKE=$fw_tools/gmake
|
||||||
|
export AWK=$irix_bin/nawk
|
||||||
|
|
||||||
|
# check all tools/files are in root/toolroot that we need
|
||||||
|
FILES="$AC_MACRODIR $M4 $CC $LIBTOOL $MAKE $fw_bin/aclocal $fw_bin/autoheader $fw_bin/autoconf"
|
||||||
|
for f in $FILES; do
|
||||||
|
if [ ! -e $f ]; then
|
||||||
|
echo "file $f not found in ROOT/TOOLROOT"
|
||||||
|
error=true
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
$error && exit 1
|
||||||
|
|
||||||
|
# force a full configure
|
||||||
|
if [ $# -eq 1 ]; then
|
||||||
|
if [ $1 = "-f" ]; then
|
||||||
|
rm -f configure include/builddefs
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# --- do all the configure stuff using the toolroot paths ---
|
||||||
|
|
||||||
|
# aclocal.m4 is actually checked in - probably won't recreate it often
|
||||||
|
if [ ! -e aclocal.m4 ]; then
|
||||||
|
set -x
|
||||||
|
$fw_bin/aclocal --acdir=m4 --output=aclocal.m4
|
||||||
|
set -
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -e ./configure ]; then
|
||||||
|
set -x
|
||||||
|
$fw_bin/autoheader
|
||||||
|
$fw_bin/autoconf
|
||||||
|
set -
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -e include/builddefs ]; then
|
||||||
|
set -x
|
||||||
|
./configure
|
||||||
|
set -
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Now call gmake with any args we were given
|
||||||
|
set -x
|
||||||
|
$MAKE $@
|
||||||
|
set -
|
||||||
+4
-95
@@ -35,6 +35,10 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
|
#ifdef sgi
|
||||||
|
#include <../../xfsprogs/include/irix.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_XFS_LIBXFS_H
|
#ifdef HAVE_XFS_LIBXFS_H
|
||||||
#include <xfs/libxfs.h>
|
#include <xfs/libxfs.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -160,98 +164,3 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef sgi
|
|
||||||
#define xfs_flock64 flock64
|
|
||||||
#define xfs_flock64_t struct flock64
|
|
||||||
|
|
||||||
#define XFS_IOC_DIOINFO F_DIOINFO
|
|
||||||
#define XFS_IOC_FSGETXATTR F_FSGETXATTR
|
|
||||||
#define XFS_IOC_FSSETXATTR F_FSSETXATTR
|
|
||||||
#define XFS_IOC_ALLOCSP64 F_ALLOCSP64
|
|
||||||
#define XFS_IOC_FREESP64 F_FREESP64
|
|
||||||
#define XFS_IOC_GETBMAP F_GETBMAP
|
|
||||||
#define XFS_IOC_FSSETDM F_FSSETDM
|
|
||||||
#define XFS_IOC_RESVSP F_RESVSP
|
|
||||||
#define XFS_IOC_UNRESVSP F_UNRESVSP
|
|
||||||
#define XFS_IOC_RESVSP64 F_RESVSP64
|
|
||||||
#define XFS_IOC_UNRESVSP64 F_UNRESVSP64
|
|
||||||
#define XFS_IOC_GETBMAPA F_GETBMAPA
|
|
||||||
#define XFS_IOC_FSGETXATTRA F_FSGETXATTRA
|
|
||||||
#define XFS_IOC_GETBMAPX F_GETBMAPX
|
|
||||||
|
|
||||||
#define XFS_IOC_FSGEOMETRY_V1 XFS_FS_GEOMETRY_V1
|
|
||||||
#define XFS_IOC_FSBULKSTAT SGI_FS_BULKSTAT
|
|
||||||
#define XFS_IOC_FSBULKSTAT_SINGLE SGI_FS_BULKSTAT_SINGLE
|
|
||||||
#define XFS_IOC_FSINUMBERS /* TODO */
|
|
||||||
#define XFS_IOC_PATH_TO_FSHANDLE /* TODO */
|
|
||||||
#define XFS_IOC_PATH_TO_HANDLE /* TODO */
|
|
||||||
#define XFS_IOC_FD_TO_HANDLE /* TODO */
|
|
||||||
#define XFS_IOC_OPEN_BY_HANDLE /* TODO */
|
|
||||||
#define XFS_IOC_READLINK_BY_HANDLE /* TODO */
|
|
||||||
#define XFS_IOC_SWAPEXT /* TODO */
|
|
||||||
#define XFS_IOC_FSGROWFSDATA XFS_GROWFS_DATA
|
|
||||||
#define XFS_IOC_FSGROWFSLOG XFS_GROWFS_LOG
|
|
||||||
#define XFS_IOC_FSGROWFSRT XFS_GROWFS_RT
|
|
||||||
#define XFS_IOC_FSCOUNTS XFS_FS_COUNTS
|
|
||||||
#define XFS_IOC_SET_RESBLKS XFS_SET_RESBLKS
|
|
||||||
#define XFS_IOC_GET_RESBLKS XFS_GET_RESBLKS
|
|
||||||
#define XFS_IOC_ERROR_INJECTION SGI_XFS_INJECT_ERROR
|
|
||||||
#define XFS_IOC_ERROR_CLEARALL SGI_XFS_CLEARALL_ERROR
|
|
||||||
#define XFS_IOC_FREEZE XFS_FS_FREEZE
|
|
||||||
#define XFS_IOC_THAW XFS_FS_THAW
|
|
||||||
#define XFS_IOC_FSSETDM_BY_HANDLE /* TODO */
|
|
||||||
#define XFS_IOC_ATTRLIST_BY_HANDLE /* TODO */
|
|
||||||
#define XFS_IOC_ATTRMULTI_BY_HANDLE /* TODO */
|
|
||||||
#define XFS_IOC_FSGEOMETRY XFS_FS_GEOMETRY
|
|
||||||
#define XFS_IOC_GOINGDOWN XFS_FS_GOINGDOWN
|
|
||||||
|
|
||||||
typedef struct xfs_error_injection {
|
|
||||||
__int32_t fd;
|
|
||||||
__int32_t errtag;
|
|
||||||
} xfs_error_injection_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct xfs_fsop_bulkreq {
|
|
||||||
ino64_t *lastip;
|
|
||||||
__int32_t icount;
|
|
||||||
xfs_bstat_t *ubuffer;
|
|
||||||
__int32_t *ocount;
|
|
||||||
} xfs_fsop_bulkreq_t;
|
|
||||||
|
|
||||||
static __inline__ int
|
|
||||||
xfsctl(char* path, int fd, int cmd, void* arg) {
|
|
||||||
if (cmd >= 0 && cmd < XFS_FSOPS_COUNT) {
|
|
||||||
/*
|
|
||||||
* We have a problem in that xfsctl takes 1 arg but
|
|
||||||
* some sgi xfs ops take an input arg and/or an output arg
|
|
||||||
* So have to special case the ops to decide if xfsctl arg
|
|
||||||
* is an input or an output argument.
|
|
||||||
*/
|
|
||||||
if (cmd == XFS_FS_GOINGDOWN) {
|
|
||||||
/* in arg */
|
|
||||||
return syssgi(SGI_XFS_FSOPERATIONS, fd, cmd, arg, 0);
|
|
||||||
} else {
|
|
||||||
/* out arg */
|
|
||||||
return syssgi(SGI_XFS_FSOPERATIONS, fd, cmd, 0, arg);
|
|
||||||
}
|
|
||||||
} else if (cmd == SGI_FS_BULKSTAT)
|
|
||||||
return syssgi(SGI_FS_BULKSTAT, fd,
|
|
||||||
((xfs_fsop_bulkreq_t*)arg)->lastip,
|
|
||||||
((xfs_fsop_bulkreq_t*)arg)->icount,
|
|
||||||
((xfs_fsop_bulkreq_t*)arg)->ubuffer,
|
|
||||||
((xfs_fsop_bulkreq_t*)arg)->ocount);
|
|
||||||
else if (cmd == SGI_FS_BULKSTAT_SINGLE)
|
|
||||||
return syssgi(SGI_FS_BULKSTAT_SINGLE, fd,
|
|
||||||
((xfs_fsop_bulkreq_t*)arg)->lastip,
|
|
||||||
((xfs_fsop_bulkreq_t*)arg)->ubuffer);
|
|
||||||
else if (cmd == SGI_XFS_INJECT_ERROR)
|
|
||||||
return syssgi(SGI_XFS_INJECT_ERROR,
|
|
||||||
((xfs_error_injection_t*)arg)->errtag, fd);
|
|
||||||
else if (cmd == SGI_XFS_CLEARALL_ERROR)
|
|
||||||
return syssgi(SGI_XFS_CLEARALL_ERROR, fd);
|
|
||||||
else
|
|
||||||
return fcntl(fd, cmd, arg);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* sgi */
|
|
||||||
|
|||||||
Reference in New Issue
Block a user