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

Abhimanyu Raghuvanshi abhimanyuraghuvanshi29 at gmail.com
Wed Dec 12 14:16:33 UTC 2018


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20181212/962dae74/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-POSIX-Signature-Test-for-sys-statvfs-GCI2018.patch
Type: application/octet-stream
Size: 6672 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/devel/attachments/20181212/962dae74/attachment.obj>


More information about the devel mailing list