Patch Attached ========================== >From 855ee6828d3ee171df52308e399749fc9bee42ed Mon Sep 17 00:00:00 2001 From: ABR290B <abhimanyuraghuvansh...@gmail.com> Date: Wed, 12 Dec 2018 19:53:35 +0530 Subject: [PATCH] POSIX Signature Test for utmpx.h (GCI2018)
--- testsuites/psxtests/Makefile.am | 9 ++++- testsuites/psxtests/psxhdrs/utmpx/endutxent.c | 34 ++++++++++++++++++ testsuites/psxtests/psxhdrs/utmpx/getutxent.c | 34 ++++++++++++++++++ testsuites/psxtests/psxhdrs/utmpx/getutxid.c | 35 +++++++++++++++++++ .../psxtests/psxhdrs/utmpx/getutxline.c | 35 +++++++++++++++++++ .../psxtests/psxhdrs/utmpx/pututxline.c | 35 +++++++++++++++++++ testsuites/psxtests/psxhdrs/utmpx/setutxent.c | 34 ++++++++++++++++++ 7 files changed, 215 insertions(+), 1 deletion(-) create mode 100644 testsuites/psxtests/psxhdrs/utmpx/endutxent.c create mode 100644 testsuites/psxtests/psxhdrs/utmpx/getutxent.c create mode 100644 testsuites/psxtests/psxhdrs/utmpx/getutxid.c create mode 100644 testsuites/psxtests/psxhdrs/utmpx/getutxline.c create mode 100644 testsuites/psxtests/psxhdrs/utmpx/pututxline.c create mode 100644 testsuites/psxtests/psxhdrs/utmpx/setutxent.c diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am index 3dd8fe0139..5062857855 100644 --- a/testsuites/psxtests/Makefile.am +++ b/testsuites/psxtests/Makefile.am @@ -1815,7 +1815,14 @@ lib_a_SOURCES = psxhdrs/devctl/posix_devctl.c \ psxhdrs/setjmp/longjmp.c \ psxhdrs/setjmp/setjmp.c \ psxhdrs/setjmp/siglongjmp.c \ - psxhdrs/setjmp/sigsetjmp.c + psxhdrs/setjmp/sigsetjmp.c \ + psxhdrs/utmpx/setutxent.c \ + psxhdrs/utmpx/endutxent.c \ + psxhdrs/utmpx/getutxent.c \ + psxhdrs/utmpx/getutxid.c \ + psxhdrs/utmpx/getutxline.c \ + psxhdrs/utmpx/pututxline.c + ## Not supported by RTEMS, but POSIX API Compliance tests exist. ## lib_a_SOURCES += psxhdrs/ulimit/ulimit.c diff --git a/testsuites/psxtests/psxhdrs/utmpx/endutxent.c b/testsuites/psxtests/psxhdrs/utmpx/endutxent.c new file mode 100644 index 0000000000..9dd54bccda --- /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..25a80c4810 --- /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..60fd67008c --- /dev/null +++ b/testsuites/psxtests/psxhdrs/utmpx/getutxid.c @@ -0,0 +1,35 @@ +/** + * @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; +} \ No newline at end of file diff --git a/testsuites/psxtests/psxhdrs/utmpx/getutxline.c b/testsuites/psxtests/psxhdrs/utmpx/getutxline.c new file mode 100644 index 0000000000..11e17f06b3 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/utmpx/getutxline.c @@ -0,0 +1,35 @@ +/** + * @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 = getutxline(&b); + return !a; +} \ No newline at end of file diff --git a/testsuites/psxtests/psxhdrs/utmpx/pututxline.c b/testsuites/psxtests/psxhdrs/utmpx/pututxline.c new file mode 100644 index 0000000000..7613dc8e36 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/utmpx/pututxline.c @@ -0,0 +1,35 @@ +/** + * @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 = pututxline(&b); + return !a; +} \ No newline at end of file diff --git a/testsuites/psxtests/psxhdrs/utmpx/setutxent.c b/testsuites/psxtests/psxhdrs/utmpx/setutxent.c new file mode 100644 index 0000000000..6665aff7fc --- /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 -- 2.19.1.windows.1 =================================== ABR
0001-POSIX-Signature-Test-for-utmpx.h-GCI2018.patch
Description: Binary data
_______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel