Skip to contentSkip to conversation

listxattr related calls: new tests and test case

PATCH New Dejan Jovicevic 2 participants 9 messages Nov 15, 2016 – Dec 5, 2016 Library code

lore
Share & tools
lore
#0 lore raw

v5 cover listxattr related calls: new tests and test case

v4 -> v5:
- Minor changes in llistxattr02.c that were missing in previous version.

v3 -> v4:
- Fixed code errors from previous series. Fixed merge conflict. Added the safe_*setxattr() function prototypes in tst_safe_macros.h. Changed the licence for the new tests to GPLv2+.

v2 -> v3:
- Removed the unnecessary string termination after the memset() call in llistxattr02 and listxattr02.
- Modified the code to be more readable and maintainable, this resulted in creating a new patch that pretty much does the same thing for llistxattr() tests.
- Started usign corresponding safe macros in the setup of all of the listxattr related tests. This resulted in a new patch that implements these safe macros.

v1 -> v2:
- Modified the setup for the new test case in llistxattr02 and a testcase in listxattr02.
- Modified commit messages.

In this series, there is a new test case added in the existing llistxattr02 test. Also, we are moving to safe macros for *setxattr() syscalls. New tests are added for system calls flistxattr(), and listxattr() which are based on the existing tests for llistxattr.

Dejan Jovicevic (5):
safe_macros: add safe_setxattr(), safe_lsetxattr() and
safe_fsetxattr()
llistxattr: moved to using safe macros
llistxattr: improved code readability and stability
llistxattr: new testcase for long path name flistxattr and listxattr: added tests

 include/tst_safe_macros.h                          |  15 +++
 lib/safe_macros.c                                  |  64 ++++++++++++
 runtest/syscalls                                   |   8 ++
 testcases/kernel/syscalls/.gitignore               |   6 ++
 testcases/kernel/syscalls/flistxattr/Makefile      |  23 +++++
 .../kernel/syscalls/flistxattr/flistxattr01.c      | 104 ++++++++++++++++++++
 .../kernel/syscalls/flistxattr/flistxattr02.c      | 104 ++++++++++++++++++++
 .../kernel/syscalls/flistxattr/flistxattr03.c      |  99 +++++++++++++++++++
 testcases/kernel/syscalls/listxattr/Makefile       |  23 +++++
 testcases/kernel/syscalls/listxattr/listxattr01.c  |  96 ++++++++++++++++++
 testcases/kernel/syscalls/listxattr/listxattr02.c  | 107 +++++++++++++++++++++
 testcases/kernel/syscalls/listxattr/listxattr03.c  |  91 ++++++++++++++++++
 .../kernel/syscalls/llistxattr/llistxattr01.c      |  49 +++-------
 .../kernel/syscalls/llistxattr/llistxattr02.c      |  57 ++++++-----
 .../kernel/syscalls/llistxattr/llistxattr03.c      |  24 ++---
 15 files changed, 788 insertions(+), 82 deletions(-)
 create mode 100644 testcases/kernel/syscalls/flistxattr/Makefile
 create mode 100644 testcases/kernel/syscalls/flistxattr/flistxattr01.c
 create mode 100644 testcases/kernel/syscalls/flistxattr/flistxattr02.c
 create mode 100644 testcases/kernel/syscalls/flistxattr/flistxattr03.c
 create mode 100644 testcases/kernel/syscalls/listxattr/Makefile
 create mode 100644 testcases/kernel/syscalls/listxattr/listxattr01.c
 create mode 100644 testcases/kernel/syscalls/listxattr/listxattr02.c
 create mode 100644 testcases/kernel/syscalls/listxattr/listxattr03.c
Signature · 1 line
1.9.1
#1 lore raw

PATCH v5 1/5 safe_macros: add safe_setxattr(), safe_lsetxattr() and safe_fsetxattr()

Added SAFE_SETXATTR(), SAFE_LSETXATTR() and SAFE_FSETXATTR() macros to simplify error checking in test preparation. Instead of calling the system function, checking for their return value and aborting the test if the operation has failed, just use corresponding safe macro.

---
 include/tst_safe_macros.h | 15 +++++++++++
 lib/safe_macros.c         | 64 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 79 insertions(+)
include/tst_safe_macros.h +15 -0
index 59cba1a..96bec5c 100644
@@ -437,4 +437,19 @@ int safe_getpriority(const char *file, const int lineno, int which, id_t who);
 #define SAFE_GETPRIORITY(which, who) \
 	safe_getpriority(__FILE__, __LINE__, (which), (who))
 
+int safe_setxattr(const char *file, const int lineno, const char *path,
+            const char *name, const void *value, size_t size, int flags);
+#define SAFE_SETXATTR(path, name, value, size, flags) \
+	safe_setxattr(__FILE__, __LINE__, (path), (name), (value), (size), (flags))
+
+int safe_lsetxattr(const char *file, const int lineno, const char *path,
+            const char *name, const void *value, size_t size, int flags);
+#define SAFE_LSETXATTR(path, name, value, size, flags) \
+	safe_lsetxattr(__FILE__, __LINE__, (path), (name), (value), (size), (flags))
+
+int safe_fsetxattr(const char *file, const int lineno, int fd, const char *name,
+            const void *value, size_t size, int flags);
+#define SAFE_FSETXATTR(fd, name, value, size, flags) \
+	safe_fsetxattr(__FILE__, __LINE__, (fd), (name), (value), (size), (flags))
+
 #endif /* SAFE_MACROS_H__ */
lib/safe_macros.c +64 -0

73 lines not on this page · raw message

Signature · 1 line
1.9.1
#2 lore raw

PATCH v5 1/5 safe_macros: add safe_setxattr(), safe_lsetxattr() and safe_fsetxattr()

Hi!

Review

Quoted 2 lines
(quoted diff) +2 -0
+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.

lib/safe_macros.c int safe_getpriority(const char *file, const int lineno, int which, id_t who) · line 829

Quoted 13 lines
lib/safe_macros.c +13 -0
+{
+	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);

lib/safe_macros.c int safe_getpriority(const char *file, const int lineno, int which, id_t who) · line 834

Quoted 5 lines
lib/safe_macros.c +5 -0
+			     file, lineno);
+	}
+
+	return rval;
+}

And the same for the rest of the functions.

Otherwise it's fine.

Signature · 2 lines
Cyril Hrubis
[email protected]
#4 lore raw

PATCH v5 2/5 llistxattr: moved to using safe macros

In reply to Dejan Jovicevic

Apply newly created SAFE_LSETXATTR() macro to all files that test llistxattr().

---
 .../kernel/syscalls/llistxattr/llistxattr01.c      | 25 ++--------------------
 .../kernel/syscalls/llistxattr/llistxattr02.c      | 12 +----------
 .../kernel/syscalls/llistxattr/llistxattr03.c      | 12 +----------
 3 files changed, 4 insertions(+), 45 deletions(-)
testcases/kernel/syscalls/llistxattr/llistxattr01.c +2 -23
index 2e95faf..f352032 100644
@@ -43,27 +43,6 @@
 #define VALUE_SIZE	4
 #define KEY_SIZE    17
 
-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_brk(TCONF,
-				 "no xattr support in fs or mounted "
-				 "without user_xattr option");
-		}
-
-		if (errno == EEXIST) {
-			tst_brk(TBROK, "exist attribute %s", key);
-		} else {
-			tst_brk(TBROK | TERRNO,
-				 "lsetxattr() failed");
-		}
-	}
-}
-
 static int has_attribute(const char *list, int llen, const char *attr)
 {
 	int i;
@@ -106,9 +85,9 @@ static void setup(void)
 
 	SAFE_SYMLINK("testfile", "symlink");
 
-	set_xattr("testfile", SECURITY_KEY1);
+	SAFE_LSETXATTR("testfile", SECURITY_KEY1, VALUE, VALUE_SIZE, XATTR_CREATE);
 
-	set_xattr("symlink", SECURITY_KEY2);
+	SAFE_LSETXATTR("symlink", SECURITY_KEY2, VALUE, VALUE_SIZE, XATTR_CREATE);
 }
 
 static struct tst_test test = {
testcases/kernel/syscalls/llistxattr/llistxattr02.c +1 -11
index ec4ba6e..2812838 100644
@@ -80,21 +80,11 @@ static void verify_llistxattr(unsigned int n)
 
 static void setup(void)
 {
-	int n;
-
 	SAFE_TOUCH("testfile", 0644, NULL);
 
 	SAFE_SYMLINK("testfile", "symlink");
 
-	n = lsetxattr("symlink", SECURITY_KEY, VALUE, VALUE_SIZE, XATTR_CREATE);
-	if (n == -1) {
-		if (errno == ENOTSUP) {
-			tst_brk(TCONF, "no xattr support in fs or "
-				 "mounted without user_xattr option");
-		} else {
-			tst_brk(TBROK | TERRNO, "lsetxattr() failed");
-		}
-	}
+	SAFE_LSETXATTR("symlink", SECURITY_KEY, VALUE, VALUE_SIZE, XATTR_CREATE);
 }
 
 static struct tst_test test = {
testcases/kernel/syscalls/llistxattr/llistxattr03.c +1 -11
index e6e4c68..475375e 100644
@@ -71,21 +71,11 @@ static void verify_llistxattr(unsigned int n)
 
 static void setup(void)
 {
-	int ret;
-
 	SAFE_TOUCH(filename[0], 0644, NULL);
 
 	SAFE_TOUCH(filename[1], 0644, NULL);
 
-	ret = lsetxattr(filename[1], SECURITY_KEY, VALUE, VALUE_SIZE, XATTR_CREATE);
-	if (ret == -1) {
-		if (errno == ENOTSUP) {
-			tst_brk(TCONF, "no xattr support in fs or "
-				 "mounted without user_xattr option");
-		} else {
-			tst_brk(TBROK | TERRNO, "lsetxattr() failed");
-		}
-	}
+	SAFE_LSETXATTR(filename[1], SECURITY_KEY, VALUE, VALUE_SIZE, XATTR_CREATE);
 }
 
 static struct tst_test test = {
Signature · 1 line
1.9.1
#5 lore raw

PATCH v5 3/5 llistxattr: improved code readability and stability

In reply to Dejan Jovicevic

Changed bits of code, such as hardcoded magic constants, unnecessary else branches, way of passing array size to a function, removed unnecessary comments, moved to using macros instead of string literals where seemed to be fit.

This was done to make the code easier to read and understand, and make it easier to maintain in case of changes

---
 .../kernel/syscalls/llistxattr/llistxattr01.c      | 30 ++++++++--------
 .../kernel/syscalls/llistxattr/llistxattr02.c      | 40 +++++++++++-----------
 .../kernel/syscalls/llistxattr/llistxattr03.c      | 12 +++----
 3 files changed, 41 insertions(+), 41 deletions(-)
testcases/kernel/syscalls/llistxattr/llistxattr01.c +16 -14
index f352032..0176893 100644
@@ -37,11 +37,14 @@
 
 #ifdef HAVE_SYS_XATTR_H
 
-#define SECURITY_KEY1	"security.ltptest1"
-#define SECURITY_KEY2	"security.ltptest2"
-#define VALUE	"test"
-#define VALUE_SIZE	4
-#define KEY_SIZE    17
+#define SECURITY_KEY1   "security.ltptest1"
+#define SECURITY_KEY2   "security.ltptest2"
+#define VALUE           "test"
+#define VALUE_SIZE      (sizeof(VALUE) - 1)
+#define KEY_SIZE        (sizeof(SECURITY_KEY1) - 1)
+#define TESTFILE        "testfile"
+#define SYMLINK         "symlink"
+
 
 static int has_attribute(const char *list, int llen, const char *attr)
 {
@@ -56,22 +59,21 @@ static int has_attribute(const char *list, int llen, const char *attr)
 
 static void verify_llistxattr(void)
 {
-	int size = 64;
-	char buf[size];
+	char buf[64];
 
-	TEST(llistxattr("symlink", buf, size));
+	TEST(llistxattr(SYMLINK, buf, sizeof(buf)));
 	if (TEST_RETURN == -1) {
 		tst_res(TFAIL | TTERRNO, "llistxattr() failed");
 		return;
 	}
 
-	if (has_attribute(buf, size, SECURITY_KEY1)) {
+	if (has_attribute(buf, sizeof(buf), SECURITY_KEY1)) {
 		tst_res(TFAIL, "get file attribute %s unexpectlly",
 			 SECURITY_KEY1);
 		return;
 	}
 
-	if (!has_attribute(buf, size, SECURITY_KEY2)) {
+	if (!has_attribute(buf, sizeof(buf), SECURITY_KEY2)) {
 		tst_res(TFAIL, "missing attribute %s", SECURITY_KEY2);
 		return;
 	}
@@ -81,13 +83,13 @@ static void verify_llistxattr(void)
 
 static void setup(void)
 {
-	SAFE_TOUCH("testfile", 0644, NULL);
+	SAFE_TOUCH(TESTFILE, 0644, NULL);
 
-	SAFE_SYMLINK("testfile", "symlink");
+	SAFE_SYMLINK(TESTFILE, SYMLINK);
 
-	SAFE_LSETXATTR("testfile", SECURITY_KEY1, VALUE, VALUE_SIZE, XATTR_CREATE);
+	SAFE_LSETXATTR(TESTFILE, SECURITY_KEY1, VALUE, VALUE_SIZE, XATTR_CREATE);
 
-	SAFE_LSETXATTR("symlink", SECURITY_KEY2, VALUE, VALUE_SIZE, XATTR_CREATE);
+	SAFE_LSETXATTR(SYMLINK, SECURITY_KEY2, VALUE, VALUE_SIZE, XATTR_CREATE);
 }
 
 static struct tst_test test = {
testcases/kernel/syscalls/llistxattr/llistxattr02.c +20 -20
index 2812838..d6a1958 100644
@@ -41,20 +41,19 @@
 
 #ifdef HAVE_SYS_XATTR_H
 
-#define SECURITY_KEY	"security.ltptest"
-#define VALUE	"test"
-#define VALUE_SIZE	4
+#define SECURITY_KEY    "security.ltptest"
+#define VALUE           "test"
+#define VALUE_SIZE      (sizeof(VALUE) - 1)
+#define TESTFILE        "testfile"
+#define SYMLINK         "symlink"
 
 static struct test_case {
 	const char *path;
 	size_t size;
 	int exp_err;
 } tc[] = {
-	/* test1 */
-	{"symlink", 1, ERANGE},
-	/* test2 */
+	{SYMLINK, 1, ERANGE},
 	{"", 20, ENOENT},
-	/* test3 */
 	{(char *)-1, 20, EFAULT}
 };
 
@@ -63,28 +62,29 @@ static void verify_llistxattr(unsigned int n)
 	struct test_case *t = tc + n;
 	char buf[t->size];
 
-	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;
+	}
+
+	if (TEST_ERRNO != t->exp_err) {
+		tst_res(TFAIL | TTERRNO, "llistxattr() failed "
+			 "unexpectedlly, expected %s",
+			 tst_strerrno(t->exp_err));
 	} else {
-		if (TEST_ERRNO != t->exp_err) {
-			tst_res(TFAIL | TTERRNO, "llistxattr() failed "
-				 "unexpectedlly, expected %s",
-				 tst_strerrno(t->exp_err));
-		} else {
-			tst_res(TPASS | TTERRNO,
-				 "llistxattr() failed as expected");
-		}
+		tst_res(TPASS | TTERRNO,
+			 "llistxattr() failed as expected");
 	}
 }
 
 static void setup(void)
 {
-	SAFE_TOUCH("testfile", 0644, NULL);
+	SAFE_TOUCH(TESTFILE, 0644, NULL);
 
-	SAFE_SYMLINK("testfile", "symlink");
+	SAFE_SYMLINK(TESTFILE, SYMLINK);
 
-	SAFE_LSETXATTR("symlink", SECURITY_KEY, VALUE, VALUE_SIZE, XATTR_CREATE);
+	SAFE_LSETXATTR(SYMLINK, SECURITY_KEY, VALUE, VALUE_SIZE, XATTR_CREATE);
 }
 
 static struct tst_test test = {
testcases/kernel/syscalls/llistxattr/llistxattr03.c +5 -7
index 475375e..6a1cb6b 100644
@@ -36,8 +36,8 @@
 #ifdef HAVE_SYS_XATTR_H
 
 #define SECURITY_KEY	"security.ltptest"
-#define VALUE	"test"
-#define VALUE_SIZE	4
+#define VALUE           "test"
+#define VALUE_SIZE      (sizeof(VALUE) - 1)
 
 static const char *filename[] = {"testfile1", "testfile2"};
 
@@ -46,11 +46,9 @@ static int check_suitable_buf(const char *name, long size)
 	int n;
 	char buf[size];
 
-	n = llistxattr(name, buf, size);
-	if (n == -1)
-		return 0;
-	else
-		return 1;
+	n = llistxattr(name, buf, sizeof(buf));
+
+	return n != -1;
 }
 
 static void verify_llistxattr(unsigned int n)
Signature · 1 line
1.9.1
#6 lore raw

PATCH v5 3/5 llistxattr: improved code readability and stability

Hi!

testcases/kernel/syscalls/llistxattr/llistxattr02.c static void verify_llistxattr(unsigned int n) · line 69

Quoted 7 lines
testcases/kernel/syscalls/llistxattr/llistxattr02.c +4 -2
-	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.

Signature · 2 lines
Cyril Hrubis
[email protected]
#7 lore raw

PATCH v5 4/5 llistxattr: new testcase for long path name

In reply to Dejan Jovicevic

Added a test case that checks if the path name, given by the first argument of the function, is too long. If that is the case, the function should return -1 and errno should be set to ENAMETOOLONG.

---
 testcases/kernel/syscalls/llistxattr/llistxattr02.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
testcases/kernel/syscalls/llistxattr/llistxattr02.c +8 -1
index d6a1958..277a956 100644
@@ -22,11 +22,13 @@
 * 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.
+* 4) llistxattr(2) fails if path is longer than allowed.
 *
 * 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.
+* 4) llistxattr(2) should return -1 and set errno to ENAMETOOLONG.
 */
 
 #include "config.h"
@@ -47,6 +49,8 @@
 #define TESTFILE        "testfile"
 #define SYMLINK         "symlink"
 
+static char longpathname[PATH_MAX + 2];
+
 static struct test_case {
 	const char *path;
 	size_t size;
@@ -54,7 +58,8 @@ static struct test_case {
 } tc[] = {
 	{SYMLINK, 1, ERANGE},
 	{"", 20, ENOENT},
-	{(char *)-1, 20, EFAULT}
+	{(char *)-1, 20, EFAULT},
+	{longpathname, 20, ENAMETOOLONG}
 };
 
 static void verify_llistxattr(unsigned int n)
@@ -85,6 +90,8 @@ static void setup(void)
 	SAFE_SYMLINK(TESTFILE, SYMLINK);
 
 	SAFE_LSETXATTR(SYMLINK, SECURITY_KEY, VALUE, VALUE_SIZE, XATTR_CREATE);
+
+	memset(longpathname, 'a', sizeof(longpathname) - 1);
 }
 
 static struct tst_test test = {
Signature · 1 line
1.9.1
#8 lore raw

PATCH v5 5/5 flistxattr and listxattr: added tests

In reply to Dejan Jovicevic

Tests for these two system calls were not present.

flistxattr(), listxattr() and llistxattr() are identical, the only difference is in the first argument:
- in listxattr() it refers to the file in the path.
- in llistxattr() in the case of a symbolic link, the list of names of extended attributes associated with the link itself is retrieved, not the file that it refers to.
- in flistxattr() the open file referred to by fd is interrogated in place of path.

Because of these similarities, implemented tests for flistxattr() and listxattr() are based on the existing tests for llistxattr(), with some adjustments to fit the appropriate system call.

---
 runtest/syscalls                                   |   8 ++
 testcases/kernel/syscalls/.gitignore               |   6 ++
 testcases/kernel/syscalls/flistxattr/Makefile      |  23 +++++
 .../kernel/syscalls/flistxattr/flistxattr01.c      | 104 ++++++++++++++++++++
 .../kernel/syscalls/flistxattr/flistxattr02.c      | 104 ++++++++++++++++++++
 .../kernel/syscalls/flistxattr/flistxattr03.c      |  99 +++++++++++++++++++
 testcases/kernel/syscalls/listxattr/Makefile       |  23 +++++
 testcases/kernel/syscalls/listxattr/listxattr01.c  |  96 ++++++++++++++++++
 testcases/kernel/syscalls/listxattr/listxattr02.c  | 107 +++++++++++++++++++++
 testcases/kernel/syscalls/listxattr/listxattr03.c  |  91 ++++++++++++++++++
 10 files changed, 661 insertions(+)
 create mode 100644 testcases/kernel/syscalls/flistxattr/Makefile
 create mode 100644 testcases/kernel/syscalls/flistxattr/flistxattr01.c
 create mode 100644 testcases/kernel/syscalls/flistxattr/flistxattr02.c
 create mode 100644 testcases/kernel/syscalls/flistxattr/flistxattr03.c
 create mode 100644 testcases/kernel/syscalls/listxattr/Makefile
 create mode 100644 testcases/kernel/syscalls/listxattr/listxattr01.c
 create mode 100644 testcases/kernel/syscalls/listxattr/listxattr02.c
 create mode 100644 testcases/kernel/syscalls/listxattr/listxattr03.c
runtest/syscalls +8 -0
index 64d09b2..6c68217 100644
@@ -272,6 +272,10 @@ fcntl34_64 fcntl34_64
 fdatasync01 fdatasync01
 fdatasync02 fdatasync02
 
+flistxattr01 flistxattr01
+flistxattr02 flistxattr02
+flistxattr03 flistxattr03
+
 flock01 flock01
 flock02 flock02
 flock03 flock03
@@ -523,6 +527,10 @@ linkat02 linkat02
 
 listen01 listen01
 
+listxattr01 listxattr01
+listxattr02 listxattr02
+listxattr03 listxattr03
+
 llistxattr01 llistxattr01
 llistxattr02 llistxattr02
 llistxattr03 llistxattr03
testcases/kernel/syscalls/.gitignore +6 -0
index 506219d..de142ba 100644
@@ -233,6 +233,9 @@
 /fcntl/fcntl34_64
 /fdatasync/fdatasync01
 /fdatasync/fdatasync02
+/flistxattr/flistxattr01
+/flistxattr/flistxattr02
+/flistxattr/flistxattr03
 /flock/flock01
 /flock/flock02
 /flock/flock03
@@ -482,6 +485,9 @@
 /linkat/linkat01
 /linkat/linkat02
 /listen/listen01
+/listxattr/listxattr01
+/listxattr/listxattr02
+/listxattr/listxattr03
 /llistxattr/llistxattr01
 /llistxattr/llistxattr02
 /llistxattr/llistxattr03
testcases/kernel/syscalls/flistxattr/Makefile new file +23 -0
new file mode 100644
index 0000000..b794ec0
@@ -0,0 +1,23 @@
+#
+#  Copyright (c) 2016 RT-RK Institute for Computer Based Systems
+#  Author: Dejan Jovicevic <[email protected]>
+#
+#  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
testcases/kernel/syscalls/flistxattr/flistxattr01.c new file +104 -0

104 lines not on this page · raw message

testcases/kernel/syscalls/flistxattr/flistxattr02.c new file +104 -0

104 lines not on this page · raw message

testcases/kernel/syscalls/flistxattr/flistxattr03.c new file +99 -0

99 lines not on this page · raw message

testcases/kernel/syscalls/listxattr/Makefile new file +23 -0
new file mode 100644
index 0000000..b794ec0
@@ -0,0 +1,23 @@
+#
+#  Copyright (c) 2016 RT-RK Institute for Computer Based Systems
+#  Author: Dejan Jovicevic <[email protected]>
+#
+#  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
testcases/kernel/syscalls/listxattr/listxattr01.c new file +96 -0

96 lines not on this page · raw message

testcases/kernel/syscalls/listxattr/listxattr02.c new file +107 -0

107 lines not on this page · raw message

testcases/kernel/syscalls/listxattr/listxattr03.c new file +91 -0

91 lines not on this page · raw message

Signature · 1 line
1.9.1