summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxhdrs
diff options
context:
space:
mode:
authorShashvat Jain <shashvatjain2002@gmail.com>2018-12-09 12:13:48 -0500
committerJoel Sherrill <joel@rtems.org>2018-12-09 16:53:51 -0600
commitdc95ef6790e7db9157b8e9c6eda65a2c00598022 (patch)
tree0541fdd50dc2b8417bc53dd1b286881191430ee1 /testsuites/psxtests/psxhdrs
parentpsxhdrs: Add POSIX API Signature Compliance Tests for sys/stat.h (GCI 2018) (diff)
downloadrtems-dc95ef6790e7db9157b8e9c6eda65a2c00598022.tar.bz2
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
Diffstat (limited to 'testsuites/psxtests/psxhdrs')
-rw-r--r--testsuites/psxtests/psxhdrs/sys/ipc/ftok.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/testsuites/psxtests/psxhdrs/sys/ipc/ftok.c b/testsuites/psxtests/psxhdrs/sys/ipc/ftok.c
new file mode 100644
index 0000000000..bfe8f95995
--- /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 = 0;
+
+ result = ftok(path, id);
+
+ return (result);
+}