[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ltp-list
Subject:    [LTP] [PATCH V2 1/2] syscalls/setgroups: fix 16-bit versions of the testcases
From:       Stanislav Kholmanskikh <stanislav.kholmanskikh () oracle ! com>
Date:       2013-08-27 9:35:28
Message-ID: 1377596129-32367-1-git-send-email-stanislav.kholmanskikh () oracle ! com
[Download RAW message or body]

Now 16-bit testcases are executed only if platform
has corresponding 16-bit version of setgroups() syscall.

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
---
 testcases/kernel/syscalls/setgroups/compat_16.h |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/testcases/kernel/syscalls/setgroups/compat_16.h \
b/testcases/kernel/syscalls/setgroups/compat_16.h index 0de4e78..8f46da9 100644
--- a/testcases/kernel/syscalls/setgroups/compat_16.h
+++ b/testcases/kernel/syscalls/setgroups/compat_16.h
@@ -32,9 +32,16 @@ extern void cleanup(void);
 #ifdef TST_USE_COMPAT16_SYSCALL
 
 long
-SETGROUPS(size_t gidsetsize, GID_T *list)
+SETGROUPS(size_t gidsetsize, GID_T *list16)
 {
-	return ltp_syscall(__NR_setgroups, gidsetsize, list);
+# if (__NR_setgroups32 != __LTP__NR_INVALID_SYSCALL)
+	/* __NR_setgroups - 16-bit version of setgroups() syscall */
+	return ltp_syscall(__NR_setgroups, gidsetsize, list16);
+# else
+	/* The platform has no 16-bit version of setgroups() syscall */
+	tst_brkm(TCONF, NULL,
+		"16-bit version of setgroups() is not supported on your arch");
+# endif /* __NR_setgroups32 */
 }
 
 int
-- 
1.7.1


------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic