* [LTP] syscall's error vaule and flag tests
@ 2014-03-04 6:31 Xiaoguang Wang
2014-03-04 6:31 ` [LTP] [PATCH 1/4] fcntl/fcntl31.c: add I/O availability signals test for fcntl(2) Xiaoguang Wang
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Xiaoguang Wang @ 2014-03-04 6:31 UTC (permalink / raw)
To: ltp-list
Currently I send many patches about syscall's error value and flag tests.
I think it has made some disorder in mail list, sorry. I will put these
similar patches in one thread to keep some orderliness, thanks.
This patchset contain 4 syscalls: fcntl, mincore, mknodat and msync.
fcntl31 has been reviewd by Cyril and has been fixed according to
his previous comments, thanks.
Regards,
Xiaoguang Wang
------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works.
Faster operations. Version large binaries. Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 7+ messages in thread
* [LTP] [PATCH 1/4] fcntl/fcntl31.c: add I/O availability signals test for fcntl(2)
2014-03-04 6:31 [LTP] syscall's error vaule and flag tests Xiaoguang Wang
@ 2014-03-04 6:31 ` Xiaoguang Wang
2014-03-04 6:31 ` [LTP] [PATCH 2/4] mincore/mincore01.c: cleanup Xiaoguang Wang
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Xiaoguang Wang @ 2014-03-04 6:31 UTC (permalink / raw)
To: ltp-list
create a new case to test F_GETOWN, F_SETOWN, F_GETOWN_EX,
F_SETOWN_EX, F_GETSIG, F_SETSIG for fcntl(2)
Signed-off-by: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
---
configure.ac | 1 +
m4/ltp-fcntl.m4 | 40 +++
runtest/ltplite | 1 +
runtest/stress.part3 | 1 +
runtest/syscalls | 2 +
testcases/kernel/syscalls/.gitignore | 2 +
testcases/kernel/syscalls/fcntl/fcntl31.c | 389 ++++++++++++++++++++++++++++++
7 files changed, 436 insertions(+)
create mode 100644 m4/ltp-fcntl.m4
create mode 100644 testcases/kernel/syscalls/fcntl/fcntl31.c
diff --git a/configure.ac b/configure.ac
index ea6fa85..59460b1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -172,5 +172,6 @@ LTP_CHECK_XFS_QUOTACTL
LTP_CHECK_CLONE_SUPPORTS_7_ARGS
LTP_CHECK_MKDIRAT
LTP_CHECK_FCHOWNAT
+LTP_CHECK_FCNTL
AC_OUTPUT
diff --git a/m4/ltp-fcntl.m4 b/m4/ltp-fcntl.m4
new file mode 100644
index 0000000..9a27fb7
--- /dev/null
+++ b/m4/ltp-fcntl.m4
@@ -0,0 +1,40 @@
+dnl
+dnl Copyright (c) 2014 Fujitsu Ltd.
+dnl Author: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
+dnl the GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+dnl
+
+dnl
+dnl LTP_CHECK_FCNTL
+dnl ----------------------------
+dnl
+AC_DEFUN([LTP_CHECK_FCNTL],[dnl
+ AC_MSG_CHECKING([for fcntl f_owner_ex])
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+#define _GNU_SOURCE
+#include <fcntl.h>
+int main(void) {
+ struct f_owner_ex tst_own_ex;
+ return 0;
+}])],[has_f_owner_ex="yes"])
+
+if test "x$has_f_owner_ex" = xyes; then
+ AC_DEFINE(HAVE_STRUCT_F_OWNER_EX,1,[Define to 1 if you have struct f_owner_ex])
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi
+])
diff --git a/runtest/ltplite b/runtest/ltplite
index f7127fe..7d78775 100644
--- a/runtest/ltplite
+++ b/runtest/ltplite
@@ -225,6 +225,7 @@ fcntl26 fcntl26
# fcntl28 fcntl28
fcntl29 fcntl29
fcntl30 fcntl30
+fcntl31 fcntl31
fdatasync01 fdatasync01
fdatasync02 fdatasync02
diff --git a/runtest/stress.part3 b/runtest/stress.part3
index 2f31e93..cd49bf1 100644
--- a/runtest/stress.part3
+++ b/runtest/stress.part3
@@ -164,6 +164,7 @@ fcntl26 fcntl26
# fcntl28 fcntl28
fcntl29 fcntl29
fcntl30 fcntl30
+fcntl31 fcntl31
fdatasync01 fdatasync01
fdatasync02 fdatasync02
diff --git a/runtest/syscalls b/runtest/syscalls
index 9099257..7031c41 100644
--- a/runtest/syscalls
+++ b/runtest/syscalls
@@ -257,6 +257,8 @@ fcntl29 fcntl29
fcntl29_64 fcntl29_64
fcntl30 fcntl30
fcntl30_64 fcntl30_64
+fcntl31 fcntl31
+fcntl31_64 fcntl31_64
fdatasync01 fdatasync01
fdatasync02 fdatasync02
diff --git a/testcases/kernel/syscalls/.gitignore b/testcases/kernel/syscalls/.gitignore
index b1d4b15..dc380e3 100644
--- a/testcases/kernel/syscalls/.gitignore
+++ b/testcases/kernel/syscalls/.gitignore
@@ -214,6 +214,8 @@
/fcntl/fcntl29_64
/fcntl/fcntl30
/fcntl/fcntl30_64
+/fcntl/fcntl31
+/fcntl/fcntl31_64
/fdatasync/fdatasync01
/fdatasync/fdatasync02
/flock/flock01
diff --git a/testcases/kernel/syscalls/fcntl/fcntl31.c b/testcases/kernel/syscalls/fcntl/fcntl31.c
new file mode 100644
index 0000000..6700708
--- /dev/null
+++ b/testcases/kernel/syscalls/fcntl/fcntl31.c
@@ -0,0 +1,389 @@
+/*
+ * Copyright (c) 2014 Fujitsu Ltd.
+ * Author: Xiaoguang Wang <wangxg.fnst@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 along
+ * with this program; if not, write the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/*
+ * Description:
+ * Verify that:
+ * Basic test for fcntl(2) using F_GETOWN, F_SETOWN, F_GETOWN_EX,
+ * F_SETOWN_EX, F_GETSIG, F_SETSIG argument.
+ */
+
+#include <stdio.h>
+#include <errno.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <string.h>
+#include <signal.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <pwd.h>
+#include <sched.h>
+
+#include "test.h"
+#include "config.h"
+#include "usctest.h"
+#include "linux_syscall_numbers.h"
+#include "safe_macros.h"
+
+
+static void setup(void);
+static void cleanup(void);
+
+static void setown_pid_test(void);
+static void setown_pgrp_test(void);
+
+#if defined(HAVE_STRUCT_F_OWNER_EX)
+static int ownex_enabled;
+static char *ownex_tconf_msg = "F_GETOWN_EX and F_SETOWN_EX only run on "
+ "kernels that are 2.6.32 and higher";
+static void setownex_tid_test(void);
+static void setownex_pid_test(void);
+static void setownex_pgrp_test(void);
+
+static struct f_owner_ex orig_own_ex;
+#endif
+
+static void signal_parent(void);
+static void check_io_signal(char *des);
+static void test_set_and_get_sig(int sig, char *des);
+
+static pid_t pid;
+static pid_t orig_pid;
+static pid_t pgrp_pid;
+
+static struct timespec timeout;
+static sigset_t newset, oldset;
+
+static int test_fd;
+static int pipe_fds[2];
+
+static void (*testfunc[])(void) = {
+ setown_pid_test, setown_pgrp_test,
+#if defined(HAVE_STRUCT_F_OWNER_EX)
+ setownex_tid_test, setownex_pid_test, setownex_pgrp_test
+#endif
+};
+
+char *TCID = "fcntl31";
+int TST_TOTAL = ARRAY_SIZE(testfunc);
+
+
+int main(int ac, char **av)
+{
+ int lc, i;
+ char *msg;
+
+ msg = parse_opts(ac, av, NULL, NULL);
+ if (msg != NULL)
+ tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+
+ setup();
+
+ for (lc = 0; TEST_LOOPING(lc); lc++) {
+ tst_count = 0;
+
+ for (i = 0; i < TST_TOTAL; i++)
+ (*testfunc[i])();
+ }
+
+ cleanup();
+ tst_exit();
+}
+
+static void setup(void)
+{
+ int ret;
+
+ tst_sig(FORK, DEF_HANDLER, cleanup);
+
+ TEST_PAUSE;
+
+ /* we have these tests on pipe */
+ SAFE_PIPE(cleanup, pipe_fds);
+ test_fd = pipe_fds[0];
+ if (fcntl(test_fd, F_SETFL, O_ASYNC) < 0)
+ tst_brkm(TBROK | TERRNO, cleanup, "fcntl set O_ASYNC failed");
+
+ pid = getpid();
+
+ ret = setpgrp();
+ if (ret < 0)
+ tst_brkm(TBROK | TERRNO, cleanup, "setpgrp() failed");
+ pgrp_pid = getpgid(0);
+ if (pgrp_pid < 0)
+ tst_brkm(TBROK | TERRNO, cleanup, "getpgid() failed");
+
+#if defined(HAVE_STRUCT_F_OWNER_EX)
+ if ((tst_kvercmp(2, 6, 32)) >= 0) {
+ ownex_enabled = 1;
+
+ /* get original f_owner_ex info */
+ TEST(fcntl(test_fd, F_GETOWN_EX, &orig_own_ex));
+ if (TEST_RETURN < 0) {
+ tst_brkm(TFAIL | TTERRNO, cleanup,
+ "fcntl get original f_owner_ex info failed");
+ }
+ }
+#endif
+
+ /* get original pid info */
+ TEST(fcntl(test_fd, F_GETOWN));
+ if (TEST_RETURN < 0) {
+ tst_brkm(TFAIL | TTERRNO, cleanup,
+ "fcntl get original pid info failed");
+ }
+ orig_pid = TEST_RETURN;
+
+ sigemptyset(&newset);
+ sigaddset(&newset, SIGUSR1);
+ sigaddset(&newset, SIGIO);
+
+ if (sigprocmask(SIG_SETMASK, &newset, &oldset) < 0)
+ tst_brkm(TBROK | TERRNO, cleanup, "sigprocmask failed");
+
+ timeout.tv_sec = 5;
+ timeout.tv_nsec = 0;
+}
+
+static void setown_pid_test(void)
+{
+ TEST(fcntl(test_fd, F_SETOWN, pid));
+ if (TEST_RETURN < 0) {
+ tst_brkm(TFAIL | TTERRNO, cleanup,
+ "fcntl(F_SETOWN) set process id failed");
+ }
+ test_set_and_get_sig(SIGUSR1, "F_GETOWN, F_SETOWN for process ID");
+
+ TEST(fcntl(test_fd, F_SETOWN, orig_pid));
+ if (TEST_RETURN < 0) {
+ tst_brkm(TFAIL | TTERRNO, cleanup,
+ "fcntl(F_SETOWN) restore orig_pid failed");
+ }
+}
+
+static void setown_pgrp_test(void)
+{
+ TEST(fcntl(test_fd, F_SETOWN, -pgrp_pid));
+ if (TEST_RETURN < 0) {
+ tst_brkm(TFAIL | TTERRNO, cleanup,
+ "fcntl(F_SETOWN) set process group id failed");
+ }
+ test_set_and_get_sig(SIGUSR1,
+ "F_GETOWN, F_SETOWN for process group ID");
+
+ TEST(fcntl(test_fd, F_SETOWN, orig_pid));
+ if (TEST_RETURN < 0) {
+ tst_brkm(TFAIL | TTERRNO, cleanup,
+ "fcntl(F_SETOWN) restore orig_pid failed");
+ }
+}
+
+#if defined(HAVE_STRUCT_F_OWNER_EX)
+static void setownex_cleanup(void)
+{
+ TEST(fcntl(test_fd, F_SETOWN_EX, &orig_own_ex));
+ if (TEST_RETURN < 0) {
+ tst_brkm(TFAIL | TTERRNO, cleanup,
+ "fcntl F_SETOWN_EX restore orig_own_ex failed");
+ }
+}
+
+static void setownex_tid_test(void)
+{
+ struct f_owner_ex tst_own_ex;
+
+ if (ownex_enabled == 0) {
+ tst_resm(TCONF, ownex_tconf_msg);
+ return;
+ }
+
+ tst_own_ex.type = F_OWNER_TID;
+ tst_own_ex.pid = ltp_syscall(__NR_gettid);
+
+ TEST(fcntl(test_fd, F_SETOWN_EX, &tst_own_ex));
+ if (TEST_RETURN < 0) {
+ tst_brkm(TFAIL | TTERRNO, cleanup,
+ "fcntl F_SETOWN_EX failed");
+ }
+ test_set_and_get_sig(SIGUSR1, "F_GETOWN_EX, F_SETOWN_EX for thread ID");
+
+ setownex_cleanup();
+}
+
+static void setownex_pid_test(void)
+{
+ struct f_owner_ex tst_own_ex;
+
+ if (ownex_enabled == 0) {
+ tst_resm(TCONF, ownex_tconf_msg);
+ return;
+ }
+
+ tst_own_ex.type = F_OWNER_PID;
+ tst_own_ex.pid = pid;
+
+ TEST(fcntl(test_fd, F_SETOWN_EX, &tst_own_ex));
+ if (TEST_RETURN < 0) {
+ tst_brkm(TFAIL | TTERRNO, cleanup,
+ "fcntl F_SETOWN_EX failed");
+ }
+ test_set_and_get_sig(SIGUSR1,
+ "F_GETOWN_EX, F_SETOWN_EX for process ID");
+
+ setownex_cleanup();
+}
+
+static void setownex_pgrp_test(void)
+{
+ struct f_owner_ex tst_own_ex;
+
+ if (ownex_enabled == 0) {
+ tst_resm(TCONF, ownex_tconf_msg);
+ return;
+ }
+
+ tst_own_ex.type = F_OWNER_PGRP;
+ tst_own_ex.pid = pgrp_pid;
+
+ TEST(fcntl(test_fd, F_SETOWN_EX, &tst_own_ex));
+ if (TEST_RETURN < 0) {
+ tst_brkm(TFAIL | TTERRNO, cleanup,
+ "fcntl F_SETOWN_EX failed");
+ }
+ test_set_and_get_sig(SIGUSR1,
+ "F_GETOWN_EX, F_SETOWN_EX for process group ID");
+
+ setownex_cleanup();
+}
+#endif
+
+static void test_set_and_get_sig(int sig, char *des)
+{
+ int orig_sig;
+
+ TEST(fcntl(test_fd, F_GETSIG));
+ if (TEST_RETURN < 0) {
+ tst_brkm(TFAIL | TTERRNO, cleanup,
+ "fcntl(fd, F_GETSIG) get orig_sig failed");
+ }
+ orig_sig = TEST_RETURN;
+
+ if (orig_sig == 0 || orig_sig == SIGIO)
+ tst_resm(TINFO, "default io events signal is SIGIO");
+
+ TEST(fcntl(test_fd, F_SETSIG, sig));
+ if (TEST_RETURN < 0) {
+ tst_brkm(TFAIL | TTERRNO, cleanup,
+ "fcntl(fd, F_SETSIG, SIG: %d) failed", sig);
+ }
+
+ TEST(fcntl(test_fd, F_GETSIG));
+ if (TEST_RETURN < 0) {
+ tst_brkm(TFAIL | TTERRNO, cleanup,
+ "fcntl(fd, F_GETSIG) get the set signal failed");
+ }
+ if (TEST_RETURN != sig) {
+ tst_brkm(TFAIL | TTERRNO, cleanup,
+ "fcntl F_SETSIG set SIG: %d failed", sig);
+ }
+
+ check_io_signal(des);
+
+ /* restore the default signal*/
+ TEST(fcntl(test_fd, F_SETSIG, orig_sig));
+ if (TEST_RETURN < 0) {
+ tst_brkm(TFAIL | TTERRNO, cleanup,
+ "fcntl restore default signal failed");
+ }
+}
+
+static void signal_parent(void)
+{
+ int ret, fd;
+
+ fd = pipe_fds[1];
+ close(pipe_fds[0]);
+
+ ret = setpgrp();
+ if (ret < 0) {
+ fprintf(stderr, "child process(%d) setpgrp() failed \n",
+ getpid());
+ }
+
+ ret = write(fd, "c", 1);
+
+ switch (ret) {
+ case 0:
+ fprintf(stderr, "No data written, something is wrong\n");
+ break;
+ case -1:
+ fprintf(stderr, "Failed to write to pipe: %s\n",
+ strerror(errno));
+ break;
+ }
+
+ close(fd);
+ return;
+}
+
+static void check_io_signal(char *des)
+{
+ int ret;
+ pid_t child;
+
+ child = tst_fork();
+ if (child < 0)
+ tst_brkm(TBROK | TERRNO, cleanup, "fork failed");
+
+ if (child == 0) {
+ signal_parent();
+ exit(0);
+ } else {
+ ret = sigtimedwait(&newset, NULL, &timeout);
+ if (ret == -1) {
+ tst_brkm(TBROK | TERRNO, NULL,
+ "sigtimedwait() failed.");
+ }
+
+ switch (ret) {
+ case SIGUSR1:
+ tst_resm(TPASS, "fcntl test %s success", des);
+ break;
+ case SIGIO:
+ tst_resm(TFAIL, "received default SIGIO, fcntl test "
+ "%s failed", des);
+ break;
+ default:
+ tst_brkm(TBROK, cleanup, "fcntl io events "
+ "signal mechanism work abnormally");
+ }
+ wait(NULL);
+ }
+}
+
+static void cleanup(void)
+{
+ TEST_CLEANUP;
+
+ if (sigprocmask(SIG_SETMASK, &oldset, NULL) < 0)
+ tst_resm(TWARN | TERRNO, "sigprocmask restore oldset failed");
+
+ if (pipe_fds[0] > 0 && close(pipe_fds[0]) == -1)
+ tst_resm(TWARN | TERRNO, "close(%d) failed", pipe_fds[0]);
+ if (pipe_fds[1] > 0 && close(pipe_fds[1]) == -1)
+ tst_resm(TWARN | TERRNO, "close(%d) failed", pipe_fds[1]);
+}
--
1.8.2.1
------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works.
Faster operations. Version large binaries. Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [LTP] [PATCH 2/4] mincore/mincore01.c: cleanup
2014-03-04 6:31 [LTP] syscall's error vaule and flag tests Xiaoguang Wang
2014-03-04 6:31 ` [LTP] [PATCH 1/4] fcntl/fcntl31.c: add I/O availability signals test for fcntl(2) Xiaoguang Wang
@ 2014-03-04 6:31 ` Xiaoguang Wang
2014-03-04 6:32 ` [LTP] [PATCH 3/4] mknodat/mknodat02.c: add ELOOP and EROFS error value test Xiaoguang Wang
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Xiaoguang Wang @ 2014-03-04 6:31 UTC (permalink / raw)
To: ltp-list
Delete some useless comments.
Move the test body from main() to mincore_verify().
Use some SAFE_* macros.
Make ENOMEM error value tests more sufficient.
Signed-off-by: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
---
testcases/kernel/syscalls/mincore/mincore01.c | 186 ++++++++++++++------------
1 file changed, 101 insertions(+), 85 deletions(-)
diff --git a/testcases/kernel/syscalls/mincore/mincore01.c b/testcases/kernel/syscalls/mincore/mincore01.c
index d3519f2..70b27a3 100644
--- a/testcases/kernel/syscalls/mincore/mincore01.c
+++ b/testcases/kernel/syscalls/mincore/mincore01.c
@@ -28,6 +28,10 @@
* test3:
* Invoke mincore() when the starting address + length contained unmapped
* memory. ENOMEM
+ * test4:
+ * Invoke mincore() when length is greater than (TASK_SIZE - addr).ENOMEM.
+ * In Linux 2.6.11 and earlier, the error EINVAL was returned for this
+ * condition.
*/
#include <fcntl.h>
@@ -40,40 +44,46 @@
#include <sys/stat.h>
#include "test.h"
#include "usctest.h"
+#include "safe_macros.h"
static int PAGESIZE;
static rlim_t STACK_LIMIT = 10485760;
static void cleanup(void);
static void setup(void);
-static void setup1(void);
-static void setup2(void);
-static void setup3(void);
char *TCID = "mincore01";
-int TST_TOTAL = 3;
-static char *global_pointer = NULL;
-static unsigned char *global_vec = NULL;
-static int global_len = 0;
-static int fd = 0;
+static char *global_pointer;
+static unsigned char *global_vec;
+static int global_len;
+
+struct test_case_t;
+static void setup1(struct test_case_t *tc);
+static void setup2(struct test_case_t *tc);
+static void setup3(struct test_case_t *tc);
+static void setup4(struct test_case_t *tc);
static struct test_case_t {
char *addr;
- int len;
+ size_t len;
unsigned char *vector;
int exp_errno;
- void (*setupfunc) (void);
+ void (*setupfunc) (struct test_case_t *tc);
} TC[] = {
{NULL, 0, NULL, EINVAL, setup1},
{NULL, 0, NULL, EFAULT, setup2},
{NULL, 0, NULL, ENOMEM, setup3},
+ {NULL, 0, NULL, ENOMEM, setup4}
};
+static void mincore_verify(struct test_case_t *tc);
+
+int TST_TOTAL = ARRAY_SIZE(TC);
+
int main(int ac, char **av)
{
- int lc;
- int i;
+ int i, lc;
char *msg;
msg = parse_opts(ac, av, NULL, NULL);
@@ -85,57 +95,30 @@ int main(int ac, char **av)
for (lc = 0; TEST_LOOPING(lc); lc++) {
tst_count = 0;
- for (i = 0; i < TST_TOTAL; i++) {
-
- if (TC[i].setupfunc != NULL)
- TC[i].setupfunc();
-
- TEST(mincore(TC[i].addr, TC[i].len, TC[i].vector));
-
- if (TEST_RETURN != -1) {
- tst_resm(TFAIL, "call succeeded unexpectedly");
- continue;
- }
-
- TEST_ERROR_LOG(TEST_ERRNO);
-
- if (TEST_ERRNO == TC[i].exp_errno) {
- tst_resm(TPASS, "expected failure: "
- "errno = %d (%s)", TEST_ERRNO,
- strerror(TEST_ERRNO));
- } else {
- tst_resm(TFAIL, "unexpected error %d (%s), "
- "expected %d", TEST_ERRNO,
- strerror(TEST_ERRNO), TC[i].exp_errno);
- }
- }
+ for (i = 0; i < TST_TOTAL; i++)
+ mincore_verify(&TC[i]);
}
+
cleanup();
tst_exit();
}
-static void setup1(void)
+static void setup1(struct test_case_t *tc)
{
- TC[0].addr = global_pointer + 1;
- TC[0].len = global_len;
- TC[0].vector = global_vec;
+ tc->addr = global_pointer + 1;
+ tc->len = global_len;
+ tc->vector = global_vec;
}
-void setup2(void)
+void setup2(struct test_case_t *tc)
{
unsigned char *t;
struct rlimit limit;
- t = mmap(NULL, global_len, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
+ t = SAFE_MMAP(cleanup, NULL, global_len, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
- /* Create pointer to invalid address */
- if (t == MAP_FAILED) {
- tst_brkm(TBROK | TERRNO, cleanup,
- "mmaping anonymous memory failed");
- }
-
- munmap(t, global_len);
+ SAFE_MUNMAP(cleanup, t, global_len);
/* set stack limit so that the unmaped pointer is invalid for architectures like s390 */
limit.rlim_cur = STACK_LIMIT;
@@ -144,63 +127,94 @@ void setup2(void)
if (setrlimit(RLIMIT_STACK, &limit) != 0)
tst_brkm(TBROK | TERRNO, cleanup, "setrlimit failed");
- TC[1].addr = global_pointer;
- TC[1].len = global_len;
- TC[1].vector = t;
+ tc->addr = global_pointer;
+ tc->len = global_len;
+ tc->vector = t;
}
-static void setup3(void)
+static void setup3(struct test_case_t *tc)
{
- TC[2].addr = global_pointer;
- TC[2].len = global_len * 2;
- munmap(global_pointer + global_len, global_len);
- TC[2].vector = global_vec;
+ tc->addr = global_pointer;
+ tc->len = global_len * 2;
+ SAFE_MUNMAP(cleanup, global_pointer + global_len, global_len);
+ tc->vector = global_vec;
+}
+
+static void setup4(struct test_case_t *tc)
+{
+ struct rlimit as_lim;
+
+ if (getrlimit(RLIMIT_AS, &as_lim) == -1) {
+ tst_brkm(TBROK | TERRNO, cleanup,
+ "getrlimit(RLIMIT_AS) failed");
+ }
+
+ tc->addr = global_pointer;
+ tc->len = as_lim.rlim_cur - (rlim_t)global_pointer + PAGESIZE;
+ tc->vector = global_vec;
+
+ /*
+ * In linux 2.6.11 and earlier, EINVAL was returned for this condition.
+ */
+ if (tst_kvercmp(2, 6, 11) <= 0)
+ tc->exp_errno = EINVAL;
}
static void setup(void)
{
char *buf;
+ int fd;
- PAGESIZE = getpagesize();
+ PAGESIZE = sysconf(_SC_PAGESIZE);
+
+ tst_sig(NOFORK, DEF_HANDLER, cleanup);
tst_tmpdir();
+ TEST_PAUSE;
+
/* global_pointer will point to a mmapped area of global_len bytes */
global_len = PAGESIZE * 2;
- buf = malloc(global_len);
+ buf = SAFE_MALLOC(cleanup, global_len);
memset(buf, 42, global_len);
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- TEST_PAUSE;
+ fd = SAFE_OPEN(cleanup, "mincore01", O_CREAT | O_RDWR,
+ S_IRUSR | S_IWUSR);
- /* create a temporary file */
- fd = open("mincore01", O_CREAT | O_RDWR, S_IRUSR | S_IWUSR);
- if (fd == -1) {
- tst_brkm(TBROK | TERRNO, cleanup,
- "Error while creating temporary file");
- }
+ SAFE_WRITE(cleanup, 1, fd, buf, global_len);
- /* fill the temporary file with two pages of data */
- if (write(fd, buf, global_len) == -1) {
- tst_brkm(TBROK | TERRNO, cleanup,
- "Error while writing to temporary file");
- }
free(buf);
- /* map the file in memory */
- global_pointer = mmap(NULL, global_len * 2,
- PROT_READ | PROT_WRITE | PROT_EXEC, MAP_SHARED,
- fd, 0);
+ global_pointer = SAFE_MMAP(cleanup, NULL, global_len * 2,
+ PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
- if (global_pointer == MAP_FAILED) {
- tst_brkm(TBROK | TERRNO, cleanup,
- "Temporary file could not be mmapped");
+ global_vec = SAFE_MALLOC(cleanup,
+ (global_len + PAGESIZE - 1) / PAGESIZE);
+
+ SAFE_CLOSE(cleanup, fd);
+}
+
+static void mincore_verify(struct test_case_t *tc)
+{
+ if (tc->setupfunc)
+ tc->setupfunc(tc);
+
+ TEST(mincore(tc->addr, tc->len, tc->vector));
+
+ if (TEST_RETURN != -1) {
+ tst_resm(TFAIL, "succeeded unexpectedly");
+ return;
}
- /* initialize the vector buffer to collect the page info */
- global_vec = malloc((global_len + PAGESIZE - 1) / PAGESIZE);
+ if (TEST_ERRNO == tc->exp_errno) {
+ tst_resm(TPASS | TTERRNO, "failed as expected");
+ } else {
+ tst_resm(TFAIL | TTERRNO,
+ "mincore failed unexpectedly; expected: "
+ "%d - %s", tc->exp_errno,
+ strerror(tc->exp_errno));
+ }
}
static void cleanup(void)
@@ -208,7 +222,9 @@ static void cleanup(void)
TEST_CLEANUP;
free(global_vec);
- munmap(global_pointer, global_len);
- close(fd);
+
+ if (munmap(global_pointer, global_len) == -1)
+ tst_resm(TWARN | TERRNO, "munmap failed");
+
tst_rmdir();
}
--
1.8.2.1
------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works.
Faster operations. Version large binaries. Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [LTP] [PATCH 3/4] mknodat/mknodat02.c: add ELOOP and EROFS error value test
2014-03-04 6:31 [LTP] syscall's error vaule and flag tests Xiaoguang Wang
2014-03-04 6:31 ` [LTP] [PATCH 1/4] fcntl/fcntl31.c: add I/O availability signals test for fcntl(2) Xiaoguang Wang
2014-03-04 6:31 ` [LTP] [PATCH 2/4] mincore/mincore01.c: cleanup Xiaoguang Wang
@ 2014-03-04 6:32 ` Xiaoguang Wang
2014-03-20 18:45 ` chrubis
2014-03-04 6:32 ` [LTP] [PATCH 4/4] msync/msync03.c: add EBUSY test for msync(2) Xiaoguang Wang
2014-03-20 16:22 ` [LTP] syscall's error vaule and flag tests chrubis
4 siblings, 1 reply; 7+ messages in thread
From: Xiaoguang Wang @ 2014-03-04 6:32 UTC (permalink / raw)
To: ltp-list
And create mknodat.h to encapsulate mknodat syscall.
Signed-off-by: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
---
configure.ac | 1 +
m4/ltp-mknodat.m4 | 25 ++++
runtest/syscalls | 3 +-
testcases/kernel/syscalls/.gitignore | 1 +
testcases/kernel/syscalls/mknodat/mknodat.h | 34 +++++
testcases/kernel/syscalls/mknodat/mknodat01.c | 13 +-
testcases/kernel/syscalls/mknodat/mknodat02.c | 207 ++++++++++++++++++++++++++
7 files changed, 274 insertions(+), 10 deletions(-)
create mode 100644 m4/ltp-mknodat.m4
create mode 100644 testcases/kernel/syscalls/mknodat/mknodat.h
create mode 100644 testcases/kernel/syscalls/mknodat/mknodat02.c
diff --git a/configure.ac b/configure.ac
index 59460b1..92b4745 100644
--- a/configure.ac
+++ b/configure.ac
@@ -173,5 +173,6 @@ LTP_CHECK_CLONE_SUPPORTS_7_ARGS
LTP_CHECK_MKDIRAT
LTP_CHECK_FCHOWNAT
LTP_CHECK_FCNTL
+LTP_CHECK_MKNODAT
AC_OUTPUT
diff --git a/m4/ltp-mknodat.m4 b/m4/ltp-mknodat.m4
new file mode 100644
index 0000000..1ec22c7
--- /dev/null
+++ b/m4/ltp-mknodat.m4
@@ -0,0 +1,25 @@
+dnl
+dnl Copyright (c) Linux Test Project, 2014
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
+dnl the GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+dnl
+
+dnl
+dnl LTP_CHECK_MKNODAT
+dnl ----------------------------
+dnl
+AC_DEFUN([LTP_CHECK_MKNODAT],[
+AC_CHECK_FUNCS(mknodat,,)
+])
diff --git a/runtest/syscalls b/runtest/syscalls
index 7031c41..7f8b8e5 100644
--- a/runtest/syscalls
+++ b/runtest/syscalls
@@ -561,7 +561,8 @@ mknod08 mknod08
mknod09 mknod09
#mknodat test cases
-mknodat01 cd $LTPROOT/testcases/bin && chown root mknodat01 && chmod 04755 mknodat01 && mknodat01
+mknodat01 mknodat01
+mknodat02 mknodat02 -D $LTP_DEV -T $LTP_DEV_FS_TYPE
mlock01 mlock01
mlock02 mlock02
diff --git a/testcases/kernel/syscalls/.gitignore b/testcases/kernel/syscalls/.gitignore
index dc380e3..5f20f3d 100644
--- a/testcases/kernel/syscalls/.gitignore
+++ b/testcases/kernel/syscalls/.gitignore
@@ -507,6 +507,7 @@
/mknod/mknod08
/mknod/mknod09
/mknodat/mknodat01
+/mknodat/mknodat02
/mlock/mlock01
/mlock/mlock02
/mlock/mlock03
diff --git a/testcases/kernel/syscalls/mknodat/mknodat.h b/testcases/kernel/syscalls/mknodat/mknodat.h
new file mode 100644
index 0000000..ac14157
--- /dev/null
+++ b/testcases/kernel/syscalls/mknodat/mknodat.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) International Business Machines Corp., 2007
+ * Copyright (c) 2014 Fujitsu Ltd.
+ *
+ * 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 Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef MKNODAT_H
+#define MKNODAT_H
+
+#include <sys/types.h>
+#include "linux_syscall_numbers.h"
+
+#if !defined(HAVE_MKNODAT)
+int mknodat(int dirfd, const char *filename, mode_t mode, dev_t dev)
+{
+ return ltp_syscall(__NR_mknodat, dirfd, filename, mode, dev);
+}
+#endif
+
+#endif /* MKNODAT_H */
diff --git a/testcases/kernel/syscalls/mknodat/mknodat01.c b/testcases/kernel/syscalls/mknodat/mknodat01.c
index 28a8111..4dbbeb8 100644
--- a/testcases/kernel/syscalls/mknodat/mknodat01.c
+++ b/testcases/kernel/syscalls/mknodat/mknodat01.c
@@ -55,11 +55,11 @@
#include "test.h"
#include "usctest.h"
#include "linux_syscall_numbers.h"
+#include "lapi/fcntl.h"
+#include "mknodat.h"
#define TEST_CASES 5
-#ifndef AT_FDCWD
-#define AT_FDCWD -100
-#endif
+
void setup();
void cleanup();
void setup_every_copy();
@@ -77,11 +77,6 @@ int expected_errno[TEST_CASES] = { 0, 0, ENOTDIR, EBADF, 0 };
dev_t dev;
-int mymknodat(int dirfd, const char *filename, mode_t mode, dev_t dev)
-{
- return ltp_syscall(__NR_mknodat, dirfd, filename, mode, dev);
-}
-
int main(int ac, char **av)
{
int lc;
@@ -119,7 +114,7 @@ int main(int ac, char **av)
*/
for (i = 0; i < TST_TOTAL; i++) {
- TEST(mymknodat(fds[i], filenames[i], S_IFREG, dev));
+ TEST(mknodat(fds[i], filenames[i], S_IFREG, dev));
/* check return code */
if (TEST_ERRNO == expected_errno[i]) {
diff --git a/testcases/kernel/syscalls/mknodat/mknodat02.c b/testcases/kernel/syscalls/mknodat/mknodat02.c
new file mode 100644
index 0000000..aacf6e8
--- /dev/null
+++ b/testcases/kernel/syscalls/mknodat/mknodat02.c
@@ -0,0 +1,207 @@
+/*
+ * Copyright (c) 2014 Fujitsu Ltd.
+ * Author: Xiaoguang Wang <wangxg.fnst@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 along
+ * with this program; if not, write the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/*
+ * Description:
+ * Verify that,
+ * 1) mknod(2) returns -1 and sets errno to EROFS if pathname refers to
+ * a file on a read-only file system.
+ * 2) mknod(2) returns -1 and sets errno to ELOOP if Too many symbolic
+ * links were encountered in resolving pathname.
+ */
+
+#define _GNU_SOURCE
+
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <error.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <signal.h>
+#include <sys/mount.h>
+
+#include "test.h"
+#include "usctest.h"
+#include "safe_macros.h"
+#include "lapi/fcntl.h"
+#include "mknodat.h"
+
+static void setup(void);
+static void cleanup(void);
+static void help(void);
+
+#define DIR_MODE (S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP| \
+ S_IXGRP|S_IROTH|S_IXOTH)
+#define MNT_POINT "mntpoint"
+
+#define FIFOMODE (S_IFIFO | S_IRUSR | S_IRGRP | S_IROTH)
+#define FREGMODE (S_IFREG | S_IRUSR | S_IRGRP | S_IROTH)
+#define SOCKMODE (S_IFSOCK | S_IRUSR | S_IRGRP | S_IROTH)
+
+static char *fstype = "ext2";
+static char *device;
+static int mount_flag;
+
+static option_t options[] = {
+ {"T:", NULL, &fstype},
+ {"D:", NULL, &device},
+ {NULL, NULL, NULL}
+};
+
+static int dirfd;
+static int curfd = AT_FDCWD;
+
+#define ELOPFILE "/test_eloop"
+static char elooppathname[sizeof(ELOPFILE) * 43] = ".";
+
+static struct test_case_t {
+ int *dirfd;
+ char *pathname;
+ mode_t mode;
+ int exp_errno;
+} test_cases[] = {
+ { &curfd, "tnode1", FIFOMODE, 0 },
+ { &curfd, "tnode2", FREGMODE, 0 },
+ { &curfd, "tnode3", SOCKMODE, 0 },
+ { &dirfd, "tnode4", FIFOMODE, EROFS },
+ { &dirfd, "tnode5", FREGMODE, EROFS },
+ { &dirfd, "tnode6", SOCKMODE, EROFS },
+ { &curfd, elooppathname, FIFOMODE, ELOOP },
+ { &curfd, elooppathname, FREGMODE, ELOOP },
+ { &curfd, elooppathname, SOCKMODE, ELOOP },
+};
+
+static void mknodat_verify(struct test_case_t *tc);
+
+char *TCID = "mknodat";
+int TST_TOTAL = ARRAY_SIZE(test_cases);
+static int exp_enos[] = { EROFS, ELOOP, 0 };
+
+int main(int ac, char **av)
+{
+ int lc, i;
+ char *msg;
+
+ msg = parse_opts(ac, av, options, help);
+ if (msg != NULL)
+ tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+
+ if (!device) {
+ tst_brkm(TBROK, NULL, "you must specify the device "
+ "used for mounting with -D option");
+ }
+
+ setup();
+
+ for (lc = 0; TEST_LOOPING(lc); lc++) {
+ tst_count = 0;
+
+ for (i = 0; i < TST_TOTAL; i++)
+ mknodat_verify(&test_cases[i]);
+ }
+
+ cleanup();
+ tst_exit();
+}
+
+static void setup(void)
+{
+ int i;
+
+ if (tst_kvercmp(2, 6, 16) < 0) {
+ tst_brkm(TCONF, NULL, "This test can only run on kernels "
+ "that are 2.6.16 and higher");
+ }
+
+ tst_sig(NOFORK, DEF_HANDLER, cleanup);
+
+ tst_require_root(NULL);
+
+ TEST_EXP_ENOS(exp_enos);
+
+ tst_mkfs(NULL, device, fstype, NULL);
+
+ tst_tmpdir();
+
+ TEST_PAUSE;
+
+ /*
+ * mount a read-only file system for EROFS test
+ */
+ SAFE_MKDIR(cleanup, MNT_POINT, DIR_MODE);
+ if (mount(device, MNT_POINT, fstype, MS_RDONLY, NULL) < 0) {
+ tst_brkm(TBROK | TERRNO, cleanup,
+ "mount device:%s failed", device);
+ }
+ mount_flag = 1;
+ dirfd = SAFE_OPEN(cleanup, MNT_POINT, O_DIRECTORY);
+
+ /*
+ * NOTE: the ELOOP test is written based on that the consecutive
+ * symlinks limits in kernel is hardwired to 40.
+ */
+ SAFE_MKDIR(cleanup, "test_eloop", DIR_MODE);
+ SAFE_SYMLINK(cleanup, "../test_eloop", "test_eloop/test_eloop");
+ for (i = 0; i < 43; i++)
+ strcat(elooppathname, ELOPFILE);
+}
+
+static void mknodat_verify(struct test_case_t *tc)
+{
+ int fd = *(tc->dirfd);
+ char *pathname = tc->pathname;
+ mode_t mode = tc->mode;
+
+ TEST(mknodat(fd, pathname, mode, 0));
+
+ if (TEST_ERRNO == tc->exp_errno) {
+ tst_resm(TPASS | TTERRNO,
+ "mknodat() returned the expected value");
+ } else {
+ tst_resm(TFAIL | TTERRNO,
+ "mknodat() got unexpected return value; expected: "
+ "%d - %s", tc->exp_errno,
+ strerror(tc->exp_errno));
+ }
+
+ if (TEST_ERRNO == 0 &&
+ ltp_syscall(__NR_unlinkat, fd, pathname, 0) < 0) {
+ tst_brkm(TBROK | TERRNO, cleanup, "unlinkat(%d, %s) "
+ "failed.", fd, pathname);
+ }
+}
+
+static void cleanup(void)
+{
+ TEST_CLEANUP;
+
+ if (dirfd > 0 && close(dirfd) < 0)
+ tst_resm(TWARN | TERRNO, "close(%d) failed", dirfd);
+ if (mount_flag && umount(MNT_POINT) < 0)
+ tst_resm(TWARN | TERRNO, "umount device:%s failed", device);
+
+ tst_rmdir();
+}
+
+static void help(void)
+{
+ printf("-T type : specifies the type of filesystem to be mounted. "
+ "Default ext2.\n");
+ printf("-D device : device used for mounting.\n");
+}
--
1.8.2.1
------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works.
Faster operations. Version large binaries. Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [LTP] [PATCH 4/4] msync/msync03.c: add EBUSY test for msync(2)
2014-03-04 6:31 [LTP] syscall's error vaule and flag tests Xiaoguang Wang
` (2 preceding siblings ...)
2014-03-04 6:32 ` [LTP] [PATCH 3/4] mknodat/mknodat02.c: add ELOOP and EROFS error value test Xiaoguang Wang
@ 2014-03-04 6:32 ` Xiaoguang Wang
2014-03-20 16:22 ` [LTP] syscall's error vaule and flag tests chrubis
4 siblings, 0 replies; 7+ messages in thread
From: Xiaoguang Wang @ 2014-03-04 6:32 UTC (permalink / raw)
To: ltp-list
Merge msync03.c, msync04.c, msync05.c into one msync03
test, which contains EINVAL and ENOMEM error value tests.
And add new EBUSY error value test.
Signed-off-by: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
---
runtest/ltplite | 2 -
runtest/stress.part3 | 2 -
runtest/syscalls | 2 -
testcases/kernel/syscalls/.gitignore | 2 -
testcases/kernel/syscalls/msync/msync03.c | 222 ++++++++++++++++++------------
testcases/kernel/syscalls/msync/msync04.c | 158 ---------------------
testcases/kernel/syscalls/msync/msync05.c | 136 ------------------
7 files changed, 133 insertions(+), 391 deletions(-)
delete mode 100644 testcases/kernel/syscalls/msync/msync04.c
delete mode 100644 testcases/kernel/syscalls/msync/msync05.c
diff --git a/runtest/ltplite b/runtest/ltplite
index 7d78775..00ff15f 100644
--- a/runtest/ltplite
+++ b/runtest/ltplite
@@ -505,8 +505,6 @@ msgsnd06 msgsnd06
msync01 msync01
msync02 msync02
msync03 msync03
-msync04 msync04
-msync05 msync05
munlock01 munlock01
munlock02 munlock02
diff --git a/runtest/stress.part3 b/runtest/stress.part3
index cd49bf1..3d48f0f 100644
--- a/runtest/stress.part3
+++ b/runtest/stress.part3
@@ -428,8 +428,6 @@ msgsnd06 msgsnd06
msync01 msync01
msync02 msync02
msync03 msync03
-msync04 msync04
-msync05 msync05
munlock01 munlock01
munlock02 munlock02
diff --git a/runtest/syscalls b/runtest/syscalls
index 7f8b8e5..cd11e00 100644
--- a/runtest/syscalls
+++ b/runtest/syscalls
@@ -665,8 +665,6 @@ msgsnd06 msgsnd06
msync01 msync01
msync02 msync02
msync03 msync03
-msync04 msync04
-msync05 msync05
munlock01 munlock01
munlock02 munlock02
diff --git a/testcases/kernel/syscalls/.gitignore b/testcases/kernel/syscalls/.gitignore
index 5f20f3d..594b029 100644
--- a/testcases/kernel/syscalls/.gitignore
+++ b/testcases/kernel/syscalls/.gitignore
@@ -566,8 +566,6 @@
/msync/msync01
/msync/msync02
/msync/msync03
-/msync/msync04
-/msync/msync05
/munlock/munlock01
/munlock/munlock02
/munlockall/munlockall01
diff --git a/testcases/kernel/syscalls/msync/msync03.c b/testcases/kernel/syscalls/msync/msync03.c
index e152f2c..68454eb 100644
--- a/testcases/kernel/syscalls/msync/msync03.c
+++ b/testcases/kernel/syscalls/msync/msync03.c
@@ -1,138 +1,182 @@
/*
+ * Copyright (c) 2014 Fujitsu Ltd.
+ * Author: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
*
- * Copyright (c) International Business Machines Corp., 2001
+ * 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 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 would be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
- * 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; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/*
- * Test Name: msync03
- *
- * Test Description:
- * Verify that, msync() fails, when the region to synchronize, is outside
- * the address space of the process.
- *
- * Expected Result:
- * msync() should fail with a return value of -1, and errno should be
- * set to EINVAL.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * if errno set == expected errno
- * Issue sys call fails with expected return value and errno.
- * Otherwise,
- * Issue sys call fails with unexpected errno.
- * Otherwise,
- * Issue sys call returns unexpected value.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- * Usage: <for command-line>
- * msync03 [-c n] [-e] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS:
- * None.
+ * Description:
+ * Verify that,
+ * 1. msync() fails with -1 return value and sets errno to EBUSY
+ * if MS_INVALIDATE was specified in flags, and a memory lock
+ * exists for the specified address range.
+ * 2. msync() fails with -1 return value and sets errno to EINVAL
+ * if addr is not a multiple of PAGESIZE; or any bit other than
+ * MS_ASYNC | MS_INVALIDATE | MS_SYNC is set in flags; or both
+ * MS_SYNC and MS_ASYNC are set in flags.
+ * 3. msync() fails with -1 return value and sets errno to ENOMEM
+ * if the indicated memory (or part of it) was not mapped.
*/
+
+#include <stdio.h>
#include <errno.h>
#include <unistd.h>
+#include <fcntl.h>
+#include <string.h>
+#include <signal.h>
+#include <sys/types.h>
+#include <sys/stat.h>
#include <sys/mman.h>
+#include <sys/mount.h>
+#include <pwd.h>
#include <sys/resource.h>
#include "test.h"
#include "usctest.h"
+#include "safe_macros.h"
+
+#define INV_SYNC -1
+#define TEMPFILE "msync_file"
+#define BUF_SIZE 256
+
+static void setup(void);
+static void cleanup(void);
+
+static int fd;
+static char *addr1;
+static char *addr2;
+static char *addr3;
+
+#if !defined(UCLINUX)
+static char *addr4;
+#endif
+
+static size_t page_sz;
+
+static struct test_case_t {
+ char **addr;
+ int flags;
+ int exp_errno;
+} test_cases[] = {
+ { &addr1, MS_INVALIDATE, EBUSY },
+ { &addr1, MS_ASYNC | MS_SYNC, EINVAL },
+ { &addr1, INV_SYNC, EINVAL },
+ { &addr2, MS_SYNC, EINVAL },
+ { &addr3, MS_SYNC, EINVAL },
+#if !defined(UCLINUX)
+ { &addr4, MS_SYNC, ENOMEM },
+#endif
+};
+
+static void msync_verify(struct test_case_t *tc);
char *TCID = "msync03";
-int TST_TOTAL = 1;
-
-void *addr; /* addr of memory mapped region */
-size_t page_sz; /* system page size */
-
-int exp_enos[] = { EINVAL, 0 };
-
-void setup(); /* Main setup function of test */
-void cleanup(); /* cleanup function for the test */
+int TST_TOTAL = ARRAY_SIZE(test_cases);
+static int exp_enos[] = { EBUSY, EINVAL, ENOMEM, 0 };
int main(int ac, char **av)
{
- int lc;
+ int i, lc;
char *msg;
- if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+ msg = parse_opts(ac, av, NULL, NULL);
+ if (msg != NULL)
tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
setup();
- TEST_EXP_ENOS(exp_enos);
-
for (lc = 0; TEST_LOOPING(lc); lc++) {
-
tst_count = 0;
- TEST(msync(addr, page_sz, MS_ASYNC));
-
- if (TEST_RETURN != -1) {
- tst_resm(TFAIL, "msync() returns unexpected "
- "value %ld, expected:-1", TEST_RETURN);
- continue;
- }
-
- if (errno == EINVAL)
- tst_resm(TPASS, "msync failed with EINVAL as expected");
- else
- tst_resm(TFAIL | TERRNO, "msync failed unexpectedly");
+ for (i = 0; i < TST_TOTAL; i++)
+ msync_verify(&test_cases[i]);
}
cleanup();
tst_exit();
}
-void setup()
+static void setup(void)
{
- struct rlimit brkval;
+ size_t nwrite = 0;
+ char write_buf[BUF_SIZE];
+ struct rlimit rl;
tst_sig(NOFORK, DEF_HANDLER, cleanup);
+ TEST_EXP_ENOS(exp_enos);
+
+ tst_tmpdir();
+
TEST_PAUSE;
- if ((page_sz = getpagesize()) == -1)
- tst_brkm(TBROK | TERRNO, NULL, "getpagesize failed");
+ page_sz = (size_t)sysconf(_SC_PAGESIZE);
- getrlimit(RLIMIT_DATA, &brkval);
+ fd = SAFE_OPEN(cleanup, TEMPFILE, O_RDWR | O_CREAT, 0666);
+
+ memset(write_buf, 'a', BUF_SIZE);
+ while (nwrite < page_sz) {
+ SAFE_WRITE(cleanup, 1, fd, write_buf, BUF_SIZE);
+ nwrite += BUF_SIZE;
+ }
- addr = (void *)brkval.rlim_max;
+ addr1 = SAFE_MMAP(cleanup, 0, page_sz, PROT_READ | PROT_WRITE,
+ MAP_SHARED | MAP_LOCKED, fd, 0);
+
+ /* addr2 is not a multiple of PAGESIZE */
+ addr2 = addr1 + 1;
+
+ /* addr3 is outside the address space of the process */
+ if (getrlimit(RLIMIT_DATA, &rl) < 0)
+ tst_brkm(TBROK | TERRNO, NULL, "getrlimit failed");
+ addr3 = (char *)rl.rlim_max;
+
+#if !defined(UCLINUX)
+ /* memory pointed to by addr4 was not mapped */
+ addr4 = get_high_address();
+#endif
}
-void cleanup()
+static void msync_verify(struct test_case_t *tc)
+{
+ TEST(msync(*(tc->addr), page_sz, tc->flags));
+ if (TEST_RETURN != -1) {
+ tst_resm(TFAIL, "msync succeeded unexpectedly");
+ return;
+ }
+
+ TEST_ERROR_LOG(TEST_ERRNO);
+
+ if (TEST_ERRNO == tc->exp_errno) {
+ tst_resm(TPASS | TTERRNO, "msync failed as expected");
+ } else {
+ tst_resm(TFAIL | TTERRNO,
+ "msync failed unexpectedly; expected: "
+ "%d - %s", tc->exp_errno,
+ strerror(tc->exp_errno));
+ }
+}
+
+static void cleanup(void)
{
TEST_CLEANUP;
+ if (munmap(addr1, page_sz) < 0)
+ tst_resm(TWARN | TERRNO, "munmap() failed");
+
+ if (fd > 0 && close(fd) < 0)
+ tst_resm(TWARN | TERRNO, "close() failed");
+
+ tst_rmdir();
}
diff --git a/testcases/kernel/syscalls/msync/msync04.c b/testcases/kernel/syscalls/msync/msync04.c
deleted file mode 100644
index a739e62..0000000
--- a/testcases/kernel/syscalls/msync/msync04.c
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * 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; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/*
- * Test Name: msync04
- *
- * Test Description:
- * Verify that, msync() fails, when the region to synchronize, is mapped
- * but the flags argument is invalid.
- *
- * Expected Result:
- * msync() should fail with a return value of -1, and set errno EINVAL.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Create temporary directory.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * if errno set == expected errno
- * Issue sys call fails with expected return value and errno.
- * Otherwise,
- * Issue sys call fails with unexpected errno.
- * Otherwise,
- * Issue sys call returns unexpected value.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory(s)/file(s) created.
- *
- * Usage: <for command-line>
- * msync04 [-c n] [-e] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS:
- * None.
- */
-#include <errno.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define TEMPFILE "msync_file"
-#define BUF_SIZE 256
-#define INV_SYNC -1
-
-char *TCID = "msync04";
-int TST_TOTAL = 1;
-
-char *addr; /* addr of memory mapped region */
-size_t page_sz; /* system page size */
-int fildes; /* file descriptor for tempfile */
-
-int exp_enos[] = { EINVAL, 0 };
-
-void setup(); /* Main setup function of test */
-void cleanup(); /* cleanup function for the test */
-
-int main(int ac, char **av)
-{
- TEST_EXP_ENOS(exp_enos);
-
- tst_count = 0;
-
- setup();
-
- TEST(msync(addr, page_sz, INV_SYNC));
-
- if (TEST_RETURN != -1)
- tst_resm(TFAIL, "msync succeeded unexpectedly");
- else if (TEST_ERRNO == EINVAL)
- tst_resm(TPASS, "msync failed with EINVAL as expected");
- else
- tst_resm(TFAIL | TTERRNO, "msync failed unexpectedly");
-
- cleanup();
-
- tst_exit();
-}
-
-void setup()
-{
- int c_total = 0, nwrite = 0; /* no. of bytes to be written */
- char tst_buf[BUF_SIZE]; /* buffer to hold data to be written */
-
- TEST_PAUSE;
-
- if ((page_sz = getpagesize()) == -1)
- tst_brkm(TBROK | TERRNO, NULL, "getpagesize failed");
-
- tst_tmpdir();
-
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Creat a temporary file used for mapping */
- if ((fildes = open(TEMPFILE, O_RDWR | O_CREAT, 0666)) < 0)
- tst_brkm(TBROK | TERRNO, cleanup, "open failed");
-
- /* Write one page size of char data into temporary file */
- while (c_total < page_sz) {
- if ((nwrite = write(fildes, tst_buf, sizeof(tst_buf))) <= 0)
- tst_brkm(TBROK, cleanup, "write failed");
- else
- c_total += nwrite;
- }
-
- addr = mmap(0, page_sz, PROT_READ | PROT_WRITE, MAP_FILE | MAP_PRIVATE,
- fildes, 0);
-
- /* Check for the return value of mmap() */
- if (addr == MAP_FAILED)
- tst_brkm(TBROK | TERRNO, cleanup, "mmap failed");
-}
-
-void cleanup()
-{
- TEST_CLEANUP;
-
- if (munmap(addr, page_sz) == -1)
- tst_brkm(TBROK, NULL, "munmap failed");
-
- /* Close the temporary file */
- if (close(fildes) == -1)
- tst_brkm(TBROK, NULL, "close failed");
-
- tst_rmdir();
-}
diff --git a/testcases/kernel/syscalls/msync/msync05.c b/testcases/kernel/syscalls/msync/msync05.c
deleted file mode 100644
index eaf28ab..0000000
--- a/testcases/kernel/syscalls/msync/msync05.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * 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; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/*
- * Test Name: msync05
- *
- * Test Description:
- * Verify that, msync() fails, when the region to synchronize, was not
- * mapped.
- *
- * Expected Result:
- * msync() should fail with a return value of -1, and set errno ENOMEM.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * if errno set == expected errno
- * Issue sys call fails with expected return value and errno.
- * Otherwise,
- * Issue sys call fails with unexpected errno.
- * Otherwise,
- * Issue sys call returns unexpected value.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- * Usage: <for command-line>
- * msync05 [-c n] [-e] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- * 03/2002 Paul Larson: expected error should be ENOMEM not EFAULT
- *
- * RESTRICTIONS:
- * None.
- */
-#include <errno.h>
-#include <unistd.h>
-#include <sys/mman.h>
-
-#include "test.h"
-#include "usctest.h"
-
-char *TCID = "msync05";
-int TST_TOTAL = 1;
-
-void *addr; /* addr of memory mapped region */
-size_t page_sz; /* system page size */
-
-int exp_enos[] = { ENOMEM, 0 };
-
-void setup(); /* Main setup function of test */
-void cleanup(); /* cleanup function for the test */
-
-#if !defined(UCLINUX)
-int main(int ac, char **av)
-{
- int lc;
- char *msg;
-
- if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-
- setup();
-
- TEST_EXP_ENOS(exp_enos);
-
- for (lc = 0; TEST_LOOPING(lc); lc++) {
-
- tst_count = 0;
-
- TEST(msync(addr, page_sz, MS_SYNC));
-
- if (TEST_RETURN != -1)
- tst_resm(TFAIL, "msync succeeded unexpectedly");
- else if (TEST_ERRNO == ENOMEM)
- tst_resm(TPASS, "msync failed as expected with ENOMEM");
- else
- tst_resm(TFAIL | TTERRNO, "msync failed unexpectedly");
- }
-
- cleanup();
- tst_exit();
-}
-
-void setup()
-{
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- TEST_PAUSE;
-
- if ((page_sz = getpagesize()) == -1)
- tst_brkm(TBROK | TERRNO, NULL, "getpagesize failed");
-
- addr = get_high_address();
-}
-
-void cleanup()
-{
- TEST_CLEANUP;
-}
-
-#else
-int main()
-{
- tst_brkm(TCONF, NULL, "test is not available on uClinux");
-}
-#endif /* if !defined(UCLINUX) */
--
1.8.2.1
------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works.
Faster operations. Version large binaries. Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [LTP] syscall's error vaule and flag tests
2014-03-04 6:31 [LTP] syscall's error vaule and flag tests Xiaoguang Wang
` (3 preceding siblings ...)
2014-03-04 6:32 ` [LTP] [PATCH 4/4] msync/msync03.c: add EBUSY test for msync(2) Xiaoguang Wang
@ 2014-03-20 16:22 ` chrubis
4 siblings, 0 replies; 7+ messages in thread
From: chrubis @ 2014-03-20 16:22 UTC (permalink / raw)
To: Xiaoguang Wang; +Cc: ltp-list
Hi!
> Currently I send many patches about syscall's error value and flag tests.
> I think it has made some disorder in mail list, sorry. I will put these
> similar patches in one thread to keep some orderliness, thanks.
As far as I can figure out which patches should be reviewed it's fine,
just make sure to number the versions so that I can figure out which one
is the latest.
And if I forget to look at some of your patches feel free to ping me.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [LTP] [PATCH 3/4] mknodat/mknodat02.c: add ELOOP and EROFS error value test
2014-03-04 6:32 ` [LTP] [PATCH 3/4] mknodat/mknodat02.c: add ELOOP and EROFS error value test Xiaoguang Wang
@ 2014-03-20 18:45 ` chrubis
0 siblings, 0 replies; 7+ messages in thread
From: chrubis @ 2014-03-20 18:45 UTC (permalink / raw)
To: Xiaoguang Wang; +Cc: ltp-list
Hi!
> And create mknodat.h to encapsulate mknodat syscall.
>
> Signed-off-by: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
Pushed, thanks.
PS: I've fixed the mknodat01 testcase, which was wrong on several
things. Most problematic was return 0; in main() instead of
tst_exit(), so the test returned success no matter what happened.
And it looks like most of the *at testcases are similarily wrong :(
At least I've allready fixed the mkdirat01 and mknodat01...
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-03-20 18:46 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-04 6:31 [LTP] syscall's error vaule and flag tests Xiaoguang Wang
2014-03-04 6:31 ` [LTP] [PATCH 1/4] fcntl/fcntl31.c: add I/O availability signals test for fcntl(2) Xiaoguang Wang
2014-03-04 6:31 ` [LTP] [PATCH 2/4] mincore/mincore01.c: cleanup Xiaoguang Wang
2014-03-04 6:32 ` [LTP] [PATCH 3/4] mknodat/mknodat02.c: add ELOOP and EROFS error value test Xiaoguang Wang
2014-03-20 18:45 ` chrubis
2014-03-04 6:32 ` [LTP] [PATCH 4/4] msync/msync03.c: add EBUSY test for msync(2) Xiaoguang Wang
2014-03-20 16:22 ` [LTP] syscall's error vaule and flag tests chrubis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox