]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
test-fs-posix: Check for failed fs_read() error string
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Sun, 1 Dec 2019 21:07:14 +0000 (23:07 +0200)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Wed, 11 Dec 2019 10:12:30 +0000 (10:12 +0000)
src/lib-fs/test-fs-posix.c

index 68211790fd98ff0bcf5bf77995f48df618b0afa0..d6fea11e735b9ff1e37f4d3d76847d59352fa9c3 100644 (file)
@@ -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();