summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxhdrs
diff options
context:
space:
mode:
authorABR290B <abhimanyuraghuvanshi29@gmail.com>2018-12-12 19:53:35 +0530
committerJoel Sherrill <joel@rtems.org>2018-12-13 09:12:54 -0600
commita0353ea266a65f275fe975bccc9f742ee6b407a2 (patch)
treecd8c27fba9bac52b2972c15447f6b7a2974cb9fa /testsuites/psxtests/psxhdrs
parentPOSIX Signature Compliance Test for sys/statvfs.h (GCI 2018) (diff)
downloadrtems-a0353ea266a65f275fe975bccc9f742ee6b407a2.tar.bz2
POSIX Signature Compliance Test for utmpx.h (GCI2018)
Diffstat (limited to 'testsuites/psxtests/psxhdrs')
-rw-r--r--testsuites/psxtests/psxhdrs/utmpx/endutxent.c34
-rw-r--r--testsuites/psxtests/psxhdrs/utmpx/getutxent.c34
-rw-r--r--testsuites/psxtests/psxhdrs/utmpx/getutxid.c36
-rw-r--r--testsuites/psxtests/psxhdrs/utmpx/getutxline.c37
-rw-r--r--testsuites/psxtests/psxhdrs/utmpx/pututxline.c37
-rw-r--r--testsuites/psxtests/psxhdrs/utmpx/setutxent.c34
6 files changed, 212 insertions, 0 deletions
diff --git a/testsuites/psxtests/psxhdrs/utmpx/endutxent.c b/testsuites/psxtests/psxhdrs/utmpx/endutxent.c
new file mode 100644
index 0000000000..e75adc7b87
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/utmpx/endutxent.c
@@ -0,0 +1,34 @@
+/**
+ * @file
+ * @brief endutxent() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Abhimanyu Raghuvanshi
+ *
+ * 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 <utmpx.h>
+
+int test(void);
+
+int test(void)
+{
+ endutxent();
+ return (0);
+} \ No newline at end of file
diff --git a/testsuites/psxtests/psxhdrs/utmpx/getutxent.c b/testsuites/psxtests/psxhdrs/utmpx/getutxent.c
new file mode 100644
index 0000000000..53b653eda8
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/utmpx/getutxent.c
@@ -0,0 +1,34 @@
+/**
+ * @file
+ * @brief getutxent() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Abhimanyu Raghuvanshi
+ *
+ * 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 <utmpx.h>
+
+int test(void);
+
+int test(void)
+{
+ struct utmpx *a = getutxent();
+ return !a;
+} \ No newline at end of file
diff --git a/testsuites/psxtests/psxhdrs/utmpx/getutxid.c b/testsuites/psxtests/psxhdrs/utmpx/getutxid.c
new file mode 100644
index 0000000000..e99633b1ce
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/utmpx/getutxid.c
@@ -0,0 +1,36 @@
+/**
+ * @file
+ * @brief getutxid() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Abhimanyu Raghuvanshi
+ *
+ * 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 <utmpx.h>
+
+int test(void);
+
+int test(void)
+{
+ const struct utmpx b = {0};
+
+ struct utmpx *a = getutxid(&b);
+ return !a;
+}
diff --git a/testsuites/psxtests/psxhdrs/utmpx/getutxline.c b/testsuites/psxtests/psxhdrs/utmpx/getutxline.c
new file mode 100644
index 0000000000..394209f172
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/utmpx/getutxline.c
@@ -0,0 +1,37 @@
+/**
+ * @file
+ * @brief getutxline() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Abhimanyu Raghuvanshi
+ *
+ * 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 <utmpx.h>
+
+int test(void);
+
+int test(void)
+{
+ const struct utmpx b = {0};
+ struct utmpx *a;
+
+ a = getutxline(&b);
+ return !a;
+}
diff --git a/testsuites/psxtests/psxhdrs/utmpx/pututxline.c b/testsuites/psxtests/psxhdrs/utmpx/pututxline.c
new file mode 100644
index 0000000000..b082df8e9e
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/utmpx/pututxline.c
@@ -0,0 +1,37 @@
+/**
+ * @file
+ * @brief pututxline() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Abhimanyu Raghuvanshi
+ *
+ * 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 <utmpx.h>
+
+int test(void);
+
+int test(void)
+{
+ const struct utmpx b = {0};
+ struct utmpx *a;
+
+ a = pututxline(&b);
+ return !a;
+}
diff --git a/testsuites/psxtests/psxhdrs/utmpx/setutxent.c b/testsuites/psxtests/psxhdrs/utmpx/setutxent.c
new file mode 100644
index 0000000000..4aaac6fd7c
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/utmpx/setutxent.c
@@ -0,0 +1,34 @@
+/**
+ * @file
+ * @brief setutxent() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Abhimanyu Raghuvanshi
+ *
+ * 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 <utmpx.h>
+
+int test(void);
+
+int test(void)
+{
+ setutxent();
+ return (0);
+} \ No newline at end of file