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

Shashvat Jain shashvatjain2002 at gmail.com
Wed Dec 12 16:35:30 UTC 2018


Hey Abhimanyu!!
please note that all the tests must have the new license BSD-2 .
It was added recently .
here is the new license
https://devel.rtems.org/wiki/GCI/Coding/AddPOSIXMethodSignatureComplianceTests
if possible ,also submit a patch editing your previous test files with the
new license .

Thank you !!
Regards
Shashvat

On Wed, Dec 12, 2018 at 9:33 PM Abhimanyu Raghuvanshi <
abhimanyuraghuvanshi29 at gmail.com> wrote:

> Patch attached
>
> ====================================
> From 145613daf5bea789337540e488b626077ce03bef Mon Sep 17 00:00:00 2001
> From: ABR290B <abhimanyuraghuvanshi29 at gmail.com>
> Date: Wed, 12 Dec 2018 21:31:27 +0530
> Subject: [PATCH] POSIX Signature Test for sys/uio.h (GCI2018)
>
> ---
>  testsuites/psxtests/Makefile.am              |  4 ++-
>  testsuites/psxtests/psxhdrs/sys/uio/readv.c  | 38 ++++++++++++++++++++
>  testsuites/psxtests/psxhdrs/sys/uio/writev.c | 38 ++++++++++++++++++++
>  3 files changed, 79 insertions(+), 1 deletion(-)
>  create mode 100644 testsuites/psxtests/psxhdrs/sys/uio/readv.c
>  create mode 100644 testsuites/psxtests/psxhdrs/sys/uio/writev.c
>
> diff --git a/testsuites/psxtests/Makefile.am
> b/testsuites/psxtests/Makefile.am
> index 3dd8fe0139..7c7a94f968 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/uio/readv.c \
> + psxhdrs/sys/uio/writev.c
>
>  ## Not supported by RTEMS, but POSIX API Compliance tests exist.
>  ## lib_a_SOURCES += psxhdrs/ulimit/ulimit.c
> diff --git a/testsuites/psxtests/psxhdrs/sys/uio/readv.c
> b/testsuites/psxtests/psxhdrs/sys/uio/readv.c
> new file mode 100644
> index 0000000000..8f6f3aa9f5
> --- /dev/null
> +++ b/testsuites/psxtests/psxhdrs/sys/uio/readv.c
> @@ -0,0 +1,38 @@
> +/**
> + *  @file
> + *  @brief readv() 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/uio.h>
> +#include <sys/types.h>
> +
> +int test(void);
> +
> +int test(void)
> +{
> +  int a = 0;
> +  const struct iovec b = {0,0};
> +  int c = 1;
> +  ssize_t ret = readv(a, &b, c);
> +  return ret!='\0';
> +}
> \ No newline at end of file
> diff --git a/testsuites/psxtests/psxhdrs/sys/uio/writev.c
> b/testsuites/psxtests/psxhdrs/sys/uio/writev.c
> new file mode 100644
> index 0000000000..0e53e21815
> --- /dev/null
> +++ b/testsuites/psxtests/psxhdrs/sys/uio/writev.c
> @@ -0,0 +1,38 @@
> +/**
> + *  @file
> + *  @brief writev() 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/uio.h>
> +#include <sys/types.h>
> +
> +int test(void);
> +
> +int test(void)
> +{
> +  int a = 0;
> +  const struct iovec b = {0,0};
> +  int c = 1;
> +  ssize_t ret = writev(a, &b, c);
> +  return ret!='\0';
> +}
> \ 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/20181212/3c6386ed/attachment-0002.html>


More information about the devel mailing list