Hello !!
this header file is not present in the newlib
I have file a ticket to include it See #3650
the tests for this file are added in this patch

Thank you
Regards
Shashvat
From a063c26ad11496739dd742ba8377591a4c2dd1c5 Mon Sep 17 00:00:00 2001
From: Shashvat Jain <shashvatjain2...@gmail.com>
Date: Sun, 9 Dec 2018 12:13:48 -0500
Subject: [PATCH] psxhdrs:Add POSIX Conformance Test for sys/ipc.h (GCI 2018)

Test for this file has been added but are disabled due to the absence of header file sys/ipc.h

see Ticket #3650
---
 testsuites/psxtests/Makefile.am            |  4 +--
 testsuites/psxtests/psxhdrs/sys/ipc/ftok.c | 40 ++++++++++++++++++++++++++++++
 2 files changed, 42 insertions(+), 2 deletions(-)
 create mode 100644 testsuites/psxtests/psxhdrs/sys/ipc/ftok.c

diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am
index 01fd04a..16c73e7 100644
--- a/testsuites/psxtests/Makefile.am
+++ b/testsuites/psxtests/Makefile.am
@@ -1780,8 +1780,7 @@ lib_a_SOURCES = psxhdrs/devctl/posix_devctl.c \
 	psxhdrs/stdlib/system.c \
 	psxhdrs/stdlib/unsetenv.c \
 	psxhdrs/stdlib/wcstombs.c \
-	psxhdrs/stdlib/wctomb.c
-
+	psxhdrs/stdlib/wctomb.c 
 
 ## Not supported by RTEMS, but POSIX API Compliance tests exist.
 ## lib_a_SOURCES += psxhdrs/ulimit/ulimit.c
@@ -1823,6 +1822,7 @@ lib_a_SOURCES = psxhdrs/devctl/posix_devctl.c \
 ## lib_a_SOURCES += psxhdrs/stdlib/posix_openpt.c  See ticket #3646
 ## lib_a_SOURCES += psxhdrs/stdlib/ptsname.c       See ticket #3647
 ## lib_a_SOURCES += psxhdrs/stdlib/unlockpt.c      See ticket #3648
+## lib_a_SOURCES += psxhdrs/sys/ftok.c             See ticket #3650
 endif
 
 rtems_tests_PROGRAMS = $(psx_tests)
diff --git a/testsuites/psxtests/psxhdrs/sys/ipc/ftok.c b/testsuites/psxtests/psxhdrs/sys/ipc/ftok.c
new file mode 100644
index 0000000..5715461
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/sys/ipc/ftok.c
@@ -0,0 +1,40 @@
+/**
+ *  @file
+ *  @brief ftok() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Shashvat Jain
+ *
+ *  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/ipc.h>
+
+int test( void );
+
+int test( void )
+{
+  key_t result;
+  const char *path = "/tmp/myfile";
+  int id = "S";
+ 
+  result = ftok(path,id);
+
+  return (result);
+}
-- 
1.8.3.1

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

Reply via email to