[rtems commit] POSIX Signature Compliance Test for utmpx.h (GCI2018)

Joel Sherrill joel at rtems.org
Thu Dec 13 15:13:10 UTC 2018


Module:    rtems
Branch:    master
Commit:    a0353ea266a65f275fe975bccc9f742ee6b407a2
Changeset: http://git.rtems.org/rtems/commit/?id=a0353ea266a65f275fe975bccc9f742ee6b407a2

Author:    ABR290B <abhimanyuraghuvanshi29 at gmail.com>
Date:      Wed Dec 12 20:11:35 2018 +0530

POSIX Signature Compliance Test for utmpx.h (GCI2018)

---

 testsuites/psxtests/Makefile.am                |  6 +++++
 testsuites/psxtests/psxhdrs/utmpx/endutxent.c  | 34 +++++++++++++++++++++++
 testsuites/psxtests/psxhdrs/utmpx/getutxent.c  | 34 +++++++++++++++++++++++
 testsuites/psxtests/psxhdrs/utmpx/getutxid.c   | 36 +++++++++++++++++++++++++
 testsuites/psxtests/psxhdrs/utmpx/getutxline.c | 37 ++++++++++++++++++++++++++
 testsuites/psxtests/psxhdrs/utmpx/pututxline.c | 37 ++++++++++++++++++++++++++
 testsuites/psxtests/psxhdrs/utmpx/setutxent.c  | 34 +++++++++++++++++++++++
 7 files changed, 218 insertions(+)

diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am
index cdd0801..0530bbb 100644
--- a/testsuites/psxtests/Makefile.am
+++ b/testsuites/psxtests/Makefile.am
@@ -1871,6 +1871,12 @@ lib_a_SOURCES = psxhdrs/devctl/posix_devctl.c \
 ## lib_a_SOURCES += psxhdrs/sys/resource/setrlimit.c     See ticket #3655
 ## lib_a_SOURCES += psxhdrs/sys/statvfs/statvfs.c        See ticket #3660
 ## lib_a_SOURCES += psxhdrs/sys/statvfs/fstatvfs.c       See ticket #3660
+## lib_a_SOURCES += psxhdrs/utmpx/setutxent.c            See ticket #3661
+## lib_a_SOURCES += psxhdrs/utmpx/endutxent.c            See ticket #3661
+## lib_a_SOURCES += psxhdrs/utmpx/getutxent.c            See ticket #3661
+## lib_a_SOURCES += psxhdrs/utmpx/getutxid.c             See ticket #3661
+## lib_a_SOURCES += psxhdrs/utmpx/getutxline.c           See ticket #3661
+## lib_a_SOURCES += psxhdrs/utmpx/pututxline.c           See ticket #3661
 endif
 
 rtems_tests_PROGRAMS = $(psx_tests)
diff --git a/testsuites/psxtests/psxhdrs/utmpx/endutxent.c b/testsuites/psxtests/psxhdrs/utmpx/endutxent.c
new file mode 100644
index 0000000..e75adc7
--- /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 0000000..53b653e
--- /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 0000000..e99633b
--- /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 0000000..394209f
--- /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 0000000..b082df8
--- /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 0000000..4aaac6f
--- /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



More information about the vc mailing list