summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxhdrs/sys/stat/utimensat.c
diff options
context:
space:
mode:
authorJacob Shin <jacobshin313@gmail.com>2018-12-09 10:31:41 -0600
committerJoel Sherrill <joel@rtems.org>2018-12-09 16:33:59 -0600
commit9e7e8b3f2c40daa1ed7c36460c86590db6236d0d (patch)
treea64342453d1c2804d29478789233e78401837021 /testsuites/psxtests/psxhdrs/sys/stat/utimensat.c
parentpsxhdrs: Added POSIX API Signature Compliance Tests for threads.h (GCI 2018) (diff)
downloadrtems-9e7e8b3f2c40daa1ed7c36460c86590db6236d0d.tar.bz2
psxhdrs: Add POSIX API Signature Compliance Tests for sys/stat.h (GCI 2018)
Diffstat (limited to '')
-rw-r--r--testsuites/psxtests/psxhdrs/sys/stat/utimensat.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/testsuites/psxtests/psxhdrs/sys/stat/utimensat.c b/testsuites/psxtests/psxhdrs/sys/stat/utimensat.c
new file mode 100644
index 0000000000..8f3eae12bd
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/sys/stat/utimensat.c
@@ -0,0 +1,41 @@
+/**
+ * @file
+ * @brief utimensat() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Jacob Shin
+ *
+ * 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/stat.h>
+#include <fcntl.h>
+
+int test( void );
+
+int test( void )
+{
+ int return_value;
+ int fd = 1;
+ char *path = "/";
+ struct timespec times[2];
+ int flag = AT_SYMLINK_NOFOLLOW;
+
+ return_value = utimensat(fd, path, times, flag);
+ return (return_value != -1);
+} \ No newline at end of file