public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v5 1/5] safe_macros: add safe_setxattr(), safe_lsetxattr() and safe_fsetxattr()
Date: Tue, 15 Nov 2016 17:47:14 +0100	[thread overview]
Message-ID: <20161115164713.GE24751@rei.lan> (raw)
In-Reply-To: <1479212377-12830-2-git-send-email-dejan.jovicevic@rt-rk.com>

Hi!
> +int safe_setxattr(const char *file, const int lineno, const char *path,
> +				  const char *name, const void *value, size_t size, int flags)
         ^
	 This line is over 80 chars. It looks like you have tab lenght
	 set to 4 spaces. You should set it to 8 when you are working on
	 LTP, Linux kernel, etc.

> +{
> +	int rval;
> +
> +	rval = setxattr(path, name, value, size, flags);
> +
> +	if (rval) {
> +		if (errno == ENOTSUP) {
> +			tst_brkm(TCONF, NULL,
> +				 "%s:%d: no xattr support in fs or mounted "
> +				 "without user_xattr option", file, lineno);
> +		}
> +
> +		tst_brkm(TBROK | TERRNO, NULL, "%s:%d: setxattr() failed",
                                                         ^
							 I would have
							 included the
							 name in the
							 message as
							 well, i.e.:

		tst_brkm(TBROK | TERRNO, NULL, "%s:%d" setxattr(%s, ...) failed"
		         file, lineno, name);
> +			     file, lineno);
> +	}
> +
> +	return rval;
> +}

And the same for the rest of the functions.

Otherwise it's fine.

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2016-11-15 16:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-15 12:19 [LTP] [PATCH v5 0/5] listxattr related calls: new tests and test case Dejan Jovicevic
2016-11-15 12:19 ` [LTP] [PATCH v5 1/5] safe_macros: add safe_setxattr(), safe_lsetxattr() and safe_fsetxattr() Dejan Jovicevic
2016-11-15 16:47   ` Cyril Hrubis [this message]
2016-12-05 15:59   ` Cyril Hrubis
2016-11-15 12:19 ` [LTP] [PATCH v5 2/5] llistxattr: moved to using safe macros Dejan Jovicevic
2016-11-15 12:19 ` [LTP] [PATCH v5 3/5] llistxattr: improved code readability and stability Dejan Jovicevic
2016-12-05 16:02   ` Cyril Hrubis
2016-11-15 12:19 ` [LTP] [PATCH v5 4/5] llistxattr: new testcase for long path name Dejan Jovicevic
2016-11-15 12:19 ` [LTP] [PATCH v5 5/5] flistxattr and listxattr: added tests Dejan Jovicevic

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=20161115164713.GE24751@rei.lan \
    --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