Skip to contentSkip to conversation

xfstests: remove unused code and resolve warnings

PATCH In review [email protected] 3 participants 11 messages Nov 9, 2012 – Nov 21, 2012

Subsystems (2)
lore
Share & tools
lore
#1 lore raw

PATCH 1/3 xfstests: remove unsupported conditionals

This patch removes the unsupported sgi and CRAY.

---
 dmapi/src/common/lib/dmport.h         |   16 
 dmapi/src/common/lib/util.c           |   16 
 dmapi/src/sample_hsm/wbee.c           |    2 
 dmapi/src/simple/dm_create_session.c  |    3 
 dmapi/src/simple/dm_destroy_session.c |    3 
 dmapi/src/simple/dm_find_eventmsg.c   |    3 
 dmapi/src/simple/dm_getall_sessions.c |    3 
 dmapi/src/simple/dm_getall_tokens.c   |    3 
 dmapi/src/simple/dm_query_session.c   |    3 
 dmapi/src/suite1/cmd/get_mountinfo.c  |    4 
 dmapi/src/suite1/cmd/make_rt_sparse.c |    7 
 dmapi/src/suite1/cmd/print_event.c    |    8 
 dmapi/src/suite1/cmd/print_fshandle.c |   21 
 dmapi/src/suite2/src/check_dmapi.c    |   25 
 dmapi/src/suite2/src/dm_test_daemon.c |   20 
 dmapi/src/suite2/src/mmap.c           |   12 
 dmapi/src/suite2/src/test_invis.c     |   43 
 include/test.h                        |   17 
 include/tlibio.h                      |   40 
 include/usctest.h                     |    2 
 include/write_log.h                   |    8 
 lib/datapid.c                         |  179 ---
 lib/random_range.c                    |   34 
 lib/str_to_bytes.c                    |    6 
 lib/tlibio.c                          |  777 --------------
 ltp/doio.c                            | 1866 +---------------------------------
 ltp/doio.h                            |    6 
 ltp/growfiles.c                       |  162 --
 ltp/iogen.c                           |  307 -----
 src/dirperf.c                         |    2 
 src/dmiperf.c                         |    6 
 src/global.h                          |    5 
 src/multi_open_unlink.c               |    4 
 src/randholes.c                       |    5 
 34 files changed, 101 insertions(+), 3517 deletions(-)
dmapi/src/common/lib/dmport.h +0 -16
Index: b/dmapi/src/common/lib/dmport.h
===================================================================
@@ -294,22 +294,6 @@ typedef	struct dm_timestruct dm_timestru
 
 -------------- end of SGI-specific hack documentation --------------- */
 
-#ifdef	__sgi
-
-#include <sys/dmi.h>
-
-/* In the dm_fileattr_t structure, Veritas used 'timeval' structures for all
-   the time fields while XDSM uses 'time_t' structures.  Define some symbols
-   that can be used for the time fields with all implementation types.
-*/
-
-#define FA_ATIME	fa_atime
-#define FA_MTIME	fa_mtime
-#define FA_CTIME	fa_ctime
-#define FA_DTIME	fa_dtime
-
-#endif /* __sgi */
-
 #ifdef	linux
 
 #include <dmapi.h>
dmapi/src/common/lib/util.c +2 -14
Index: b/dmapi/src/common/lib/util.c
===================================================================
@@ -380,11 +380,7 @@ save_filedata(
 		nread = dm_read_invis(sid, hanp, hlen, DM_NO_TOKEN, off, 
 					(dm_ssize_t)CHUNKSIZE, filebuf);
 		if (nread != CHUNKSIZE) {
-#ifdef	__sgi
-			errno_msg("%s/%d: invis read err: got %lld, expected %lld, buf %d",
-#else
 			errno_msg("%s/%d: invis read err: got %d, expected %d, buf %d",
-#endif
 				__FILE__, __LINE__,
 				nread, (dm_ssize_t)CHUNKSIZE, i);
 			retval = 1;
@@ -406,11 +402,7 @@ save_filedata(
 	nread  = dm_read_invis(sid, hanp, hlen, DM_NO_TOKEN, off, 
 				(dm_ssize_t)lastbuf, filebuf);
 	if (nread != lastbuf) {
-#ifdef	__sgi
-		errno_msg("%s/%d: invis read error- got %lld, expected %lld, last buf",
-#else
 		errno_msg("%s/%d: invis read error- got %d, expected %d, last buf",
-#endif
 				__FILE__, __LINE__,
 				nread, lastbuf);
 		retval = 1;
@@ -419,11 +411,7 @@ save_filedata(
 
 	nwrite = write(stg_fd, filebuf, (int)lastbuf);
 	if (nwrite != lastbuf) {
-#ifdef	__sgi
-		errno_msg("%s/%d: write error %d, expected %lld, last buffer", 
-#else
 		errno_msg("%s/%d: write error %d, expected %d, last buffer", 
-#endif
 				__FILE__, __LINE__,
 				nwrite, lastbuf);
 		retval = 1;
@@ -845,7 +833,7 @@ static	char		buffer[256];
 }
 
 
-#if defined(__sgi) || defined(linux)
+#if defined(linux)
 
 extern char *
 xflags_to_string(
@@ -913,7 +901,7 @@ print_state(
 	fprintf(stdout, "dt_blksize     %d\n", dmstat->dt_blksize);
 	fprintf(stdout, "dt_blocks      %lld\n", (long long) dmstat->dt_blocks);
 
-#if defined(__sgi) || defined(linux)
+#if defined(linux)
 	fprintf(stdout, "dt_xfs_igen    %d\n",  dmstat->dt_xfs_igen);
 	fprintf(stdout, "dt_xfs_xflags  %s\n",
 		xflags_to_string(dmstat->dt_xfs_xflags));
dmapi/src/sample_hsm/wbee.c +1 -1
Index: b/dmapi/src/sample_hsm/wbee.c
===================================================================
@@ -245,7 +245,7 @@ check_lockstate(
 		errno_msg("Can't query file access rights");
 		return(1);
 	}
-#if defined(__sgi) || defined(linux)
+#if defined(linux)
 	/*
  	 * There are no access rights on the SGI. 1 means it's
 	 * there.
dmapi/src/simple/dm_create_session.c +0 -3
Index: b/dmapi/src/simple/dm_create_session.c
===================================================================
@@ -22,9 +22,6 @@
 #ifdef linux
 #include <dmapi.h>
 #endif
-#ifdef __sgi
-#include <sys/dmi.h>
-#endif
 
 int
 main( int argc, char **argv )
dmapi/src/simple/dm_destroy_session.c +0 -3
Index: b/dmapi/src/simple/dm_destroy_session.c
===================================================================
@@ -22,9 +22,6 @@
 #ifdef linux
 #include <dmapi.h>
 #endif
-#ifdef __sgi
-#include <sys/dmi.h>
-#endif
 
 int
 main( int argc, char **argv )
dmapi/src/simple/dm_find_eventmsg.c +0 -3
Index: b/dmapi/src/simple/dm_find_eventmsg.c
===================================================================
@@ -22,9 +22,6 @@
 #ifdef linux
 #include <dmapi.h>
 #endif
-#ifdef __sgi
-#include <sys/dmi.h>
-#endif
 
 int
 main( int argc, char **argv )
dmapi/src/simple/dm_getall_sessions.c +0 -3
Index: b/dmapi/src/simple/dm_getall_sessions.c
===================================================================
@@ -24,9 +24,6 @@
 #ifdef linux
 #include <dmapi.h>
 #endif
-#ifdef __sgi
-#include <sys/dmi.h>
-#endif
 
 int
 main( int argc, char **argv )
dmapi/src/simple/dm_getall_tokens.c +0 -3
Index: b/dmapi/src/simple/dm_getall_tokens.c
===================================================================
@@ -23,9 +23,6 @@
 #ifdef linux
 #include <dmapi.h>
 #endif
-#ifdef __sgi
-#include <sys/dmi.h>
-#endif
 
 int
 main( int argc, char **argv )
dmapi/src/simple/dm_query_session.c +0 -3
Index: b/dmapi/src/simple/dm_query_session.c
===================================================================
@@ -22,9 +22,6 @@
 #ifdef linux
 #include <dmapi.h>
 #endif
-#ifdef __sgi
-#include <sys/dmi.h>
-#endif
 
 int
 main( int argc, char **argv )
dmapi/src/suite1/cmd/get_mountinfo.c +0 -4
Index: b/dmapi/src/suite1/cmd/get_mountinfo.c
===================================================================
@@ -43,11 +43,7 @@ in the call, and sid is the session ID w
 #define HDR  "%s: token %d sequence %d\n"
 #define VALS "\t%-15s %s\n"
 #define VALD "\t%-15s %d\n"
-#ifdef	__sgi
-#define VALLLD "\t%-15s %lld\n"
-#else
 #define VALLLD "\t%-15s %ld\n"
-#endif
 
 #ifndef linux
 extern	char	*sys_errlist[];
dmapi/src/suite1/cmd/make_rt_sparse.c +0 -7
Index: b/dmapi/src/suite1/cmd/make_rt_sparse.c
===================================================================
@@ -21,13 +21,6 @@
  */
 
 #include <sys/types.h>
-#ifdef __sgi
-#include <sys/fs/xfs_itable.h>
-#include <sys/syssgi.h>
-#include <sys/uuid.h>
-#include <sys/fs/xfs_fsops.h>
-#endif
-
 #include <errno.h>
 #include <fcntl.h>
 #include <malloc.h>
dmapi/src/suite1/cmd/print_event.c +4 -4
Index: b/dmapi/src/suite1/cmd/print_event.c
===================================================================
@@ -965,10 +965,10 @@ set_disposition(
 	/* Metadata events. */
 
 	DMEV_SET(DM_EVENT_ATTRIBUTE, eventlist);
-#if 	! defined ( __sgi ) && ! defined ( VERITAS_21 ) && !defined(linux)
+#if 	!defined(VERITAS_21) && !defined(linux)
 	DMEV_SET(DM_EVENT_CANCEL, eventlist);	/* not supported on SGI */
 #endif
-#if !defined( __sgi) && !defined(linux)
+#if !defined(linux)
 	DMEV_SET(DM_EVENT_CLOSE, eventlist);	/* not supported on SGI */
 #endif
 	DMEV_SET(DM_EVENT_DESTROY, eventlist);
@@ -1051,10 +1051,10 @@ set_events(
 	/* Metadata events. */
 
 	DMEV_SET(DM_EVENT_ATTRIBUTE, eventlist);
-#if 	! defined ( __sgi ) && ! defined ( VERITAS_21 ) && ! defined(linux)
+#if 	!defined(VERITAS_21) && !defined(linux)
 	DMEV_SET(DM_EVENT_CANCEL, eventlist);	/* not supported on SGI */
 #endif
-#if !defined( __sgi) && !defined(linux)
+#if !defined(linux)
 	DMEV_SET(DM_EVENT_CLOSE, eventlist);	/* not supported on SGI */
 #endif
 	DMEV_SET(DM_EVENT_DESTROY, eventlist);
dmapi/src/suite1/cmd/print_fshandle.c +0 -21
Index: b/dmapi/src/suite1/cmd/print_fshandle.c
===================================================================
@@ -22,17 +22,10 @@
 
 #include <sys/types.h>
 #include <string.h>
-#ifdef __sgi
-#include <sys/syssgi.h>
-#include <sys/uuid.h>
-#include <sys/fs/xfs_fsops.h>
-#endif
-
 #include <errno.h>
 #include <fcntl.h>
 #include <stdio.h>
 #include <stdlib.h>
-
 #include <lib/dmport.h>
 
 char *Progname;
@@ -56,11 +49,6 @@ main(
 	int		argc,
 	char		**argv)
 {
-#ifdef __sgi
-	xfs_fsop_geom_t	geom;
-	char		*uuid_str;
-	u_int		status;
-#endif
 	char		*name;
 	int		fd;
 	void		*fshanp;
@@ -85,15 +73,6 @@ main(
 			strerror(errno));
 		exit(1);
 	}
-
-#ifdef __sgi
-	syssgi(SGI_XFS_FSOPERATIONS, fd, XFS_FS_GEOMETRY, NULL, &geom);
-
-	uuid_to_string(&geom.uuid, &uuid_str, &status);
-
-	fprintf(stdout, "fshandle %s, uuid %s, %s\n",
-		buffer, uuid_str, argv[1]);
-#endif
 	fprintf(stdout, "fshandle %s, %s\n",
 		buffer, argv[1]);
 	exit(0);
dmapi/src/suite2/src/check_dmapi.c +0 -25
Index: b/dmapi/src/suite2/src/check_dmapi.c
===================================================================
@@ -123,31 +123,6 @@ main(
 	  exit(1);
 	}
 
-	/*--------------------------------
-	 * EXAMINE /usr/include/sys/dmi.h:
-	 *--------------------------------
-	 */
-#ifdef __sgi
-#define DMAPI_HDR "/usr/include/sys/dmi.h"
-
-	if (stat(DMAPI_HDR, &stat_buf)==-1){
-	  if (errno==ENOENT) { 
-	    printf( "You are missing a vital DMAPI file: %s\n", DMAPI_HDR);
-	  }
-	  else {
-	    printf( "ERROR: could not stat %s (%s)\n", DMAPI_HDR, strerror(errno));
-	  }
-	}
-	else {
-	  if (stat_buf.st_size <= 15000) {
-	    printf("You appear to have an old version of a vital DMAPI file: %s\n", DMAPI_HDR);
-	  }
-	  else if (Vflag) {
-	    printf("(You appear to have the correct version of %s\n", DMAPI_HDR);
-	  }
-	}
-#endif
-	
 	/*--------------------------
 	 * RESOLVE KERNEL PRESENCE:
 	 *--------------------------
dmapi/src/suite2/src/dm_test_daemon.c +10 -10
Index: b/dmapi/src/suite2/src/dm_test_daemon.c
===================================================================
@@ -736,7 +736,7 @@ handle_message(
       respcode = ENOSPC;
       break;
 
-    case DM_EVENT_DEBUT:		/* not supported on SGI */
+    case DM_EVENT_DEBUT:
       printf(HDR VALS,
 	     "debut", msg->ev_token, msg->ev_sequence,
 	     "object",		hans1);
@@ -843,7 +843,7 @@ handle_message(
       respond = 0;
       break;
 
-    case DM_EVENT_CLOSE:	/* not supported on SGI */
+    case DM_EVENT_CLOSE:
       printf(HDR VALS,
 	     "close", msg->ev_token, msg->ev_sequence,
 	     "object",		hans1);
@@ -1024,11 +1024,11 @@ set_disposition(
 	/* Metadata events. */
 
 	DMEV_SET(DM_EVENT_ATTRIBUTE, eventlist);
-#if 	! defined ( __sgi ) && ! defined ( VERITAS ) && ! defined(linux)
-	DMEV_SET(DM_EVENT_CANCEL, eventlist);	/* not supported on SGI */
+#if 	!defined(VERITAS) && !defined(linux)
+	DMEV_SET(DM_EVENT_CANCEL, eventlist);
 #endif
-#if !defined(__sgi) && !defined(linux)
-	DMEV_SET(DM_EVENT_CLOSE, eventlist);	/* not supported on SGI */
+#if !defined(linux)
+	DMEV_SET(DM_EVENT_CLOSE, eventlist);
 #endif
 	DMEV_SET(DM_EVENT_DESTROY, eventlist);
 
@@ -1103,11 +1103,11 @@ set_events(
 	/* Metadata events. */
 
 	DMEV_SET(DM_EVENT_ATTRIBUTE, eventlist);
-#if 	! defined ( __sgi ) && ! defined ( VERITAS ) && !defined(linux)
-	DMEV_SET(DM_EVENT_CANCEL, eventlist);	/* not supported on SGI */
+#if 	!defined(VERITAS) && !defined(linux)
+	DMEV_SET(DM_EVENT_CANCEL, eventlist);
 #endif
-#if !defined(__sgi) && !defined(linux)
-	DMEV_SET(DM_EVENT_CLOSE, eventlist);	/* not supported on SGI */
+#if !defined(linux)
+	DMEV_SET(DM_EVENT_CLOSE, eventlist);
 #endif
 	DMEV_SET(DM_EVENT_DESTROY, eventlist);
 
dmapi/src/suite2/src/mmap.c +0 -12
Index: b/dmapi/src/suite2/src/mmap.c
===================================================================
@@ -94,18 +94,9 @@ static	struct	{
 	FLAG(PROT_READ, FL_PROT),
 	FLAG(PROT_WRITE, FL_PROT),
 	FLAG(PROT_EXEC, FL_PROT),
-#ifdef __sgi
-	FLAG(PROT_EXECUTE, FL_PROT),
-#endif
 	FLAG(MAP_SHARED, FL_MAP),
 	FLAG(MAP_PRIVATE, FL_MAP),
 	FLAG(MAP_FIXED, FL_MAP),
-#ifdef __sgi
-	FLAG(MAP_RENAME, FL_MAP),
-	FLAG(MAP_AUTOGROW, FL_MAP),
-	FLAG(MAP_LOCAL, FL_MAP),
-	FLAG(MAP_AUTORESRV, FL_MAP),
-#endif
 	FLAG(MAP_NONE, FL_MAP),
 };
 
@@ -145,9 +136,6 @@ main(int argc, char * argv[])
 	ifile->flags[FL_PROT].value = PROT_READ;
 	ifile->flags[FL_OPEN].value = O_RDONLY;
 	ofile->flags[FL_MAP].value = MAP_SHARED;
-#ifdef __sgi
-	ofile->flags[FL_MAP].value = MAP_AUTOGROW;
-#endif
 	ofile->flags[FL_PROT].value = PROT_WRITE;
 	ofile->flags[FL_OPEN].value = O_RDWR|O_CREAT;
 
dmapi/src/suite2/src/test_invis.c +0 -43

67 lines not on this page · raw message

include/test.h +0 -17
Index: b/include/test.h
===================================================================
@@ -36,23 +36,6 @@
 #define TCONF    32   /* Test not appropriate for configuration flag */
 
 /*
- * To determine if you are on a Umk or Unicos system,
- * use sysconf(_SC_CRAY_SYSTEM).  But since _SC_CRAY_SYSTEM
- * is not defined until 90, it will be define here if not already
- * defined.
- * if ( sysconf(_SC_CRAY_SYSTEM) == 1 )
- *    on UMK
- * else   # returned 0 or -1 
- *    on Unicos
- * This is only being done on CRAY systems.
- */
-#ifdef CRAY
-#ifndef _SC_CRAY_SYSTEM
-#define _SC_CRAY_SYSTEM  140
-#endif /* ! _SC_CRAY_SYSTEM */
-#endif /* CRAY */
-
-/*
  * Ensure that NUMSIGS is defined.
  * It should be defined in signal.h or sys/signal.h on
  * UNICOS/mk and IRIX systems.   On UNICOS systems,
include/tlibio.h +1 -39
Index: b/include/tlibio.h
===================================================================
@@ -23,54 +23,27 @@
 #define LIO_IO_SYNCV            00020   /* single-buffer readv/writev */
 #define LIO_IO_SYNCP            00040   /* pread/pwrite */
 
-#ifdef sgi
-#define LIO_IO_ATYPES           00077   /* all io types */
-#define LIO_IO_TYPES            00061   /* all io types, non-async */
-#endif /* sgi */
 #ifdef linux
 #define LIO_IO_TYPES            00021   /* all io types */
 #endif /* linux */
-#ifdef CRAY
-#define LIO_IO_TYPES            00017   /* all io types */
-#endif /* CRAY */
 
 #define LIO_WAIT_NONE           00010000 /* return asap -- use with care */
 #define LIO_WAIT_ACTIVE         00020000 /* spin looking at iosw fields, or EINPROGRESS */
 #define LIO_WAIT_RECALL         00040000 /* call recall(2)/aio_suspend(3) */
 #define LIO_WAIT_SIGPAUSE       00100000 /* call pause */
 #define LIO_WAIT_SIGACTIVE      00200000 /* spin waiting for signal */
-#ifdef sgi
-#define LIO_WAIT_CBSUSPEND      00400000 /* aio_suspend waiting for callback */
-#define LIO_WAIT_SIGSUSPEND     01000000 /* aio_suspend waiting for signal */
-#define LIO_WAIT_ATYPES         01760000 /* all async wait types, except nowait */
-#define LIO_WAIT_TYPES          00020000 /* all sync wait types (sorta) */
-#endif /* sgi */
+
 #ifdef linux
 #define LIO_WAIT_TYPES          00300000 /* all wait types, except nowait */
 #endif /* linux */
-#ifdef CRAY
-#define LIO_WAIT_TYPES          00360000 /* all wait types, except nowait */
-#endif /* CRAY */
 
 /* meta wait io  */
 /*  00  000 0000 */
 
-#ifdef sgi
-/* all callback wait types */
-#define LIO_WAIT_CBTYPES	(LIO_WAIT_CBSUSPEND)
-/* all signal wait types */
-#define LIO_WAIT_SIGTYPES	(LIO_WAIT_SIGPAUSE|LIO_WAIT_SIGACTIVE|LIO_WAIT_SIGSUSPEND)
-/* all aio_{read,write} or lio_listio */
-#define LIO_IO_ASYNC_TYPES	(LIO_IO_ASYNC|LIO_IO_SLISTIO|LIO_IO_ALISTIO)
-#endif /* sgi */
 #ifdef linux
 /* all signal wait types */
 #define LIO_WAIT_SIGTYPES	(LIO_WAIT_SIGPAUSE)
 #endif /* linux */
-#ifdef CRAY
-/* all signal wait types */
-#define LIO_WAIT_SIGTYPES	(LIO_WAIT_SIGPAUSE|LIO_WAIT_SIGACTIVE)
-#endif /* CRAY */
 
 /*
  * This bit provides a way to randomly pick an io type and wait method.
@@ -110,17 +83,6 @@ int  lio_read_buffer(int fd, int method,
 		     int sig, char **errmsg, long wrd);
 int  lio_random_methods(long mask);
 
-#if CRAY
-#include <sys/iosw.h>
-int  lio_wait4asyncio(int method, int fd, struct iosw **statptr);
-int  lio_check_asyncio(char *io_type, int size, struct iosw *status);
-#endif /* CRAY */
-#ifdef sgi
-#include <aio.h>
-int  lio_wait4asyncio(int method, int fd, aiocb_t *aiocbp);
-int  lio_check_asyncio(char *io_type, int size, aiocb_t *aiocbp, int method);
-#endif /* sgi */
-
 /*
  * Define the structure that contains the infomation that is used
  * by the parsing and help functions.
include/usctest.h +0 -2
Index: b/include/usctest.h
===================================================================
@@ -89,11 +89,9 @@
 #endif
 #endif
 
-#ifndef CRAY
 #ifndef BSIZE 
 #define BSIZE BBSIZE
 #endif
-#endif
 
 /***********************************************************************
  * Define option_t structure type.
include/write_log.h +0 -8
Index: b/include/write_log.h
===================================================================
@@ -91,18 +91,10 @@ struct wlog_rec {
  */
 
 struct wlog_rec_disk {
-#ifdef sgi	/* sgi is pissy about fields > 32 bit, even cc -mips3 */
-    uint    w_offset    : 32;	    /* file offset  	    	    */
-    uint    w_extra0    : 32;       /* EXTRA BITS IN WORD 0         */
-#endif
 #ifdef linux
     uint    w_offset    : 32;	    /* file offset  	    	    */
     uint    w_extra0    : 32;       /* EXTRA BITS IN WORD 0         */
 #endif
-#ifdef CRAY
-    uint    w_offset    : 44;	    /* file offset  	    	    */
-    uint    w_extra0    : 20;       /* EXTRA BITS IN WORD 0         */
-#endif
 
     uint    w_nbytes    : 32;	    /* # bytes written	    	    */
     uint    w_oflags	: 32;	    /* low-order open() flags	    */
lib/datapid.c +0 -179

199 lines not on this page · raw message

lib/random_range.c +2 -32
Index: b/lib/random_range.c
===================================================================
@@ -338,27 +338,7 @@ char	**errp;
 	}
 
     	nmults = ((max - min) / mult) + 1;
-#if CRAY 
-        /*
-         * If max is less than 2gb, then the value can fit in 32 bits
-         * and the standard lrand48() routine can be used.
-         */
-        if ( max <= (long)2147483647 ) {
-            return (long) (min + (((long)lrand48() % nmults) * mult));
-        } else {
-            /*
-             * max is greater than 2gb - meeds more than 32 bits.
-             * Since lrand48 only will get a number up to 32bits.
-             */
-	    long randnum;
-            randnum=divider(min, max, 0, -1);
-            return (long) (min + ((randnum % nmults) * mult));
-        }
-
-#else
         return (min + ((lrand48() % nmults) * mult));
-#endif
-
 }
 
 /*
@@ -430,7 +410,7 @@ char	**errp;
 	}
 
     	nmults = ((max - min) / mult) + 1;
-#if CRAY || (_MIPS_SZLONG == 64)
+#if (_MIPS_SZLONG == 64)
         /*
          * If max is less than 2gb, then the value can fit in 32 bits
          * and the standard lrand48() routine can be used.
@@ -648,8 +628,6 @@ random_bit(long mask)
     /*
      * get the number of bits set in mask
      */
-#ifndef CRAY
-
         bit=1L;
         for ( nshift=0; nshift<sizeof(long)*8; nshift++) {
                 if ( mask & bit )
@@ -657,10 +635,6 @@ random_bit(long mask)
                 bit=bit<<1;
         }
 
-#else
-        nbits=_popcnt(mask);
-#endif  /* if CRAY */
-
     /*
      * randomly choose a bit.
      */
@@ -740,14 +714,10 @@ char **argv;
     int ind;
     int cnt, iter=10;
     int imin=0, imult=1, itmin, itmax=0;
-#if CRAY
-    int imax=6*GIG;	/* higher than 32 bits */
-#else
     int imax=1048576;
-#endif
 
     long lret, lmin=0, lmult=1, ltmin, ltmax=0; 
-#if CRAY || (_MIPS_SZLONG == 64)
+#if (_MIPS_SZLONG == 64)
     long lmax=6*(long)GIG;	/* higher than 32 bits */
 #else
     long lmax=1048576;
lib/str_to_bytes.c +1 -5
Index: b/lib/str_to_bytes.c
===================================================================
@@ -43,11 +43,7 @@
  *
  ****************************************************************************/
 
-#if CRAY
-#define B_MULT	BSIZE		/* block size */
-#elif sgi
-#define B_MULT	BBSIZE		/* block size */
-#elif linux
+#if linux
 #define B_MULT	DEV_BSIZE	/* block size */
 #endif
 
lib/tlibio.c +1 -776

996 lines not on this page · raw message

ltp/doio.c +79 -1787

1,206 lines not on this page · raw message

ltp/doio.h +0 -6
Index: b/ltp/doio.h
===================================================================

Lines of this file are not shown. View the raw message.

ltp/growfiles.c +0 -162

162 lines not on this page · raw message

ltp/iogen.c +0 -307

307 lines not on this page · raw message

src/dirperf.c +0 -2
Index: b/src/dirperf.c
===================================================================

Lines of this file are not shown. View the raw message.

src/dmiperf.c +0 -6
Index: b/src/dmiperf.c
===================================================================

Lines of this file are not shown. View the raw message.

src/global.h +0 -5
Index: b/src/global.h
===================================================================

Lines of this file are not shown. View the raw message.

src/multi_open_unlink.c +0 -4
Index: b/src/multi_open_unlink.c
===================================================================

Lines of this file are not shown. View the raw message.

src/randholes.c +0 -5
Index: b/src/randholes.c
===================================================================

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

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

Part of the diff is not shown here. View the raw message.

Reviewed-by on v1 1/3
#2 lore raw

Re: [PATCH 1/3] xfstests: remove unsupported conditionals

Quoted 32 lines · On 11/09/12 07:23, [email protected] wrote:

This patch removes the unsupported sgi and CRAY.

---
  dmapi/src/common/lib/dmport.h         |   16
  dmapi/src/common/lib/util.c           |   16
  dmapi/src/sample_hsm/wbee.c           |    2
  dmapi/src/simple/dm_create_session.c  |    3
  dmapi/src/simple/dm_destroy_session.c |    3
  dmapi/src/simple/dm_find_eventmsg.c   |    3
  dmapi/src/simple/dm_getall_sessions.c |    3
  dmapi/src/simple/dm_getall_tokens.c   |    3
  dmapi/src/simple/dm_query_session.c   |    3
  dmapi/src/suite1/cmd/get_mountinfo.c  |    4
  dmapi/src/suite1/cmd/make_rt_sparse.c |    7
  dmapi/src/suite1/cmd/print_event.c    |    8
  dmapi/src/suite1/cmd/print_fshandle.c |   21
  dmapi/src/suite2/src/check_dmapi.c    |   25
  dmapi/src/suite2/src/dm_test_daemon.c |   20
  dmapi/src/suite2/src/mmap.c           |   12
  dmapi/src/suite2/src/test_invis.c     |   43
  include/test.h                        |   17
  include/tlibio.h                      |   40
  include/usctest.h                     |    2
  include/write_log.h                   |    8
  lib/datapid.c                         |  179 ---
  lib/random_range.c                    |   34
  lib/str_to_bytes.c                    |    6
  lib/tlibio.c                          |  777 --------------
  ltp/doio.c                            | 1866 +---------------------------------
  ltp/doio.h                            |    6
Quoted 8 lines
  ltp/growfiles.c                       |  162 --
  ltp/iogen.c                           |  307 -----
  src/dirperf.c                         |    2
  src/dmiperf.c                         |    6
  src/global.h                          |    5
  src/multi_open_unlink.c               |    4
  src/randholes.c                       |    5
  34 files changed, 101 insertions(+), 3517 deletions(-)

Looks good.

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

#4 lore raw

PATCH 2/3 xfstests: remove unused conditional NO_XFS

In reply to [email protected]

This patch removes the unused conditional NO_XFS which was added with commit 332ee29d1ab7a8690ca8f6d06b0d116e3a4a4f0f:
"xfstests updates - rework build to be like other xfs packages ..."

---
 ltp/doio.c      |   70 --------------------------------------------------------
 ltp/growfiles.c |   20 ----------------
 ltp/iogen.c     |   30 ------------------------
 3 files changed, 120 deletions(-)
ltp/doio.c +0 -70
Index: b/ltp/doio.c
===================================================================
@@ -37,10 +37,8 @@
 #include <sys/time.h>	/* for delays */
 #include <ctype.h>
 
-#ifndef NO_XFS
 struct io_req;
 int do_xfsctl(struct io_req *);
-#endif
 
 #include "doio.h"
 #include "pattern.h"
@@ -172,11 +170,9 @@ struct fd_cache {
 	int	c_oflags;
 	int	c_fd;
 	long    c_rtc;
-#ifndef NO_XFS
 	int	c_memalign;	/* from xfsctl(XFS_IOC_DIOINFO) */
 	int	c_miniosz;
 	int	c_maxiosz;
-#endif
 	void	*c_memaddr;	/* mmapped address */
 	int	c_memlen;	/* length of above region */
 };
@@ -777,12 +773,10 @@ doio()
 		case LEWRITEA:
 			rval = do_rw(&ioreq);
 			break;
-#ifndef NO_XFS
 		case RESVSP:
 		case UNRESVSP:
 			rval = do_xfsctl(&ioreq);
 			break;
-#endif
 		case FSYNC2:
 		case FDATASYNC:
 			rval = do_sync(&ioreq);
@@ -1056,9 +1050,7 @@ struct io_req	*req;
 {
 	int	    	    	fd, offset, nbytes, oflags, rval;
 	char    	    	*addr, *file;
-#ifndef NO_XFS
 	struct fd_cache		*fdc;
-#endif
 
 	/*
 	 * Initialize common fields - assumes r_oflags, r_file, r_offset, and
@@ -1090,7 +1082,6 @@ struct io_req	*req;
 #define wtob(x)	(x * sizeof(UINT64_T))
 #endif
 
-#ifndef NO_XFS
 	/* get memory alignment for using DIRECT I/O */
 	fdc = alloc_fdcache(file, oflags);
 
@@ -1111,14 +1102,6 @@ struct io_req	*req;
 	} else {
 		addr += random_range(0, wtob(1) - 1, 1, NULL);
 	}
-#else
-	if ((rval = alloc_mem(nbytes + wtob(1) * 2)) < 0) {
-		return rval;
-	}
-
-	addr = Memptr;
-#endif	/* !NO_XFS */
-
 
 	switch (req->r_type) {
 	case READ:
@@ -1167,9 +1150,7 @@ struct io_req	*req;
 	long    	    	offset, woffset = 0;
 	char    	    	*addr, pattern, *file, *msg;
 	struct wlog_rec		wrec;
-#ifndef NO_XFS
 	struct fd_cache		*fdc;
-#endif
 
 	/*
 	 * Misc variable setup
@@ -1206,7 +1187,6 @@ struct io_req	*req;
 	 * Allocate SDS space for backdoor write if desired
 	 */
 
-#ifndef NO_XFS
 	/* get memory alignment for using DIRECT I/O */
 	fdc = alloc_fdcache(file, oflags);
 
@@ -1231,18 +1211,6 @@ struct io_req	*req;
 	if( addr != Memptr )
 		memmove( addr, Memptr, nbytes);
 
-#else /* sgi */
-	if ((rval = alloc_mem(nbytes + wtob(1) * 2)) < 0) {
-		return rval;
-	}
-
-	addr = Memptr;
-
-	(*Data_Fill)(Memptr, nbytes, Pattern, Pattern_Length, 0);
-	if( addr != Memptr )
-		memmove( addr, Memptr, nbytes);
-#endif /* sgi */
-
 	rval = -1;
 	got_lock = 0;
 	logged_write = 0;
@@ -1312,7 +1280,6 @@ struct io_req	*req;
 				     "write() failed:  %s (%d)\n%s\n",
 				     SYSERR, errno,
 				     format_rw(req, fd, addr, -1, Pattern, NULL));
-#ifndef NO_XFS
 			doio_fprintf(stderr,
 				     "write() failed:  %s\n\twrite(%d, %#o, %d)\n\toffset %d, nbytes%%miniou(%d)=%d, oflags=%#o memalign=%d, addr%%memalign=%d\n",
 				     strerror(errno),
@@ -1320,13 +1287,6 @@ struct io_req	*req;
 				     offset,
 				     fdc->c_miniosz, nbytes%fdc->c_miniosz,
 				     oflags, fdc->c_memalign, (long)addr%fdc->c_memalign);
-#else
-			doio_fprintf(stderr,
-				     "write() failed:  %s\n\twrite(%d, %#o, %d)\n\toffset %d, nbytes%%1B=%d, oflags=%#o\n",
-				     strerror(errno),
-				     fd, addr, nbytes,
-				     offset, nbytes%4096, oflags);
-#endif
 			doio_upanic(U_RVAL);
 		} else if (rval != nbytes) {
 			doio_fprintf(stderr,
@@ -1511,7 +1471,6 @@ fmt_ioreq(struct io_req *ioreq, struct s
 	cp += sprintf(cp, "          memory alignment is %s\n",
 		      (io->r_uflags & F_WORD_ALIGNED) ? "aligned" : "unaligned");
 
-#ifndef NO_XFS
 	if(io->r_oflags & O_DIRECT) {
 		struct dioattr	finfo;
 		
@@ -1531,8 +1490,6 @@ fmt_ioreq(struct io_req *ioreq, struct s
 		cp += sprintf(cp, "          mem alignment 0x%x xfer size: small: %d large: %d\n",
 			      finfo.d_mem, finfo.d_miniosz, finfo.d_maxiosz);
 	}
-#endif
-
 	return(errbuf);
 }
 
@@ -1846,9 +1803,7 @@ do_rw(req)
 	struct status		*s;
 	struct wlog_rec		wrec;
 	struct syscall_info	*sy;
-#ifndef NO_XFS
 	struct fd_cache		*fdc;
-#endif
 
 	/*
 	 * Initialize common fields - assumes r_oflags, r_file, r_offset, and
@@ -1907,18 +1862,12 @@ do_rw(req)
 		mem_needed = nbytes;
 	}
 
-#ifndef NO_XFS
 	/* get memory alignment for using DIRECT I/O */
 	fdc = alloc_fdcache(file, oflags);
 
 	if ((rval = alloc_mem(mem_needed + wtob(1) * 2 + fdc->c_memalign)) < 0) {
 		return rval;
 	}
-#else
-	if ((rval = alloc_mem(mem_needed + wtob(1) * 2)) < 0) {
-		return rval;
-	}
-#endif
 
 	Pattern[0] = pattern;
 
@@ -1945,14 +1894,12 @@ do_rw(req)
 			addr += random_range(0, wtob(1) - 1, 1, NULL);
 		}
 
-#ifndef NO_XFS
 		/*
 		 * Force memory alignment for Direct I/O
 		 */
 		if( (oflags & O_DIRECT) && ((long)addr % fdc->c_memalign != 0) ) {
 			addr += fdc->c_memalign - ((long)addr % fdc->c_memalign);
 		}
-#endif
 
 		/*
 		 * FILL must be done on a word-aligned buffer.
@@ -2141,7 +2088,6 @@ do_rw(req)
  *   - XFS_IOC_RESVSP
  *   - XFS_IOC_UNRESVSP
  */
-#ifndef NO_XFS
 int
 do_xfsctl(req)
 	struct io_req	*req;
@@ -2232,7 +2178,6 @@ do_xfsctl(req)
 
 	return (rval == -1) ? -1 : 0;
 }
-#endif
 
 /*
  *  fsync(2) and fdatasync(2)
@@ -2379,9 +2324,7 @@ int	fsa;
 	static char	errbuf[4096];
 	int	    	fd, nb, flags;
 	char		*buf, *em, *ep;
-#ifndef NO_XFS
 	struct fd_cache *fdc;
-#endif
 
 	buf = Memptr;
 
@@ -2406,27 +2349,18 @@ int	fsa;
 		return errbuf;
 	}
 
-#ifndef NO_XFS
 	/* Guarantee a properly aligned address on Direct I/O */
 	fdc = alloc_fdcache(file, flags);
 	if( (flags & O_DIRECT) && ((long)buf % fdc->c_memalign != 0) ) {
 		buf += fdc->c_memalign - ((long)buf % fdc->c_memalign);
 	}
-#endif
 
 	if ((nb = read(fd, buf, length)) == -1) {
-#ifndef NO_XFS
 		sprintf(errbuf,
 			"Could not read %d bytes from %s for verification:  %s (%d)\n\tread(%d, 0x%p, %d)\n\tbuf %% alignment(%d) = %ld\n",
 			length, file, SYSERR, errno,
 			fd, buf, length,
 			fdc->c_memalign, (long)buf % fdc->c_memalign);
-#else
-		sprintf(errbuf,
-			"Could not read %d bytes from %s for verification:  %s (%d)\n",
-			length, file, SYSERR, errno);
-
-#endif
 		return errbuf;
 	}
 
@@ -2722,9 +2656,7 @@ int	oflags;
 	struct fd_cache		*free_slot, *oldest_slot, *cp;
 	static int		cache_size = 0;
 	static struct fd_cache	*cache = NULL;
-#ifndef NO_XFS
 	struct dioattr	finfo;
-#endif
 
 	/*
 	 * If file is NULL, it means to free up the fd cache.
@@ -2846,7 +2778,6 @@ int	oflags;
 	strcpy(free_slot->c_file, file);
 	free_slot->c_rtc = Reqno;
 
-#ifndef NO_XFS
 	if (oflags & O_DIRECT) {
 		if (xfsctl(file, fd, XFS_IOC_DIOINFO, &finfo) == -1) {
 			finfo.d_mem = 1;
@@ -2862,7 +2793,6 @@ int	oflags;
 	free_slot->c_memalign = finfo.d_mem;
 	free_slot->c_miniosz = finfo.d_miniosz;
 	free_slot->c_maxiosz = finfo.d_maxiosz;
-#endif
 	free_slot->c_memaddr = NULL;
 	free_slot->c_memlen = 0;
 
ltp/growfiles.c +0 -20
Index: b/ltp/growfiles.c
===================================================================
@@ -89,9 +89,7 @@ void prt_examples();
 int set_sig();
 void sig_handler();
 static void notify_others();
-#ifndef NO_XFS
 int pre_alloc();
-#endif
 
 
 #define NEWIO	1	/* Use the tlibio.c functions */
@@ -293,9 +291,7 @@ int tmp;
 char chr;
 int ret;
 int pre_alloc_space = 0;
-#ifndef NO_XFS
 int total_grow_value = 0;	/* used in pre-allocations */
-#endif
 int backgrnd = 1;		/* return control to user */
 struct stat statbuf;
 int time_iterval = -1;
@@ -564,13 +560,9 @@ extern int Forker_npids;	/* num of forke
 
 
 		case 'p' :	/* pre allocate space */
-#ifdef NO_XFS
 			printf("%s%s: --p is illegal option on this system\n",
 				Progname, TagName);
 			exit(1);
-#else
-			pre_alloc_space++;
-#endif
 			break;
 
 		case 'P':
@@ -1147,7 +1139,6 @@ no whole file checking will be performed
 			Progname, Pid, num_files);
 	}
 
-#ifndef NO_XFS
 	if ( pre_alloc_space ) {
 		if ( iterations == 0 ) {
 		    fprintf(stderr, "%s%s: %d %s/%d: can NOT pre-alloc and grow forever\n",
@@ -1170,7 +1161,6 @@ no whole file checking will be performed
 			total_grow_value=bytes_to_consume;
 		}
 	}
-#endif
 
 	/*
 	 * If delaying between iterations, get amount time to
@@ -1254,7 +1244,6 @@ no whole file checking will be performed
 
 		lkfile(fd, LOCK_EX, LKLVL1);   /* lock if lockfile is LKLVL1 */
 
-#ifndef NO_XFS
 		/*
 		 * preallocation is only done once, if specified.
 		 */
@@ -1272,7 +1261,6 @@ no whole file checking will be performed
 			Iter_cnt=0;	/* reset outside loop to restart from one */
 			continue;
 		}
-#endif
 
 		/*
 		 * grow file by desired amount.
@@ -1348,7 +1336,6 @@ no whole file checking will be performed
 		    }
 	        }
 	    }
-#ifndef NO_XFS
 	    /*
 	     * if Iter_cnt == 0, then we pre allocated space to all files
 	     * and we are starting outside loop over.  Set pre_alloc_space
@@ -1357,9 +1344,6 @@ no whole file checking will be performed
 	    if ( Iter_cnt == 0 ) {
 		pre_alloc_space=0;
 	    }
-#endif
-
-
 	}   /* end iteration for loop */
 
 
@@ -2594,7 +2578,6 @@ lkfile(int fd, int operation, int lkleve
    return 0;
 }
 
-#ifndef NO_XFS
 /***********************************************************************
  *
  ***********************************************************************/
@@ -2605,7 +2588,6 @@ int fd;
 int size;
 {
 
-#ifndef NO_XFS
 #ifdef XFS_IOC_RESVSP
     struct xfs_flock64 f;
 
@@ -2635,8 +2617,6 @@ int size;
 		return -1;
 	}
 #endif
-#endif
 
 	return 0;
 }
-#endif
ltp/iogen.c +0 -30
Index: b/ltp/iogen.c
===================================================================
@@ -182,12 +182,10 @@ struct strmap	Syscall_Map[] = {
 	{ "write",		WRITE,		SY_WRITE		},
 	{ "pread",		PREAD   				},
 	{ "pwrite",		PWRITE,		SY_WRITE		},
-#ifndef NO_XFS
 	{ "resvsp",		RESVSP, 	SY_WRITE		},
 	{ "unresvsp",		UNRESVSP, 	SY_WRITE		},
 	{ "reserve",		RESVSP, 	SY_WRITE		},
 	{ "unreserve",		UNRESVSP, 	SY_WRITE		},
-#endif
 	{ "readv",		READV					},
 	{ "writev",		WRITEV,		SY_WRITE		},
 	{ "mmread",		MMAPR					},
@@ -744,10 +742,8 @@ get_file_info(rec)
 struct file_info    *rec;
 {
     struct stat			sbuf;
-#ifndef NO_XFS
     int				fd;
     struct dioattr		finfo;
-#endif
 
     /*
      * Figure out if the files is regular, block or character special.  Any
@@ -784,7 +780,6 @@ struct file_info    *rec;
 	}
 
 	rec->f_riou = BSIZE;
-#ifndef NO_XFS
 	if( (fd = open(rec->f_path, O_RDWR|O_DIRECT, 0)) != -1 ) {
 #ifdef XFS_IOC_DIOINFO
 	    if(xfsctl(rec->f_path, fd, XFS_IOC_DIOINFO, &finfo) != -1) {
@@ -805,7 +800,6 @@ bozo!
 	} else {
 	    rec->f_riou = BBSIZE;
 	}
-#endif
     } else {
 
 	rec->f_riou = BSIZE;
@@ -829,13 +823,11 @@ int 	nbytes;
     int	    	fd, rval;
     char    	c;
     struct stat	sbuf;
-#ifndef NO_XFS
     int		nb;
     struct flock64 f;
     struct fsxattr xattr;
     struct dioattr finfo;
     char	*b, *buf;
-#endif
 
     errno = 0;
     rval = stat(path, &sbuf);
@@ -883,7 +875,6 @@ int 	nbytes;
 	}
     } else {
 
-#ifndef NO_XFS
 	/*
 	 *  The file must be designated as Real-Time before any data
 	 *  is allocated to it.
@@ -926,7 +917,6 @@ bozo!
 		fprintf(stderr, "get: fsx_xflags = 0x%x\n", 
 			xattr.fsx_xflags);
 	    }
-#endif
 	}
 
 	/*
@@ -1008,7 +998,6 @@ bozo!
 	 * file size.
 	 */
 
-#ifndef NO_XFS
 	if(Owrite == 2) {
 	    close(fd);
 	    if( (fd = open(path, O_CREAT|O_RDWR|O_DIRECT, 0)) != -1 ) {
@@ -1081,7 +1070,6 @@ bozo!
 	    }
 	    free(b);
 	} else
-#endif
 	    if(Owrite) {
 	    /*fprintf(stderr,
 		    "create_file_Owrite: lseek(%d, %d {%d}, SEEK_SET)\n",
@@ -1286,7 +1274,6 @@ char	*opts;
 	case 'O':
 
 	    nopenargs = string_to_tokens(optarg, openargs, 4, ":/");
-#ifndef NO_XFS
 	    if(!strcmp(openargs[0], "realtime")) {
 		/*
 		 * -O realtime:extsize
@@ -1323,14 +1310,6 @@ char	*opts;
 			TagName, openargs[0]);
 		exit(1);
 	    }
-#else
-	    Oflags = parse_open_flags(openargs[0], &errmsg);
-	    if(Oflags == -1) {
-		fprintf(stderr, "iogen%s: -O %s error: %s\n", TagName, optarg, errmsg);
-		exit(1);
-	    }
-#endif
-
 	    O_opt++;
 	    break;
 
@@ -1629,13 +1608,8 @@ FILE	*stream;
     fprintf(stream, "\t-a               (Not used on Linux).\n");
 #endif /* !linux */
     fprintf(stream, "\t-f flag,...      Flags to use for file IO.  Supported flags are\n");
-#ifndef NO_XFS
     fprintf(stream, "\t                 buffered, direct, sync.\n");
     fprintf(stream, "\t                 Default is 'buffered,sync'.\n");
-#else
-    fprintf(stream, "\t                 buffered, sync.\n");
-    fprintf(stream, "\t                 Default is 'buffered,sync'.\n");
-#endif /* sgi */
     fprintf(stream, "\t-h               This help.\n");
     fprintf(stream, "\t-i iterations[s] # of requests to generate.  0 means causes iogen\n");
     fprintf(stream, "\t                 to run until it's killed.  If iterations is suffixed\n");
@@ -1650,15 +1624,11 @@ FILE	*stream;
     fprintf(stream, "\t-N tagname       Tag name, for Monster.\n");
     fprintf(stream, "\t-o               Form overlapping consecutive requests.\n");
     fprintf(stream, "\t-O               Open flags for creating files\n");
-#ifndef NO_XFS
     fprintf(stream, "\t                 realtime:extsize - put file on real-time volume\n");
     fprintf(stream, "\t                 allocate - allocate space with F_ALLOCSP\n");
     fprintf(stream, "\t                 reserve - reserve space with F_RESVSP (default)\n");
     fprintf(stream, "\t                 noreserve - do not reserve with F_RESVSP\n");
     fprintf(stream, "\t                 direct - use O_DIRECT I/O to write to the file\n");
-#else
-    fprintf(stream, "\t                 {O_SYNC,etc}\n");
-#endif
     fprintf(stream, "\t-p               Output pipe.  Default is stdout.\n");
     fprintf(stream, "\t-q               Quiet mode.  Normally iogen spits out info\n");
     fprintf(stream, "\t                 about test files, options, etc. before starting.\n");

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

Reviewed-by on v1 2/3
#5 lore raw

Re: [PATCH 2/3] xfstests: remove unused conditional NO_XFS

Quoted 11 lines · On 11/09/12 07:24, [email protected] wrote:

This patch removes the unused conditional NO_XFS which was added with commit 332ee29d1ab7a8690ca8f6d06b0d116e3a4a4f0f:
"xfstests updates - rework build to be like other xfs packages ..."

---
  ltp/doio.c      |   70 --------------------------------------------------------
  ltp/growfiles.c |   20 ----------------
  ltp/iogen.c     |   30 ------------------------
  3 files changed, 120 deletions(-)

Looks good.

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

#7 lore raw

PATCH 3/3 xfstests: resolve compiler warnings

In reply to [email protected]

This patch resolves the following compiler/configure warnings:

configure: WARNING: unrecognized options: --enable-lib64
warning: 'xxxx' may be used uninitialized in this function [-Wuninitialized]
warning: variable 'xxx' set but not used [-Wunused-but-set-variable]
warning: call to function 'foo' without a real prototype [-Wunprototyped-calls]

---
 Makefile                         |    3 
 dmapi/src/suite1/cmd/link_test.c |  135 +++++++++++++++++++--------------------
 lib/tlibio.c                     |   18 +----
 ltp/doio.c                       |   91 ++++++++++++--------------
 ltp/growfiles.c                  |   44 +++++-------
 ltp/iogen.c                      |    4 -
 src/fiemap-tester.c              |    2 
 src/ftrunc.c                     |    3 
 src/trunc.c                      |    3 
 9 files changed, 139 insertions(+), 164 deletions(-)
Makefile +1 -2
Index: b/Makefile
===================================================================
@@ -76,8 +76,7 @@ configure: configure.ac
 
 include/builddefs include/config.h: configure
 	./configure \
-                --libexecdir=/usr/lib \
-                --enable-lib64=yes
+                --libexecdir=/usr/lib
 
 aclocal.m4::
 	aclocal --acdir=`pwd`/m4 --output=$@
dmapi/src/suite1/cmd/link_test.c +66 -69

156 lines not on this page · raw message

lib/tlibio.c +4 -14
Index: b/lib/tlibio.c
===================================================================
@@ -465,7 +465,6 @@ char **errmsg;	/* char pointer that will
 long wrd;	/* to allow future features, use zero for now */
 {
     int ret = 0;	/* syscall return or used to get random method */
-    char *io_type;		/* Holds string of type of io */
 #ifndef linux
     int omethod = method;
     int listio_cmd;		/* Holds the listio/lio_listio cmd */
@@ -514,10 +513,8 @@ long wrd;	/* to allow future features, u
     /*
      * Determine the system call that will be called and produce
      * the string of the system call and place it in Lio_SysCall.
-     * Also update the io_type char pointer to give brief description
-     * of system call.  Execute the system call and check for
-     * system call failure.  If sync i/o, return the number of
-     * bytes written/read.
+     * Execute the system call and check for system call failure.
+     * If sync i/o, return the number of bytes written/read.
      */
      
     if ( (method & LIO_IO_SYNC) || (method & LIO_IO_TYPES) == 0 ){
@@ -528,7 +525,6 @@ long wrd;	/* to allow future features, u
 
 	sprintf(Lio_SysCall,
 	    "write(%d, buf, %d)", fd, size);
-	io_type="write";
 
         if ( Debug_level ) {
 	    printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__, Lio_SysCall);
@@ -556,7 +552,6 @@ long wrd;	/* to allow future features, u
     }
 
     else if ( method & LIO_IO_SYNCV ) {
-	io_type="writev(2)";
 
 	sprintf(Lio_SysCall, 
 		"writev(%d, &iov, 1) nbyte:%d", fd, size);
@@ -667,7 +662,6 @@ char **errmsg;	/* char pointer that will
 long wrd;	/* to allow future features, use zero for now */
 {
     int ret = 0;	/* syscall return or used to get random method */
-    char *io_type;		/* Holds string of type of io */
 #ifndef linux
     int listio_cmd;		/* Holds the listio/lio_listio cmd */
     int omethod = method;
@@ -716,10 +710,8 @@ long wrd;	/* to allow future features, u
     /*
      * Determine the system call that will be called and produce
      * the string of the system call and place it in Lio_SysCall.
-     * Also update the io_type char pointer to give brief description
-     * of system call.  Execute the system call and check for
-     * system call failure.  If sync i/o, return the number of
-     * bytes written/read.
+     * Execute the system call and check for system call failure.
+     * If sync i/o, return the number of bytes written/read.
      */
      
     if ( (method & LIO_IO_SYNC) || (method & LIO_IO_TYPES) == 0 ){
@@ -730,7 +722,6 @@ long wrd;	/* to allow future features, u
 
 	sprintf(Lio_SysCall,
 	    "read(%d, buf, %d)", fd, size);
-	io_type="read";
 
         if ( Debug_level ) {
 	    printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__, Lio_SysCall);
@@ -758,7 +749,6 @@ long wrd;	/* to allow future features, u
     }
 
     else if ( method & LIO_IO_SYNCV ) {
-	io_type="readv(2)";
 
 	sprintf(Lio_SysCall, 
 		"readv(%d, &iov, 1) nbyte:%d", fd, size);
ltp/doio.c +43 -48

144 lines not on this page · raw message

ltp/growfiles.c +20 -24

75 lines not on this page · raw message

ltp/iogen.c +2 -2
Index: b/ltp/iogen.c
===================================================================
@@ -132,7 +132,7 @@ int	Fileio = 0;		/* flag indicating that
 int	Naio_Strat_Types = 0;	/* # async io completion types		    */
 struct	strmap *Aio_Strat_List[128]; /* Async io completion types	    */
 
-void	startup_info();
+void	startup_info(FILE *stream, int seed);
 
 /*
  * Map async io completion modes (-a args) names to values.  Macros are
@@ -299,7 +299,7 @@ char	**argv;
 void
 startup_info(FILE *stream, int seed)
 {
-    char	*value_to_string(), *type;
+    char	*value_to_string(struct strmap *map, int val), *type;
     int		i;
 
     fprintf(stream, "\n");
src/fiemap-tester.c +1 -1
Index: b/src/fiemap-tester.c
===================================================================
@@ -423,7 +423,7 @@ compare_fiemap_and_map(int fd, char *map
 {
 	struct fiemap *fiemap;
 	char *fiebuf;
-	int blocks_to_map, ret, cur_extent = 0, last_data;
+	int blocks_to_map, ret, cur_extent = 0, last_data = 0;
 	__u64 map_start, map_length;
 	int i, c;
 
src/ftrunc.c +1 -2
Index: b/src/ftrunc.c
===================================================================
@@ -30,7 +30,7 @@ int     argc;
 char    **argv;
 
 {
-char    ch, *filename="testfile";
+char *filename="testfile";
 int c;
 int fd, err;
 
@@ -40,7 +40,6 @@ if(argc != 3)
         }
 
 while((c=getopt(argc,argv,"f:"))!=EOF) {
-                ch = (char)c;
                 switch (c) {
                 case 'f':
                         filename = optarg;
src/trunc.c +1 -2
Index: b/src/trunc.c
===================================================================
@@ -47,7 +47,7 @@ char	**argv;
 	int fd, err, elapsed;
 	char *buf, *goodbuf;
 	time_t starttime;
-        char	ch, *filename="testfile";
+        char *filename="testfile";
  	int c;
 
 if(argc != 3)
@@ -56,7 +56,6 @@ if(argc != 3)
         }
 
 while((c=getopt(argc,argv,"f:"))!=EOF) {
-		ch = (char)c;
 		switch (c) {
 		case 'f':
 			filename = optarg;

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

Reviewed-by on v1 3/3
#8 lore raw

Re: [PATCH 3/3] xfstests: resolve compiler warnings

Quoted 10 lines · On 11/09/12 07:24, [email protected] wrote:

This patch resolves the following compiler/configure warnings:

configure: WARNING: unrecognized options: --enable-lib64
warning: 'xxxx' may be used uninitialized in this function [-Wuninitialized]
warning: variable 'xxx' set but not used [-Wunused-but-set-variable]
warning: call to function 'foo' without a real prototype [-Wunprototyped-calls]

---

Looks good.

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

#10 lore raw
In reply to [email protected]
Quoted 10 lines · On 11/09/2012 07:23 AM, [email protected] wrote:

This patchset:
1. Removes the unsupported sgi and CRAY conditionals
2. Removes the unused conditional NO_XFS
3. Resolves compiler/configure warnings

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

Christoph and Mark thanks for the review. This series has been committed to git://oss.sgi.com/xfs/cmds/xfstests master branch, commit 062f9b, a07ce0, and 2924ad.

--Rich

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