From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v5 3/5] llistxattr: improved code readability and stability
Date: Mon, 5 Dec 2016 17:02:02 +0100 [thread overview]
Message-ID: <20161205160201.GK22344@rei.lan> (raw)
In-Reply-To: <1479212377-12830-4-git-send-email-dejan.jovicevic@rt-rk.com>
Hi!
> - TEST(llistxattr(t->path, buf, t->size));
> - if (TEST_RETURN != -1) {
> + TEST(llistxattr(t->path, buf, sizeof(buf)));
> + if (TEST_RETURN == 0) {
> tst_res(TFAIL, "llistxattr() succeeded unexpectedly");
> + return;
> + }
I've changed this check back to TEST_RETURN != -1 since the call must
return -1 on failure. The manual page says that it either returns -1 or
size of the copied data. Hence even if it returns -2 it's a bug in
libc/kernel.
And I've did the same change for the newly introduced listxattr() and
flistxattr() tests and pushed the rest of the patchset, thanks.
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2016-12-05 16:02 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
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 [this message]
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=20161205160201.GK22344@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