From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v3 2/2] syscalls/lremovexattr: Add lremovexattr() test
Date: Fri, 16 Nov 2018 20:37:47 +0100 [thread overview]
Message-ID: <20181116193747.GA17471@rei.lan> (raw)
In-Reply-To: <20181108183320.11262-2-rafael.tinoco@linaro.org>
Hi!
Pushed with minor changes, see below, thanks.
diff --git a/testcases/kernel/syscalls/lremovexattr/lremovexattr01.c b/testcases/kernel/syscalls/lremovexattr/lremovexattr01.c
index 2cf46ebdf..26194f114 100644
--- a/testcases/kernel/syscalls/lremovexattr/lremovexattr01.c
+++ b/testcases/kernel/syscalls/lremovexattr/lremovexattr01.c
@@ -18,7 +18,7 @@
* Note:
* According to attr(5), extended attributes are interpreted differently from
* regular files, directories and symbolic links. User attributes are only
- * allowed for regular files and directories, thus the need of using security.*
+ * allowed for regular files and directories, thus the need of using trusted.*
* attributes for this test.
*/
@@ -39,7 +39,7 @@
#define ENOATTR ENODATA
-#define XATTR_KEY "security.key1"
+#define XATTR_KEY "trusted.key1"
#define XATTR_VALUE "file and link"
#define XATTR_VALUE_SIZE 13
@@ -79,8 +79,8 @@ static void verify_lremovexattr(void)
return;
}
- if (TST_RET < 0 && TST_ERR != ENOATTR) {
- tst_brk(TBROK, "lgetxattr(2) failed unexpectedly");
+ if (TST_ERR != ENOATTR) {
+ tst_brk(TBROK | TTERRNO, "lgetxattr(2) failed unexpectedly");
return;
}
@@ -111,10 +111,8 @@ static void setup(void)
{
SAFE_TOUCH(FILENAME, 0644, NULL);
- if (symlink(FILENAME, SYMLINK) < 0) {
+ if (symlink(FILENAME, SYMLINK) < 0)
tst_brk(TCONF, "symlink() not supported");
- return;
- }
}
static struct tst_test test = {
I've found that the trusted attributes works as well and cannot be
disabled in kernel (at least for ext3 security attributes have their own
CONFIG switches).
The rest is just removed unreachable or always true code.
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2018-11-16 19:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-01 22:05 [LTP] [PATCH] syscalls/fremovexattr: Add fremovexattr() tests Rafael David Tinoco
2018-11-04 23:45 ` Rafael David Tinoco
2018-11-05 0:25 ` [LTP] [PATCH v2 1/2] " Rafael David Tinoco
2018-11-05 0:25 ` [LTP] [PATCH v2 2/2] syscalls/lremovexattr: Add lremovexattr() test Rafael David Tinoco
2018-11-07 15:38 ` [LTP] [PATCH v2 1/2] syscalls/fremovexattr: Add fremovexattr() tests Cyril Hrubis
2018-11-07 15:50 ` Rafael David Tinoco
2018-11-08 18:33 ` [LTP] [PATCH v3 " Rafael David Tinoco
2018-11-08 18:33 ` [LTP] [PATCH v3 2/2] syscalls/lremovexattr: Add lremovexattr() test Rafael David Tinoco
2018-11-16 19:37 ` Cyril Hrubis [this message]
2018-11-18 13:37 ` Rafael David Tinoco
2018-11-15 16:33 ` [LTP] [PATCH v3 1/2] syscalls/fremovexattr: Add fremovexattr() tests Cyril Hrubis
2018-11-16 0:33 ` Rafael David Tinoco
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=20181116193747.GA17471@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