diff options
author | Luke Chen <luke.chen@mongodb.com> | 2019-03-25 16:50:07 +1100 |
---|---|---|
committer | Luke Chen <luke.chen@mongodb.com> | 2019-03-25 16:50:07 +1100 |
commit | f4bea6b0f6b247f89929cc0a0558f0bf141e5a72 (patch) | |
tree | 4e6a3828e6315c57a3bdeb51cb7261741d6fb146 /src/third_party/wiredtiger/test/salvage/salvage.c | |
parent | e35e8076dbddc863205cf24517e1b16dc9104d07 (diff) | |
download | mongo-f4bea6b0f6b247f89929cc0a0558f0bf141e5a72.tar.gz |
Import wiredtiger: 67066a329d365cb1de6e198184016d4a9d280679 from branch mongodb-4.2
ref: bb36cf83cd..67066a329d
for: 4.1.10
WT-4324 Ensure checkpoints rewrite pages with data in the future
WT-4609 Extend timestamp usage documentation
WT-4621 Support rounding up prepare timestamp to oldest
WT-4629 Research timestamping and add to test coverage for timestamping
WT-4630 Add Clang Format script
WT-4645 Fill gaps in test coverage regarding transactions
WT-4646 Coverity doesn't like testutil_assert() on fopen calls
WT-4648 Coverity false positive on fopen call
WT-4651 Remove 'incase' from s_string.ok and its uses
WT-4654 Split task for Evergreen Windows build variant to reduce makespan
WT-4655 Avoid C and C++ compiler incompatibilities
Diffstat (limited to 'src/third_party/wiredtiger/test/salvage/salvage.c')
-rw-r--r-- | src/third_party/wiredtiger/test/salvage/salvage.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/third_party/wiredtiger/test/salvage/salvage.c b/src/third_party/wiredtiger/test/salvage/salvage.c index d3429788bfc..06386e5e86e 100644 --- a/src/third_party/wiredtiger/test/salvage/salvage.c +++ b/src/third_party/wiredtiger/test/salvage/salvage.c @@ -160,7 +160,7 @@ run(int r) testutil_make_work_dir(HOME); - testutil_assert((res_fp = fopen(RSLT, "w")) != NULL); + testutil_checksys((res_fp = fopen(RSLT, "w")) == NULL); /* * Each run builds the LOAD file, and then appends the first page of @@ -571,7 +571,7 @@ copy(u_int gen, u_int recno) uint32_t cksum32, gen32; char buf[PSIZE]; - testutil_assert((ifp = fopen(LOAD, "r")) != NULL); + testutil_checksys((ifp = fopen(LOAD, "r")) == NULL); /* * If the salvage file doesn't exist, then we're creating it: @@ -579,9 +579,9 @@ copy(u_int gen, u_int recno) * Otherwise, we are appending to an existing file. */ if (file_exists(SLVG)) - testutil_assert((ofp = fopen(SLVG, "a")) != NULL); + testutil_checksys((ofp = fopen(SLVG, "a")) == NULL); else { - testutil_assert((ofp = fopen(SLVG, "w")) != NULL); + testutil_checksys((ofp = fopen(SLVG, "w")) == NULL); testutil_assert(fread(buf, 1, PSIZE, ifp) == PSIZE); testutil_assert(fwrite(buf, 1, PSIZE, ofp) == PSIZE); } @@ -656,7 +656,7 @@ process(void) testutil_check(conn->close(conn, 0)); /* Dump. */ - testutil_assert((fp = fopen(DUMP, "w")) != NULL); + testutil_checksys((fp = fopen(DUMP, "w")) == NULL); testutil_check(wiredtiger_open(HOME, NULL, config, &conn)); testutil_check(conn->open_session(conn, NULL, NULL, &session)); testutil_check(session->open_cursor( |