From: Timo Sirainen Date: Sun, 1 Dec 2019 21:07:14 +0000 (+0200) Subject: test-fs-posix: Check for failed fs_read() error string X-Git-Tag: 2.3.10~204 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e771f2d1e6dab858fcbb4b261f6f555ad4de6384;p=thirdparty%2Fdovecot%2Fcore.git test-fs-posix: Check for failed fs_read() error string --- diff --git a/src/lib-fs/test-fs-posix.c b/src/lib-fs/test-fs-posix.c index 68211790fd..d6fea11e73 100644 --- a/src/lib-fs/test-fs-posix.c +++ b/src/lib-fs/test-fs-posix.c @@ -56,7 +56,8 @@ static void test_fs_posix(void) file = fs_file_init(fs, "fail_1", FS_OPEN_MODE_READONLY); test_assert(fs_exists(file) == 0); count = fs_read(file, buf, 1); - test_assert(count == -1 && errno == ENOENT); + test_assert(count == -1 && errno == ENOENT && + strstr(fs_file_last_error(file), "No such file or directory") != NULL); fs_file_deinit(&file); test_end();