POSIX Signature Test for sys/statvfs.h (GCI2018)

Joel Sherrill joel at rtems.org
Thu Dec 13 15:03:02 UTC 2018


RTEMS does not support this so I went ahead and filed the ticket to track
adding this support.

Thanks.

--joel

On Wed, Dec 12, 2018 at 8:16 AM Abhimanyu Raghuvanshi <
abhimanyuraghuvanshi29 at gmail.com> wrote:

> Patch attached
>
> =========================
> From 2c4927cf98fee6818d98c95106c938a175b7bf58 Mon Sep 17 00:00:00 2001
> From: ABR290B <abhimanyuraghuvanshi29 at 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
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20181213/50cb6d2d/attachment-0002.html>


More information about the devel mailing list