summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2012-12-28 16:48:22 -0800
committerSage Weil <sage@inktank.com>2013-01-02 13:39:05 -0800
commit483c6f76adf960017614a8641c4dcdbd7902ce33 (patch)
tree22cbb84b6f71604da74762d948b0b2cc91784a95
parentc461e7fc1e34fdddd8ff8833693d067451df906b (diff)
downloadceph-483c6f76adf960017614a8641c4dcdbd7902ce33.tar.gz
test_filejournal: optionally specify journal filename as an argument
Signed-off-by: Sage Weil <sage@inktank.com>
-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);