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-10070 lod: SEL: Repeated components
[fs/lustre-release.git]
/
lustre
/
tests
/
lockahead_test.c
diff --git
a/lustre/tests/lockahead_test.c
b/lustre/tests/lockahead_test.c
index
7e05e31
..
07ce3ab
100644
(file)
--- a/
lustre/tests/lockahead_test.c
+++ b/
lustre/tests/lockahead_test.c
@@
-70,12
+70,11
@@
rc = testfn(); \
fprintf(stderr, "Finishing test " #testfn " at %lld\n", \
(unsigned long long)time(NULL)); \
rc = testfn(); \
fprintf(stderr, "Finishing test " #testfn " at %lld\n", \
(unsigned long long)time(NULL)); \
- cleanup(); \
} while (0)
/* Name of file/directory. Will be set once and will not change. */
static char mainpath[PATH_MAX];
} while (0)
/* Name of file/directory. Will be set once and will not change. */
static char mainpath[PATH_MAX];
-static c
onst char *mainfile = "lockahead_test_654"
;
+static c
har *mainfile
;
static char fsmountdir[PATH_MAX]; /* Lustre mountpoint */
static char *lustre_dir; /* Test directory inside Lustre */
static char fsmountdir[PATH_MAX]; /* Lustre mountpoint */
static char *lustre_dir; /* Test directory inside Lustre */
@@
-1088,8
+1087,11
@@
static void process_args(int argc, char *argv[])
{
int c;
{
int c;
- while ((c = getopt(argc, argv, "d:t:")) != -1) {
+ while ((c = getopt(argc, argv, "d:
f:
t:")) != -1) {
switch (c) {
switch (c) {
+ case 'f':
+ mainfile = optarg;
+ break;
case 'd':
lustre_dir = optarg;
break;
case 'd':
lustre_dir = optarg;
break;
@@
-1113,6
+1115,8
@@
int main(int argc, char *argv[])
process_args(argc, argv);
if (lustre_dir == NULL)
lustre_dir = "/mnt/lustre";
process_args(argc, argv);
if (lustre_dir == NULL)
lustre_dir = "/mnt/lustre";
+ if (mainfile == NULL)
+ mainfile = "lockahead_test_654";
rc = llapi_search_mounts(lustre_dir, 0, fsmountdir, fsname);
if (rc != 0) {
rc = llapi_search_mounts(lustre_dir, 0, fsmountdir, fsname);
if (rc != 0) {
@@
-1131,8
+1135,6
@@
int main(int argc, char *argv[])
ASSERTF(rc > 0 && rc < sizeof(mainpath), "invalid name for mainpath");
cleanup();
ASSERTF(rc > 0 && rc < sizeof(mainpath), "invalid name for mainpath");
cleanup();
- atexit(cleanup);
-
switch (single_test) {
case 0:
PERFORM(test10);
switch (single_test) {
case 0:
PERFORM(test10);