git » libfiu » commit 273fc65

tests: Add generated tests for kill and mmap

author Alberto Bertogli
2012-09-05 18:55:13 UTC
committer Alberto Bertogli
2012-09-05 18:55:13 UTC
parent 4856a2c32c11afac87da19f1554fec5da579ebe6

tests: Add generated tests for kill and mmap

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>

tests/generated/tests/kill.conf +10 -0
tests/generated/tests/mmap.conf +12 -0

diff --git a/tests/generated/tests/kill.conf b/tests/generated/tests/kill.conf
new file mode 100644
index 0000000..83961e3
--- /dev/null
+++ b/tests/generated/tests/kill.conf
@@ -0,0 +1,10 @@
+
+[kill]
+fp: posix/proc/kill
+include: sys/types.h signal.h
+prep: int r;
+call: r = kill(0, 0);
+success_cond: r != -1
+failure_cond: r == -1
+errno_on_fail: ESRCH
+
diff --git a/tests/generated/tests/mmap.conf b/tests/generated/tests/mmap.conf
new file mode 100644
index 0000000..68af0ca
--- /dev/null
+++ b/tests/generated/tests/mmap.conf
@@ -0,0 +1,12 @@
+
+[mmap]
+fp: posix/mm/mmap
+include: sys/mman.h unistd.h
+ifdef: _POSIX_MAPPED_FILES
+prep: void *p;
+call: p = mmap(NULL, 4092, PROT_READ | PROT_WRITE,
+		MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+success_cond: p != MAP_FAILED
+failure_cond: p == MAP_FAILED
+errno_on_fail: ETXTBSY
+