<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style></head>
<body>
<body><p dir="ltr">Reviewing from my cell phone so didn't compile.</p><p dir="ltr">Copyright year is wrong.<br>Does sysconf() need to be called to ensure it gives a consistent answer?</p><p dir="ltr">Otherwise ok</p><div class="quote">On Dec 6, 2013 9:46 AM, Gedare Bloom <gedare@rtems.org> wrote:<br type="attribution"></div></body>
<font size="2"><div class="PlainText">Module:    rtems<br>
Branch:    master<br>
Commit:    54da1243eb1840a7311e2449e3fb3c00d45c7f2f<br>
Changeset: <a href="http://git.rtems.org/rtems/commit/?id=54da1243eb1840a7311e2449e3fb3c00d45c7f2f">http://git.rtems.org/rtems/commit/?id=54da1243eb1840a7311e2449e3fb3c00d45c7f2f</a><br>
<br>
Author:    Chirayu Desai <cdesai@cyanogenmod.org><br>
Date:      Fri Dec  6 20:53:36 2013 +0530<br>
<br>
sptests: add a test for page size<br>
<br>
Bug: <a href="https://www.rtems.org/bugzilla/show_bug.cgi?id=1216">https://www.rtems.org/bugzilla/show_bug.cgi?id=1216</a><br>
<br>
---<br>
<br>
 testsuites/sptests/Makefile.am               |    4 +-<br>
 testsuites/sptests/configure.ac              |    1 +<br>
 testsuites/sptests/sppagesize/Makefile.am    |   22 ++++++++++++<br>
 testsuites/sptests/sppagesize/init.c         |   45 ++++++++++++++++++++++++++<br>
 testsuites/sptests/sppagesize/sppagesize.doc |   17 ++++++++++<br>
 testsuites/sptests/sppagesize/sppagesize.scn |    2 +<br>
 6 files changed, 89 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am<br>
index 4618d36..f440b0f 100644<br>
--- a/testsuites/sptests/Makefile.am<br>
+++ b/testsuites/sptests/Makefile.am<br>
@@ -26,8 +26,8 @@ SUBDIRS = \<br>
     spintrcritical09 spintrcritical10 spintrcritical11 spintrcritical12 \<br>
     spintrcritical13 spintrcritical14 spintrcritical15 spintrcritical16 \<br>
     spintrcritical17 spintrcritical18 spmkdir spmountmgr01 spheapprot \<br>
-    spsem01 spsem02 spsimplesched01 spsimplesched02 spsimplesched03 spnsext01 \<br>
-    spedfsched01 spedfsched02 spedfsched03 \<br>
+    sppagesize spsem01 spsem02 spsimplesched01 spsimplesched02 \<br>
+    spsimplesched03 spnsext01 spedfsched01 spedfsched02 spedfsched03 \<br>
     spcbssched01 spcbssched02 spcbssched03 spqreslib sptimespec01<br>
 SUBDIRS += spintrcritical20<br>
 SUBDIRS += spintrcritical19<br>
diff --git a/testsuites/sptests/configure.ac b/testsuites/sptests/configure.ac<br>
index 70e425d..69c999a 100644<br>
--- a/testsuites/sptests/configure.ac<br>
+++ b/testsuites/sptests/configure.ac<br>
@@ -180,6 +180,7 @@ spmountmgr01/Makefile<br>
 spnotepad01/Makefile<br>
 spnsext01/Makefile<br>
 spobjgetnext/Makefile<br>
+sppagesize/Makefile<br>
 spprintk/Makefile<br>
 spprivenv01/Makefile<br>
 spqreslib/Makefile<br>
diff --git a/testsuites/sptests/sppagesize/Makefile.am b/testsuites/sptests/sppagesize/Makefile.am<br>
new file mode 100644<br>
index 0000000..83647ef<br>
--- /dev/null<br>
+++ b/testsuites/sptests/sppagesize/Makefile.am<br>
@@ -0,0 +1,22 @@<br>
+<br>
+rtems_tests_PROGRAMS = sppagesize<br>
+sppagesize_SOURCES = init.c<br>
+<br>
+dist_rtems_tests_DATA = sppagesize.scn<br>
+dist_rtems_tests_DATA += sppagesize.doc<br>
+<br>
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg<br>
+include $(top_srcdir)/../automake/compile.am<br>
+include $(top_srcdir)/../automake/leaf.am<br>
+<br>
+<br>
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include<br>
+<br>
+LINK_OBJS = $(sppagesize_OBJECTS)<br>
+LINK_LIBS = $(sppagesize_LDLIBS)<br>
+<br>
+sppagesize$(EXEEXT): $(sppagesize_OBJECTS) $(sppagesize_DEPENDENCIES)<br>
+       @rm -f sppagesize$(EXEEXT)<br>
+       $(make-exe)<br>
+<br>
+include $(top_srcdir)/../automake/local.am<br>
diff --git a/testsuites/sptests/sppagesize/init.c b/testsuites/sptests/sppagesize/init.c<br>
new file mode 100644<br>
index 0000000..0f21aa8<br>
--- /dev/null<br>
+++ b/testsuites/sptests/sppagesize/init.c<br>
@@ -0,0 +1,45 @@<br>
+/*<br>
+ *  COPYRIGHT (c) 1989-2011.<br>
+ *  On-Line Applications Research Corporation (OAR).<br>
+ *<br>
+ *  The license and distribution terms for this file may be<br>
+ *  found in the file LICENSE in this distribution or at<br>
+ *  <a href="http://www.rtems.com/license/LICENSE">http://www.rtems.com/license/LICENSE</a>.<br>
+ */<br>
+<br>
+#ifdef HAVE_CONFIG_H<br>
+#include "config.h"<br>
+#endif<br>
+<br>
+#include <tmacros.h><br>
+#include <rtems.h><br>
+#include <limits.h><br>
+#include <sys/param.h><br>
+<br>
+/* forward declarations to avoid warnings */<br>
+rtems_task Init(rtems_task_argument argument);<br>
+<br>
+rtems_task Init(<br>
+  rtems_task_argument argument<br>
+)<br>
+{<br>
+    puts("\n\n*** TEST SPPAGESIZE ***");<br>
+<br>
+    rtems_test_assert(PAGESIZE == PAGE_SIZE);<br>
+    rtems_test_assert(getpagesize() == PAGE_SIZE);<br>
+<br>
+    puts("*** END OF TEST SPPAGESIZE ***");<br>
+<br>
+    rtems_test_exit(0);<br>
+}<br>
+<br>
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER<br>
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER<br>
+<br>
+#define CONFIGURE_MAXIMUM_TASKS 1<br>
+<br>
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE<br>
+<br>
+#define CONFIGURE_INIT<br>
+<br>
+#include <rtems/confdefs.h><br>
diff --git a/testsuites/sptests/sppagesize/sppagesize.doc b/testsuites/sptests/sppagesize/sppagesize.doc<br>
new file mode 100644<br>
index 0000000..696d1fa<br>
--- /dev/null<br>
+++ b/testsuites/sptests/sppagesize/sppagesize.doc<br>
@@ -0,0 +1,17 @@<br>
+#  COPYRIGHT (c) 1989-2011.<br>
+#  On-Line Applications Research Corporation (OAR).<br>
+#<br>
+#  The license and distribution terms for this file may be<br>
+#  found in the file LICENSE in this distribution or at<br>
+#  <a href="http://www.rtems.com/license/LICENSE">http://www.rtems.com/license/LICENSE</a>.<br>
+#<br>
+<br>
+test name:  sppagesize<br>
+<br>
+directives:<br>
+  getpagesize<br>
+<br>
+concepts:<br>
+<br>
++ Verifies that the different declarations of pagesize have<br>
+  the same value<br>
diff --git a/testsuites/sptests/sppagesize/sppagesize.scn b/testsuites/sptests/sppagesize/sppagesize.scn<br>
new file mode 100644<br>
index 0000000..2468e04<br>
--- /dev/null<br>
+++ b/testsuites/sptests/sppagesize/sppagesize.scn<br>
@@ -0,0 +1,2 @@<br>
+*** TEST SPPAGESIZE ***<br>
+*** END OF TEST SPPAGESIZE ***<br>
<br>
_______________________________________________<br>
rtems-vc mailing list<br>
rtems-vc@rtems.org<br>
<a href="http://www.rtems.org/mailman/listinfo/rtems-vc">http://www.rtems.org/mailman/listinfo/rtems-vc</a><br>
</div></font>
</body>
</html>