Testing sendmsg syscall with multiple flags can lead to undefined results, depending on order in which these flags are processed.
Futher, this flag is defined by LTP in different way than it's defined in kernel, which causes testcase to fail as it hits different check in kernel for 64 and 32 bit testcase. This patch removes the case entirely. And since this is the only place using it, it removes msg_common.h, where it's defined as well. Signed-off-by: Jan Stancek <jstan...@redhat.com> --- testcases/kernel/syscalls/recvmsg/recvmsg01.c | 1 - testcases/kernel/syscalls/sendmsg/sendmsg01.c | 18 ----------- testcases/kernel/syscalls/utils/msg_common.h | 39 ------------------------- 3 files changed, 0 insertions(+), 58 deletions(-) delete mode 100644 testcases/kernel/syscalls/utils/msg_common.h diff --git a/testcases/kernel/syscalls/recvmsg/recvmsg01.c b/testcases/kernel/syscalls/recvmsg/recvmsg01.c index 2964b26..d35f1fa 100644 --- a/testcases/kernel/syscalls/recvmsg/recvmsg01.c +++ b/testcases/kernel/syscalls/recvmsg/recvmsg01.c @@ -57,7 +57,6 @@ #include "test.h" #include "usctest.h" -#include "msg_common.h" char *TCID = "recvmsg01"; int testno; diff --git a/testcases/kernel/syscalls/sendmsg/sendmsg01.c b/testcases/kernel/syscalls/sendmsg/sendmsg01.c index 0ae4bf8..2349385 100644 --- a/testcases/kernel/syscalls/sendmsg/sendmsg01.c +++ b/testcases/kernel/syscalls/sendmsg/sendmsg01.c @@ -49,7 +49,6 @@ #include "test.h" #include "usctest.h" -#include "msg_common.h" char *TCID = "sendmsg01"; int testno; @@ -305,23 +304,6 @@ struct test_case_t tdat[] = { .cleanup = cleanup4, .desc = "rights passing"} , - {.domain = PF_UNIX, - .type = SOCK_DGRAM, - .proto = 0, - .iov = iov, - .iovcnt = 1, - .buf = buf, - .buflen = sizeof(buf), - .msg = &msgdat, - .flags = ~MSG_CMSG_COMPAT, - .to = (struct sockaddr *)&sun1, - .tolen = sizeof(sun1), - .retval = -1, - .experrno = EOPNOTSUPP, - .setup = setup4, - .cleanup = cleanup4, - .desc = "invalid flags set w/ control"} - , {.domain = PF_INET, .type = SOCK_DGRAM, .proto = 0, diff --git a/testcases/kernel/syscalls/utils/msg_common.h b/testcases/kernel/syscalls/utils/msg_common.h deleted file mode 100644 index 2ecd27e..0000000 --- a/testcases/kernel/syscalls/utils/msg_common.h +++ /dev/null @@ -1,39 +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 would 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 the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifndef LTP_MSG_COMMON -#define LTP_MSG_COMMON - -/* The #ifndef code below is for 2.5 64-bit kernels, where */ -/* the MSG_CMSG_COMPAT flag must be 0 in order for the syscall */ -/* and this test to function correctly. */ -#ifndef MSG_CMSG_COMPAT - -#if defined(__powerpc64__) || defined(__mips64) || defined(__x86_64__) || \ - defined(__ia64__) || defined(__s390x__) || \ - defined(__sparc__) && defined(__arch64__) -#define MSG_CMSG_COMPAT 0x80000000 -#else -#define MSG_CMSG_COMPAT 0 -#endif - -#endif - - -#endif /* LTP_MSG_COMMON */ -- 1.7.1 ------------------------------------------------------------------------------ Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list