[git commit] test: add utmpx test

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Sun Mar 22 13:49:27 UTC 2015


commit: http://git.uclibc.org/uClibc/commit/?id=63729418992d5f63965a88fa2ac3570e3d270479
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
 test/.gitignore       |    1 +
 test/misc/Makefile.in |    4 ++++
 test/misc/tst-utmp.c  |   15 +++++++++++++++
 test/misc/tst-utmpx.c |    2 ++
 4 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/test/.gitignore b/test/.gitignore
index 5944f0a..beb5095 100644
--- a/test/.gitignore
+++ b/test/.gitignore
@@ -163,6 +163,7 @@ misc/tst-seekdir
 misc/tst-statfs
 misc/tst-statvfs
 misc/tst-utmp
+misc/tst-utmpx
 mmap/mmap
 mmap/mmap2
 mmap/mmap64
diff --git a/test/misc/Makefile.in b/test/misc/Makefile.in
index 1e0da6f..2fb9652 100644
--- a/test/misc/Makefile.in
+++ b/test/misc/Makefile.in
@@ -16,6 +16,10 @@ ifeq ($(UCLIBC_HAS_GLOB),)
 TESTS_DISABLED += bug-glob2
 endif
 
+ifeq ($(UCLIBC_HAS_UTMPX),)
+TESTS_DISABLED += tst-utmpx
+endif
+
 DODIFF_dirent    := 1
 DODIFF_dirent64  := 1
 DODIFF_tst-statfs := 1
diff --git a/test/misc/tst-utmp.c b/test/misc/tst-utmp.c
index 08a6f8e..1b0333a 100644
--- a/test/misc/tst-utmp.c
+++ b/test/misc/tst-utmp.c
@@ -37,6 +37,21 @@
 # include <utmp.h>
 #endif
 
+#ifndef _HAVE_UT_TYPE
+# define _HAVE_UT_TYPE 0
+#endif
+#ifndef _HAVE_UT_PID
+# define _HAVE_UT_PID 0
+#endif
+#ifndef _HAVE_UT_ID
+# define _HAVE_UT_ID 0
+#endif
+#ifndef _HAVE_UT_TV
+# define _HAVE_UT_TV 0
+#endif
+#ifndef _HAVE_UT_HOST
+# define _HAVE_UT_HOST 0
+#endif
 
 #if _HAVE_UT_TYPE || defined UTMPX
 
diff --git a/test/misc/tst-utmpx.c b/test/misc/tst-utmpx.c
new file mode 100644
index 0000000..edb5551
--- /dev/null
+++ b/test/misc/tst-utmpx.c
@@ -0,0 +1,2 @@
+#define UTMPX
+#include "tst-utmp.c"


More information about the uClibc-cvs mailing list