diff options
author | Sage Weil <sage@inktank.com> | 2012-12-28 16:48:22 -0800 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-01-02 13:39:05 -0800 |
commit | 483c6f76adf960017614a8641c4dcdbd7902ce33 (patch) | |
tree | 22cbb84b6f71604da74762d948b0b2cc91784a95 | |
parent | c461e7fc1e34fdddd8ff8833693d067451df906b (diff) | |
download | ceph-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.cc | 9 |
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); |