[rtems commit] POSIX Compliance Signature Test for glob.h (GCI 2018)
Joel Sherrill
joel at rtems.org
Thu Dec 6 04:47:26 UTC 2018
Module: rtems
Branch: master
Commit: bf135a97a11d7ec36e9fcfd646972c7d2d2b8a6c
Changeset: http://git.rtems.org/rtems/commit/?id=bf135a97a11d7ec36e9fcfd646972c7d2d2b8a6c
Author: ABR290B <abhimanyuraghuvanshi29 at gmail.com>
Date: Thu Dec 6 09:56:31 2018 +0530
POSIX Compliance Signature Test for glob.h (GCI 2018)
---
testsuites/psxtests/Makefile.am | 2 ++
testsuites/psxtests/psxhdrs/glob/glob.c | 42 +++++++++++++++++++++++++++++
testsuites/psxtests/psxhdrs/glob/globfree.c | 37 +++++++++++++++++++++++++
3 files changed, 81 insertions(+)
diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am
index 79eb626..4186bd8 100644
--- a/testsuites/psxtests/Makefile.am
+++ b/testsuites/psxtests/Makefile.am
@@ -1093,6 +1093,8 @@ lib_a_SOURCES = psxhdrs/devctl/posix_devctl.c \
psxhdrs/dirent/scandir.c \
psxhdrs/dirent/seekdir.c \
psxhdrs/dirent/telldir.c \
+ psxhdrs/glob/glob.c \
+ psxhdrs/glob/globfree.c \
psxhdrs/mqueue/mq_open.c \
psxhdrs/mqueue/mq_close.c \
psxhdrs/mqueue/mq_getattr.c \
diff --git a/testsuites/psxtests/psxhdrs/glob/glob.c b/testsuites/psxtests/psxhdrs/glob/glob.c
new file mode 100644
index 0000000..d97ecf8
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/glob/glob.c
@@ -0,0 +1,42 @@
+/**
+ * @file
+ * @brief glob() 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 <glob.h>
+
+int test(void);
+
+static int errfunc (const char *epath, int eerrno)
+{
+ return 0;
+}
+
+int test(void)
+{
+ const char *a = "string";
+ int b = 0;
+ glob_t e;
+
+ return glob(a, b, errfunc, &e);
+}
diff --git a/testsuites/psxtests/psxhdrs/glob/globfree.c b/testsuites/psxtests/psxhdrs/glob/globfree.c
new file mode 100644
index 0000000..7da3520
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/glob/globfree.c
@@ -0,0 +1,37 @@
+/**
+ * @file
+ * @brief globfree() 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 <glob.h>
+
+int test(void);
+
+int test(void)
+{
+ glob_t a;
+
+ globfree(&a);
+
+ return 0;
+}
More information about the vc
mailing list