public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/2] syscalls/fchmod05.c: Cleanup && convert to new API
Date: Fri, 9 Nov 2018 19:21:35 +0100	[thread overview]
Message-ID: <20181109182122.GA26178@x230> (raw)
In-Reply-To: <1528975762-10624-2-git-send-email-huangjh.jy@cn.fujitsu.com>

Hi Jinhui,

> Signed-off-by: Jinhui huang <huangjh.jy@cn.fujitsu.com>
> ---
>  testcases/kernel/syscalls/fchmod/fchmod05.c | 238 ++++++----------------------

thanks for your patch!
Merged, with following diff (variables renamed, _GNU_SOURCE and include not needed).


Kind regards,
Petr

@@ -16,12 +16,7 @@
  *  the mode of a directory but fails to set setgid bit on it.
  */
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
 #include <pwd.h>
-#include <grp.h>
 #include <errno.h>
 
 #include "tst_test.h"
@@ -37,7 +32,7 @@ static void verify_fchmod(void)
 	mode_t dir_mode;
 
 	TEST(fchmod(fd, PERMS_DIR));
-	if (TEST_RETURN == -1)
+	if (TST_RET == -1)
 		tst_res(TFAIL | TTERRNO, "fchmod() failed unexpectly");
 
 	SAFE_FSTAT(fd, &stat_buf);
@@ -64,7 +59,7 @@ static void setup(void)
 
 	if (setgroups(1, &ltpuser->pw_gid) == -1) {
 		tst_brk(TBROK, "Couldn't change supplementary group Id: %s",
-			tst_strerrno(TEST_ERRNO));
+			tst_strerrno(TST_ERR));
 	}
 
 	SAFE_CHOWN(TESTDIR, ltpuser->pw_uid, ltpgroup->gr_gid);

  reply	other threads:[~2018-11-09 18:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-14 11:29 [LTP] [PATCH 1/2] syscalls/fchmod03.c: Convert to new API && merge fchmod04 into fchmod03 Jinhui huang
2018-06-14 11:29 ` [LTP] [PATCH 2/2] syscalls/fchmod05.c: Cleanup && convert to new API Jinhui huang
2018-11-09 18:21   ` Petr Vorel [this message]
2018-06-26 15:27 ` [LTP] [PATCH 1/2] syscalls/fchmod03.c: Convert to new API && merge fchmod04 into fchmod03 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=20181109182122.GA26178@x230 \
    --to=pvorel@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