]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test_filejournal: optionally specify journal filename as an argument
authorSage Weil <sage@inktank.com>
Sat, 29 Dec 2012 00:48:22 +0000 (16:48 -0800)
committerSage Weil <sage@inktank.com>
Wed, 2 Jan 2013 21:39:05 +0000 (13:39 -0800)
Signed-off-by: Sage Weil <sage@inktank.com>
src/test/test_filejournal.cc

index 975233fd22a3d05ddce47d587caac7300e67e01c..5b7576dea39a03b4b1c7929839196c576ef8aeeb 100644 (file)
@@ -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);