From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 1/2] syscalls/stat01, 02, 05: Cleanup && Convert to new API
Date: Tue, 9 Apr 2019 15:33:25 +0200 [thread overview]
Message-ID: <20190409133324.GB19255@rei> (raw)
In-Reply-To: <1554706347-2452-1-git-send-email-xuyang2018.jy@cn.fujitsu.com>
Hi!
Pushed with small simplification, thanks.
diff --git a/testcases/kernel/syscalls/stat/stat01.c b/testcases/kernel/syscalls/stat/stat01.c
index 437ce0cf8..14f1036d5 100644
--- a/testcases/kernel/syscalls/stat/stat01.c
+++ b/testcases/kernel/syscalls/stat/stat01.c
@@ -48,36 +48,31 @@ static void verify_stat(unsigned int n)
}
if (stat_buf.st_uid != user_id) {
- tst_res(TINFO, "stat_buf.st_uid = %i expected %i",
+ tst_res(TFAIL, "stat_buf.st_uid = %i expected %i",
stat_buf.st_uid, user_id);
fail++;
}
if (stat_buf.st_gid != group_id) {
- tst_res(TINFO, "stat_buf.st_gid = %i expected %i",
+ tst_res(TFAIL, "stat_buf.st_gid = %i expected %i",
stat_buf.st_gid, group_id);
fail++;
}
if (stat_buf.st_size != FILE_SIZE) {
- tst_res(TINFO, "stat_buf.st_size = %li expected %i",
+ tst_res(TFAIL, "stat_buf.st_size = %li expected %i",
(long)stat_buf.st_size, FILE_SIZE);
fail++;
}
if ((stat_buf.st_mode & MASK) != tc->mode) {
- tst_res(TINFO, "stat_buf.st_mode = %o expected %o",
+ tst_res(TFAIL, "stat_buf.st_mode = %o expected %o",
(stat_buf.st_mode & MASK), tc->mode);
fail++;
}
- if (fail) {
- tst_res(TFAIL, "functionality of stat(%s) incorrect",
- tc->pathname);
- return;
- }
-
- tst_res(TPASS, "functionality of stat(%s) correct", tc->pathname);
+ if (!fail)
+ tst_res(TPASS, "stat(%s)", tc->pathname);
}
void setup(void)
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2019-04-09 13:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-03 8:29 [LTP] [PATCH 1/2] syscalls/stat01, 02, 05: Cleanup && Convert to new API Yang Xu
2019-04-03 8:29 ` [LTP] [PATCH 2/2] syscalls/stat03, 06: " Yang Xu
2019-04-04 13:19 ` Cyril Hrubis
2019-04-08 6:52 ` [LTP] [PATCH v2 1/2] syscalls/stat01, 02, 05: " Yang Xu
2019-04-08 6:52 ` [LTP] [PATCH v2 2/2] syscalls/stat03, 06: " Yang Xu
2019-04-09 14:22 ` Cyril Hrubis
2019-04-09 13:33 ` Cyril Hrubis [this message]
2019-04-04 12:58 ` [LTP] [PATCH 1/2] syscalls/stat01, 02, 05: " Cyril Hrubis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190409133324.GB19255@rei \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox