From: Artem Bityutskiy Date: Thu, 26 May 2011 13:04:20 +0000 (+0300) Subject: fs-tests: integck: add some more error messages X-Git-Tag: v1.4.5~32 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=8ed2f6b8bf6465197230b196f013b9cae1308ca8;p=mtd-utils.git fs-tests: integck: add some more error messages Signed-off-by: Artem Bityutskiy --- diff --git a/tests/fs-tests/integrity/integck.c b/tests/fs-tests/integrity/integck.c index e2a878f..54e5ddc 100644 --- a/tests/fs-tests/integrity/integck.c +++ b/tests/fs-tests/integrity/integck.c @@ -1562,7 +1562,10 @@ static void file_check(struct file_info *file, int fd) path = dir_path(file->links->parent, get_file_name(file)); v("checking file %s", path); fd = open(path, O_RDONLY); - CHECK(fd != -1); + if (fd == -1) { + sys_errmsg("cannot open file %s", path); + CHECK(0); + } } else v("checking file %s", get_file_name(file)); @@ -1722,7 +1725,7 @@ static void dir_check(struct dir_info *dir) /* Go through directory on file system checking entries match */ d = opendir(path); if (!d) { - errmsg("cannot open directory %s", path); + sys_errmsg("cannot open directory %s", path); CHECK(0); }