[rtems commit] POSIX Signature Test for fenv.h (GCI 2018)
Joel Sherrill
joel at rtems.org
Thu Dec 6 15:34:28 UTC 2018
Module: rtems
Branch: master
Commit: da2621649ca002941c77295402b9052e128487ad
Changeset: http://git.rtems.org/rtems/commit/?id=da2621649ca002941c77295402b9052e128487ad
Author: ABR290B <abhimanyuraghuvanshi29 at gmail.com>
Date: Thu Dec 6 17:04:25 2018 +0530
POSIX Signature Test for fenv.h (GCI 2018)
Updates #2971.
---
testsuites/psxtests/Makefile.am | 22 ++++++++++----
testsuites/psxtests/psxhdrs/fenv/feclearexcept.c | 34 +++++++++++++++++++++
testsuites/psxtests/psxhdrs/fenv/fegetenv.c | 34 +++++++++++++++++++++
testsuites/psxtests/psxhdrs/fenv/fegetexceptflag.c | 35 ++++++++++++++++++++++
testsuites/psxtests/psxhdrs/fenv/fegetround.c | 33 ++++++++++++++++++++
testsuites/psxtests/psxhdrs/fenv/feholdexcept.c | 34 +++++++++++++++++++++
testsuites/psxtests/psxhdrs/fenv/feraiseexcept.c | 34 +++++++++++++++++++++
testsuites/psxtests/psxhdrs/fenv/fesetenv.c | 34 +++++++++++++++++++++
testsuites/psxtests/psxhdrs/fenv/fesetexceptflag.c | 35 ++++++++++++++++++++++
testsuites/psxtests/psxhdrs/fenv/fesetround.c | 34 +++++++++++++++++++++
testsuites/psxtests/psxhdrs/fenv/fetestexcept.c | 34 +++++++++++++++++++++
testsuites/psxtests/psxhdrs/fenv/feupdateenv.c | 34 +++++++++++++++++++++
12 files changed, 391 insertions(+), 6 deletions(-)
diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am
index 35821b1..09d5875 100644
--- a/testsuites/psxtests/Makefile.am
+++ b/testsuites/psxtests/Makefile.am
@@ -1325,14 +1325,24 @@ lib_a_SOURCES = psxhdrs/devctl/posix_devctl.c \
## lib_a_SOURCES += psxhdrs/ulimit/ulimit.c
## lib_a_SOURCES += psxhdrs/monetary/strfmon.c
## lib_a_SOURCES += psxhdrs/monetary/strfmon_l.c
-## lib_a_SOURCES += psxhdrs/ftw/ftw.c See ticket #2970
-## lib_a_SOURCES += psxhdrs/ftw/nftw.c See ticket #2970
## Specific issues that tickets are tracking
-## lib_a_SOURCES += psxhdrs/dirent/dirfd.c See ticket #3371
-## lib_a_SOURCES += psxhdrs/dirent/fdopendir.c See ticket #3371
-## lib_a_SOURCES += psxhdrs/stdio/getdelim.c See ticket #3633
-## lib_a_SOURCES += psxhdrs/stdio/getline.c See ticket #3633
+## lib_a_SOURCES += psxhdrs/dirent/dirfd.c See ticket #3371
+## lib_a_SOURCES += psxhdrs/dirent/fdopendir.c See ticket #3371
+## lib_a_SOURCES += psxhdrs/fenv/feclearexcept.c See ticket #2971
+## lib_a_SOURCES += psxhdrs/fenv/fegetenv.c See ticket #2971
+## lib_a_SOURCES += psxhdrs/fenv/fegetexceptflag.c See ticket #2971
+## lib_a_SOURCES += psxhdrs/fenv/fegetround.c See ticket #2971
+## lib_a_SOURCES += psxhdrs/fenv/feholdexcept.c See ticket #2971
+## lib_a_SOURCES += psxhdrs/fenv/feraiseexcept.c See ticket #2971
+## lib_a_SOURCES += psxhdrs/fenv/fesetenv.c See ticket #2971
+## lib_a_SOURCES += psxhdrs/fenv/fesetexceptflag.c See ticket #2971
+## lib_a_SOURCES += psxhdrs/fenv/fesetround.c See ticket #2971
+## lib_a_SOURCES += psxhdrs/fenv/fetestexcept.c See ticket #2971
+## lib_a_SOURCES += psxhdrs/ftw/ftw.c See ticket #2970
+## lib_a_SOURCES += psxhdrs/ftw/nftw.c See ticket #2970
+## lib_a_SOURCES += psxhdrs/stdio/getdelim.c See ticket #3633
+## lib_a_SOURCES += psxhdrs/stdio/getline.c See ticket #3633
endif
rtems_tests_PROGRAMS = $(psx_tests)
diff --git a/testsuites/psxtests/psxhdrs/fenv/feclearexcept.c b/testsuites/psxtests/psxhdrs/fenv/feclearexcept.c
new file mode 100644
index 0000000..0e2e694
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/fenv/feclearexcept.c
@@ -0,0 +1,34 @@
+/**
+ * @file
+ * @brief feclearexcept() 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 <fenv.h>
+
+int test(void);
+
+int test(void)
+{
+ int b = 0;
+ return feclearexcept(b);
+}
\ No newline at end of file
diff --git a/testsuites/psxtests/psxhdrs/fenv/fegetenv.c b/testsuites/psxtests/psxhdrs/fenv/fegetenv.c
new file mode 100644
index 0000000..8341cd3
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/fenv/fegetenv.c
@@ -0,0 +1,34 @@
+/**
+ * @file
+ * @brief fegetenv() 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 <fenv.h>
+
+int test(void);
+
+int test(void)
+{
+ fenv_t a;
+ return fegetenv(&a);
+}
\ No newline at end of file
diff --git a/testsuites/psxtests/psxhdrs/fenv/fegetexceptflag.c b/testsuites/psxtests/psxhdrs/fenv/fegetexceptflag.c
new file mode 100644
index 0000000..7d99378
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/fenv/fegetexceptflag.c
@@ -0,0 +1,35 @@
+/**
+ * @file
+ * @brief fegetexceptflag() 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 <fenv.h>
+
+int test(void);
+
+int test(void)
+{
+ int a = 1;
+ fexcept_t b;
+ return fegetexceptflag(&b, a);
+}
\ No newline at end of file
diff --git a/testsuites/psxtests/psxhdrs/fenv/fegetround.c b/testsuites/psxtests/psxhdrs/fenv/fegetround.c
new file mode 100644
index 0000000..189daa5
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/fenv/fegetround.c
@@ -0,0 +1,33 @@
+/**
+ * @file
+ * @brief fegetround() 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 <fenv.h>
+
+int test(void);
+
+int test(void)
+{
+ return fegetround();
+}
\ No newline at end of file
diff --git a/testsuites/psxtests/psxhdrs/fenv/feholdexcept.c b/testsuites/psxtests/psxhdrs/fenv/feholdexcept.c
new file mode 100644
index 0000000..9b395ee
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/fenv/feholdexcept.c
@@ -0,0 +1,34 @@
+/**
+ * @file
+ * @brief feholfexcept() 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 <fenv.h>
+
+int test(void);
+
+int test(void)
+{
+ fenv_t a;
+ return feholdexcept(&a);
+}
diff --git a/testsuites/psxtests/psxhdrs/fenv/feraiseexcept.c b/testsuites/psxtests/psxhdrs/fenv/feraiseexcept.c
new file mode 100644
index 0000000..6098ea6
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/fenv/feraiseexcept.c
@@ -0,0 +1,34 @@
+/**
+ * @file
+ * @brief feraiseexcept() 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 <fenv.h>
+
+int test(void);
+
+int test(void)
+{
+ int b = 0;
+ return feraiseexcept(b);
+}
\ No newline at end of file
diff --git a/testsuites/psxtests/psxhdrs/fenv/fesetenv.c b/testsuites/psxtests/psxhdrs/fenv/fesetenv.c
new file mode 100644
index 0000000..46cf246
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/fenv/fesetenv.c
@@ -0,0 +1,34 @@
+/**
+ * @file
+ * @brief fesetenv() 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 <fenv.h>
+
+int test(void);
+
+int test(void)
+{
+ fenv_t a;
+ return fegetenv(&a);
+}
diff --git a/testsuites/psxtests/psxhdrs/fenv/fesetexceptflag.c b/testsuites/psxtests/psxhdrs/fenv/fesetexceptflag.c
new file mode 100644
index 0000000..e938e17
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/fenv/fesetexceptflag.c
@@ -0,0 +1,35 @@
+/**
+ * @file
+ * @brief fesetexceptflag() 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 <fenv.h>
+
+int test(void);
+
+int test(void)
+{
+ int a = 0;
+ const fexcept_t b;
+ return fesetexceptflag(&b, a);
+}
\ No newline at end of file
diff --git a/testsuites/psxtests/psxhdrs/fenv/fesetround.c b/testsuites/psxtests/psxhdrs/fenv/fesetround.c
new file mode 100644
index 0000000..2bc5a4b
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/fenv/fesetround.c
@@ -0,0 +1,34 @@
+/**
+ * @file
+ * @brief fesetround() 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 <fenv.h>
+
+int test(void);
+
+int test(void)
+{
+ int b = 0;
+ return fesetround(b);
+}
\ No newline at end of file
diff --git a/testsuites/psxtests/psxhdrs/fenv/fetestexcept.c b/testsuites/psxtests/psxhdrs/fenv/fetestexcept.c
new file mode 100644
index 0000000..e6990d9
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/fenv/fetestexcept.c
@@ -0,0 +1,34 @@
+/**
+ * @file
+ * @brief fetestexcept() 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 <fenv.h>
+
+int test(void);
+
+int test(void)
+{
+ int b = 0;
+ return fetestexcept(b);
+}
\ No newline at end of file
diff --git a/testsuites/psxtests/psxhdrs/fenv/feupdateenv.c b/testsuites/psxtests/psxhdrs/fenv/feupdateenv.c
new file mode 100644
index 0000000..0136cca
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/fenv/feupdateenv.c
@@ -0,0 +1,34 @@
+/**
+ * @file
+ * @brief feupdateenv() 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 <fenv.h>
+
+int test(void);
+
+int test(void)
+{
+ const fenv_t a;
+ return feupdateenv(&a);
+}
\ No newline at end of file
More information about the vc
mailing list