mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfstests: remove unsupported conditionals
This patch removes the unsupported sgi and CRAY. Signed-off-by: Rich Johnston <rjohnston@sgi.com> Reviewed-by: Mark Tinguely <tinguely@sgi.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
@@ -294,22 +294,6 @@ typedef struct dm_timestruct dm_timestruct_t;
|
|||||||
|
|
||||||
-------------- end of SGI-specific hack documentation --------------- */
|
-------------- 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
|
#ifdef linux
|
||||||
|
|
||||||
#include <dmapi.h>
|
#include <dmapi.h>
|
||||||
|
|||||||
@@ -380,11 +380,7 @@ save_filedata(
|
|||||||
nread = dm_read_invis(sid, hanp, hlen, DM_NO_TOKEN, off,
|
nread = dm_read_invis(sid, hanp, hlen, DM_NO_TOKEN, off,
|
||||||
(dm_ssize_t)CHUNKSIZE, filebuf);
|
(dm_ssize_t)CHUNKSIZE, filebuf);
|
||||||
if (nread != CHUNKSIZE) {
|
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",
|
errno_msg("%s/%d: invis read err: got %d, expected %d, buf %d",
|
||||||
#endif
|
|
||||||
__FILE__, __LINE__,
|
__FILE__, __LINE__,
|
||||||
nread, (dm_ssize_t)CHUNKSIZE, i);
|
nread, (dm_ssize_t)CHUNKSIZE, i);
|
||||||
retval = 1;
|
retval = 1;
|
||||||
@@ -406,11 +402,7 @@ save_filedata(
|
|||||||
nread = dm_read_invis(sid, hanp, hlen, DM_NO_TOKEN, off,
|
nread = dm_read_invis(sid, hanp, hlen, DM_NO_TOKEN, off,
|
||||||
(dm_ssize_t)lastbuf, filebuf);
|
(dm_ssize_t)lastbuf, filebuf);
|
||||||
if (nread != lastbuf) {
|
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",
|
errno_msg("%s/%d: invis read error- got %d, expected %d, last buf",
|
||||||
#endif
|
|
||||||
__FILE__, __LINE__,
|
__FILE__, __LINE__,
|
||||||
nread, lastbuf);
|
nread, lastbuf);
|
||||||
retval = 1;
|
retval = 1;
|
||||||
@@ -419,11 +411,7 @@ save_filedata(
|
|||||||
|
|
||||||
nwrite = write(stg_fd, filebuf, (int)lastbuf);
|
nwrite = write(stg_fd, filebuf, (int)lastbuf);
|
||||||
if (nwrite != 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",
|
errno_msg("%s/%d: write error %d, expected %d, last buffer",
|
||||||
#endif
|
|
||||||
__FILE__, __LINE__,
|
__FILE__, __LINE__,
|
||||||
nwrite, lastbuf);
|
nwrite, lastbuf);
|
||||||
retval = 1;
|
retval = 1;
|
||||||
@@ -845,7 +833,7 @@ static char buffer[256];
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if defined(__sgi) || defined(linux)
|
#if defined(linux)
|
||||||
|
|
||||||
extern char *
|
extern char *
|
||||||
xflags_to_string(
|
xflags_to_string(
|
||||||
@@ -913,7 +901,7 @@ print_state(
|
|||||||
fprintf(stdout, "dt_blksize %d\n", dmstat->dt_blksize);
|
fprintf(stdout, "dt_blksize %d\n", dmstat->dt_blksize);
|
||||||
fprintf(stdout, "dt_blocks %lld\n", (long long) dmstat->dt_blocks);
|
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_igen %d\n", dmstat->dt_xfs_igen);
|
||||||
fprintf(stdout, "dt_xfs_xflags %s\n",
|
fprintf(stdout, "dt_xfs_xflags %s\n",
|
||||||
xflags_to_string(dmstat->dt_xfs_xflags));
|
xflags_to_string(dmstat->dt_xfs_xflags));
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ check_lockstate(
|
|||||||
errno_msg("Can't query file access rights");
|
errno_msg("Can't query file access rights");
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
#if defined(__sgi) || defined(linux)
|
#if defined(linux)
|
||||||
/*
|
/*
|
||||||
* There are no access rights on the SGI. 1 means it's
|
* There are no access rights on the SGI. 1 means it's
|
||||||
* there.
|
* there.
|
||||||
|
|||||||
@@ -22,9 +22,6 @@
|
|||||||
#ifdef linux
|
#ifdef linux
|
||||||
#include <dmapi.h>
|
#include <dmapi.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef __sgi
|
|
||||||
#include <sys/dmi.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main( int argc, char **argv )
|
main( int argc, char **argv )
|
||||||
|
|||||||
@@ -22,9 +22,6 @@
|
|||||||
#ifdef linux
|
#ifdef linux
|
||||||
#include <dmapi.h>
|
#include <dmapi.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef __sgi
|
|
||||||
#include <sys/dmi.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main( int argc, char **argv )
|
main( int argc, char **argv )
|
||||||
|
|||||||
@@ -22,9 +22,6 @@
|
|||||||
#ifdef linux
|
#ifdef linux
|
||||||
#include <dmapi.h>
|
#include <dmapi.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef __sgi
|
|
||||||
#include <sys/dmi.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main( int argc, char **argv )
|
main( int argc, char **argv )
|
||||||
|
|||||||
@@ -24,9 +24,6 @@
|
|||||||
#ifdef linux
|
#ifdef linux
|
||||||
#include <dmapi.h>
|
#include <dmapi.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef __sgi
|
|
||||||
#include <sys/dmi.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main( int argc, char **argv )
|
main( int argc, char **argv )
|
||||||
|
|||||||
@@ -23,9 +23,6 @@
|
|||||||
#ifdef linux
|
#ifdef linux
|
||||||
#include <dmapi.h>
|
#include <dmapi.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef __sgi
|
|
||||||
#include <sys/dmi.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main( int argc, char **argv )
|
main( int argc, char **argv )
|
||||||
|
|||||||
@@ -22,9 +22,6 @@
|
|||||||
#ifdef linux
|
#ifdef linux
|
||||||
#include <dmapi.h>
|
#include <dmapi.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef __sgi
|
|
||||||
#include <sys/dmi.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main( int argc, char **argv )
|
main( int argc, char **argv )
|
||||||
|
|||||||
@@ -43,11 +43,7 @@ in the call, and sid is the session ID whose attributes you are interested in.
|
|||||||
#define HDR "%s: token %d sequence %d\n"
|
#define HDR "%s: token %d sequence %d\n"
|
||||||
#define VALS "\t%-15s %s\n"
|
#define VALS "\t%-15s %s\n"
|
||||||
#define VALD "\t%-15s %d\n"
|
#define VALD "\t%-15s %d\n"
|
||||||
#ifdef __sgi
|
|
||||||
#define VALLLD "\t%-15s %lld\n"
|
|
||||||
#else
|
|
||||||
#define VALLLD "\t%-15s %ld\n"
|
#define VALLLD "\t%-15s %ld\n"
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef linux
|
#ifndef linux
|
||||||
extern char *sys_errlist[];
|
extern char *sys_errlist[];
|
||||||
|
|||||||
@@ -21,13 +21,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/types.h>
|
#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 <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
|||||||
@@ -965,10 +965,10 @@ set_disposition(
|
|||||||
/* Metadata events. */
|
/* Metadata events. */
|
||||||
|
|
||||||
DMEV_SET(DM_EVENT_ATTRIBUTE, eventlist);
|
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 */
|
DMEV_SET(DM_EVENT_CANCEL, eventlist); /* not supported on SGI */
|
||||||
#endif
|
#endif
|
||||||
#if !defined( __sgi) && !defined(linux)
|
#if !defined(linux)
|
||||||
DMEV_SET(DM_EVENT_CLOSE, eventlist); /* not supported on SGI */
|
DMEV_SET(DM_EVENT_CLOSE, eventlist); /* not supported on SGI */
|
||||||
#endif
|
#endif
|
||||||
DMEV_SET(DM_EVENT_DESTROY, eventlist);
|
DMEV_SET(DM_EVENT_DESTROY, eventlist);
|
||||||
@@ -1051,10 +1051,10 @@ set_events(
|
|||||||
/* Metadata events. */
|
/* Metadata events. */
|
||||||
|
|
||||||
DMEV_SET(DM_EVENT_ATTRIBUTE, eventlist);
|
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 */
|
DMEV_SET(DM_EVENT_CANCEL, eventlist); /* not supported on SGI */
|
||||||
#endif
|
#endif
|
||||||
#if !defined( __sgi) && !defined(linux)
|
#if !defined(linux)
|
||||||
DMEV_SET(DM_EVENT_CLOSE, eventlist); /* not supported on SGI */
|
DMEV_SET(DM_EVENT_CLOSE, eventlist); /* not supported on SGI */
|
||||||
#endif
|
#endif
|
||||||
DMEV_SET(DM_EVENT_DESTROY, eventlist);
|
DMEV_SET(DM_EVENT_DESTROY, eventlist);
|
||||||
|
|||||||
@@ -22,17 +22,10 @@
|
|||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <string.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 <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <lib/dmport.h>
|
#include <lib/dmport.h>
|
||||||
|
|
||||||
char *Progname;
|
char *Progname;
|
||||||
@@ -56,11 +49,6 @@ main(
|
|||||||
int argc,
|
int argc,
|
||||||
char **argv)
|
char **argv)
|
||||||
{
|
{
|
||||||
#ifdef __sgi
|
|
||||||
xfs_fsop_geom_t geom;
|
|
||||||
char *uuid_str;
|
|
||||||
u_int status;
|
|
||||||
#endif
|
|
||||||
char *name;
|
char *name;
|
||||||
int fd;
|
int fd;
|
||||||
void *fshanp;
|
void *fshanp;
|
||||||
@@ -85,15 +73,6 @@ main(
|
|||||||
strerror(errno));
|
strerror(errno));
|
||||||
exit(1);
|
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",
|
fprintf(stdout, "fshandle %s, %s\n",
|
||||||
buffer, argv[1]);
|
buffer, argv[1]);
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|||||||
@@ -123,31 +123,6 @@ main(
|
|||||||
exit(1);
|
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:
|
* RESOLVE KERNEL PRESENCE:
|
||||||
*--------------------------
|
*--------------------------
|
||||||
|
|||||||
@@ -736,7 +736,7 @@ handle_message(
|
|||||||
respcode = ENOSPC;
|
respcode = ENOSPC;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DM_EVENT_DEBUT: /* not supported on SGI */
|
case DM_EVENT_DEBUT:
|
||||||
printf(HDR VALS,
|
printf(HDR VALS,
|
||||||
"debut", msg->ev_token, msg->ev_sequence,
|
"debut", msg->ev_token, msg->ev_sequence,
|
||||||
"object", hans1);
|
"object", hans1);
|
||||||
@@ -843,7 +843,7 @@ handle_message(
|
|||||||
respond = 0;
|
respond = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DM_EVENT_CLOSE: /* not supported on SGI */
|
case DM_EVENT_CLOSE:
|
||||||
printf(HDR VALS,
|
printf(HDR VALS,
|
||||||
"close", msg->ev_token, msg->ev_sequence,
|
"close", msg->ev_token, msg->ev_sequence,
|
||||||
"object", hans1);
|
"object", hans1);
|
||||||
@@ -1024,11 +1024,11 @@ set_disposition(
|
|||||||
/* Metadata events. */
|
/* Metadata events. */
|
||||||
|
|
||||||
DMEV_SET(DM_EVENT_ATTRIBUTE, eventlist);
|
DMEV_SET(DM_EVENT_ATTRIBUTE, eventlist);
|
||||||
#if ! defined ( __sgi ) && ! defined ( VERITAS ) && ! defined(linux)
|
#if !defined(VERITAS) && !defined(linux)
|
||||||
DMEV_SET(DM_EVENT_CANCEL, eventlist); /* not supported on SGI */
|
DMEV_SET(DM_EVENT_CANCEL, eventlist);
|
||||||
#endif
|
#endif
|
||||||
#if !defined(__sgi) && !defined(linux)
|
#if !defined(linux)
|
||||||
DMEV_SET(DM_EVENT_CLOSE, eventlist); /* not supported on SGI */
|
DMEV_SET(DM_EVENT_CLOSE, eventlist);
|
||||||
#endif
|
#endif
|
||||||
DMEV_SET(DM_EVENT_DESTROY, eventlist);
|
DMEV_SET(DM_EVENT_DESTROY, eventlist);
|
||||||
|
|
||||||
@@ -1103,11 +1103,11 @@ set_events(
|
|||||||
/* Metadata events. */
|
/* Metadata events. */
|
||||||
|
|
||||||
DMEV_SET(DM_EVENT_ATTRIBUTE, eventlist);
|
DMEV_SET(DM_EVENT_ATTRIBUTE, eventlist);
|
||||||
#if ! defined ( __sgi ) && ! defined ( VERITAS ) && !defined(linux)
|
#if !defined(VERITAS) && !defined(linux)
|
||||||
DMEV_SET(DM_EVENT_CANCEL, eventlist); /* not supported on SGI */
|
DMEV_SET(DM_EVENT_CANCEL, eventlist);
|
||||||
#endif
|
#endif
|
||||||
#if !defined(__sgi) && !defined(linux)
|
#if !defined(linux)
|
||||||
DMEV_SET(DM_EVENT_CLOSE, eventlist); /* not supported on SGI */
|
DMEV_SET(DM_EVENT_CLOSE, eventlist);
|
||||||
#endif
|
#endif
|
||||||
DMEV_SET(DM_EVENT_DESTROY, eventlist);
|
DMEV_SET(DM_EVENT_DESTROY, eventlist);
|
||||||
|
|
||||||
|
|||||||
@@ -94,18 +94,9 @@ static struct {
|
|||||||
FLAG(PROT_READ, FL_PROT),
|
FLAG(PROT_READ, FL_PROT),
|
||||||
FLAG(PROT_WRITE, FL_PROT),
|
FLAG(PROT_WRITE, FL_PROT),
|
||||||
FLAG(PROT_EXEC, FL_PROT),
|
FLAG(PROT_EXEC, FL_PROT),
|
||||||
#ifdef __sgi
|
|
||||||
FLAG(PROT_EXECUTE, FL_PROT),
|
|
||||||
#endif
|
|
||||||
FLAG(MAP_SHARED, FL_MAP),
|
FLAG(MAP_SHARED, FL_MAP),
|
||||||
FLAG(MAP_PRIVATE, FL_MAP),
|
FLAG(MAP_PRIVATE, FL_MAP),
|
||||||
FLAG(MAP_FIXED, 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),
|
FLAG(MAP_NONE, FL_MAP),
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -145,9 +136,6 @@ main(int argc, char * argv[])
|
|||||||
ifile->flags[FL_PROT].value = PROT_READ;
|
ifile->flags[FL_PROT].value = PROT_READ;
|
||||||
ifile->flags[FL_OPEN].value = O_RDONLY;
|
ifile->flags[FL_OPEN].value = O_RDONLY;
|
||||||
ofile->flags[FL_MAP].value = MAP_SHARED;
|
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_PROT].value = PROT_WRITE;
|
||||||
ofile->flags[FL_OPEN].value = O_RDWR|O_CREAT;
|
ofile->flags[FL_OPEN].value = O_RDWR|O_CREAT;
|
||||||
|
|
||||||
|
|||||||
@@ -210,18 +210,9 @@ main(
|
|||||||
test_file);
|
test_file);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
#ifdef __sgi
|
|
||||||
if ((statbuf.st_atim.tv_sec == checkbuf.st_atim.tv_sec) &&
|
|
||||||
(statbuf.st_atim.tv_nsec == checkbuf.st_atim.tv_nsec) &&
|
|
||||||
(statbuf.st_mtim.tv_sec == checkbuf.st_mtim.tv_sec) &&
|
|
||||||
(statbuf.st_mtim.tv_nsec == checkbuf.st_mtim.tv_nsec) &&
|
|
||||||
(statbuf.st_ctim.tv_sec == checkbuf.st_ctim.tv_sec) &&
|
|
||||||
(statbuf.st_ctim.tv_nsec == checkbuf.st_ctim.tv_nsec))
|
|
||||||
#else
|
|
||||||
if ((statbuf.st_atime == checkbuf.st_atime) &&
|
if ((statbuf.st_atime == checkbuf.st_atime) &&
|
||||||
(statbuf.st_mtime == checkbuf.st_mtime) &&
|
(statbuf.st_mtime == checkbuf.st_mtime) &&
|
||||||
(statbuf.st_ctime == checkbuf.st_ctime))
|
(statbuf.st_ctime == checkbuf.st_ctime))
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
if (Vflag) {
|
if (Vflag) {
|
||||||
printf("Report: time stamp unchanged by write\n");
|
printf("Report: time stamp unchanged by write\n");
|
||||||
@@ -267,18 +258,9 @@ main(
|
|||||||
test_file);
|
test_file);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
#ifdef __sgi
|
|
||||||
if ((statbuf.st_atim.tv_sec == checkbuf.st_atim.tv_sec) &&
|
|
||||||
(statbuf.st_atim.tv_nsec == checkbuf.st_atim.tv_nsec) &&
|
|
||||||
(statbuf.st_mtim.tv_sec == checkbuf.st_mtim.tv_sec) &&
|
|
||||||
(statbuf.st_mtim.tv_nsec == checkbuf.st_mtim.tv_nsec) &&
|
|
||||||
(statbuf.st_ctim.tv_sec == checkbuf.st_ctim.tv_sec) &&
|
|
||||||
(statbuf.st_ctim.tv_nsec == checkbuf.st_ctim.tv_nsec))
|
|
||||||
#else
|
|
||||||
if ((statbuf.st_atime == checkbuf.st_atime) &&
|
if ((statbuf.st_atime == checkbuf.st_atime) &&
|
||||||
(statbuf.st_mtime == checkbuf.st_mtime) &&
|
(statbuf.st_mtime == checkbuf.st_mtime) &&
|
||||||
(statbuf.st_ctime == checkbuf.st_ctime))
|
(statbuf.st_ctime == checkbuf.st_ctime))
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
if (Vflag) {
|
if (Vflag) {
|
||||||
printf("Report: time stamp unchanged by read\n");
|
printf("Report: time stamp unchanged by read\n");
|
||||||
@@ -344,31 +326,6 @@ main(
|
|||||||
printf("Report: \"0x%x\" was written and \"0x%x\" was read "
|
printf("Report: \"0x%x\" was written and \"0x%x\" was read "
|
||||||
"at byte %d million.\n", ch, *(u_char *)bufp, ch);
|
"at byte %d million.\n", ch, *(u_char *)bufp, ch);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __sgi
|
|
||||||
/* Try writing a character in the 2 gigabyte (2^31) range */
|
|
||||||
sprintf(bufp, "%c", ch);
|
|
||||||
if (dm_write_invis(sid, hanp, hlen, DM_NO_TOKEN, 0,
|
|
||||||
2147840000, 1, bufp)==-1){
|
|
||||||
printf("Error invis-writing %s at 2 gigabytes: %s\n",
|
|
||||||
(u_char *)bufp, ERR_NAME);
|
|
||||||
}
|
|
||||||
else if (dm_read_invis(sid, hanp, hlen, DM_NO_TOKEN,
|
|
||||||
2147840000, 1, bufp)==-1){
|
|
||||||
printf("Error invis-reading at 2 gigabytes: %s\n",
|
|
||||||
ERR_NAME);
|
|
||||||
}
|
|
||||||
else if (((u_char *)bufp)[0]!=ch) {
|
|
||||||
printf("Error: wanted to read %c and instead got %s.\n",
|
|
||||||
ch, (u_char *)bufp);
|
|
||||||
}
|
|
||||||
else if (Vflag) {
|
|
||||||
printf("Report: \"0x%x\" was written and \"0x%x\" was read "
|
|
||||||
"at 2147840000 bytes\n\t(a bit over 2 gigabytes).\n",
|
|
||||||
ch, *(u_char *)bufp);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
printf("\t(errno subtests beginning...)\n");
|
printf("\t(errno subtests beginning...)\n");
|
||||||
/**** WRITE tests ****/
|
/**** WRITE tests ****/
|
||||||
/*---------------------------------------------------------*/
|
/*---------------------------------------------------------*/
|
||||||
|
|||||||
@@ -35,23 +35,6 @@
|
|||||||
#define TINFO 16 /* Test information flag */
|
#define TINFO 16 /* Test information flag */
|
||||||
#define TCONF 32 /* Test not appropriate for configuration flag */
|
#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.
|
* Ensure that NUMSIGS is defined.
|
||||||
* It should be defined in signal.h or sys/signal.h on
|
* It should be defined in signal.h or sys/signal.h on
|
||||||
|
|||||||
+1
-39
@@ -23,54 +23,27 @@
|
|||||||
#define LIO_IO_SYNCV 00020 /* single-buffer readv/writev */
|
#define LIO_IO_SYNCV 00020 /* single-buffer readv/writev */
|
||||||
#define LIO_IO_SYNCP 00040 /* pread/pwrite */
|
#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
|
#ifdef linux
|
||||||
#define LIO_IO_TYPES 00021 /* all io types */
|
#define LIO_IO_TYPES 00021 /* all io types */
|
||||||
#endif /* linux */
|
#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_NONE 00010000 /* return asap -- use with care */
|
||||||
#define LIO_WAIT_ACTIVE 00020000 /* spin looking at iosw fields, or EINPROGRESS */
|
#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_RECALL 00040000 /* call recall(2)/aio_suspend(3) */
|
||||||
#define LIO_WAIT_SIGPAUSE 00100000 /* call pause */
|
#define LIO_WAIT_SIGPAUSE 00100000 /* call pause */
|
||||||
#define LIO_WAIT_SIGACTIVE 00200000 /* spin waiting for signal */
|
#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
|
#ifdef linux
|
||||||
#define LIO_WAIT_TYPES 00300000 /* all wait types, except nowait */
|
#define LIO_WAIT_TYPES 00300000 /* all wait types, except nowait */
|
||||||
#endif /* linux */
|
#endif /* linux */
|
||||||
#ifdef CRAY
|
|
||||||
#define LIO_WAIT_TYPES 00360000 /* all wait types, except nowait */
|
|
||||||
#endif /* CRAY */
|
|
||||||
|
|
||||||
/* meta wait io */
|
/* meta wait io */
|
||||||
/* 00 000 0000 */
|
/* 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
|
#ifdef linux
|
||||||
/* all signal wait types */
|
/* all signal wait types */
|
||||||
#define LIO_WAIT_SIGTYPES (LIO_WAIT_SIGPAUSE)
|
#define LIO_WAIT_SIGTYPES (LIO_WAIT_SIGPAUSE)
|
||||||
#endif /* linux */
|
#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.
|
* 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, char *buffer, int size,
|
|||||||
int sig, char **errmsg, long wrd);
|
int sig, char **errmsg, long wrd);
|
||||||
int lio_random_methods(long mask);
|
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
|
* Define the structure that contains the infomation that is used
|
||||||
* by the parsing and help functions.
|
* by the parsing and help functions.
|
||||||
|
|||||||
@@ -89,11 +89,9 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CRAY
|
|
||||||
#ifndef BSIZE
|
#ifndef BSIZE
|
||||||
#define BSIZE BBSIZE
|
#define BSIZE BBSIZE
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* Define option_t structure type.
|
* Define option_t structure type.
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user