summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuites/psxtests/Makefile.am8
-rw-r--r--testsuites/psxtests/psxhdrs/sys/time/getitimer.c41
-rw-r--r--testsuites/psxtests/psxhdrs/sys/time/gettimeofday.c41
-rw-r--r--testsuites/psxtests/psxhdrs/sys/time/select.c46
-rw-r--r--testsuites/psxtests/psxhdrs/sys/time/setitimer.c42
-rw-r--r--testsuites/psxtests/psxhdrs/sys/time/utimes.c37
6 files changed, 214 insertions, 1 deletions
diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am
index c4df4ba09a..a7ee8a59a4 100644
--- a/testsuites/psxtests/Makefile.am
+++ b/testsuites/psxtests/Makefile.am
@@ -1141,7 +1141,13 @@ lib_a_SOURCES = psxhdrs/devctl/posix_devctl.c \
psxhdrs/fnmatch/fnmatch.c \
psxhdrs/iconv/iconv.c \
psxhdrs/iconv/iconv_close.c \
- psxhdrs/iconv/iconv_open.c
+ psxhdrs/iconv/iconv_open.c \
+ psxhdrs/regex/regfree.c \
+ psxhdrs/sys/time/select.c \
+ psxhdrs/sys/time/utimes.c \
+ psxhdrs/sys/time/setitimer.c \
+ psxhdrs/sys/time/getitimer.c \
+ psxhdrs/sys/time/gettimeofday.c
endif
rtems_tests_PROGRAMS = $(psx_tests)
diff --git a/testsuites/psxtests/psxhdrs/sys/time/getitimer.c b/testsuites/psxtests/psxhdrs/sys/time/getitimer.c
new file mode 100644
index 0000000000..aa1ce8b428
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/sys/time/getitimer.c
@@ -0,0 +1,41 @@
+/**
+ * @file
+ * @brief getitimer() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) <2018>.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <sys/time.h>
+
+int test(void);
+
+int test(void)
+{
+ int which,callback;
+ struct itimerval timeval;
+ it_interval interval = 0;
+ it_value value = 0;
+
+ timeval.it_interval = interval;
+ timeval.it_value = value;
+ callback = getitimer(which, &timeval);
+ return (callback == 0);
+}
diff --git a/testsuites/psxtests/psxhdrs/sys/time/gettimeofday.c b/testsuites/psxtests/psxhdrs/sys/time/gettimeofday.c
new file mode 100644
index 0000000000..60a56f3370
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/sys/time/gettimeofday.c
@@ -0,0 +1,41 @@
+/**
+ * @file
+ * @brief gettimeofday() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) <2018>.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <sys/time.h>
+
+int test(void);
+
+int test(void)
+{
+ int which,callback;
+ struct itimerval timeval;
+ it_interval interval = 0;
+ it_value value = 0;
+
+ timeval.it_interval = interval;
+ timeval.it_value = value;
+ callback = gettimeofday(&timeval);
+ return (callback == 0);
+}
diff --git a/testsuites/psxtests/psxhdrs/sys/time/select.c b/testsuites/psxtests/psxhdrs/sys/time/select.c
new file mode 100644
index 0000000000..48b8fe6a42
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/sys/time/select.c
@@ -0,0 +1,46 @@
+/**
+ * @file
+ * @brief select() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) <2018>.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <sys/time.h>
+
+int test(void);
+
+int test(void)
+{
+ int callback;
+ int nfds = 0;
+ struct timeval tv;
+ time_t tv_sec = 0;
+ suseconds_t tv_usec = 0;
+ fd_set readfds, writefds, errorfds;
+
+ tv.tv_sec = tv_sec;
+ tv.tv_usec = tv_usec;
+ FD_ZERO(&readfds);
+ FD_ZERO(&writefds);
+ FD_ZERO(&errorfds);
+ callback = select(nfds, &readfds, &writefds, &errorfds, &tv);
+ return callback;
+}
diff --git a/testsuites/psxtests/psxhdrs/sys/time/setitimer.c b/testsuites/psxtests/psxhdrs/sys/time/setitimer.c
new file mode 100644
index 0000000000..32fb4da7ee
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/sys/time/setitimer.c
@@ -0,0 +1,42 @@
+/**
+ * @file
+ * @brief setitimer() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) <2018>.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <sys/time.h>
+
+int test(void);
+
+int test(void)
+{
+ int which,callback;
+ struct itimerval timeval;
+ it_interval interval = 0;
+ it_value value = 0;
+
+ timeval.it_interval = interval;
+ timeval.it_value = value;
+ setitimer(which, &timeval, NULL);
+ callback = getitimer(which, &timeval);
+ return (callback == 0);
+}
diff --git a/testsuites/psxtests/psxhdrs/sys/time/utimes.c b/testsuites/psxtests/psxhdrs/sys/time/utimes.c
new file mode 100644
index 0000000000..9fc0e2928a
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/sys/time/utimes.c
@@ -0,0 +1,37 @@
+/**
+ * @file
+ * @brief utimes() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) <2018>.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <sys/time.h>
+
+int test(void);
+
+int test(void)
+{
+ int callback;
+ struct timeval tv;
+
+ callback = utimes(NULL, &tv);
+ return (callback == -1);
+}