diff options
author | Chenhao Qu <chenhao.qu@mongodb.com> | 2021-11-24 02:53:01 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-11-24 03:16:45 +0000 |
commit | 72cdc3d05b5c86a3cf3beb41d10a9be5ce7fa11c (patch) | |
tree | 972e5a2705f936a5474bc9507fd786abf40ef6c3 /src/third_party | |
parent | e4712083a8797ce978fe24a6eabec4786e172c98 (diff) | |
download | mongo-72cdc3d05b5c86a3cf3beb41d10a9be5ce7fa11c.tar.gz |
Import wiredtiger: 616084e5deac1055637569b5369db6820aa9e749 from branch mongodb-master
ref: 026d49e992..616084e5de
for: 5.2.0
WT-8385 Fix unused value in test format backup
Diffstat (limited to 'src/third_party')
-rw-r--r-- | src/third_party/wiredtiger/import.data | 2 | ||||
-rw-r--r-- | src/third_party/wiredtiger/test/format/backup.c | 16 |
2 files changed, 7 insertions, 11 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index 9c1a4e171ed..b00f193f6a8 100644 --- a/src/third_party/wiredtiger/import.data +++ b/src/third_party/wiredtiger/import.data @@ -2,5 +2,5 @@ "vendor": "wiredtiger", "github": "wiredtiger/wiredtiger.git", "branch": "mongodb-master", - "commit": "026d49e992bd947db9bd558193721c8cbce58381" + "commit": "616084e5deac1055637569b5369db6820aa9e749" } diff --git a/src/third_party/wiredtiger/test/format/backup.c b/src/third_party/wiredtiger/test/format/backup.c index 3d53b5324f7..d865bd2f12f 100644 --- a/src/third_party/wiredtiger/test/format/backup.c +++ b/src/third_party/wiredtiger/test/format/backup.c @@ -53,19 +53,15 @@ check_copy(void) */ testutil_check(__wt_snprintf(path, len, "%s/%s", g.home, BACKUP_INFO_FILE_TMP)); ret = unlink(path); - /* It is fine if the file does not exist. */ - if (ret == 0 || errno == ENOENT) - ret = 0; - else - testutil_die(errno, "unlink %s", path); + /* Check if unlink command failed. It is fine if the file does not exist. */ + if (ret != 0 && errno != ENOENT) + testutil_die(errno, "unlink command failed with error code: %s", path); testutil_check(__wt_snprintf(path, len, "%s/%s", g.home, BACKUP_INFO_FILE)); ret = unlink(path); - /* It is fine if the file does not exist. */ - if (ret == 0 || errno == ENOENT) - ret = 0; - else - testutil_die(errno, "unlink %s", path); + /* Check if unlink command failed. It is fine if the file does not exist. */ + if (ret != 0 && errno != ENOENT) + testutil_die(errno, "unlink command failed with error code: %s", path); /* Now setup and open the path for real. */ testutil_check(__wt_snprintf(path, len, "%s/BACKUP", g.home)); |