summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/mmaptests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/dbtests/mmaptests.cpp')
-rw-r--r--src/mongo/dbtests/mmaptests.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/mongo/dbtests/mmaptests.cpp b/src/mongo/dbtests/mmaptests.cpp
index 20e363c9db0..7741ccfa933 100644
--- a/src/mongo/dbtests/mmaptests.cpp
+++ b/src/mongo/dbtests/mmaptests.cpp
@@ -31,12 +31,13 @@ namespace MMapTests {
const int optOld;
public:
LeakTest() :
- fn( (boost::filesystem::path(dbpath) / "testfile.map").string() ), optOld(cmdLine.durOptions)
+ fn((boost::filesystem::path(storageGlobalParams.dbpath) / "testfile.map").string()),
+ optOld(storageGlobalParams.durOptions)
{
- cmdLine.durOptions = 0; // DurParanoid doesn't make sense with this test
+ storageGlobalParams.durOptions = 0; // DurParanoid doesn't make sense with this test
}
~LeakTest() {
- cmdLine.durOptions = optOld;
+ storageGlobalParams.durOptions = optOld;
try { boost::filesystem::remove(fn); }
catch(...) { }
}
@@ -55,11 +56,11 @@ namespace MMapTests {
char *p = (char *) f.getView();
verify(p);
// write something to the private view as a test
- if( cmdLine.dur )
+ if (storageGlobalParams.dur)
MemoryMappedFile::makeWritable(p, 6);
strcpy(p, "hello");
}
- if( cmdLine.dur ) {
+ if (storageGlobalParams.dur) {
char *w = (char *) f.view_write();
strcpy(w + 6, "world");
}
@@ -86,11 +87,11 @@ namespace MMapTests {
{
char *p = (char *) f.getView();
verify(p);
- if( cmdLine.dur )
+ if (storageGlobalParams.dur)
MemoryMappedFile::makeWritable(p, 4);
strcpy(p, "zzz");
}
- if( cmdLine.dur ) {
+ if (storageGlobalParams.dur) {
char *w = (char *) f.view_write();
if( i % 2 == 0 )
++(*w);