Module: xenomai-3
Branch: master
Commit: 4bd117a74ac31b6ca5ce010477ec48993f441c76
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=4bd117a74ac31b6ca5ce010477ec48993f441c76

Author: Philippe Gerum <r...@xenomai.org>
Date:   Sat Jun 20 11:16:31 2015 +0200

testsuite/smokey: rename POSIX tests consistently

Running smokey --run=posix* will now run all tests for POSIX services.

---

 configure.ac                                       |    8 +++----
 testsuite/smokey/Makefile.am                       |   24 ++++++++++----------
 testsuite/smokey/cond-torture/Makefile.am          |    9 --------
 testsuite/smokey/fork-exec/Makefile.am             |   10 --------
 testsuite/smokey/mutex-torture/Makefile.am         |    9 --------
 testsuite/smokey/posix-cond/Makefile.am            |    9 ++++++++
 .../cond-torture.c => posix-cond/posix-cond.c}     |    7 +++---
 testsuite/smokey/posix-fork/Makefile.am            |   10 ++++++++
 .../fork-exec.c => posix-fork/posix-fork.c}        |    6 ++---
 testsuite/smokey/posix-mutex/Makefile.am           |    9 ++++++++
 .../mutex-torture.c => posix-mutex/posix-mutex.c}  |   11 ++++-----
 11 files changed, 55 insertions(+), 57 deletions(-)

diff --git a/configure.ac b/configure.ac
index 14a3354..7abd18c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -927,14 +927,14 @@ AC_CONFIG_FILES([ \
        testsuite/smokey/sched-tp/Makefile \
        testsuite/smokey/rtdm/Makefile \
        testsuite/smokey/vdso-access/Makefile \
-       testsuite/smokey/cond-torture/Makefile \
-       testsuite/smokey/mutex-torture/Makefile \
+       testsuite/smokey/posix-cond/Makefile \
+       testsuite/smokey/posix-mutex/Makefile \
+       testsuite/smokey/posix-clock/Makefile \
+       testsuite/smokey/posix-fork/Makefile \
        testsuite/smokey/xddp/Makefile \
        testsuite/smokey/iddp/Makefile \
        testsuite/smokey/bufp/Makefile \
-       testsuite/smokey/fork-exec/Makefile \
        testsuite/smokey/sigdebug/Makefile \
-       testsuite/smokey/posix-clock/Makefile \
        testsuite/clocktest/Makefile \
        testsuite/xeno-test/Makefile \
        testsuite/regression/Makefile \
diff --git a/testsuite/smokey/Makefile.am b/testsuite/smokey/Makefile.am
index b1a6426..2229871 100644
--- a/testsuite/smokey/Makefile.am
+++ b/testsuite/smokey/Makefile.am
@@ -10,17 +10,17 @@ wrappers = $(XENO_POSIX_WRAPPERS)
 SUBDIRS =              \
        arith           \
        bufp            \
-       posix-clock      \
-       cond-torture    \
-       fork-exec       \
        iddp            \
-       mutex-torture   \
+       posix-clock     \
+       posix-cond      \
+       posix-fork      \
+       posix-mutex     \
        rtdm            \
        sched-quota     \
        sched-tp        \
+       sigdebug        \
        vdso-access     \
-       xddp            \
-       sigdebug
+       xddp
 else
 SUBDIRS =
 wrappers =
@@ -50,14 +50,14 @@ smokey_LDADD =                                      \
 DIST_SUBDIRS =                 \
        arith           \
        bufp            \
-       posix-clock     \
-       cond-torture    \
-       fork-exec       \
        iddp            \
-       mutex-torture   \
+       posix-clock     \
+       posix-cond      \
+       posix-fork      \
+       posix-mutex     \
        rtdm            \
        sched-quota     \
        sched-tp        \
+       sigdebug        \
        vdso-access     \
-       xddp            \
-       sigdebug
+       xddp
diff --git a/testsuite/smokey/cond-torture/Makefile.am 
b/testsuite/smokey/cond-torture/Makefile.am
deleted file mode 100644
index 333f95f..0000000
--- a/testsuite/smokey/cond-torture/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-
-noinst_LIBRARIES = libcond-torture.a
-
-libcond_torture_a_SOURCES = cond-torture.c
-
-libcond_torture_a_CPPFLAGS =   \
-       @XENO_USER_CFLAGS@      \
-       -I$(top_srcdir)         \
-       -I$(top_srcdir)/include
diff --git a/testsuite/smokey/fork-exec/Makefile.am 
b/testsuite/smokey/fork-exec/Makefile.am
deleted file mode 100644
index e1d0a33..0000000
--- a/testsuite/smokey/fork-exec/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-
-noinst_LIBRARIES = libfork-exec.a
-
-libfork_exec_a_SOURCES = fork-exec.c
-
-CCLD = $(top_srcdir)/scripts/wrap-link.sh $(CC)
-
-libfork_exec_a_CPPFLAGS =      \
-       @XENO_USER_CFLAGS@      \
-       -I$(top_srcdir)/include
diff --git a/testsuite/smokey/mutex-torture/Makefile.am 
b/testsuite/smokey/mutex-torture/Makefile.am
deleted file mode 100644
index 9d2f08e..0000000
--- a/testsuite/smokey/mutex-torture/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-
-noinst_LIBRARIES = libmutex-torture.a
-
-libmutex_torture_a_SOURCES = mutex-torture.c
-
-libmutex_torture_a_CPPFLAGS =  \
-       @XENO_USER_CFLAGS@      \
-       -I$(top_srcdir)         \
-       -I$(top_srcdir)/include
diff --git a/testsuite/smokey/posix-cond/Makefile.am 
b/testsuite/smokey/posix-cond/Makefile.am
new file mode 100644
index 0000000..4f911e2
--- /dev/null
+++ b/testsuite/smokey/posix-cond/Makefile.am
@@ -0,0 +1,9 @@
+
+noinst_LIBRARIES = libposix-cond.a
+
+libposix_cond_a_SOURCES = posix-cond.c
+
+libposix_cond_a_CPPFLAGS =     \
+       @XENO_USER_CFLAGS@      \
+       -I$(top_srcdir)         \
+       -I$(top_srcdir)/include
diff --git a/testsuite/smokey/cond-torture/cond-torture.c 
b/testsuite/smokey/posix-cond/posix-cond.c
similarity index 98%
rename from testsuite/smokey/cond-torture/cond-torture.c
rename to testsuite/smokey/posix-cond/posix-cond.c
index 54fcea5..cd5c922 100644
--- a/testsuite/smokey/cond-torture/cond-torture.c
+++ b/testsuite/smokey/posix-cond/posix-cond.c
@@ -16,9 +16,9 @@
 #include <pthread.h>
 #include <smokey/smokey.h>
 
-smokey_test_plugin(cond_torture,
+smokey_test_plugin(posix_cond,
                   SMOKEY_NOARGS,
-                  "Check POSIX condition variables"
+                  "Check POSIX condition variable services"
 );
 
 #define NS_PER_MS (1000000)
@@ -626,7 +626,7 @@ static void cond_destroy_whilewait(void)
        check("cond_destroy", cond_destroy(&cond), 0);
 }
 
-int run_cond_torture(struct smokey_test *t, int argc, char *const argv[])
+int run_posix_cond(struct smokey_test *t, int argc, char *const argv[])
 {
        struct sched_param sparam;
 
@@ -644,7 +644,6 @@ int run_cond_torture(struct smokey_test *t, int argc, char 
*const argv[])
        sig_norestart_double();
        sig_restart_double();
        cond_destroy_whilewait();
-       fprintf(stderr, "Test OK\n");
 
        return 0;
 }
diff --git a/testsuite/smokey/posix-fork/Makefile.am 
b/testsuite/smokey/posix-fork/Makefile.am
new file mode 100644
index 0000000..c4232cf
--- /dev/null
+++ b/testsuite/smokey/posix-fork/Makefile.am
@@ -0,0 +1,10 @@
+
+noinst_LIBRARIES = libposix-fork.a
+
+libposix_fork_a_SOURCES = posix-fork.c
+
+CCLD = $(top_srcdir)/scripts/wrap-link.sh $(CC)
+
+libposix_fork_a_CPPFLAGS =     \
+       @XENO_USER_CFLAGS@      \
+       -I$(top_srcdir)/include
diff --git a/testsuite/smokey/fork-exec/fork-exec.c 
b/testsuite/smokey/posix-fork/posix-fork.c
similarity index 89%
rename from testsuite/smokey/fork-exec/fork-exec.c
rename to testsuite/smokey/posix-fork/posix-fork.c
index 79fe234..bb809e1 100644
--- a/testsuite/smokey/fork-exec/fork-exec.c
+++ b/testsuite/smokey/posix-fork/posix-fork.c
@@ -14,9 +14,9 @@
 #include <boilerplate/libc.h>
 #include <smokey/smokey.h>
 
-smokey_test_plugin(fork_exec,
+smokey_test_plugin(posix_fork,
                   SMOKEY_NOARGS,
-                  "Check fork->exec sequence."
+                  "Check POSIX fork->exec sequence."
 );
 
 #ifdef HAVE_FORK
@@ -35,7 +35,7 @@ smokey_test_plugin(fork_exec,
  * We don't have to do much beyond firing such sequence fo testing: if
  * Cobalt messes up, the kernel will certainly crash.
  */
-static int run_fork_exec(struct smokey_test *t, int argc, char *const argv[])
+static int run_posix_fork(struct smokey_test *t, int argc, char *const argv[])
 {
        struct timespec req;
 
diff --git a/testsuite/smokey/posix-mutex/Makefile.am 
b/testsuite/smokey/posix-mutex/Makefile.am
new file mode 100644
index 0000000..5a36c77
--- /dev/null
+++ b/testsuite/smokey/posix-mutex/Makefile.am
@@ -0,0 +1,9 @@
+
+noinst_LIBRARIES = libposix-mutex.a
+
+libposix_mutex_a_SOURCES = posix-mutex.c
+
+libposix_mutex_a_CPPFLAGS =    \
+       @XENO_USER_CFLAGS@      \
+       -I$(top_srcdir)         \
+       -I$(top_srcdir)/include
diff --git a/testsuite/smokey/mutex-torture/mutex-torture.c 
b/testsuite/smokey/posix-mutex/posix-mutex.c
similarity index 98%
rename from testsuite/smokey/mutex-torture/mutex-torture.c
rename to testsuite/smokey/posix-mutex/posix-mutex.c
index 357d2cb..770463b 100644
--- a/testsuite/smokey/mutex-torture/mutex-torture.c
+++ b/testsuite/smokey/posix-mutex/posix-mutex.c
@@ -21,9 +21,9 @@
 #include "lib/cobalt/current.h"
 #include <smokey/smokey.h>
 
-smokey_test_plugin(mutex_torture,
+smokey_test_plugin(posix_mutex,
                   SMOKEY_NOARGS,
-                  "Check POSIX mutexes"
+                  "Check POSIX mutex services"
 );
 
 #define MUTEX_CREATE           1
@@ -550,7 +550,7 @@ static void pi_wait(void)
        pthread_t waiter_tid;
 
 #ifndef HAVE_PTHREAD_MUTEXATTR_SETPROTOCOL
-       fprintf(stderr, "NOTE: pi_wait PTHREAD_PRIO_INHERIT: not supported\n");
+       smokey_note("PTHREAD_PRIO_INHERIT not supported");
        return;
 #endif
        fprintf(stderr, "pi_wait\n");
@@ -648,8 +648,7 @@ static void lock_stealing(void)
        dispatch("lock_stealing mutex_destroy", MUTEX_DESTROY, 1, 0, &mutex);
 
        if (trylock_result != 0)
-               fprintf(stderr,
-                       "NOTE: lock_stealing mutex_trylock: not supported\n");
+               smokey_note("mutex_trylock not supported");
 }
 
 static void *victim(void *cookie)
@@ -875,7 +874,7 @@ static void auto_switchback(void)
        dispatch("auto_switchback mutex_destroy", MUTEX_DESTROY, 1, 0, &mutex);
 }
 
-int run_mutex_torture(struct smokey_test *t, int argc, char *const argv[])
+int run_posix_mutex(struct smokey_test *t, int argc, char *const argv[])
 {
        struct sched_param sparam;
        struct sigaction sa;


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://xenomai.org/mailman/listinfo/xenomai-git

Reply via email to