Linux Test Project
 help / color / mirror / Atom feed
* [LTP] [PATCH] syscalls/chown03.c: Remove the redundant pass information
@ 2021-04-28  8:07 Jinhui Huang
  2021-04-28  8:39 ` xuyang2018.jy
  0 siblings, 1 reply; 3+ messages in thread
From: Jinhui Huang @ 2021-04-28  8:07 UTC (permalink / raw)
  To: ltp

When executing testcase chown03_16, the system will report pass information
even if 16-bit version of chown() is not supported, for example:
--------------------------------------------------------------------------
tst_test.c:1313: TINFO: Timeout per run is 0h 05m 00s
chown03.c:48: TPASS: chown03_testfile: expected owner set to (uid=99, gid=0)
chown03.c:58: TPASS: chown03_testfile: expected mode permissions 0106770
/root/ltp/testcases/kernel/syscalls/chown/../utils/compat_tst_16.h:153: TCONF: 16-bit version of chown() is not supported on your platform

Summary:
passed   2
failed   0
broken   0
skipped  1
warnings 0
--------------------------------------------------------------------------

The redundant pass information may mislead testers, so we should remove them.

Signed-off-by: Jinhui Huang <huangjh.jy@cn.fujitsu.com>
---
 testcases/kernel/syscalls/chown/chown03.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/testcases/kernel/syscalls/chown/chown03.c b/testcases/kernel/syscalls/chown/chown03.c
index 8ff2602..ff6e904 100644
--- a/testcases/kernel/syscalls/chown/chown03.c
+++ b/testcases/kernel/syscalls/chown/chown03.c
@@ -43,9 +43,6 @@ static void check_owner(struct stat *s, uid_t exp_uid, gid_t exp_gid)
 		tst_res(TFAIL, "%s: wrong owner set to (uid=%d, gid=%d),"
 			       " expected (uid=%d, gid=%d)",
 			FILENAME, s->st_uid, s->st_gid, exp_uid, exp_gid);
-	else
-		tst_res(TPASS, "%s: expected owner set to (uid=%d, gid=%d)",
-			FILENAME, exp_uid, exp_gid);
 }
 
 static void check_mode(struct stat *s, mode_t exp_mode)
@@ -53,9 +50,6 @@ static void check_mode(struct stat *s, mode_t exp_mode)
 	if (s->st_mode != exp_mode)
 	      tst_res(TFAIL, "%s: wrong mode permissions %#o, expected %#o",
 		      FILENAME, s->st_mode, exp_mode);
-	else
-	      tst_res(TPASS, "%s: expected mode permissions %#o",
-		      FILENAME, s->st_mode);
 }
 
 static void run(void)
-- 
1.8.3.1




^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-29  9:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-28  8:07 [LTP] [PATCH] syscalls/chown03.c: Remove the redundant pass information Jinhui Huang
2021-04-28  8:39 ` xuyang2018.jy
2021-04-29  9:29   ` xuyang2018.jy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox