Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-17895 lnet: Validate input for lnetctl import
[fs/lustre-release.git]
/
lustre
/
tests
/
reads.c
diff --git
a/lustre/tests/reads.c
b/lustre/tests/reads.c
index
e358c57
..
9b1e98e
100644
(file)
--- a/
lustre/tests/reads.c
+++ b/
lustre/tests/reads.c
@@
-25,7
+25,6
@@
*/
/*
* This file is part of Lustre, http://www.lustre.org/
*/
/*
* This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
*
* lustre/tests/reads.c
*
*
* lustre/tests/reads.c
*
@@
-51,10
+50,7
@@
static void usage(void)
{
printf("reads: read random or stride chunks of a file.\n");
printf("Usage:\n\n");
{
printf("reads: read random or stride chunks of a file.\n");
printf("Usage:\n\n");
- printf("reads -f <filename> -s <filesize> -b <buffersize>"
- "-a <adjacent reads> [-v] [-h] [-C] [-l <stride_length> ] "
- "[ -o <stride_offset> ] [-S <seed>] [-n <iterations>]"
- "[-w <width>] [-t <timelimit>]\n");
+ printf("reads -f <filename> -s <filesize> -b <buffersize> -a <adjacent reads> [-v] [-h] [-C] [-l <stride_length> ] [ -o <stride_offset> ] [-S <seed>] [-n <iterations>][-w <width>] [-t <timelimit>]\n");
}
enum {
}
enum {
@@
-124,7
+120,7
@@
int main(int argc, char **argv)
usage();
return RR_PARSE;
case 'v':
usage();
return RR_PARSE;
case 'v':
- verbosity
++;
+ verbosity++;
break;
case 'f':
fname = strdup(optarg);
break;
case 'f':
fname = strdup(optarg);
@@
-132,7
+128,8
@@
int main(int argc, char **argv)
case 's':
size = strtol(optarg, &term, 0);
if (term == optarg) {
case 's':
size = strtol(optarg, &term, 0);
if (term == optarg) {
- fprintf (stderr, "Can't parse size %s\n", optarg);
+ fprintf(stderr, "Can't parse size %s\n",
+ optarg);
usage();
return RR_SET;
}
usage();
return RR_SET;
}
@@
-140,7
+137,8
@@
int main(int argc, char **argv)
case 'b':
bsize = strtol(optarg, &term, 0);
if (term == optarg) {
case 'b':
bsize = strtol(optarg, &term, 0);
if (term == optarg) {
- fprintf (stderr, "Can't parse bsize %s\n", optarg);
+ fprintf(stderr, "Can't parse bsize %s\n",
+ optarg);
usage();
return RR_SET;
}
usage();
return RR_SET;
}
@@
-148,7
+146,8
@@
int main(int argc, char **argv)
case 'a':
ad = (int)strtol(optarg, &term, 0);
if (term == optarg) {
case 'a':
ad = (int)strtol(optarg, &term, 0);
if (term == optarg) {
- fprintf (stderr, "Can't parse ad %s\n", optarg);
+ fprintf(stderr, "Can't parse ad %s\n",
+ optarg);
usage();
return RR_SET;
}
usage();
return RR_SET;
}
@@
-159,7
+158,8
@@
int main(int argc, char **argv)
case 'S':
seed = strtol(optarg, &term, 0);
if (term == optarg) {
case 'S':
seed = strtol(optarg, &term, 0);
if (term == optarg) {
- fprintf (stderr, "Can't parse seed %s\n", optarg);
+ fprintf(stderr, "Can't parse seed %s\n",
+ optarg);
usage();
return RR_SET;
}
usage();
return RR_SET;
}
@@
-167,7
+167,8
@@
int main(int argc, char **argv)
case 'n':
iterations = strtol(optarg, &term, 0);
if (term == optarg) {
case 'n':
iterations = strtol(optarg, &term, 0);
if (term == optarg) {
- fprintf (stderr, "Can't parse seed %s\n", optarg);
+ fprintf(stderr, "Can't parse seed %s\n",
+ optarg);
usage();
return RR_SET;
}
usage();
return RR_SET;
}
@@
-177,23
+178,26
@@
int main(int argc, char **argv)
case 't':
timelimit = strtol(optarg, &term, 0);
if (term == optarg) {
case 't':
timelimit = strtol(optarg, &term, 0);
if (term == optarg) {
- fprintf (stderr, "Can't parse seed %s\n", optarg);
+ fprintf(stderr, "Can't parse seed %s\n",
+ optarg);
usage();
return RR_SET;
}
break;
usage();
return RR_SET;
}
break;
-
case 'l':
-
stride_length = strtol(optarg, &term, 0);
+ case 'l':
+ stride_length = strtol(optarg, &term, 0);
if (term == optarg) {
if (term == optarg) {
- fprintf (stderr, "Can't parse seed %s\n", optarg);
+ fprintf(stderr, "Can't parse seed %s\n",
+ optarg);
usage();
return RR_SET;
}
usage();
return RR_SET;
}
- break;
+ break;
case 'o':
stride_offset = strtol(optarg, &term, 0);
if (term == optarg) {
case 'o':
stride_offset = strtol(optarg, &term, 0);
if (term == optarg) {
- fprintf (stderr, "Can't parse seed %s\n", optarg);
+ fprintf(stderr, "Can't parse seed %s\n",
+ optarg);
usage();
return RR_SET;
}
usage();
return RR_SET;
}
@@
-201,7
+205,8
@@
int main(int argc, char **argv)
case 'w':
width = (int)strtol(optarg, &term, 0);
if (term == optarg) {
case 'w':
width = (int)strtol(optarg, &term, 0);
if (term == optarg) {
- fprintf (stderr, "Can't parse seed %s\n", optarg);
+ fprintf(stderr, "Can't parse seed %s\n",
+ optarg);
usage();
return RR_SET;
}
usage();
return RR_SET;
}
@@
-250,12
+255,12
@@
int main(int argc, char **argv)
srand(seed);
gettimeofday(&start, NULL);
timelimit += start.tv_sec;
srand(seed);
gettimeofday(&start, NULL);
timelimit += start.tv_sec;
- for (i = 0; !iterations || i < iterations; i
++) {
+ for (i = 0; !iterations || i < iterations; i++) {
unsigned long block_nr;
int j;
unsigned long block_nr;
int j;
- if (stride_length)
- block_nr = (unsigned long)(i*stride_length +
+ if (stride_length)
+ block_nr = (unsigned long)(i*stride_length +
stride_offset) % nblocks;
else
block_nr = (unsigned long)((double)nblocks*rand()/
stride_offset) % nblocks;
else
block_nr = (unsigned long)((double)nblocks*rand()/