[PATCH] c-user: rtems_scheduler_get_maximum_priority()

2018-12-07 Thread Sebastian Huber
Close #3636.
---
 c-user/scheduling_concepts.rst | 37 +
 1 file changed, 37 insertions(+)

diff --git a/c-user/scheduling_concepts.rst b/c-user/scheduling_concepts.rst
index e088c62..5a2ce05 100644
--- a/c-user/scheduling_concepts.rst
+++ b/c-user/scheduling_concepts.rst
@@ -35,6 +35,8 @@ The directives provided by the scheduler manager are:
 
 - rtems_scheduler_ident_by_processor_set_ - Get ID of a scheduler by processor 
set
 
+- rtems_scheduler_get_maximum_priority_ - Get maximum task priority of a 
scheduler
+
 - rtems_scheduler_get_processor_set_ - Get processor set of a scheduler
 
 - rtems_scheduler_add_processor_ - Add processor to a scheduler
@@ -660,6 +662,41 @@ NOTES:
 
\clearpage
 
+.. _rtems_scheduler_get_maximum_priority:
+
+SCHEDULER_GET_MAXIMUM_PRIORITY - Get maximum task priority of a scheduler
+-
+
+CALLING SEQUENCE:
+.. code-block:: c
+
+rtems_status_code rtems_scheduler_get_maximum_priority(
+rtems_id scheduler_id,
+rtems_task_priority *priority
+);
+
+DIRECTIVE STATUS CODES:
+.. list-table::
+ :class: rtems-table
+
+ * - ``RTEMS_SUCCESSFUL``
+   - Successful operation.
+ * - ``RTEMS_INVALID_ID``
+   - Invalid scheduler instance identifier.
+ * - ``RTEMS_INVALID_ADDRESS``
+   - The ``priority`` parameter is ``NULL``.
+
+DESCRIPTION:
+Returns the maximum task priority of the specified scheduler instance in
+``priority``.
+
+NOTES:
+None.
+
+.. raw:: latex
+
+   \clearpage
+
 .. _rtems_scheduler_get_processor_set:
 
 SCHEDULER_GET_PROCESSOR_SET - Get processor set of a scheduler
-- 
2.16.4

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


psxhdrs: POSIX API Signature Compliance Tests for netdb.h File (GCI 2018)

2018-12-07 Thread Himanshu Sekhar Nayak
Hi guys,

Here is the patch for netdb.h file.

Thanks
Himanshu
From a9464ea48eaa7a7f4d08cc1b904ad13cd8abaa3a Mon Sep 17 00:00:00 2001
From: Himanshu40 
Date: Fri, 7 Dec 2018 23:44:43 +0530
Subject: [PATCH] psxhdrs: POSIX API Signature Compliance Tests for netdb.h
 File (GCI 2018)

---
 testsuites/psxtests/Makefile.am   | 25 +-
 .../psxtests/psxhdrs/netdb/endhostent.c   | 40 +++
 testsuites/psxtests/psxhdrs/netdb/endnetent.c | 39 +++
 .../psxtests/psxhdrs/netdb/endprotoent.c  | 39 +++
 .../psxtests/psxhdrs/netdb/endservent.c   | 40 +++
 .../psxtests/psxhdrs/netdb/freeaddrinfo.c | 50 +++
 .../psxtests/psxhdrs/netdb/gai_strerror.c | 40 +++
 .../psxtests/psxhdrs/netdb/getaddrinfo.c  | 49 ++
 .../psxtests/psxhdrs/netdb/gethostbyaddr.c| 40 +++
 .../psxtests/psxhdrs/netdb/gethostbyname.c| 39 +++
 .../psxtests/psxhdrs/netdb/gethostent.c   | 38 ++
 .../psxtests/psxhdrs/netdb/getnameinfo.c  | 49 ++
 .../psxtests/psxhdrs/netdb/getnetbyaddr.c | 39 +++
 .../psxtests/psxhdrs/netdb/getnetbyname.c | 39 +++
 testsuites/psxtests/psxhdrs/netdb/getnetent.c | 37 ++
 .../psxtests/psxhdrs/netdb/getprotobyname.c   | 39 +++
 .../psxtests/psxhdrs/netdb/getprotobynumber.c | 38 ++
 .../psxtests/psxhdrs/netdb/getprotoent.c  | 37 ++
 .../psxtests/psxhdrs/netdb/getservbyname.c| 39 +++
 .../psxtests/psxhdrs/netdb/getservbyport.c| 39 +++
 .../psxtests/psxhdrs/netdb/getservent.c   | 38 ++
 testsuites/psxtests/psxhdrs/netdb/h_errno.c   | 39 +++
 .../psxtests/psxhdrs/netdb/sethostent.c   | 39 +++
 testsuites/psxtests/psxhdrs/netdb/setnetent.c | 38 ++
 .../psxtests/psxhdrs/netdb/setprotoent.c  | 38 ++
 .../psxtests/psxhdrs/netdb/setservent.c   | 39 +++
 26 files changed, 1025 insertions(+), 1 deletion(-)
 create mode 100644 testsuites/psxtests/psxhdrs/netdb/endhostent.c
 create mode 100644 testsuites/psxtests/psxhdrs/netdb/endnetent.c
 create mode 100644 testsuites/psxtests/psxhdrs/netdb/endprotoent.c
 create mode 100644 testsuites/psxtests/psxhdrs/netdb/endservent.c
 create mode 100644 testsuites/psxtests/psxhdrs/netdb/freeaddrinfo.c
 create mode 100644 testsuites/psxtests/psxhdrs/netdb/gai_strerror.c
 create mode 100644 testsuites/psxtests/psxhdrs/netdb/getaddrinfo.c
 create mode 100644 testsuites/psxtests/psxhdrs/netdb/gethostbyaddr.c
 create mode 100644 testsuites/psxtests/psxhdrs/netdb/gethostbyname.c
 create mode 100644 testsuites/psxtests/psxhdrs/netdb/gethostent.c
 create mode 100644 testsuites/psxtests/psxhdrs/netdb/getnameinfo.c
 create mode 100644 testsuites/psxtests/psxhdrs/netdb/getnetbyaddr.c
 create mode 100644 testsuites/psxtests/psxhdrs/netdb/getnetbyname.c
 create mode 100644 testsuites/psxtests/psxhdrs/netdb/getnetent.c
 create mode 100644 testsuites/psxtests/psxhdrs/netdb/getprotobyname.c
 create mode 100644 testsuites/psxtests/psxhdrs/netdb/getprotobynumber.c
 create mode 100644 testsuites/psxtests/psxhdrs/netdb/getprotoent.c
 create mode 100644 testsuites/psxtests/psxhdrs/netdb/getservbyname.c
 create mode 100644 testsuites/psxtests/psxhdrs/netdb/getservbyport.c
 create mode 100644 testsuites/psxtests/psxhdrs/netdb/getservent.c
 create mode 100644 testsuites/psxtests/psxhdrs/netdb/h_errno.c
 create mode 100644 testsuites/psxtests/psxhdrs/netdb/sethostent.c
 create mode 100644 testsuites/psxtests/psxhdrs/netdb/setnetent.c
 create mode 100644 testsuites/psxtests/psxhdrs/netdb/setprotoent.c
 create mode 100644 testsuites/psxtests/psxhdrs/netdb/setservent.c

diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am
index 6b6bee0d0d..0199694916 100644
--- a/testsuites/psxtests/Makefile.am
+++ b/testsuites/psxtests/Makefile.am
@@ -1579,7 +1579,30 @@ lib_a_SOURCES = psxhdrs/devctl/posix_devctl.c \
 	psxhdrs/inttypes/strtoimax.c \
 	psxhdrs/inttypes/strtoumax.c \
 	psxhdrs/inttypes/wcstoimax.c \
-	psxhdrs/inttypes/wcstoumax.c
+	psxhdrs/inttypes/wcstoumax.c \
+	psxhdrs/netdb/endhostent.c \
+	psxhdrs/netdb/endnetent.c \
+	psxhdrs/netdb/endprotoent.c \
+	psxhdrs/netdb/endservent.c \
+	psxhdrs/netdb/sethostent.c \
+	psxhdrs/netdb/setnetent.c \
+	psxhdrs/netdb/setservent.c \
+	psxhdrs/netdb/gethostent.c \
+	psxhdrs/netdb/getprotoent.c \
+	psxhdrs/netdb/getnetent.c \
+	psxhdrs/netdb/getservent.c \
+	psxhdrs/netdb/freeaddrinfo.c \
+	psxhdrs/netdb/gai_strerror.c \
+	psxhdrs/netdb/getaddrinfo.c \
+	psxhdrs/netdb/gethostbyaddr.c \
+	psxhdrs/netdb/gethostbyname.c \
+	psxhdrs/netdb/getnameinfo.c \
+	psxhdrs/netdb/getnetbyname.c \
+	psxhdrs/netdb/getprotobyname.c \
+	psxhdrs/netdb/getprotobynumber.c \
+	psxhdrs/netdb/getservbyname.c \
+	psxhdrs/netdb/getservbyport.c \
+	psxhdrs/netdb/h_errno.c
 
 
 ## Not supported by RT

[PATCH] Implement POSIX API Signature Compliance Tests for uchar.h

2018-12-07 Thread Marçal Comajoan Cara
This header file is C11 and not currently supported by RTEMS.
See #3643.

This work was part of GCI 2018.
---
 testsuites/psxtests/Makefile.am  |  4 ++
 testsuites/psxtests/psxhdrs/uchar/c16rtomb.c | 41 +++
 testsuites/psxtests/psxhdrs/uchar/c32rtomb.c | 41 +++
 testsuites/psxtests/psxhdrs/uchar/mbrtoc16.c | 42 
 testsuites/psxtests/psxhdrs/uchar/mbrtoc32.c | 42 
 5 files changed, 170 insertions(+)
 create mode 100644 testsuites/psxtests/psxhdrs/uchar/c16rtomb.c
 create mode 100644 testsuites/psxtests/psxhdrs/uchar/c32rtomb.c
 create mode 100644 testsuites/psxtests/psxhdrs/uchar/mbrtoc16.c
 create mode 100644 testsuites/psxtests/psxhdrs/uchar/mbrtoc32.c

diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am
index 887849368f..6092a079fc 100644
--- a/testsuites/psxtests/Makefile.am
+++ b/testsuites/psxtests/Makefile.am
@@ -1613,6 +1613,10 @@ lib_a_SOURCES = psxhdrs/devctl/posix_devctl.c \
 ## lib_a_SOURCES += psxhdrs/ucontext/makecontext.c See ticket #3640
 ## lib_a_SOURCES += psxhdrs/ucontext/setcontext.c  See ticket #3640
 ## lib_a_SOURCES += psxhdrs/ucontext/swapcontext.c See ticket #3640
+## lib_a_SOURCES += psxhdrs/uchar/c16rtomb.c   See ticket #3643
+## lib_a_SOURCES += psxhdrs/uchar/c32rtomb.c   See ticket #3643
+## lib_a_SOURCES += psxhdrs/uchar/c32rtomb.c   See ticket #3643
+## lib_a_SOURCES += psxhdrs/uchar/mbrtoc32.c   See ticket #3643
 endif
 
 rtems_tests_PROGRAMS = $(psx_tests)
diff --git a/testsuites/psxtests/psxhdrs/uchar/c16rtomb.c 
b/testsuites/psxtests/psxhdrs/uchar/c16rtomb.c
new file mode 100644
index 00..8e2bc29ddc
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/uchar/c16rtomb.c
@@ -0,0 +1,41 @@
+/**
+ *  @file
+ *  @brief c16rtomb() API Conformance Test. This is a C11 method.
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Marçal Comajoan Cara
+ *
+ *  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 
+#include 
+
+int test( void );
+
+int test( void )
+{
+  char16_t* c16_str = u"Mar\u00E7al";
+  char out[MB_CUR_MAX];
+  mbstate_t mbs;
+  int result;
+  
+  result = c16rtomb( out, *c16_str, &mbs );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/uchar/c32rtomb.c 
b/testsuites/psxtests/psxhdrs/uchar/c32rtomb.c
new file mode 100644
index 00..c98f7539f2
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/uchar/c32rtomb.c
@@ -0,0 +1,41 @@
+/**
+ *  @file
+ *  @brief c32rtomb() API Conformance Test. This is a C11 method.
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Marçal Comajoan Cara
+ *
+ *  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 
+#include 
+
+int test( void );
+
+int test( void )
+{
+  char32_t* c32_str = U"Mar\u00E7al";
+  char out[MB_CUR_MAX];
+  mbstate_t mbs;
+  int result;
+  
+  result = c32rtomb( out, *c32_str, &mbs );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/uchar/mbrtoc16.c 
b/testsuites/psxtests/psxhdrs/uchar/mbrtoc16.c
new file mode 100644
index 00..93e9c363b2
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/uchar/mbrtoc16.c
@@ -0,0 +1,42 @@
+/**
+ *  @file
+ *  @brief mbrtoc16() API Conformance Test. This is a C11 method.
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Marçal Comajoan Cara
+ *
+ *  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 

[PATCH] Implement POSIX API Signature Compliance Tests for stddef.h

2018-12-07 Thread Marçal Comajoan Cara
This work was part of GCI 2018.
---
 testsuites/psxtests/Makefile.am   |  3 +-
 testsuites/psxtests/psxhdrs/stddef/offsetof.c | 38 +++
 2 files changed, 40 insertions(+), 1 deletion(-)
 create mode 100644 testsuites/psxtests/psxhdrs/stddef/offsetof.c

diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am
index 1ac5a31df4..887849368f 100644
--- a/testsuites/psxtests/Makefile.am
+++ b/testsuites/psxtests/Makefile.am
@@ -1579,7 +1579,8 @@ lib_a_SOURCES = psxhdrs/devctl/posix_devctl.c \
psxhdrs/inttypes/strtoimax.c \
psxhdrs/inttypes/strtoumax.c \
psxhdrs/inttypes/wcstoimax.c \
-   psxhdrs/inttypes/wcstoumax.c
+   psxhdrs/inttypes/wcstoumax.c \
+   psxhdrs/stddef/offsetof.c
 
 
 ## Not supported by RTEMS, but POSIX API Compliance tests exist.
diff --git a/testsuites/psxtests/psxhdrs/stddef/offsetof.c 
b/testsuites/psxtests/psxhdrs/stddef/offsetof.c
new file mode 100644
index 00..b3c2a97c71
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stddef/offsetof.c
@@ -0,0 +1,38 @@
+/**
+ *  @file
+ *  @brief offsetof() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Marçal Comajoan Cara
+ *
+ *  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 
+
+int test( void );
+
+int test( void )
+{
+  struct S {
+char c;
+double d;
+  };
+
+  return offsetof(struct S, d);
+}
-- 
2.19.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

POSIX Signature Test for arpa/inet.h (GCI2018)

2018-12-07 Thread Abhimanyu Raghuvanshi
>From 662e3309b1b8598589238a9bfc04c29710da34ad Mon Sep 17 00:00:00 2001
From: ABR290B 
Date: Sat, 8 Dec 2018 09:20:49 +0530
Subject: [PATCH] POSIX Signature Test for arpa/inet.h (GCI2018)

---
 testsuites/psxtests/Makefile.am   |  6 ++-
 .../psxtests/psxhdrs/arpa/inet/inet_addr.c| 39 +++
 .../psxtests/psxhdrs/arpa/inet/inet_ntoa.c| 36 +
 .../psxtests/psxhdrs/arpa/inet/inet_ntop.c| 39 +++
 .../psxtests/psxhdrs/arpa/inet/inet_pton.c| 39 +++
 5 files changed, 158 insertions(+), 1 deletion(-)
 create mode 100644 testsuites/psxtests/psxhdrs/arpa/inet/inet_addr.c
 create mode 100644 testsuites/psxtests/psxhdrs/arpa/inet/inet_ntoa.c
 create mode 100644 testsuites/psxtests/psxhdrs/arpa/inet/inet_ntop.c
 create mode 100644 testsuites/psxtests/psxhdrs/arpa/inet/inet_pton.c

diff --git a/testsuites/psxtests/Makefile.am
b/testsuites/psxtests/Makefile.am
index 62378f1182..f49cb918f7 100644
--- a/testsuites/psxtests/Makefile.am
+++ b/testsuites/psxtests/Makefile.am
@@ -1602,7 +1602,11 @@ lib_a_SOURCES = psxhdrs/devctl/posix_devctl.c \
  psxhdrs/netdb/getprotobynumber.c \
  psxhdrs/netdb/getservbyname.c \
  psxhdrs/netdb/getservbyport.c \
- psxhdrs/netdb/h_errno.c
+ psxhdrs/netdb/h_errno.c \
+ psxhdrs/arpa/inet/inet_addr.c \
+ psxhdrs/arpa/inet/inet_ntop.c \
+ psxhdrs/arpa/inet/inet_ntoa.c \
+ psxhdrs/arpa/inet/inet_pton.c


 ## Not supported by RTEMS, but POSIX API Compliance tests exist.
diff --git a/testsuites/psxtests/psxhdrs/arpa/inet/inet_addr.c
b/testsuites/psxtests/psxhdrs/arpa/inet/inet_addr.c
new file mode 100644
index 00..351882e9d9
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/arpa/inet/inet_addr.c
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief inet_addr() 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 
+#include 
+
+int test(void);
+
+int test(void)
+{
+  in_addr_t con;
+  const char addr = 'a';
+
+  con = inet_addr(&addr);
+
+  return (con != -1);
+}
\ No newline at end of file
diff --git a/testsuites/psxtests/psxhdrs/arpa/inet/inet_ntoa.c
b/testsuites/psxtests/psxhdrs/arpa/inet/inet_ntoa.c
new file mode 100644
index 00..d916cbbfcd
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/arpa/inet/inet_ntoa.c
@@ -0,0 +1,36 @@
+/**
+ *  @file
+ *  @brief inet_ntoa() 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 
+#include 
+
+int test(void);
+
+int test(void)
+{
+  struct in_addr addr;
+
+  return inet_ntoa(addr) != 0;
+}
\ No newline at end of file
diff --git a/testsuites/psxtests/psxhdrs/arpa/inet/inet_ntop.c
b/testsuites/psxtests/psxhdrs/arpa/inet/inet_ntop.c
new file mode 100644
index 00..aab3d04902
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/arpa/inet/inet_ntop.c
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief inet_ntop() 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