test: fileio - make coverity happy

Explicitly check the length of the read.

Fixes CID#1250803.
This commit is contained in:
Tom Gundersen 2014-11-04 16:19:26 +01:00
parent 7c63b23f49
commit 696c24fced

View file

@ -342,7 +342,7 @@ static void test_write_string_file_no_create(void) {
assert_se(write_string_file_no_create("/a/file/which/does/not/exists/i/guess", "boohoo") < 0);
assert_se(write_string_file_no_create(fn, "boohoo") == 0);
assert_se(read(fd, buf, sizeof(buf)));
assert_se(read(fd, buf, sizeof(buf)) == strlen("boohoo\n"));
assert_se(streq(buf, "boohoo\n"));
unlink(fn);