[PATCH 4/4] tests: add munlockall.test

Fei Jie feij.fnst at cn.fujitsu.com
Wed May 11 07:07:29 UTC 2016


* tests/munlockall.c: New file.
* tests/munlockall.test: New test.
* tests/.gitignore: Add munlockall.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add munlockall.test.
---
 tests/.gitignore      |  1 +
 tests/Makefile.am     |  2 ++
 tests/munlockall.c    | 13 +++++++++++++
 tests/munlockall.test |  6 ++++++
 4 files changed, 22 insertions(+)
 create mode 100644 tests/munlockall.c
 create mode 100755 tests/munlockall.test

diff --git a/tests/.gitignore b/tests/.gitignore
index 44ae1a9..b47c6af 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -127,6 +127,7 @@ mmap64
 mmsg
 move_pages
 mq
+munlockall
 nanosleep
 net-accept-connect
 net-icmp_filter
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 27aecd2..3aadb03 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -180,6 +180,7 @@ check_PROGRAMS = \
 	mmsg \
 	move_pages \
 	mq \
+	munlockall \
 	nanosleep \
 	net-accept-connect \
 	net-icmp_filter \
@@ -464,6 +465,7 @@ DECODER_TESTS = \
 	mmsg.test \
 	move_pages.test \
 	mq.test \
+	munlockall.test \
 	nanosleep.test \
 	net-icmp_filter.test \
 	net-y-unix.test \
diff --git a/tests/munlockall.c b/tests/munlockall.c
new file mode 100644
index 0000000..9ac6942
--- /dev/null
+++ b/tests/munlockall.c
@@ -0,0 +1,13 @@
+#include "tests.h"
+
+#include <stdio.h>
+#include <sys/mman.h>
+
+int
+main(void)
+{
+	printf("munlockall() = %d\n", munlockall());
+
+	puts("+++ exited with 0 +++");
+	return 0;
+}
diff --git a/tests/munlockall.test b/tests/munlockall.test
new file mode 100755
index 0000000..e25d60a
--- /dev/null
+++ b/tests/munlockall.test
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# Check munlockall syscall decoding.
+
+. "${srcdir=.}/init.sh"
+run_strace_match_diff -a13
-- 
1.8.3.1







More information about the Strace-devel mailing list