summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/test/test_filejournal.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/test/test_filejournal.cc b/src/test/test_filejournal.cc
index 975233fd22a..5b7576dea39 100644
--- a/src/test/test_filejournal.cc
+++ b/src/test/test_filejournal.cc
@@ -70,8 +70,13 @@ int main(int argc, char **argv) {
finisher = new Finisher(g_ceph_context);
- srand(getpid()+time(0));
- snprintf(path, sizeof(path), "/tmp/test_filejournal.tmp.%d", rand());
+ if (args.size()) {
+ strcpy(path, args[0]);
+ } else {
+ srand(getpid()+time(0));
+ snprintf(path, sizeof(path), "/tmp/test_filejournal.tmp.%d", rand());
+ }
+ cout << "path " << path << std::endl;
::testing::InitGoogleTest(&argc, argv);