[rtems commit] psxhdrs: POSIX API Signature Compliance Tests for netdb.h ( GCI 2018)

Joel Sherrill joel at rtems.org
Sat Dec 8 00:41:06 UTC 2018


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

Author:    Himanshu40 <himanshuwindows8.1 at gmail.com>
Date:      Sat Dec  8 00:02:43 2018 +0530

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

---

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

diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am
index 736e8c4..62378f1 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 RTEMS, but POSIX API Compliance tests exist.
diff --git a/testsuites/psxtests/psxhdrs/netdb/endhostent.c b/testsuites/psxtests/psxhdrs/netdb/endhostent.c
new file mode 100644
index 0000000..752aca1
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/netdb/endhostent.c
@@ -0,0 +1,40 @@
+/**
+ *  @file
+ *  @brief endhostent() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  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/socket.h>
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct hostent *host;
+
+   host = gethostent();
+   sethostent( 1 );
+   endhostent();
+
+   return ( host != (void *)0 );
+ }
diff --git a/testsuites/psxtests/psxhdrs/netdb/endnetent.c b/testsuites/psxtests/psxhdrs/netdb/endnetent.c
new file mode 100644
index 0000000..6b46f77
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/netdb/endnetent.c
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief endnetent() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  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 <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct netent *nent;
+
+   nent = getnetent();
+   setnetent( 1 );
+   endnetent();
+
+   return ( nent != (void *)0 );
+ }
diff --git a/testsuites/psxtests/psxhdrs/netdb/endprotoent.c b/testsuites/psxtests/psxhdrs/netdb/endprotoent.c
new file mode 100644
index 0000000..be0f55e
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/netdb/endprotoent.c
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief endprotoent() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  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 <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct protoent *protoc;
+
+   protoc = getprotoent();
+   setprotoent( 1 );
+   endprotoent();
+
+   return ( protoc != (void *)0 );
+ }
diff --git a/testsuites/psxtests/psxhdrs/netdb/endservent.c b/testsuites/psxtests/psxhdrs/netdb/endservent.c
new file mode 100644
index 0000000..71ea21e
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/netdb/endservent.c
@@ -0,0 +1,40 @@
+/**
+ *  @file
+ *  @brief endservent() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  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/socket.h>
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct servent *serv;
+
+   serv = getservent();
+   setservent( 1 );
+   endservent();
+
+   return ( serv != (void *)0 );
+ }
diff --git a/testsuites/psxtests/psxhdrs/netdb/freeaddrinfo.c b/testsuites/psxtests/psxhdrs/netdb/freeaddrinfo.c
new file mode 100644
index 0000000..2c04f33
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/netdb/freeaddrinfo.c
@@ -0,0 +1,50 @@
+/**
+ *  @file
+ *  @brief freeaddrinfo() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  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/types.h>
+ #include <sys/socket.h>
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct addrinfo hints;
+   struct addrinfo *finfo = (void *)0;
+   int result;
+
+   hints.ai_family = AF_UNSPEC;    /* Allow IPv4 or IPv6 */
+   hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */
+   hints.ai_flags = AI_PASSIVE;    /* For wildcard IP address */
+   hints.ai_protocol = 0;          /* Any protocol */
+   hints.ai_canonname = (void *)0;
+   hints.ai_addr = (void *)0;
+   hints.ai_next = (void *)0;
+
+   result = getaddrinfo( (void *)0, (void *)0, &hints, &finfo );
+   freeaddrinfo( finfo );
+
+   return result;
+ }
diff --git a/testsuites/psxtests/psxhdrs/netdb/gai_strerror.c b/testsuites/psxtests/psxhdrs/netdb/gai_strerror.c
new file mode 100644
index 0000000..496a2d4
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/netdb/gai_strerror.c
@@ -0,0 +1,40 @@
+/**
+ *  @file
+ *  @brief gai_strerror() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  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/types.h>
+ #include <sys/socket.h>
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   int ecode = 2;
+   const char *result;
+
+   result = gai_strerror( ecode );
+
+   return ( result != (void *)0 );
+ }
diff --git a/testsuites/psxtests/psxhdrs/netdb/getaddrinfo.c b/testsuites/psxtests/psxhdrs/netdb/getaddrinfo.c
new file mode 100644
index 0000000..20695f6
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/netdb/getaddrinfo.c
@@ -0,0 +1,49 @@
+/**
+ *  @file
+ *  @brief getaddrinfo() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  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/types.h>
+ #include <sys/socket.h>
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct addrinfo hints;
+   struct addrinfo *finfo = (void *)0;
+   int result;
+
+   hints.ai_family = AF_UNSPEC;    /* Allow IPv4 or IPv6 */
+   hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */
+   hints.ai_flags = AI_PASSIVE;    /* For wildcard IP address */
+   hints.ai_protocol = 0;          /* Any protocol */
+   hints.ai_canonname = (void *)0;
+   hints.ai_addr = (void *)0;
+   hints.ai_next = (void *)0;
+
+   result = getaddrinfo( (void *)0, (void *)0, &hints, &finfo );
+
+   return result;
+ }
diff --git a/testsuites/psxtests/psxhdrs/netdb/gethostbyaddr.c b/testsuites/psxtests/psxhdrs/netdb/gethostbyaddr.c
new file mode 100644
index 0000000..ff4e1f2
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/netdb/gethostbyaddr.c
@@ -0,0 +1,40 @@
+/**
+ *  @file
+ *  @brief gethostbyaddr() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  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 <arpa/inet.h>
+ #include <sys/socket.h>
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct hostent *host;
+   struct in_addr ipv4addr;
+
+   host = gethostbyaddr( &ipv4addr, sizeof(ipv4addr), AF_INET );
+
+   return ( host != (void *)0 );
+ }
diff --git a/testsuites/psxtests/psxhdrs/netdb/gethostbyname.c b/testsuites/psxtests/psxhdrs/netdb/gethostbyname.c
new file mode 100644
index 0000000..21c5885
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/netdb/gethostbyname.c
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief gethostbyname() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  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/socket.h>
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct hostent *host;
+   char *name = (void *)0;
+
+   host = gethostbyname( name );
+
+   return ( host != (void *)0 );
+ }
diff --git a/testsuites/psxtests/psxhdrs/netdb/gethostent.c b/testsuites/psxtests/psxhdrs/netdb/gethostent.c
new file mode 100644
index 0000000..8e61d9f
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/netdb/gethostent.c
@@ -0,0 +1,38 @@
+/**
+ *  @file
+ *  @brief getservent() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  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/socket.h>
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct servent *serv;
+
+   serv = getservent();
+
+   return ( serv != (void *)0 );
+ }
diff --git a/testsuites/psxtests/psxhdrs/netdb/getnameinfo.c b/testsuites/psxtests/psxhdrs/netdb/getnameinfo.c
new file mode 100644
index 0000000..140f786
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/netdb/getnameinfo.c
@@ -0,0 +1,49 @@
+/**
+ *  @file
+ *  @brief getnameinfo() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  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/socket.h>
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct sockaddr sa;
+   char host[1024];
+   char service[20];
+   int result;
+
+   sa.sa_family      = AF_INET;
+
+   result = getnameinfo( &sa,
+                        sizeof(sa),
+                        host,
+                        sizeof(host),
+                        service,
+                        sizeof(service),
+                        0 );
+
+   return result;
+ }
diff --git a/testsuites/psxtests/psxhdrs/netdb/getnetbyaddr.c b/testsuites/psxtests/psxhdrs/netdb/getnetbyaddr.c
new file mode 100644
index 0000000..6f7adee
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/netdb/getnetbyaddr.c
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief getnetbyaddr() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  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 <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct netent *gnet;
+   uint32_t net = 2;
+   int type = 2;
+
+   gnet = getnetbyaddr( net, type );
+
+   return ( gnet != (void *)0 );
+ }
diff --git a/testsuites/psxtests/psxhdrs/netdb/getnetbyname.c b/testsuites/psxtests/psxhdrs/netdb/getnetbyname.c
new file mode 100644
index 0000000..7552aad
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/netdb/getnetbyname.c
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief getnetbyname() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  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 <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct netent *gnet;
+   char *name = "ipv4";
+
+   gnet = getnetbyname( name );
+   (void) name;
+
+   return ( gnet != (void *)0 );
+ }
diff --git a/testsuites/psxtests/psxhdrs/netdb/getnetent.c b/testsuites/psxtests/psxhdrs/netdb/getnetent.c
new file mode 100644
index 0000000..9e15205
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/netdb/getnetent.c
@@ -0,0 +1,37 @@
+/**
+ *  @file
+ *  @brief getnetent() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  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 <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct netent *nent;
+
+   nent = getnetent();
+
+   return ( nent != (void *)0 );
+ }
diff --git a/testsuites/psxtests/psxhdrs/netdb/getprotobyname.c b/testsuites/psxtests/psxhdrs/netdb/getprotobyname.c
new file mode 100644
index 0000000..2379714
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/netdb/getprotobyname.c
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief getprotobyname() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  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 <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct protoent *pnet;
+   char *name = "ipv4";
+
+   pnet = getprotobyname( name );
+   (void) name;
+
+   return ( pnet != (void *)0 );
+ }
diff --git a/testsuites/psxtests/psxhdrs/netdb/getprotobynumber.c b/testsuites/psxtests/psxhdrs/netdb/getprotobynumber.c
new file mode 100644
index 0000000..55db5e1
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/netdb/getprotobynumber.c
@@ -0,0 +1,38 @@
+/**
+ *  @file
+ *  @brief getprotobynumber() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  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 <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct protoent *pnet;
+   int proto = 2;
+
+   pnet = getprotobynumber( proto );
+
+   return ( pnet != (void *)0 );
+ }
diff --git a/testsuites/psxtests/psxhdrs/netdb/getprotoent.c b/testsuites/psxtests/psxhdrs/netdb/getprotoent.c
new file mode 100644
index 0000000..699cd9e
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/netdb/getprotoent.c
@@ -0,0 +1,37 @@
+/**
+ *  @file
+ *  @brief getprotoent() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  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 <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct protoent *protoc;
+
+   protoc = getprotoent();
+
+   return ( protoc != (void *)0 );
+ }
diff --git a/testsuites/psxtests/psxhdrs/netdb/getservbyname.c b/testsuites/psxtests/psxhdrs/netdb/getservbyname.c
new file mode 100644
index 0000000..afb5567
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/netdb/getservbyname.c
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief getservbyname() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  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 <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct servent *pserv;
+   char *name = "ip";
+   char *proto = "ipv4";
+
+   pserv = getservbyname( name, proto );
+
+   return ( pserv != (void *)0 );
+ }
diff --git a/testsuites/psxtests/psxhdrs/netdb/getservbyport.c b/testsuites/psxtests/psxhdrs/netdb/getservbyport.c
new file mode 100644
index 0000000..df4a013
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/netdb/getservbyport.c
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief getservbyport() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  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 <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct servent *pserv;
+   int port = 2;
+   char *proto = "ipv4";
+
+   pserv = getservbyport( port, proto );
+
+   return ( pserv != (void *)0 );
+ }
diff --git a/testsuites/psxtests/psxhdrs/netdb/getservent.c b/testsuites/psxtests/psxhdrs/netdb/getservent.c
new file mode 100644
index 0000000..8e61d9f
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/netdb/getservent.c
@@ -0,0 +1,38 @@
+/**
+ *  @file
+ *  @brief getservent() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  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/socket.h>
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct servent *serv;
+
+   serv = getservent();
+
+   return ( serv != (void *)0 );
+ }
diff --git a/testsuites/psxtests/psxhdrs/netdb/h_errno.c b/testsuites/psxtests/psxhdrs/netdb/h_errno.c
new file mode 100644
index 0000000..8b95b99
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/netdb/h_errno.c
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief h_errno() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  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/socket.h>
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct hostent *host;
+
+   host = gethostent();
+   sethostent( h_errno );
+
+   return ( host != (void *)0 );
+ }
diff --git a/testsuites/psxtests/psxhdrs/netdb/sethostent.c b/testsuites/psxtests/psxhdrs/netdb/sethostent.c
new file mode 100644
index 0000000..8c4f319
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/netdb/sethostent.c
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief sethostent() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  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/socket.h>
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct hostent *host;
+
+   host = gethostent();
+   sethostent( 1 );
+
+   return ( host != (void *)0 );
+ }
diff --git a/testsuites/psxtests/psxhdrs/netdb/setnetent.c b/testsuites/psxtests/psxhdrs/netdb/setnetent.c
new file mode 100644
index 0000000..b6a8b7e
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/netdb/setnetent.c
@@ -0,0 +1,38 @@
+/**
+ *  @file
+ *  @brief setnetent() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  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 <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct netent *nent;
+
+   nent = getnetent();
+   setnetent( 1 );
+
+   return ( nent != (void *)0 );
+ }
diff --git a/testsuites/psxtests/psxhdrs/netdb/setprotoent.c b/testsuites/psxtests/psxhdrs/netdb/setprotoent.c
new file mode 100644
index 0000000..f08cfec
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/netdb/setprotoent.c
@@ -0,0 +1,38 @@
+/**
+ *  @file
+ *  @brief setprotoent() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  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 <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct protoent *protoc;
+
+   protoc = getprotoent();
+   setprotoent( 1 );
+
+   return ( protoc != (void *)0 );
+ }
diff --git a/testsuites/psxtests/psxhdrs/netdb/setservent.c b/testsuites/psxtests/psxhdrs/netdb/setservent.c
new file mode 100644
index 0000000..5599dd3
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/netdb/setservent.c
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief setservent() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  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/socket.h>
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct servent *serv;
+
+   serv = getservent();
+   setservent( 1 );
+
+   return ( serv != (void *)0 );
+ }




More information about the vc mailing list