Patch attached ========================= >From 2c4927cf98fee6818d98c95106c938a175b7bf58 Mon Sep 17 00:00:00 2001 From: ABR290B <abhimanyuraghuvansh...@gmail.com> Date: Wed, 12 Dec 2018 19:44:40 +0530 Subject: [PATCH] POSIX Signature Test for sys/statvfs (GCI2018)
--- testsuites/psxtests/Makefile.am | 4 ++- .../psxtests/psxhdrs/statvfs/fstatvfs.c | 36 +++++++++++++++++++ testsuites/psxtests/psxhdrs/statvfs/statvfs.c | 36 +++++++++++++++++++ .../psxtests/psxhdrs/sys/statvfs/fstatvfs.c | 36 +++++++++++++++++++ .../psxtests/psxhdrs/sys/statvfs/statvfs.c | 36 +++++++++++++++++++ 5 files changed, 147 insertions(+), 1 deletion(-) create mode 100644 testsuites/psxtests/psxhdrs/statvfs/fstatvfs.c create mode 100644 testsuites/psxtests/psxhdrs/statvfs/statvfs.c create mode 100644 testsuites/psxtests/psxhdrs/sys/statvfs/fstatvfs.c create mode 100644 testsuites/psxtests/psxhdrs/sys/statvfs/statvfs.c diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am index 3dd8fe0139..f7989f1c7c 100644 --- a/testsuites/psxtests/Makefile.am +++ b/testsuites/psxtests/Makefile.am @@ -1815,7 +1815,9 @@ lib_a_SOURCES = psxhdrs/devctl/posix_devctl.c \ psxhdrs/setjmp/longjmp.c \ psxhdrs/setjmp/setjmp.c \ psxhdrs/setjmp/siglongjmp.c \ - psxhdrs/setjmp/sigsetjmp.c + psxhdrs/setjmp/sigsetjmp.c \ + psxhdrs/sys/statvfs/statvfs.c \ + psxhdrs/sys/statvfs/fstatvfs.c ## Not supported by RTEMS, but POSIX API Compliance tests exist. ## lib_a_SOURCES += psxhdrs/ulimit/ulimit.c diff --git a/testsuites/psxtests/psxhdrs/statvfs/fstatvfs.c b/testsuites/psxtests/psxhdrs/statvfs/fstatvfs.c new file mode 100644 index 0000000000..a71fce1d7d --- /dev/null +++ b/testsuites/psxtests/psxhdrs/statvfs/fstatvfs.c @@ -0,0 +1,36 @@ +/** + * @file + * @brief fstatvfs() 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 <sys/statvfs.h> +#include <sys/types.h> + +int test(void); + +int test(void) +{ + int a = 0; + struct statvfs b = {0,0,0,0,0}; + return fstatvfs(a, &b); +} \ No newline at end of file diff --git a/testsuites/psxtests/psxhdrs/statvfs/statvfs.c b/testsuites/psxtests/psxhdrs/statvfs/statvfs.c new file mode 100644 index 0000000000..cabc7ff2e5 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/statvfs/statvfs.c @@ -0,0 +1,36 @@ +/** + * @file + * @brief statvfs() 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 <sys/statvfs.h> +#include <sys/types.h> + +int test(void); + +int test(void) +{ + const char a = 1; + struct statvfs b = {0,0,0,0,0}; + return statvfs(&a, &b); +} \ No newline at end of file diff --git a/testsuites/psxtests/psxhdrs/sys/statvfs/fstatvfs.c b/testsuites/psxtests/psxhdrs/sys/statvfs/fstatvfs.c new file mode 100644 index 0000000000..a71fce1d7d --- /dev/null +++ b/testsuites/psxtests/psxhdrs/sys/statvfs/fstatvfs.c @@ -0,0 +1,36 @@ +/** + * @file + * @brief fstatvfs() 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 <sys/statvfs.h> +#include <sys/types.h> + +int test(void); + +int test(void) +{ + int a = 0; + struct statvfs b = {0,0,0,0,0}; + return fstatvfs(a, &b); +} \ No newline at end of file diff --git a/testsuites/psxtests/psxhdrs/sys/statvfs/statvfs.c b/testsuites/psxtests/psxhdrs/sys/statvfs/statvfs.c new file mode 100644 index 0000000000..cabc7ff2e5 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/sys/statvfs/statvfs.c @@ -0,0 +1,36 @@ +/** + * @file + * @brief statvfs() 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 <sys/statvfs.h> +#include <sys/types.h> + +int test(void); + +int test(void) +{ + const char a = 1; + struct statvfs b = {0,0,0,0,0}; + return statvfs(&a, &b); +} \ No newline at end of file -- 2.19.1.windows.1 ======================================== ABR
0001-POSIX-Signature-Test-for-sys-statvfs-GCI2018.patch
Description: Binary data
_______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel