syscalls/mprotect: Cleanup UCLINUX ifdefs.
Add mprotect directory to FILTER_OUT_DIRS on UCLINUX.
Remove the UCLINUX ifdefs from the code.
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
diff --git a/testcases/kernel/syscalls/Makefile b/testcases/kernel/syscalls/Makefile
index da7c7fa..e70758d 100644
--- a/testcases/kernel/syscalls/Makefile
+++ b/testcases/kernel/syscalls/Makefile
@@ -26,7 +26,7 @@
ifeq ($(UCLINUX),1)
FILTER_OUT_DIRS += capget capset chmod chown clone fork getcontext llseek \
- nftw profil remap_file_pages mincore
+ nftw profil remap_file_pages mincore mprotect
endif
include $(top_srcdir)/include/mk/generic_trunk_target.mk
diff --git a/testcases/kernel/syscalls/mprotect/mprotect01.c b/testcases/kernel/syscalls/mprotect/mprotect01.c
index ccf4cab..e635fed 100644
--- a/testcases/kernel/syscalls/mprotect/mprotect01.c
+++ b/testcases/kernel/syscalls/mprotect/mprotect01.c
@@ -110,8 +110,6 @@
&addr3, PAGESIZE, PROT_WRITE, EACCES, setup3}
};
-#ifndef UCLINUX
-
int main(int ac, char **av)
{
int lc;
@@ -166,16 +164,6 @@
tst_exit();
}
-#else
-
-int main()
-{
- tst_resm(TINFO, "Ignore this test on uClinux");
- tst_exit();
-}
-
-#endif /* UCLINUX */
-
/*
* setup1() - sets up conditions for the first test
*/
diff --git a/testcases/kernel/syscalls/mprotect/mprotect02.c b/testcases/kernel/syscalls/mprotect/mprotect02.c
index 0a9492f..05f6bfe 100644
--- a/testcases/kernel/syscalls/mprotect/mprotect02.c
+++ b/testcases/kernel/syscalls/mprotect/mprotect02.c
@@ -72,8 +72,6 @@
char *addr = MAP_FAILED;
char buf[] = "abcdefghijklmnopqrstuvwxyz";
-#ifndef UCLINUX
-
int main(int ac, char **av)
{
int lc;
@@ -185,15 +183,6 @@
tst_exit();
}
-#else
-
-int main()
-{
- tst_brkm(TCONF, NULL, "test not runnable on uClinux");
-}
-
-#endif /* UCLINUX */
-
static void sighandler(int sig)
{
_exit((sig == SIGSEGV) ? 0 : sig);
diff --git a/testcases/kernel/syscalls/mprotect/mprotect03.c b/testcases/kernel/syscalls/mprotect/mprotect03.c
index 0174418..524cfe7 100644
--- a/testcases/kernel/syscalls/mprotect/mprotect03.c
+++ b/testcases/kernel/syscalls/mprotect/mprotect03.c
@@ -73,8 +73,6 @@
int status;
char file1[BUFSIZ];
-#ifndef UCLINUX
-
int main(int ac, char **av)
{
int lc;
@@ -163,16 +161,6 @@
}
-#else
-
-int main()
-{
- tst_resm(TINFO, "Ignore this test on uClinux");
- tst_exit();
-}
-
-#endif /* UCLINUX */
-
void sighandler(int sig)
{
if (sig == SIGSEGV) {