public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/3] llistxattr/llistxattr01.c: add new testcase
@ 2016-01-29  9:08 Xiao Yang
  2016-01-29  9:08 ` [LTP] [PATCH 2/3] llistxattr/llistxattr02.c: " Xiao Yang
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Xiao Yang @ 2016-01-29  9:08 UTC (permalink / raw)
  To: ltp

The testcase checks the basic functionality of the llistxattr(2).
llistxattr(2) retrieves the list of extended attribute names
associated with the link itself in the filesystem.

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---
 runtest/ltplite                                    |   2 +
 runtest/syscalls                                   |   2 +
 testcases/kernel/syscalls/.gitignore               |   1 +
 testcases/kernel/syscalls/llistxattr/Makefile      |  23 +++
 .../kernel/syscalls/llistxattr/llistxattr01.c      | 168 +++++++++++++++++++++
 5 files changed, 196 insertions(+)
 create mode 100644 testcases/kernel/syscalls/llistxattr/Makefile
 create mode 100644 testcases/kernel/syscalls/llistxattr/llistxattr01.c

diff --git a/runtest/ltplite b/runtest/ltplite
index 6ca24c5..0a56c3a 100644
--- a/runtest/ltplite
+++ b/runtest/ltplite
@@ -388,6 +388,8 @@ link08 link08
 
 listen01 listen01
 
+llistxattr01 llistxattr01
+
 llseek01 llseek01
 llseek02 llseek02
 llseek03 llseek03
diff --git a/runtest/syscalls b/runtest/syscalls
index d206831..ffd8be3 100644
--- a/runtest/syscalls
+++ b/runtest/syscalls
@@ -514,6 +514,8 @@ linkat02 linkat02
 
 listen01 listen01
 
+llistxattr01 llistxattr01
+
 llseek01 llseek01
 llseek02 llseek02
 llseek03 llseek03
diff --git a/testcases/kernel/syscalls/.gitignore b/testcases/kernel/syscalls/.gitignore
index 1e0a85f..b283761 100644
--- a/testcases/kernel/syscalls/.gitignore
+++ b/testcases/kernel/syscalls/.gitignore
@@ -474,6 +474,7 @@
 /linkat/linkat01
 /linkat/linkat02
 /listen/listen01
+/llistxattr/llistxattr01
 /llseek/llseek01
 /llseek/llseek02
 /llseek/llseek03
diff --git a/testcases/kernel/syscalls/llistxattr/Makefile b/testcases/kernel/syscalls/llistxattr/Makefile
new file mode 100644
index 0000000..ed05a48
--- /dev/null
+++ b/testcases/kernel/syscalls/llistxattr/Makefile
@@ -0,0 +1,23 @@
+#
+#  Copyright (c) 2016 Fujitsu Ltd.
+#  Author: Xiao Yang <yangx.jy@cn.fujitsu.com>
+#
+#  This program is free software;  you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY;  without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
+#  the GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program.
+#
+
+top_srcdir		?= ../../../..
+
+include $(top_srcdir)/include/mk/testcases.mk
+
+include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/kernel/syscalls/llistxattr/llistxattr01.c b/testcases/kernel/syscalls/llistxattr/llistxattr01.c
new file mode 100644
index 0000000..1f4e6b3
--- /dev/null
+++ b/testcases/kernel/syscalls/llistxattr/llistxattr01.c
@@ -0,0 +1,168 @@
+/*
+* Copyright (c) 2016 Fujitsu Ltd.
+* Author: Xiao Yang <yangx.jy@cn.fujitsu.com>
+*
+* This program is free software; you can redistribute it and/or modify it
+* under the terms of version 2 of the GNU General Public License as
+* published by the Free Software Foundation.
+*
+* This program is distributed in the hope that it would be useful, but
+* WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+*
+* You should have received a copy of the GNU General Public License
+* alone with this program.
+*/
+
+/*
+* Test Name: llistxattr01
+*
+* Description:
+* The testcase checks the basic functionality of the llistxattr(2).
+* llistxattr(2) retrieves the list of extended attribute names
+* associated with the given path in the filesystem. In the case of
+* a symbolic, the path associated with the link itself, not the file
+* that it refers to. The list is the set of (NULL-terminated) names,
+* one after the other. The length of the attribute name list is returned.
+*/
+
+#include "config.h"
+#include <errno.h>
+#include <sys/types.h>
+#include <string.h>
+
+#ifdef HAVE_ATTR_XATTR_H
+#include <attr/xattr.h>
+#endif
+
+#include "test.h"
+#include "safe_macros.h"
+#include "safe_file_ops.h"
+
+char *TCID = "llistxattr01";
+
+#ifdef HAVE_ATTR_XATTR_H
+#define SECURITY_KEY	"security.symtest"
+#define SECURITY_KEY_INIT	"security.selinux"
+#define VALUE	"test"
+#define VALUE_SIZE	4
+#define KEY_SIZE    17
+
+static void verify_llistxattr(void);
+static void setup(void);
+static void cleanup(void);
+
+int TST_TOTAL = 1;
+
+int main(int ac, char **av)
+{
+	int lc;
+
+	tst_parse_opts(ac, av, NULL, NULL);
+
+	setup();
+
+	for (lc = 0; TEST_LOOPING(lc); lc++) {
+		tst_count = 0;
+
+		verify_llistxattr();
+	}
+
+	cleanup();
+	tst_exit();
+}
+
+static void verify_llistxattr(void)
+{
+	int n;
+	int se = 1;
+	int size = 64;
+	char buf[size];
+	char cmp_buf1[size];
+	char cmp_buf2[size];
+
+	/* check selinux initialized attr */
+	n = lgetxattr("symlink", SECURITY_KEY_INIT, NULL, 0);
+	if (n == -1) {
+		if (errno == ENOATTR) {
+			se = 0;
+		} else {
+			tst_brkm(TFAIL | TERRNO, cleanup,
+				 "lgetxattr() failed");
+		}
+	}
+
+	TEST(llistxattr("symlink", buf, size));
+	if (TEST_RETURN == -1) {
+		tst_resm(TFAIL | TTERRNO, "llistxattr() failed");
+		return;
+	}
+
+	if (TEST_RETURN != KEY_SIZE*(1 + se)) {
+		tst_resm(TFAIL, "llistxattr() retrieved %li bytes, "
+			 "expected %i", TEST_RETURN, KEY_SIZE*2);
+		return;
+	}
+
+	/*
+	* The list of names is returned as an unordered array of
+	* NULL-terminated character strings.
+	*/
+	if (se == 1) {
+		memcpy(cmp_buf1, SECURITY_KEY, KEY_SIZE);
+		memcpy(cmp_buf1+KEY_SIZE, SECURITY_KEY_INIT, KEY_SIZE);
+		memcpy(cmp_buf2, SECURITY_KEY_INIT, KEY_SIZE);
+		memcpy(cmp_buf2+KEY_SIZE, SECURITY_KEY, KEY_SIZE);
+
+		if (memcmp(buf, cmp_buf1, KEY_SIZE*(1 + se)) && memcmp(buf, cmp_buf2, KEY_SIZE*(1 + se))) {
+			tst_resm(TFAIL, "name list mismatched");
+			return;
+		}
+	} else {
+		if (memcmp(buf, SECURITY_KEY, KEY_SIZE*(1 + se))) {
+			tst_resm(TFAIL, "name list mismatched");
+			return;
+		}
+	}
+
+	tst_resm(TPASS, "llistxattr() succeeded");
+}
+
+static void setup(void)
+{
+	int n;
+
+	tst_sig(NOFORK, DEF_HANDLER, cleanup);
+
+	TEST_PAUSE;
+
+	tst_tmpdir();
+
+	SAFE_TOUCH(cleanup, "testfile", 0644, NULL);
+
+	SAFE_SYMLINK(cleanup, "testfile", "symlink");
+
+	n = lsetxattr("symlink", SECURITY_KEY, VALUE, VALUE_SIZE, XATTR_CREATE);
+	if (n == -1) {
+		if (errno == ENOTSUP) {
+			tst_brkm(TCONF, cleanup,
+				 "no xattr support in fs or mounted "
+				 "without user_xattr option");
+		} else {
+			tst_brkm(TFAIL | TERRNO, cleanup,
+				 "lsetxattr() failed");
+		}
+	}
+}
+
+static void cleanup(void)
+{
+	tst_rmdir();
+}
+
+#else /* HAVE_ATTR_XATTR_H */
+int main(int ac, char **av)
+{
+	tst_brkm(TCONF, NULL, "<attr/xattr.h> does not exist.");
+}
+#endif
-- 
1.8.3.1




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

* [LTP] [PATCH 2/3] llistxattr/llistxattr02.c: add new testcase
  2016-01-29  9:08 [LTP] [PATCH 1/3] llistxattr/llistxattr01.c: add new testcase Xiao Yang
@ 2016-01-29  9:08 ` Xiao Yang
  2016-02-10 13:41   ` Cyril Hrubis
  2016-01-29  9:08 ` [LTP] [PATCH 3/3] llistxattr/llistxattr03.c: " Xiao Yang
  2016-02-10 14:04 ` [LTP] [PATCH 1/3] llistxattr/llistxattr01.c: " Cyril Hrubis
  2 siblings, 1 reply; 16+ messages in thread
From: Xiao Yang @ 2016-01-29  9:08 UTC (permalink / raw)
  To: ltp

1) llistxattr(2) fails if the size of the list buffer is too small to
   hold the result and set errno to ERANGE.
2) llistxattr(2) fails if path is an empty string and set errno to ENOENT.
3) llistxattr(2) fails when attempted to read from a invalid address and
   set set errno to EFAULT.

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---
 runtest/ltplite                                    |   1 +
 runtest/syscalls                                   |   1 +
 testcases/kernel/syscalls/.gitignore               |   1 +
 .../kernel/syscalls/llistxattr/llistxattr02.c      | 143 +++++++++++++++++++++
 4 files changed, 146 insertions(+)
 create mode 100644 testcases/kernel/syscalls/llistxattr/llistxattr02.c

diff --git a/runtest/ltplite b/runtest/ltplite
index 0a56c3a..f752150 100644
--- a/runtest/ltplite
+++ b/runtest/ltplite
@@ -389,6 +389,7 @@ link08 link08
 listen01 listen01
 
 llistxattr01 llistxattr01
+llistxattr02 llistxattr02
 
 llseek01 llseek01
 llseek02 llseek02
diff --git a/runtest/syscalls b/runtest/syscalls
index ffd8be3..5652da1 100644
--- a/runtest/syscalls
+++ b/runtest/syscalls
@@ -515,6 +515,7 @@ linkat02 linkat02
 listen01 listen01
 
 llistxattr01 llistxattr01
+llistxattr02 llistxattr02
 
 llseek01 llseek01
 llseek02 llseek02
diff --git a/testcases/kernel/syscalls/.gitignore b/testcases/kernel/syscalls/.gitignore
index b283761..053c067 100644
--- a/testcases/kernel/syscalls/.gitignore
+++ b/testcases/kernel/syscalls/.gitignore
@@ -475,6 +475,7 @@
 /linkat/linkat02
 /listen/listen01
 /llistxattr/llistxattr01
+/llistxattr/llistxattr02
 /llseek/llseek01
 /llseek/llseek02
 /llseek/llseek03
diff --git a/testcases/kernel/syscalls/llistxattr/llistxattr02.c b/testcases/kernel/syscalls/llistxattr/llistxattr02.c
new file mode 100644
index 0000000..d40b619
--- /dev/null
+++ b/testcases/kernel/syscalls/llistxattr/llistxattr02.c
@@ -0,0 +1,143 @@
+/*
+* Copyright (c) 2016 Fujitsu Ltd.
+* Author: Xiao Yang <yangx.jy@cn.fujitsu.com>
+*
+* This program is free software; you can redistribute it and/or modify it
+* under the terms of version 2 of the GNU General Public License as
+* published by the Free Software Foundation.
+*
+* This program is distributed in the hope that it would be useful, but
+* WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+*
+* You should have received a copy of the GNU General Public License
+* alone with this program.
+*/
+
+/*
+* Test Name: llistxattr02
+*
+* Description:
+* 1) llistxattr(2) fails if the size of the list buffer is too small
+* to hold the result.
+* 2) llistxattr(2) fails if path is an empty string.
+* 3) llistxattr(2) fails when attempted to read from a invalid address.
+*
+* Expected Result:
+* 1) llistxattr(2) should return -1 and set errno to ERANGE.
+* 2) llistxattr(2) should return -1 and set errno to ENOENT.
+* 3) llistxattr(2) should return -1 and set errno to EFAULT.
+*/
+
+#include "config.h"
+#include <errno.h>
+#include <sys/types.h>
+
+#ifdef HAVE_ATTR_XATTR_H
+#include <attr/xattr.h>
+#endif
+
+#include "test.h"
+#include "safe_macros.h"
+#include "safe_file_ops.h"
+
+char *TCID = "llistxattr02";
+
+#ifdef HAVE_ATTR_XATTR_H
+#define SECURITY_KEY	"security.symtest"
+#define VALUE	"test"
+#define VALUE_SIZE	4
+
+static struct test_case {
+	const char *path;
+	size_t size;
+	int exp_err;
+} tc[] = {
+	/* test1 */
+	{"symlink", 1, ERANGE},
+	/* test2 */
+	{"", 20, ENOENT},
+	/* test3 */
+	{NULL, 20, EFAULT}
+};
+
+static void verify_llistxattr(struct test_case *tc);
+static void setup(void);
+static void cleanup(void);
+
+int TST_TOTAL = ARRAY_SIZE(tc);
+
+int main(int ac, char **av)
+{
+	int lc;
+	int i;
+
+	tst_parse_opts(ac, av, NULL, NULL);
+
+	setup();
+
+	for (lc = 0; TEST_LOOPING(lc); lc++) {
+		tst_count = 0;
+		for (i = 0; i < TST_TOTAL; i++)
+			verify_llistxattr(&tc[i]);
+	}
+
+	cleanup();
+	tst_exit();
+}
+
+static void verify_llistxattr(struct test_case *tc)
+{
+	char buf[tc->size];
+
+	TEST(llistxattr(tc->path, buf, tc->size));
+	if (TEST_RETURN != -1) {
+		tst_resm(TFAIL, "llistxattr() succeeded unexpectedly");
+	} else {
+		if (TEST_ERRNO != tc->exp_err) {
+			tst_resm(TFAIL | TTERRNO, "llistxattr() failed "
+				 "unexpectedlly, expected errno is %s",
+				 tst_strerrno(tc->exp_err));
+		} else {
+			tst_resm(TPASS | TTERRNO,
+				 "llistxattr() failed as expected");
+		}
+	}
+}
+
+static void setup(void)
+{
+	int n;
+
+	tst_sig(NOFORK, DEF_HANDLER, cleanup);
+
+	TEST_PAUSE;
+
+	tst_tmpdir();
+
+	SAFE_TOUCH(cleanup, "testfile", 0644, NULL);
+
+	SAFE_SYMLINK(cleanup, "testfile", "symlink");
+
+	n = lsetxattr("symlink", SECURITY_KEY, VALUE, VALUE_SIZE, XATTR_CREATE);
+	if (n == -1) {
+		if (errno == ENOTSUP) {
+			tst_brkm(TCONF, cleanup, "no xattr support in fs or "
+				 "mounted without user_xattr option");
+		} else {
+			tst_brkm(TFAIL | TERRNO, cleanup, "lsetxattr() failed");
+		}
+	}
+}
+
+static void cleanup(void)
+{
+	tst_rmdir();
+}
+
+#else /* HAVE_ATTR_XATTR_H */
+int main(int ac, char **av)
+{
+	tst_brkm(TCONF, NULL, "<attr/xattr.h> does not exist.");
+}
+#endif
-- 
1.8.3.1




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

* [LTP] [PATCH 3/3] llistxattr/llistxattr03.c: add new testcase
  2016-01-29  9:08 [LTP] [PATCH 1/3] llistxattr/llistxattr01.c: add new testcase Xiao Yang
  2016-01-29  9:08 ` [LTP] [PATCH 2/3] llistxattr/llistxattr02.c: " Xiao Yang
@ 2016-01-29  9:08 ` Xiao Yang
  2016-02-10 14:12   ` Cyril Hrubis
  2016-02-10 14:04 ` [LTP] [PATCH 1/3] llistxattr/llistxattr01.c: " Cyril Hrubis
  2 siblings, 1 reply; 16+ messages in thread
From: Xiao Yang @ 2016-01-29  9:08 UTC (permalink / raw)
  To: ltp

llistxattr(2) with an empty buffer of size zero can return
the current size of the list of extended attribute names.

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---
 runtest/ltplite                                    |   1 +
 runtest/syscalls                                   |   1 +
 testcases/kernel/syscalls/.gitignore               |   1 +
 .../kernel/syscalls/llistxattr/llistxattr03.c      | 133 +++++++++++++++++++++
 4 files changed, 136 insertions(+)
 create mode 100644 testcases/kernel/syscalls/llistxattr/llistxattr03.c

diff --git a/runtest/ltplite b/runtest/ltplite
index f752150..bc2541b 100644
--- a/runtest/ltplite
+++ b/runtest/ltplite
@@ -390,6 +390,7 @@ listen01 listen01
 
 llistxattr01 llistxattr01
 llistxattr02 llistxattr02
+llistxattr03 llistxattr03
 
 llseek01 llseek01
 llseek02 llseek02
diff --git a/runtest/syscalls b/runtest/syscalls
index 5652da1..06a8cc2 100644
--- a/runtest/syscalls
+++ b/runtest/syscalls
@@ -516,6 +516,7 @@ listen01 listen01
 
 llistxattr01 llistxattr01
 llistxattr02 llistxattr02
+llistxattr03 llistxattr03
 
 llseek01 llseek01
 llseek02 llseek02
diff --git a/testcases/kernel/syscalls/.gitignore b/testcases/kernel/syscalls/.gitignore
index 053c067..e902ad8 100644
--- a/testcases/kernel/syscalls/.gitignore
+++ b/testcases/kernel/syscalls/.gitignore
@@ -476,6 +476,7 @@
 /listen/listen01
 /llistxattr/llistxattr01
 /llistxattr/llistxattr02
+/llistxattr/llistxattr03
 /llseek/llseek01
 /llseek/llseek02
 /llseek/llseek03
diff --git a/testcases/kernel/syscalls/llistxattr/llistxattr03.c b/testcases/kernel/syscalls/llistxattr/llistxattr03.c
new file mode 100644
index 0000000..dd5ab52
--- /dev/null
+++ b/testcases/kernel/syscalls/llistxattr/llistxattr03.c
@@ -0,0 +1,133 @@
+/*
+* Copyright (c) 2016 Fujitsu Ltd.
+* Author: Xiao Yang <yangx.jy@cn.fujitsu.com>
+*
+* This program is free software; you can redistribute it and/or modify it
+* under the terms of version 2 of the GNU General Public License as
+* published by the Free Software Foundation.
+*
+* This program is distributed in the hope that it would be useful, but
+* WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+*
+* You should have received a copy of the GNU General Public License
+* alone with this program.
+*/
+
+/*
+* Test Name: llistxattr03
+*
+* Description:
+* llistxattr(2) with an empty buffer of size zero can return
+* the current size of the list of extended attribute names.
+*/
+
+#include "config.h"
+#include <errno.h>
+#include <sys/types.h>
+
+#ifdef HAVE_ATTR_XATTR_H
+#include <attr/xattr.h>
+#endif
+
+#include "test.h"
+#include "safe_macros.h"
+#include "safe_file_ops.h"
+
+char *TCID = "llistxattr03";
+
+#ifdef HAVE_ATTR_XATTR_H
+#define SECURITY_KEY	"security.symtest"
+#define SECURITY_KEY_INIT	"security.selinux"
+#define VALUE	"test"
+#define VALUE_SIZE	4
+#define KEY_SIZE	17
+
+static void verify_llistxattr(void);
+static void setup(void);
+static void cleanup(void);
+
+int TST_TOTAL = 1;
+
+int main(int ac, char **av)
+{
+	int lc;
+
+	tst_parse_opts(ac, av, NULL, NULL);
+
+	setup();
+
+	for (lc = 0; TEST_LOOPING(lc); lc++) {
+		tst_count = 0;
+
+		verify_llistxattr();
+	}
+
+	cleanup();
+	tst_exit();
+}
+
+static void verify_llistxattr(void)
+{
+	int se = 1;
+	int n;
+
+	/* check selinux initialized attr */
+	n = lgetxattr("symlink", SECURITY_KEY_INIT, NULL, 0);
+	if (n == -1) {
+		if (errno == ENOATTR) {
+			se = 0;
+		} else {
+			tst_brkm(TFAIL | TERRNO, cleanup,
+				 "lgetxattr() failed");
+		}
+	}
+
+	TEST(llistxattr("symlink", NULL, 0));
+	if (TEST_RETURN == -1) {
+		tst_resm(TFAIL | TTERRNO, "llistxattr() failed");
+		return;
+	}
+
+	if (TEST_RETURN == KEY_SIZE*(1 + se))
+		tst_resm(TPASS, "llistxattr() returned the size successfully");
+	else
+		tst_resm(TFAIL, "llistxattr() failed to return the size");
+}
+
+static void setup(void)
+{
+	int n;
+
+	tst_sig(NOFORK, DEF_HANDLER, cleanup);
+
+	TEST_PAUSE;
+
+	tst_tmpdir();
+
+	SAFE_TOUCH(cleanup, "testfile", 0644, NULL);
+
+	SAFE_SYMLINK(cleanup, "testfile", "symlink");
+
+	n = lsetxattr("symlink", SECURITY_KEY, VALUE, VALUE_SIZE, XATTR_CREATE);
+	if (n == -1) {
+		if (errno == ENOTSUP) {
+			tst_brkm(TCONF, cleanup, "no xattr support in fs or "
+				 "mounted without user_xattr option");
+		} else {
+			tst_brkm(TFAIL | TERRNO, cleanup, "lsetxattr() failed");
+		}
+	}
+}
+
+static void cleanup(void)
+{
+	tst_rmdir();
+}
+
+#else /* HAVE_ATTR_XATTR_H */
+int main(int ac, char **av)
+{
+	tst_brkm(TCONF, NULL, "<attr/xattr.h> does not exist.");
+}
+#endif
-- 
1.8.3.1




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

* [LTP] [PATCH 2/3] llistxattr/llistxattr02.c: add new testcase
  2016-01-29  9:08 ` [LTP] [PATCH 2/3] llistxattr/llistxattr02.c: " Xiao Yang
@ 2016-02-10 13:41   ` Cyril Hrubis
  0 siblings, 0 replies; 16+ messages in thread
From: Cyril Hrubis @ 2016-02-10 13:41 UTC (permalink / raw)
  To: ltp

Hi!
> +static struct test_case {
> +	const char *path;
> +	size_t size;
> +	int exp_err;
> +} tc[] = {
> +	/* test1 */
> +	{"symlink", 1, ERANGE},
> +	/* test2 */
> +	{"", 20, ENOENT},
> +	/* test3 */
> +	{NULL, 20, EFAULT}

You should use (char *)-1 instead of NULL. AFAIK on sparc there is some
system mapping at NULL and the call will overwrite it.

> +};

Otherwise it looks good.

-- 
Cyril Hrubis
chrubis@suse.cz

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

* [LTP] [PATCH 1/3] llistxattr/llistxattr01.c: add new testcase
  2016-01-29  9:08 [LTP] [PATCH 1/3] llistxattr/llistxattr01.c: add new testcase Xiao Yang
  2016-01-29  9:08 ` [LTP] [PATCH 2/3] llistxattr/llistxattr02.c: " Xiao Yang
  2016-01-29  9:08 ` [LTP] [PATCH 3/3] llistxattr/llistxattr03.c: " Xiao Yang
@ 2016-02-10 14:04 ` Cyril Hrubis
  2016-02-18 10:02   ` Xiao Yang
  2 siblings, 1 reply; 16+ messages in thread
From: Cyril Hrubis @ 2016-02-10 14:04 UTC (permalink / raw)
  To: ltp

Hi!
> +#ifdef HAVE_ATTR_XATTR_H
> +#define SECURITY_KEY   "security.symtest"
                                     ^

			   Why symtest, I would preffere to have 'ltp'
                           substring in everything that testcases create
                           so that is clear where it came from

> +#define SECURITY_KEY_INIT      "security.selinux"
> +#define VALUE  "test"
> +#define VALUE_SIZE     4
> +#define KEY_SIZE    17


> +static void verify_llistxattr(void)
> +{
> +	int n;
> +	int se = 1;
> +	int size = 64;
> +	char buf[size];
> +	char cmp_buf1[size];
> +	char cmp_buf2[size];
> +
> +	/* check selinux initialized attr */
> +	n = lgetxattr("symlink", SECURITY_KEY_INIT, NULL, 0);
> +	if (n == -1) {
> +		if (errno == ENOATTR) {
> +			se = 0;
> +		} else {
> +			tst_brkm(TFAIL | TERRNO, cleanup,
> +				 "lgetxattr() failed");
> +		}
> +	}

I do not like the special case for seliux here. What we should do
instead is to:

* Create file/symlink and store it's attribute list

* Add an attribute

* Check that the list has exactly one more attribute

* Remove the file/symlink


And there should be a comment that selinux adds default attribute to
newly created files/symlinks.


> +	TEST(llistxattr("symlink", buf, size));
> +	if (TEST_RETURN == -1) {
> +		tst_resm(TFAIL | TTERRNO, "llistxattr() failed");
> +		return;
> +	}
> +
> +	if (TEST_RETURN != KEY_SIZE*(1 + se)) {
> +		tst_resm(TFAIL, "llistxattr() retrieved %li bytes, "
> +			 "expected %i", TEST_RETURN, KEY_SIZE*2);
> +		return;
> +	}
> +
> +	/*
> +	* The list of names is returned as an unordered array of
> +	* NULL-terminated character strings.
> +	*/
> +	if (se == 1) {
> +		memcpy(cmp_buf1, SECURITY_KEY, KEY_SIZE);
> +		memcpy(cmp_buf1+KEY_SIZE, SECURITY_KEY_INIT, KEY_SIZE);
> +		memcpy(cmp_buf2, SECURITY_KEY_INIT, KEY_SIZE);
> +		memcpy(cmp_buf2+KEY_SIZE, SECURITY_KEY, KEY_SIZE);
> +
> +		if (memcmp(buf, cmp_buf1, KEY_SIZE*(1 + se)) && memcmp(buf, cmp_buf2, KEY_SIZE*(1 + se))) {
> +			tst_resm(TFAIL, "name list mismatched");
> +			return;
> +		}
> +	} else {
> +		if (memcmp(buf, SECURITY_KEY, KEY_SIZE*(1 + se))) {
> +			tst_resm(TFAIL, "name list mismatched");
> +			return;
> +		}
> +	}

If you have actually checked that the list has 2 attributes all you
need to do here is to check that it includes both attributes.

All you need is a function that takes attribute list and checks that
there is attribute included, i.e.

int has_attribute(const char *list, unsigned int llen, const char *attr)
{
	unsigned int i;

	for (i = 0; i < llen; i += strlen(list + i) + 1) {
		if (!strcmp(list+i, attr))
			return 1;
	}

	return 0;
}

...
	if (!has_attribute(buf, size, attr_1)) {
		tst_resm(TFAIL, "Missing attribute %s", attr_1);
		return;
	}

	if (!has_attribute(buf, size, attr_2)) {
...


-- 
Cyril Hrubis
chrubis@suse.cz

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

* [LTP] [PATCH 3/3] llistxattr/llistxattr03.c: add new testcase
  2016-01-29  9:08 ` [LTP] [PATCH 3/3] llistxattr/llistxattr03.c: " Xiao Yang
@ 2016-02-10 14:12   ` Cyril Hrubis
  0 siblings, 0 replies; 16+ messages in thread
From: Cyril Hrubis @ 2016-02-10 14:12 UTC (permalink / raw)
  To: ltp

Hi!
> diff --git a/testcases/kernel/syscalls/llistxattr/llistxattr03.c b/testcases/kernel/syscalls/llistxattr/llistxattr03.c
> new file mode 100644
> index 0000000..dd5ab52
> --- /dev/null
> +++ b/testcases/kernel/syscalls/llistxattr/llistxattr03.c
> @@ -0,0 +1,133 @@
> +/*
> +* Copyright (c) 2016 Fujitsu Ltd.
> +* Author: Xiao Yang <yangx.jy@cn.fujitsu.com>
> +*
> +* This program is free software; you can redistribute it and/or modify it
> +* under the terms of version 2 of the GNU General Public License as
> +* published by the Free Software Foundation.
> +*
> +* This program is distributed in the hope that it would be useful, but
> +* WITHOUT ANY WARRANTY; without even the implied warranty of
> +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> +*
> +* You should have received a copy of the GNU General Public License
> +* alone with this program.
> +*/
> +
> +/*
> +* Test Name: llistxattr03
> +*
> +* Description:
> +* llistxattr(2) with an empty buffer of size zero can return
> +* the current size of the list of extended attribute names.
> +*/
> +
> +#include "config.h"
> +#include <errno.h>
> +#include <sys/types.h>
> +
> +#ifdef HAVE_ATTR_XATTR_H
> +#include <attr/xattr.h>
> +#endif
> +
> +#include "test.h"
> +#include "safe_macros.h"
> +#include "safe_file_ops.h"
> +
> +char *TCID = "llistxattr03";
> +
> +#ifdef HAVE_ATTR_XATTR_H
> +#define SECURITY_KEY	"security.symtest"
> +#define SECURITY_KEY_INIT	"security.selinux"
> +#define VALUE	"test"
> +#define VALUE_SIZE	4
> +#define KEY_SIZE	17
> +
> +static void verify_llistxattr(void);
> +static void setup(void);
> +static void cleanup(void);
> +
> +int TST_TOTAL = 1;
> +
> +int main(int ac, char **av)
> +{
> +	int lc;
> +
> +	tst_parse_opts(ac, av, NULL, NULL);
> +
> +	setup();
> +
> +	for (lc = 0; TEST_LOOPING(lc); lc++) {
> +		tst_count = 0;
> +
> +		verify_llistxattr();
> +	}
> +
> +	cleanup();
> +	tst_exit();
> +}
> +
> +static void verify_llistxattr(void)
> +{
> +	int se = 1;
> +	int n;
> +
> +	/* check selinux initialized attr */
> +	n = lgetxattr("symlink", SECURITY_KEY_INIT, NULL, 0);
> +	if (n == -1) {
> +		if (errno == ENOATTR) {
> +			se = 0;
> +		} else {
> +			tst_brkm(TFAIL | TERRNO, cleanup,
> +				 "lgetxattr() failed");
> +		}
> +	}
> +
> +	TEST(llistxattr("symlink", NULL, 0));
> +	if (TEST_RETURN == -1) {
> +		tst_resm(TFAIL | TTERRNO, "llistxattr() failed");
> +		return;
> +	}
> +
> +	if (TEST_RETURN == KEY_SIZE*(1 + se))
> +		tst_resm(TPASS, "llistxattr() returned the size successfully");
> +	else
> +		tst_resm(TFAIL, "llistxattr() failed to return the size");

Hmm, why don't we just call llistxattr() with zero size and then check
that it succeds with allocated buffer of a size of the return value and
fails for a buffer that is one byte smaller?

There is no need for special cases like this.

> +}
> +
> +static void setup(void)
> +{
> +	int n;
> +
> +	tst_sig(NOFORK, DEF_HANDLER, cleanup);
> +
> +	TEST_PAUSE;
> +
> +	tst_tmpdir();
> +
> +	SAFE_TOUCH(cleanup, "testfile", 0644, NULL);
> +
> +	SAFE_SYMLINK(cleanup, "testfile", "symlink");
> +
> +	n = lsetxattr("symlink", SECURITY_KEY, VALUE, VALUE_SIZE, XATTR_CREATE);

Why the symlink here? I understand that in the first test you want to
make sure that the atrribute from symlink is read. (you should probably
add some attributes for the file there, and maybe try with broken
symlink as well)

But here you just check that it returns a size for a suitable buffer.

> +	if (n == -1) {
> +		if (errno == ENOTSUP) {
> +			tst_brkm(TCONF, cleanup, "no xattr support in fs or "
> +				 "mounted without user_xattr option");
> +		} else {
> +			tst_brkm(TFAIL | TERRNO, cleanup, "lsetxattr() failed");
> +		}
> +	}
> +}

-- 
Cyril Hrubis
chrubis@suse.cz

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

* [LTP] [PATCH 1/3] llistxattr/llistxattr01.c: add new testcase
  2016-02-10 14:04 ` [LTP] [PATCH 1/3] llistxattr/llistxattr01.c: " Cyril Hrubis
@ 2016-02-18 10:02   ` Xiao Yang
  2016-02-18 12:03     ` Cyril Hrubis
  0 siblings, 1 reply; 16+ messages in thread
From: Xiao Yang @ 2016-02-18 10:02 UTC (permalink / raw)
  To: ltp

? 2016/02/10 22:04, Cyril Hrubis ??:
> Hi!
>> +#ifdef HAVE_ATTR_XATTR_H
>> +#define SECURITY_KEY   "security.symtest"
>                                       ^
>
> 			   Why symtest, I would preffere to have 'ltp'
>                             substring in everything that testcases create
>                             so that is clear where it came from
>
>> +#define SECURITY_KEY_INIT      "security.selinux"
>> +#define VALUE  "test"
>> +#define VALUE_SIZE     4
>> +#define KEY_SIZE    17
>
>> +static void verify_llistxattr(void)
>> +{
>> +	int n;
>> +	int se = 1;
>> +	int size = 64;
>> +	char buf[size];
>> +	char cmp_buf1[size];
>> +	char cmp_buf2[size];
>> +
>> +	/* check selinux initialized attr */
>> +	n = lgetxattr("symlink", SECURITY_KEY_INIT, NULL, 0);
>> +	if (n == -1) {
>> +		if (errno == ENOATTR) {
>> +			se = 0;
>> +		} else {
>> +			tst_brkm(TFAIL | TERRNO, cleanup,
>> +				 "lgetxattr() failed");
>> +		}
>> +	}
> I do not like the special case for seliux here. What we should do
> instead is to:
>
> * Create file/symlink and store it's attribute list
>
> * Add an attribute
>
> * Check that the list has exactly one more attribute
>
> * Remove the file/symlink
>
>
If we don't check that selinux adds default attribute to symlinks, What 
about the return value.

We're not going to judge the size of  the extended attribute name list. 
That's OK?

> And there should be a comment that selinux adds default attribute to
> newly created files/symlinks.
>
>
>> +	TEST(llistxattr("symlink", buf, size));
>> +	if (TEST_RETURN == -1) {
>> +		tst_resm(TFAIL | TTERRNO, "llistxattr() failed");
>> +		return;
>> +	}
>> +
>> +	if (TEST_RETURN != KEY_SIZE*(1 + se)) {
>> +		tst_resm(TFAIL, "llistxattr() retrieved %li bytes, "
>> +			 "expected %i", TEST_RETURN, KEY_SIZE*2);
>> +		return;
>> +	}
>> +
>> +	/*
>> +	* The list of names is returned as an unordered array of
>> +	* NULL-terminated character strings.
>> +	*/
>> +	if (se == 1) {
>> +		memcpy(cmp_buf1, SECURITY_KEY, KEY_SIZE);
>> +		memcpy(cmp_buf1+KEY_SIZE, SECURITY_KEY_INIT, KEY_SIZE);
>> +		memcpy(cmp_buf2, SECURITY_KEY_INIT, KEY_SIZE);
>> +		memcpy(cmp_buf2+KEY_SIZE, SECURITY_KEY, KEY_SIZE);
>> +
>> +		if (memcmp(buf, cmp_buf1, KEY_SIZE*(1 + se))&&  memcmp(buf, cmp_buf2, KEY_SIZE*(1 + se))) {
>> +			tst_resm(TFAIL, "name list mismatched");
>> +			return;
>> +		}
>> +	} else {
>> +		if (memcmp(buf, SECURITY_KEY, KEY_SIZE*(1 + se))) {
>> +			tst_resm(TFAIL, "name list mismatched");
>> +			return;
>> +		}
>> +	}
> If you have actually checked that the list has 2 attributes all you
> need to do here is to check that it includes both attributes.
>
> All you need is a function that takes attribute list and checks that
> there is attribute included, i.e.
>
> int has_attribute(const char *list, unsigned int llen, const char *attr)
> {
> 	unsigned int i;
>
> 	for (i = 0; i<  llen; i += strlen(list + i) + 1) {
> 		if (!strcmp(list+i, attr))
> 			return 1;
> 	}
>
> 	return 0;
> }
>
> ...
> 	if (!has_attribute(buf, size, attr_1)) {
> 		tst_resm(TFAIL, "Missing attribute %s", attr_1);
> 		return;
> 	}
>
> 	if (!has_attribute(buf, size, attr_2)) {
> ...
>
>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20160218/30c84406/attachment.html>

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

* [LTP] [PATCH 1/3] llistxattr/llistxattr01.c: add new testcase
  2016-02-18 10:02   ` Xiao Yang
@ 2016-02-18 12:03     ` Cyril Hrubis
  2016-02-19  4:55       ` [LTP] [PATCH v2 " Xiao Yang
  0 siblings, 1 reply; 16+ messages in thread
From: Cyril Hrubis @ 2016-02-18 12:03 UTC (permalink / raw)
  To: ltp

Hi!
> > I do not like the special case for seliux here. What we should do
> > instead is to:
> >
> > * Create file/symlink and store it's attribute list
> >
> > * Add an attribute
> >
> > * Check that the list has exactly one more attribute
> >
> > * Remove the file/symlink
> >
> >
> If we don't check that selinux adds default attribute to symlinks, What 
> about the return value.
> 
> We're not going to judge the size of  the extended attribute name list. 
> That's OK?

By "Check that the list has exactly one more attribute" I meant that we
compare the result to the previous state. If we store the attribute list
right after the symlink was created we can check if the increase in list
size is as expected. Or is there a reason why we can't do this?

-- 
Cyril Hrubis
chrubis@suse.cz

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

* [LTP] [PATCH v2 1/3] llistxattr/llistxattr01.c: add new testcase
  2016-02-18 12:03     ` Cyril Hrubis
@ 2016-02-19  4:55       ` Xiao Yang
  2016-02-19  4:55         ` [LTP] [PATCH v2 2/3] llistxattr/llistxattr02.c: " Xiao Yang
                           ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Xiao Yang @ 2016-02-19  4:55 UTC (permalink / raw)
  To: ltp

The testcase checks the basic functionality of the llistxattr(2).
llistxattr(2) retrieves the list of extended attribute names
associated with the link itself in the filesystem.

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---
 runtest/ltplite                                    |   2 +
 runtest/syscalls                                   |   2 +
 testcases/kernel/syscalls/.gitignore               |   1 +
 testcases/kernel/syscalls/llistxattr/Makefile      |  23 +++
 .../kernel/syscalls/llistxattr/llistxattr01.c      | 159 +++++++++++++++++++++
 5 files changed, 187 insertions(+)
 create mode 100644 testcases/kernel/syscalls/llistxattr/Makefile
 create mode 100644 testcases/kernel/syscalls/llistxattr/llistxattr01.c

diff --git a/runtest/ltplite b/runtest/ltplite
index 89accc4..de7cecb 100644
--- a/runtest/ltplite
+++ b/runtest/ltplite
@@ -387,6 +387,8 @@ link08 link08
 
 listen01 listen01
 
+llistxattr01 llistxattr01
+
 llseek01 llseek01
 llseek02 llseek02
 llseek03 llseek03
diff --git a/runtest/syscalls b/runtest/syscalls
index 5f169a3..c48dd92 100644
--- a/runtest/syscalls
+++ b/runtest/syscalls
@@ -513,6 +513,8 @@ linkat02 linkat02
 
 listen01 listen01
 
+llistxattr01 llistxattr01
+
 llseek01 llseek01
 llseek02 llseek02
 llseek03 llseek03
diff --git a/testcases/kernel/syscalls/.gitignore b/testcases/kernel/syscalls/.gitignore
index de403e4..47f2fc8 100644
--- a/testcases/kernel/syscalls/.gitignore
+++ b/testcases/kernel/syscalls/.gitignore
@@ -473,6 +473,7 @@
 /linkat/linkat01
 /linkat/linkat02
 /listen/listen01
+/llistxattr/llistxattr01
 /llseek/llseek01
 /llseek/llseek02
 /llseek/llseek03
diff --git a/testcases/kernel/syscalls/llistxattr/Makefile b/testcases/kernel/syscalls/llistxattr/Makefile
new file mode 100644
index 0000000..ed05a48
--- /dev/null
+++ b/testcases/kernel/syscalls/llistxattr/Makefile
@@ -0,0 +1,23 @@
+#
+#  Copyright (c) 2016 Fujitsu Ltd.
+#  Author: Xiao Yang <yangx.jy@cn.fujitsu.com>
+#
+#  This program is free software;  you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY;  without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
+#  the GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program.
+#
+
+top_srcdir		?= ../../../..
+
+include $(top_srcdir)/include/mk/testcases.mk
+
+include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/kernel/syscalls/llistxattr/llistxattr01.c b/testcases/kernel/syscalls/llistxattr/llistxattr01.c
new file mode 100644
index 0000000..0bf6f25
--- /dev/null
+++ b/testcases/kernel/syscalls/llistxattr/llistxattr01.c
@@ -0,0 +1,159 @@
+/*
+* Copyright (c) 2016 Fujitsu Ltd.
+* Author: Xiao Yang <yangx.jy@cn.fujitsu.com>
+*
+* This program is free software; you can redistribute it and/or modify it
+* under the terms of version 2 of the GNU General Public License as
+* published by the Free Software Foundation.
+*
+* This program is distributed in the hope that it would be useful, but
+* WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+*
+* You should have received a copy of the GNU General Public License
+* alone with this program.
+*/
+
+/*
+* Test Name: llistxattr01
+*
+* Description:
+* The testcase checks the basic functionality of the llistxattr(2).
+* llistxattr(2) retrieves the list of extended attribute names
+* associated with the link itself in the filesystem.
+*
+*/
+
+#include "config.h"
+#include <errno.h>
+#include <sys/types.h>
+#include <string.h>
+
+#ifdef HAVE_ATTR_XATTR_H
+#include <attr/xattr.h>
+#endif
+
+#include "test.h"
+#include "safe_macros.h"
+#include "safe_file_ops.h"
+
+char *TCID = "llistxattr01";
+
+#ifdef HAVE_ATTR_XATTR_H
+#define SECURITY_KEY1	"security.ltptest1"
+#define SECURITY_KEY2	"security.ltptest2"
+#define VALUE	"test"
+#define VALUE_SIZE	4
+#define KEY_SIZE    17
+
+static void verify_llistxattr(void);
+static void setup(void);
+static void set_xattr(const char *, const char *);
+static int has_attribute(const char *, int, const char *);
+static void cleanup(void);
+
+int TST_TOTAL = 1;
+
+int main(int ac, char **av)
+{
+	int lc;
+
+	tst_parse_opts(ac, av, NULL, NULL);
+
+	setup();
+
+	for (lc = 0; TEST_LOOPING(lc); lc++) {
+		tst_count = 0;
+
+		verify_llistxattr();
+	}
+
+	cleanup();
+	tst_exit();
+}
+
+static void verify_llistxattr(void)
+{
+	int size = 64;
+	char buf[size];
+
+	TEST(llistxattr("symlink", buf, size));
+	if (TEST_RETURN == -1) {
+		tst_resm(TFAIL | TERRNO, "llistxattr() failed");
+		return;
+	}
+
+	if (has_attribute(buf, size, SECURITY_KEY1)) {
+		tst_resm(TFAIL, "get file attribute %s unexpectlly",
+			 SECURITY_KEY1);
+		return;
+	}
+
+	if (!has_attribute(buf, size, SECURITY_KEY2)) {
+		tst_resm(TFAIL, "missing attribute %s", SECURITY_KEY2);
+		return;
+	}
+
+	tst_resm(TPASS, "llistxattr() succeeded");
+}
+
+static void setup(void)
+{
+	tst_sig(NOFORK, DEF_HANDLER, cleanup);
+
+	TEST_PAUSE;
+
+	tst_tmpdir();
+
+	SAFE_TOUCH(cleanup, "testfile", 0644, NULL);
+
+	SAFE_SYMLINK(cleanup, "testfile", "symlink");
+
+	set_xattr("testfile", SECURITY_KEY1);
+
+	set_xattr("symlink", SECURITY_KEY2);
+}
+
+static void set_xattr(const char *path, const char *key)
+{
+	int n;
+
+	n = lsetxattr(path, key, VALUE, VALUE_SIZE, XATTR_CREATE);
+	if (n == -1) {
+		if (errno == ENOTSUP) {
+			tst_brkm(TCONF, cleanup,
+				 "no xattr support in fs or mounted "
+				 "without user_xattr option");
+		}
+
+		if (errno == EEXIST) {
+			tst_brkm(TFAIL, cleanup, "exist attribute %s", key);
+		} else {
+			tst_brkm(TFAIL | TERRNO, cleanup,
+				 "lsetxattr() failed");
+		}
+	}
+}
+
+static int has_attribute(const char *list, int llen, const char *attr)
+{
+	int i;
+
+	for (i = 0; i < llen; i += strlen(list + i) + 1) {
+		if (!strcmp(list + i, attr))
+			return 1;
+	}
+	return 0;
+}
+
+static void cleanup(void)
+{
+	tst_rmdir();
+}
+
+#else /* HAVE_ATTR_XATTR_H */
+int main(int ac, char **av)
+{
+	tst_brkm(TCONF, NULL, "<attr/xattr.h> does not exist.");
+}
+#endif
-- 
1.8.3.1




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

* [LTP] [PATCH v2 2/3] llistxattr/llistxattr02.c: add new testcase
  2016-02-19  4:55       ` [LTP] [PATCH v2 " Xiao Yang
@ 2016-02-19  4:55         ` Xiao Yang
  2016-02-24 13:54           ` Cyril Hrubis
  2016-02-19  4:55         ` [LTP] [PATCH v2 3/3] llistxattr/llistxattr03.c: " Xiao Yang
  2016-02-24 13:38         ` [LTP] [PATCH v2 1/3] llistxattr/llistxattr01.c: " Cyril Hrubis
  2 siblings, 1 reply; 16+ messages in thread
From: Xiao Yang @ 2016-02-19  4:55 UTC (permalink / raw)
  To: ltp

1) llistxattr(2) fails if the size of the list buffer is too small to
   hold the result and set errno to ERANGE.
2) llistxattr(2) fails if path is an empty string and set errno to ENOENT.
3) llistxattr(2) fails when attempted to read from a invalid address and
   set set errno to EFAULT.

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---
 runtest/ltplite                                    |   1 +
 runtest/syscalls                                   |   1 +
 testcases/kernel/syscalls/.gitignore               |   1 +
 .../kernel/syscalls/llistxattr/llistxattr02.c      | 143 +++++++++++++++++++++
 4 files changed, 146 insertions(+)
 create mode 100644 testcases/kernel/syscalls/llistxattr/llistxattr02.c

diff --git a/runtest/ltplite b/runtest/ltplite
index de7cecb..ea18c22 100644
--- a/runtest/ltplite
+++ b/runtest/ltplite
@@ -388,6 +388,7 @@ link08 link08
 listen01 listen01
 
 llistxattr01 llistxattr01
+llistxattr02 llistxattr02
 
 llseek01 llseek01
 llseek02 llseek02
diff --git a/runtest/syscalls b/runtest/syscalls
index c48dd92..a986a4e 100644
--- a/runtest/syscalls
+++ b/runtest/syscalls
@@ -514,6 +514,7 @@ linkat02 linkat02
 listen01 listen01
 
 llistxattr01 llistxattr01
+llistxattr02 llistxattr02
 
 llseek01 llseek01
 llseek02 llseek02
diff --git a/testcases/kernel/syscalls/.gitignore b/testcases/kernel/syscalls/.gitignore
index 47f2fc8..1762c14 100644
--- a/testcases/kernel/syscalls/.gitignore
+++ b/testcases/kernel/syscalls/.gitignore
@@ -474,6 +474,7 @@
 /linkat/linkat02
 /listen/listen01
 /llistxattr/llistxattr01
+/llistxattr/llistxattr02
 /llseek/llseek01
 /llseek/llseek02
 /llseek/llseek03
diff --git a/testcases/kernel/syscalls/llistxattr/llistxattr02.c b/testcases/kernel/syscalls/llistxattr/llistxattr02.c
new file mode 100644
index 0000000..cf53275
--- /dev/null
+++ b/testcases/kernel/syscalls/llistxattr/llistxattr02.c
@@ -0,0 +1,143 @@
+/*
+* Copyright (c) 2016 Fujitsu Ltd.
+* Author: Xiao Yang <yangx.jy@cn.fujitsu.com>
+*
+* This program is free software; you can redistribute it and/or modify it
+* under the terms of version 2 of the GNU General Public License as
+* published by the Free Software Foundation.
+*
+* This program is distributed in the hope that it would be useful, but
+* WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+*
+* You should have received a copy of the GNU General Public License
+* alone with this program.
+*/
+
+/*
+* Test Name: llistxattr02
+*
+* Description:
+* 1) llistxattr(2) fails if the size of the list buffer is too small
+* to hold the result.
+* 2) llistxattr(2) fails if path is an empty string.
+* 3) llistxattr(2) fails when attempted to read from a invalid address.
+*
+* Expected Result:
+* 1) llistxattr(2) should return -1 and set errno to ERANGE.
+* 2) llistxattr(2) should return -1 and set errno to ENOENT.
+* 3) llistxattr(2) should return -1 and set errno to EFAULT.
+*/
+
+#include "config.h"
+#include <errno.h>
+#include <sys/types.h>
+
+#ifdef HAVE_ATTR_XATTR_H
+#include <attr/xattr.h>
+#endif
+
+#include "test.h"
+#include "safe_macros.h"
+#include "safe_file_ops.h"
+
+char *TCID = "llistxattr02";
+
+#ifdef HAVE_ATTR_XATTR_H
+#define SECURITY_KEY	"security.ltptest"
+#define VALUE	"test"
+#define VALUE_SIZE	4
+
+static struct test_case {
+	const char *path;
+	size_t size;
+	int exp_err;
+} tc[] = {
+	/* test1 */
+	{"symlink", 1, ERANGE},
+	/* test2 */
+	{"", 20, ENOENT},
+	/* test3 */
+	{(char *)-1, 20, EFAULT}
+};
+
+static void verify_llistxattr(struct test_case *tc);
+static void setup(void);
+static void cleanup(void);
+
+int TST_TOTAL = ARRAY_SIZE(tc);
+
+int main(int ac, char **av)
+{
+	int lc;
+	int i;
+
+	tst_parse_opts(ac, av, NULL, NULL);
+
+	setup();
+
+	for (lc = 0; TEST_LOOPING(lc); lc++) {
+		tst_count = 0;
+		for (i = 0; i < TST_TOTAL; i++)
+			verify_llistxattr(&tc[i]);
+	}
+
+	cleanup();
+	tst_exit();
+}
+
+static void verify_llistxattr(struct test_case *tc)
+{
+	char buf[tc->size];
+
+	TEST(llistxattr(tc->path, buf, tc->size));
+	if (TEST_RETURN != -1) {
+		tst_resm(TFAIL, "llistxattr() succeeded unexpectedly");
+	} else {
+		if (TEST_ERRNO != tc->exp_err) {
+			tst_resm(TFAIL | TTERRNO, "llistxattr() failed "
+				 "unexpectedlly, expected %s",
+				 tst_strerrno(tc->exp_err));
+		} else {
+			tst_resm(TPASS | TTERRNO,
+				 "llistxattr() failed as expected");
+		}
+	}
+}
+
+static void setup(void)
+{
+	int n;
+
+	tst_sig(NOFORK, DEF_HANDLER, cleanup);
+
+	TEST_PAUSE;
+
+	tst_tmpdir();
+
+	SAFE_TOUCH(cleanup, "testfile", 0644, NULL);
+
+	SAFE_SYMLINK(cleanup, "testfile", "symlink");
+
+	n = lsetxattr("symlink", SECURITY_KEY, VALUE, VALUE_SIZE, XATTR_CREATE);
+	if (n == -1) {
+		if (errno == ENOTSUP) {
+			tst_brkm(TCONF, cleanup, "no xattr support in fs or "
+				 "mounted without user_xattr option");
+		} else {
+			tst_brkm(TFAIL | TERRNO, cleanup, "lsetxattr() failed");
+		}
+	}
+}
+
+static void cleanup(void)
+{
+	tst_rmdir();
+}
+
+#else /* HAVE_ATTR_XATTR_H */
+int main(int ac, char **av)
+{
+	tst_brkm(TCONF, NULL, "<attr/xattr.h> does not exist.");
+}
+#endif
-- 
1.8.3.1




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

* [LTP] [PATCH v2 3/3] llistxattr/llistxattr03.c: add new testcase
  2016-02-19  4:55       ` [LTP] [PATCH v2 " Xiao Yang
  2016-02-19  4:55         ` [LTP] [PATCH v2 2/3] llistxattr/llistxattr02.c: " Xiao Yang
@ 2016-02-19  4:55         ` Xiao Yang
  2016-02-24 14:28           ` Cyril Hrubis
  2016-02-24 13:38         ` [LTP] [PATCH v2 1/3] llistxattr/llistxattr01.c: " Cyril Hrubis
  2 siblings, 1 reply; 16+ messages in thread
From: Xiao Yang @ 2016-02-19  4:55 UTC (permalink / raw)
  To: ltp

llistxattr() is identical to listxattr(), we call llistxattr() with
zero size and check that it returns value which is suitable size of
buffer to hold the name list.

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---
 runtest/ltplite                                    |   1 +
 runtest/syscalls                                   |   1 +
 testcases/kernel/syscalls/.gitignore               |   1 +
 .../kernel/syscalls/llistxattr/llistxattr03.c      | 114 +++++++++++++++++++++
 4 files changed, 117 insertions(+)
 create mode 100644 testcases/kernel/syscalls/llistxattr/llistxattr03.c

diff --git a/runtest/ltplite b/runtest/ltplite
index ea18c22..d9a362d 100644
--- a/runtest/ltplite
+++ b/runtest/ltplite
@@ -389,6 +389,7 @@ listen01 listen01
 
 llistxattr01 llistxattr01
 llistxattr02 llistxattr02
+llistxattr03 llistxattr03
 
 llseek01 llseek01
 llseek02 llseek02
diff --git a/runtest/syscalls b/runtest/syscalls
index a986a4e..d1abf16 100644
--- a/runtest/syscalls
+++ b/runtest/syscalls
@@ -515,6 +515,7 @@ listen01 listen01
 
 llistxattr01 llistxattr01
 llistxattr02 llistxattr02
+llistxattr03 llistxattr03
 
 llseek01 llseek01
 llseek02 llseek02
diff --git a/testcases/kernel/syscalls/.gitignore b/testcases/kernel/syscalls/.gitignore
index 1762c14..f5ea349 100644
--- a/testcases/kernel/syscalls/.gitignore
+++ b/testcases/kernel/syscalls/.gitignore
@@ -475,6 +475,7 @@
 /listen/listen01
 /llistxattr/llistxattr01
 /llistxattr/llistxattr02
+/llistxattr/llistxattr03
 /llseek/llseek01
 /llseek/llseek02
 /llseek/llseek03
diff --git a/testcases/kernel/syscalls/llistxattr/llistxattr03.c b/testcases/kernel/syscalls/llistxattr/llistxattr03.c
new file mode 100644
index 0000000..2c5792f
--- /dev/null
+++ b/testcases/kernel/syscalls/llistxattr/llistxattr03.c
@@ -0,0 +1,114 @@
+/*
+* Copyright (c) 2016 Fujitsu Ltd.
+* Author: Xiao Yang <yangx.jy@cn.fujitsu.com>
+*
+* This program is free software; you can redistribute it and/or modify it
+* under the terms of version 2 of the GNU General Public License as
+* published by the Free Software Foundation.
+*
+* This program is distributed in the hope that it would be useful, but
+* WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+*
+* You should have received a copy of the GNU General Public License
+* alone with this program.
+*/
+
+/*
+* Test Name: llistxattr03
+*
+* Description:
+* llistxattr is identical to listxattr. an empty buffer of size zero
+* can return the current size of the list of extended attribute names,
+* which can be used to estimate a suitable buffer.
+*/
+
+#include "config.h"
+#include <errno.h>
+#include <sys/types.h>
+
+#ifdef HAVE_ATTR_XATTR_H
+#include <attr/xattr.h>
+#endif
+
+#include "test.h"
+#include "safe_macros.h"
+#include "safe_file_ops.h"
+
+char *TCID = "llistxattr03";
+
+#ifdef HAVE_ATTR_XATTR_H
+
+static void verify_llistxattr(void);
+static void setup(void);
+static int check_suitable_buf(long);
+static void cleanup(void);
+
+int TST_TOTAL = 1;
+
+int main(int ac, char **av)
+{
+	int lc;
+
+	tst_parse_opts(ac, av, NULL, NULL);
+
+	setup();
+
+	for (lc = 0; TEST_LOOPING(lc); lc++) {
+		tst_count = 0;
+
+		verify_llistxattr();
+	}
+
+	cleanup();
+	tst_exit();
+}
+
+static void verify_llistxattr(void)
+{
+	TEST(llistxattr("testfile", NULL, 0));
+	if (TEST_RETURN == -1) {
+		tst_resm(TFAIL | TERRNO, "llistxattr() failed");
+		return;
+	}
+
+	if (check_suitable_buf(TEST_RETURN))
+		tst_resm(TPASS, "llistxattr() succeed with suitable buffer");
+	else
+		tst_resm(TFAIL, "llistxattr() failed with small buffer");
+}
+
+static void setup(void)
+{
+	tst_sig(NOFORK, DEF_HANDLER, cleanup);
+
+	TEST_PAUSE;
+
+	tst_tmpdir();
+
+	SAFE_TOUCH(cleanup, "testfile", 0644, NULL);
+}
+
+static int check_suitable_buf(long size)
+{
+	int n;
+	char buf[size];
+
+	n = llistxattr("testfile", buf, size);
+	if (n == -1)
+		return 0;
+	else
+		return 1;
+}
+
+static void cleanup(void)
+{
+	tst_rmdir();
+}
+
+#else /* HAVE_ATTR_XATTR_H */
+int main(int ac, char **av)
+{
+	tst_brkm(TCONF, NULL, "<attr/xattr.h> does not exist.");
+}
+#endif
-- 
1.8.3.1




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

* [LTP] [PATCH v2 1/3] llistxattr/llistxattr01.c: add new testcase
  2016-02-19  4:55       ` [LTP] [PATCH v2 " Xiao Yang
  2016-02-19  4:55         ` [LTP] [PATCH v2 2/3] llistxattr/llistxattr02.c: " Xiao Yang
  2016-02-19  4:55         ` [LTP] [PATCH v2 3/3] llistxattr/llistxattr03.c: " Xiao Yang
@ 2016-02-24 13:38         ` Cyril Hrubis
  2 siblings, 0 replies; 16+ messages in thread
From: Cyril Hrubis @ 2016-02-24 13:38 UTC (permalink / raw)
  To: ltp

Hi!
> The testcase checks the basic functionality of the llistxattr(2).
> llistxattr(2) retrieves the list of extended attribute names
> associated with the link itself in the filesystem.

I've added tst_require_root() into the test setup, since modifying
attrinbutes in security namespace requires it.

> +static void set_xattr(const char *path, const char *key)
> +{
> +	int n;
> +
> +	n = lsetxattr(path, key, VALUE, VALUE_SIZE, XATTR_CREATE);
> +	if (n == -1) {
> +		if (errno == ENOTSUP) {
> +			tst_brkm(TCONF, cleanup,
> +				 "no xattr support in fs or mounted "
> +				 "without user_xattr option");
> +		}
> +
> +		if (errno == EEXIST) {
> +			tst_brkm(TFAIL, cleanup, "exist attribute %s", key);
> +		} else {
> +			tst_brkm(TFAIL | TERRNO, cleanup,
> +				 "lsetxattr() failed");

And changed these two to TBROK since it's more "test broken in setup"
rather than "test assertion failed".

And pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

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

* [LTP] [PATCH v2 2/3] llistxattr/llistxattr02.c: add new testcase
  2016-02-19  4:55         ` [LTP] [PATCH v2 2/3] llistxattr/llistxattr02.c: " Xiao Yang
@ 2016-02-24 13:54           ` Cyril Hrubis
  0 siblings, 0 replies; 16+ messages in thread
From: Cyril Hrubis @ 2016-02-24 13:54 UTC (permalink / raw)
  To: ltp

Hi!
Pushed with the same changes, added tst_require_root() and changed TFAIL
to TBROK in setup(). Thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

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

* [LTP] [PATCH v2 3/3] llistxattr/llistxattr03.c: add new testcase
  2016-02-19  4:55         ` [LTP] [PATCH v2 3/3] llistxattr/llistxattr03.c: " Xiao Yang
@ 2016-02-24 14:28           ` Cyril Hrubis
  2016-02-25  3:55             ` [LTP] [PATCH v3] " Xiao Yang
  0 siblings, 1 reply; 16+ messages in thread
From: Cyril Hrubis @ 2016-02-24 14:28 UTC (permalink / raw)
  To: ltp

Hi!
> +static void verify_llistxattr(void)
> +{
> +	TEST(llistxattr("testfile", NULL, 0));
> +	if (TEST_RETURN == -1) {
> +		tst_resm(TFAIL | TERRNO, "llistxattr() failed");
> +		return;
> +	}

For me the call returns 0 here.

Can we create another file with some attribute in the setup as well so
that we can test both with no attributes (zero sized buffer) and with
non-zero one?

Otherwise it looks fine.

-- 
Cyril Hrubis
chrubis@suse.cz

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

* [LTP] [PATCH v3] llistxattr/llistxattr03.c: add new testcase
  2016-02-24 14:28           ` Cyril Hrubis
@ 2016-02-25  3:55             ` Xiao Yang
  2016-02-25 11:21               ` Cyril Hrubis
  0 siblings, 1 reply; 16+ messages in thread
From: Xiao Yang @ 2016-02-25  3:55 UTC (permalink / raw)
  To: ltp

llistxattr() is identical to listxattr(), we call llistxattr() with
zero size and check that it returns value which is suitable size of
buffer to hold the name list.

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---
 runtest/ltplite                                    |   1 +
 runtest/syscalls                                   |   1 +
 testcases/kernel/syscalls/.gitignore               |   1 +
 .../kernel/syscalls/llistxattr/llistxattr03.c      | 137 +++++++++++++++++++++
 4 files changed, 140 insertions(+)
 create mode 100644 testcases/kernel/syscalls/llistxattr/llistxattr03.c

diff --git a/runtest/ltplite b/runtest/ltplite
index 7766404..3e32aef 100644
--- a/runtest/ltplite
+++ b/runtest/ltplite
@@ -391,6 +391,7 @@ listen01 listen01
 
 llistxattr01 llistxattr01
 llistxattr02 llistxattr02
+llistxattr03 llistxattr03
 
 llseek01 llseek01
 llseek02 llseek02
diff --git a/runtest/syscalls b/runtest/syscalls
index 375a810..cb1b3ef 100644
--- a/runtest/syscalls
+++ b/runtest/syscalls
@@ -516,6 +516,7 @@ listen01 listen01
 
 llistxattr01 llistxattr01
 llistxattr02 llistxattr02
+llistxattr03 llistxattr03
 
 llseek01 llseek01
 llseek02 llseek02
diff --git a/testcases/kernel/syscalls/.gitignore b/testcases/kernel/syscalls/.gitignore
index f53c76c..e61294b 100644
--- a/testcases/kernel/syscalls/.gitignore
+++ b/testcases/kernel/syscalls/.gitignore
@@ -476,6 +476,7 @@
 /listen/listen01
 /llistxattr/llistxattr01
 /llistxattr/llistxattr02
+/llistxattr/llistxattr03
 /llseek/llseek01
 /llseek/llseek02
 /llseek/llseek03
diff --git a/testcases/kernel/syscalls/llistxattr/llistxattr03.c b/testcases/kernel/syscalls/llistxattr/llistxattr03.c
new file mode 100644
index 0000000..300966b
--- /dev/null
+++ b/testcases/kernel/syscalls/llistxattr/llistxattr03.c
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2016 Fujitsu Ltd.
+* Author: Xiao Yang <yangx.jy@cn.fujitsu.com>
+*
+* This program is free software; you can redistribute it and/or modify it
+* under the terms of version 2 of the GNU General Public License as
+* published by the Free Software Foundation.
+*
+* This program is distributed in the hope that it would be useful, but
+* WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+*
+* You should have received a copy of the GNU General Public License
+* alone with this program.
+*/
+
+/*
+* Test Name: llistxattr03
+*
+* Description:
+* llistxattr is identical to listxattr. an empty buffer of size zero
+* can return the current size of the list of extended attribute names,
+* which can be used to estimate a suitable buffer.
+*/
+
+#include "config.h"
+#include <errno.h>
+#include <sys/types.h>
+
+#ifdef HAVE_ATTR_XATTR_H
+#include <attr/xattr.h>
+#endif
+
+#include "test.h"
+#include "safe_file_ops.h"
+
+char *TCID = "llistxattr03";
+
+#ifdef HAVE_ATTR_XATTR_H
+
+#define SECURITY_KEY	"security.ltptest"
+#define VALUE	"test"
+#define VALUE_SIZE	4
+
+static char *filename[2] = {"testfile1", "testfile2"};
+
+static void verify_llistxattr(char *);
+static void setup(void);
+static int check_suitable_buf(char *, long);
+static void cleanup(void);
+
+int TST_TOTAL = ARRAY_SIZE(filename);
+
+int main(int ac, char **av)
+{
+	int lc;
+	int i;
+
+	tst_parse_opts(ac, av, NULL, NULL);
+
+	setup();
+
+	for (lc = 0; TEST_LOOPING(lc); lc++) {
+		tst_count = 0;
+
+		for (i = 0; i < TST_TOTAL; i++)
+			verify_llistxattr(filename[i]);
+	}
+
+	cleanup();
+	tst_exit();
+}
+
+static void verify_llistxattr(char *name)
+{
+	TEST(llistxattr(name, NULL, 0));
+	if (TEST_RETURN == -1) {
+		tst_resm(TFAIL | TERRNO, "llistxattr() failed");
+		return;
+	}
+
+	if (check_suitable_buf(name, TEST_RETURN))
+		tst_resm(TPASS, "llistxattr() succeed with suitable buffer");
+	else
+		tst_resm(TFAIL, "llistxattr() failed with small buffer");
+}
+
+static void setup(void)
+{
+	int n;
+
+	tst_require_root();
+
+	tst_sig(NOFORK, DEF_HANDLER, cleanup);
+
+	TEST_PAUSE;
+
+	tst_tmpdir();
+
+	SAFE_TOUCH(cleanup, filename[0], 0644, NULL);
+
+	SAFE_TOUCH(cleanup, filename[1], 0644, NULL);
+
+	n = lsetxattr(filename[1], SECURITY_KEY, VALUE, VALUE_SIZE, XATTR_CREATE);
+	if (n == -1) {
+		if (errno == ENOTSUP) {
+			tst_brkm(TCONF, cleanup, "no xattr support in fs or "
+				 "mounted without user_xattr option");
+		} else {
+			tst_brkm(TBROK | TERRNO, cleanup, "lsetxattr() failed");
+		}
+	}
+}
+
+static int check_suitable_buf(char *name, long size)
+{
+	int n;
+	char buf[size];
+
+	n = llistxattr(name, buf, size);
+	if (n == -1)
+		return 0;
+	else
+		return 1;
+}
+
+static void cleanup(void)
+{
+	tst_rmdir();
+}
+
+#else /* HAVE_ATTR_XATTR_H */
+int main(int ac, char **av)
+{
+	tst_brkm(TCONF, NULL, "<attr/xattr.h> does not exist.");
+}
+#endif
-- 
1.8.3.1




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

* [LTP] [PATCH v3] llistxattr/llistxattr03.c: add new testcase
  2016-02-25  3:55             ` [LTP] [PATCH v3] " Xiao Yang
@ 2016-02-25 11:21               ` Cyril Hrubis
  0 siblings, 0 replies; 16+ messages in thread
From: Cyril Hrubis @ 2016-02-25 11:21 UTC (permalink / raw)
  To: ltp

Hi!
Pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

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

end of thread, other threads:[~2016-02-25 11:21 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-29  9:08 [LTP] [PATCH 1/3] llistxattr/llistxattr01.c: add new testcase Xiao Yang
2016-01-29  9:08 ` [LTP] [PATCH 2/3] llistxattr/llistxattr02.c: " Xiao Yang
2016-02-10 13:41   ` Cyril Hrubis
2016-01-29  9:08 ` [LTP] [PATCH 3/3] llistxattr/llistxattr03.c: " Xiao Yang
2016-02-10 14:12   ` Cyril Hrubis
2016-02-10 14:04 ` [LTP] [PATCH 1/3] llistxattr/llistxattr01.c: " Cyril Hrubis
2016-02-18 10:02   ` Xiao Yang
2016-02-18 12:03     ` Cyril Hrubis
2016-02-19  4:55       ` [LTP] [PATCH v2 " Xiao Yang
2016-02-19  4:55         ` [LTP] [PATCH v2 2/3] llistxattr/llistxattr02.c: " Xiao Yang
2016-02-24 13:54           ` Cyril Hrubis
2016-02-19  4:55         ` [LTP] [PATCH v2 3/3] llistxattr/llistxattr03.c: " Xiao Yang
2016-02-24 14:28           ` Cyril Hrubis
2016-02-25  3:55             ` [LTP] [PATCH v3] " Xiao Yang
2016-02-25 11:21               ` Cyril Hrubis
2016-02-24 13:38         ` [LTP] [PATCH v2 1/3] llistxattr/llistxattr01.c: " Cyril Hrubis

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