Re: [PATCH 1/1] eng: Add software test framework chapter

2019-03-22 Thread Sebastian Huber

I rename T Test in RTEMS Test and updated

https://ftp.rtems.org/pub/rtems/people/sebh/eng.pdf

with the attached patch.

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

>From a5a3c8870293e646f7c373b69e831a5193b0d3df Mon Sep 17 00:00:00 2001
From: Sebastian Huber 
Date: Fri, 22 Mar 2019 09:51:29 +0100
Subject: [PATCH] eng: Rename T Test in RTEMS Test

---
 eng/test-framework.rst | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/eng/test-framework.rst b/eng/test-framework.rst
index 9e0560b..2730f6a 100644
--- a/eng/test-framework.rst
+++ b/eng/test-framework.rst
@@ -6,12 +6,12 @@
 Software Test Framework
 ***
 
-.. _TheTTestFramework:
+.. _RTEMSTestFramework:
 
-The T Test Framework
-
+The RTEMS Test Framework
+
 
-The `T Test Framework` helps you to write test suites.  It has the following
+The `RTEMS Test Framework` helps you to write test suites.  It has the following
 features:
 
 * Implemented in standard C11
@@ -127,7 +127,7 @@ as the test step 1 failed with a message of `"a test failure message"`.  The
 `E` line indicates the end of test case `a_test_case` resulting in a total of
 two test steps (`N`) and one test failure (`F`).  The test case execution
 duration (`D`) was 0.001657 seconds.  For test report details see:
-:ref:`Test Reporting `.
+:ref:`Test Reporting `.
 
 Test Fixture
 
@@ -1427,7 +1427,7 @@ The same example with `T_VERBOSE` verbosity:
 E:d:N:6:F:0
 Z:xyz:C:4:N:9:F:3
 
-.. _TheTTestFrameworkTestReporting:
+.. _RTEMSTestFrameworkTestReporting:
 
 Test Reporting
 --
@@ -2110,8 +2110,8 @@ You know the failure count only after a complete test run.  This runs contrary
 to requirement `TF.Portability.Small.Memory`.  It is also a bit verbose
 (`TF.Reporting.Compact`).
 
-It is easy to convert a full test report generated by :ref:`The T Test
-Framework ` to the JUnit XML format.
+It is easy to convert a full test report generated by :ref:`The RTEMS Test
+Framework ` to the JUnit XML format.
 
 Test Anything Protocol
 --
@@ -2132,5 +2132,5 @@ You have to know in advance how many test statements you want to execute in a
 test case.  The problem with this format is that there is no standard way to
 provide auxiliary data such as test timing or a tracing report.
 
-It is easy to convert a full test report generated by :ref:`The T Test
-Framework ` to the TAP format.
+It is easy to convert a full test report generated by :ref:`The RTEMS Test
+Framework ` to the TAP format.
-- 
2.16.4

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH v2 3/3] ttest01: New test

2019-03-22 Thread Sebastian Huber
This is an example test using the RTEMS Test Framework.  It tests also
the framework itself.

Add T_FILE_NAME command line define to get rid of the full file path.
This is important to reduce the read-only data of test files and make
them build system independent.

Update #3199.
---
 testsuites/automake/compile.am |   1 +
 testsuites/libtests/Makefile.am|  10 ++
 testsuites/libtests/configure.ac   |   1 +
 testsuites/libtests/ttest01/init.c | 183 +
 testsuites/libtests/ttest01/t-self-test.h  |  46 
 testsuites/libtests/ttest01/test-example.c |  57 +
 testsuites/libtests/ttest01/ttest01.doc|  19 +++
 testsuites/libtests/ttest01/ttest01.scn|  26 
 8 files changed, 343 insertions(+)
 create mode 100644 testsuites/libtests/ttest01/init.c
 create mode 100644 testsuites/libtests/ttest01/t-self-test.h
 create mode 100644 testsuites/libtests/ttest01/test-example.c
 create mode 100644 testsuites/libtests/ttest01/ttest01.doc
 create mode 100644 testsuites/libtests/ttest01/ttest01.scn

diff --git a/testsuites/automake/compile.am b/testsuites/automake/compile.am
index 83d4ab111c..66ea9a8421 100644
--- a/testsuites/automake/compile.am
+++ b/testsuites/automake/compile.am
@@ -11,6 +11,7 @@ STRIP = @STRIP@
 TEST_LD_FLAGS = -Wl,--wrap=printf -Wl,--wrap=puts -Wl,--wrap=putchar
 
 AM_CPPFLAGS = $(TEST_FLAGS) @RTEMS_CPPFLAGS@ @RTEMS_BSP_CPPFLAGS@
+AM_CPPFLAGS += -DT_FILE_NAME='"$(notdir $<)"'
 AM_CFLAGS   = $(TEST_C_FLAGS)
 AM_CXXFLAGS = $(TEST_CXX_FLAGS)
 
diff --git a/testsuites/libtests/Makefile.am b/testsuites/libtests/Makefile.am
index fe6f7d8ee8..1b80283123 100644
--- a/testsuites/libtests/Makefile.am
+++ b/testsuites/libtests/Makefile.am
@@ -1500,6 +1500,16 @@ top_SOURCES = top/init.c top/task1.c top/task2.c 
top/task3.c \
 top_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_top) $(support_includes)
 endif
 
+if TEST_ttest01
+lib_tests += ttest01
+lib_screens += ttest01/ttest01.scn
+lib_docs += ttest01/ttest01.doc
+ttest01_SOURCES = ttest01/init.c
+ttest01_SOURCES += ttest01/test-example.c
+ttest01_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_ttest01) \
+   $(support_includes)
+endif
+
 if TEST_tztest
 lib_tests += tztest
 lib_screens += tztest/tztest.scn
diff --git a/testsuites/libtests/configure.ac b/testsuites/libtests/configure.ac
index a6879a7430..c02b42a5f9 100644
--- a/testsuites/libtests/configure.ac
+++ b/testsuites/libtests/configure.ac
@@ -226,6 +226,7 @@ RTEMS_TEST_CHECK([termios07])
 RTEMS_TEST_CHECK([termios08])
 RTEMS_TEST_CHECK([termios09])
 RTEMS_TEST_CHECK([top])
+RTEMS_TEST_CHECK([ttest01])
 RTEMS_TEST_CHECK([tztest])
 RTEMS_TEST_CHECK([uid01])
 RTEMS_TEST_CHECK([unlink])
diff --git a/testsuites/libtests/ttest01/init.c 
b/testsuites/libtests/ttest01/init.c
new file mode 100644
index 00..6a76eec123
--- /dev/null
+++ b/testsuites/libtests/ttest01/init.c
@@ -0,0 +1,183 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2018, 2019 embedded brains GmbH
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+
+#include "t-self-test.h"
+
+#include 
+
+const char rtems_test_name[] = "TTEST 1";
+
+#define test_assert(e) (e) ? (void)0 : test_failed(__LINE__, #e)
+
+RTEMS_LINKER_ROSET(t_self_test, const char *);
+
+typedef struct {
+   const char *c;
+   BSP_output_char_function_type output_char;
+   size_t case_begin_count;
+   size_t case_end_count;
+} test_context;
+
+static test_context test_instance;
+
+static void
+test_failed(int line, const char *e)
+{
+   BSP_output_char = test_instance.output_char;
+   printk("FAILED:%i:%s\n", line, e);
+   rtems_test_

[PATCH v2 1/3] build: Move test support to librtemstest.a

2019-03-22 Thread Sebastian Huber
One reason to move the test support into a dedicated library are the
standard output __wrap_*() functions.  They may conflict with
application level wrappers.

Update #3199.
---
 cpukit/Makefile.am  | 14 +-
 cpukit/{libmisc/testsupport => libtest}/testbeginend.c  |  0
 cpukit/{libmisc/testsupport => libtest}/testbusy.c  |  0
 cpukit/{libmisc/testsupport => libtest}/testextension.c |  0
 cpukit/{libmisc/testsupport => libtest}/testparallel.c  |  0
 cpukit/{libmisc/testsupport => libtest}/testwrappers.c  |  0
 testsuites/ada/ada.am   |  2 +-
 testsuites/automake/compile.am  |  1 +
 8 files changed, 11 insertions(+), 6 deletions(-)
 rename cpukit/{libmisc/testsupport => libtest}/testbeginend.c (100%)
 rename cpukit/{libmisc/testsupport => libtest}/testbusy.c (100%)
 rename cpukit/{libmisc/testsupport => libtest}/testextension.c (100%)
 rename cpukit/{libmisc/testsupport => libtest}/testparallel.c (100%)
 rename cpukit/{libmisc/testsupport => libtest}/testwrappers.c (100%)

diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am
index 51ab18ca05..0081bb77cd 100644
--- a/cpukit/Makefile.am
+++ b/cpukit/Makefile.am
@@ -322,11 +322,6 @@ librtemscpu_a_SOURCES += 
libmisc/stringto/stringtounsignedchar.c
 librtemscpu_a_SOURCES += libmisc/stringto/stringtounsignedint.c
 librtemscpu_a_SOURCES += libmisc/stringto/stringtounsignedlong.c
 librtemscpu_a_SOURCES += libmisc/stringto/stringtounsignedlonglong.c
-librtemscpu_a_SOURCES += libmisc/testsupport/testbeginend.c
-librtemscpu_a_SOURCES += libmisc/testsupport/testbusy.c
-librtemscpu_a_SOURCES += libmisc/testsupport/testextension.c
-librtemscpu_a_SOURCES += libmisc/testsupport/testparallel.c
-librtemscpu_a_SOURCES += libmisc/testsupport/testwrappers.c
 librtemscpu_a_SOURCES += libmisc/untar/untar.c
 librtemscpu_a_SOURCES += libmisc/untar/untar_tgz.c
 librtemscpu_a_SOURCES += libmisc/untar/untar_txz.c
@@ -1834,6 +1829,15 @@ project_lib_LIBRARIES += librtemsdefaultconfig.a
 librtemsdefaultconfig_a_SOURCES =
 librtemsdefaultconfig_a_SOURCES += libmisc/dummy/default-configuration.c
 
+project_lib_LIBRARIES += librtemstest.a
+
+librtemstest_a_SOURCES =
+librtemstest_a_SOURCES += libtest/testbeginend.c
+librtemstest_a_SOURCES += libtest/testbusy.c
+librtemstest_a_SOURCES += libtest/testextension.c
+librtemstest_a_SOURCES += libtest/testparallel.c
+librtemstest_a_SOURCES += libtest/testwrappers.c
+
 project_lib_LIBRARIES += libftpd.a
 
 libftpd_a_SOURCES =
diff --git a/cpukit/libmisc/testsupport/testbeginend.c 
b/cpukit/libtest/testbeginend.c
similarity index 100%
rename from cpukit/libmisc/testsupport/testbeginend.c
rename to cpukit/libtest/testbeginend.c
diff --git a/cpukit/libmisc/testsupport/testbusy.c b/cpukit/libtest/testbusy.c
similarity index 100%
rename from cpukit/libmisc/testsupport/testbusy.c
rename to cpukit/libtest/testbusy.c
diff --git a/cpukit/libmisc/testsupport/testextension.c 
b/cpukit/libtest/testextension.c
similarity index 100%
rename from cpukit/libmisc/testsupport/testextension.c
rename to cpukit/libtest/testextension.c
diff --git a/cpukit/libmisc/testsupport/testparallel.c 
b/cpukit/libtest/testparallel.c
similarity index 100%
rename from cpukit/libmisc/testsupport/testparallel.c
rename to cpukit/libtest/testparallel.c
diff --git a/cpukit/libmisc/testsupport/testwrappers.c 
b/cpukit/libtest/testwrappers.c
similarity index 100%
rename from cpukit/libmisc/testsupport/testwrappers.c
rename to cpukit/libtest/testwrappers.c
diff --git a/testsuites/ada/ada.am b/testsuites/ada/ada.am
index 33d0c3ae2f..83260687c2 100644
--- a/testsuites/ada/ada.am
+++ b/testsuites/ada/ada.am
@@ -9,7 +9,7 @@ GNATCOMPILE = $(GNATMAKE) \
 -bargs -Mgnat_main \
 -margs $(AM_ADAFLAGS) $(ADAFLAGS) \
 -cargs $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) \
--largs $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) init.o
+-largs $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -lrtemstest init.o
 
 CLEANFILES += *.ali *.o b~*.adb b~*.ads
 
diff --git a/testsuites/automake/compile.am b/testsuites/automake/compile.am
index f7f0fb623f..83d4ab111c 100644
--- a/testsuites/automake/compile.am
+++ b/testsuites/automake/compile.am
@@ -24,5 +24,6 @@ AM_LDFLAGS += $(TEST_LD_FLAGS)
 LDADD =
 LDADD += $(RTEMS_ROOT)lib/libbsp/@RTEMS_CPU@/@RTEMS_BSP_FAMILY@/librtemsbsp.a
 LDADD += $(RTEMS_ROOT)cpukit/librtemscpu.a
+LDADD += $(RTEMS_ROOT)cpukit/librtemstest.a
 
 CLEANFILES = *.num *.nxe *.elf *.srec* *.bin *.bt *.ralf
-- 
2.16.4

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: RTEMS Requirement Management Tools

2019-03-22 Thread Sebastian Huber

Hello,

I searched a bit for Doorstop use cases. I found this:

https://arxiv.org/abs/1807.05422

It was used for this NASA mission:

https://wfirst.gsfc.nasa.gov/observatory.html

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: RTEMS Requirement Management Tools

2019-03-22 Thread Sebastian Huber



On 21/03/2019 14:32, Joel Sherrill wrote:
5. Is it possible to have custom fields? I worked on a project where 
requirements were
tagged with project phase and HW/SW. Alternatively, can we add 
comments to the YAML

files. Or who cares since the author information is in git.


According to the Doorstep documentation:

https://doorstop.readthedocs.io/en/latest/reference/items/

"Extended attributes

In addition to the standard attributes, Doorstop will allow any number 
of custom attributes (key-value pairs) in the YAML file. The extended 
attributes will not be part of a published document, but they can be 
queried by a 3rd party application through the REST interface or the 
Python API.

Example:

In this example, an extended attribute invented-by is added to the item.

invented-by: some@email.com"

Use of a standard format such as YAML is nice since it enables us to 
read these requirements files quite easily.


[...]
Is the documentation and/or tutorial sufficient to get us started? 
Whatever tool is adopted,

common tasks will have to be documented like we do with git use.


Similar to the Git overview in

https://docs.rtems.org/branches/master/eng/vc-authors.html

we need something similar for the requirements tool.

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH 3/4] libfs/src/pipe/fifo.c: Fix warning.

2019-03-22 Thread Joel Sherrill
---
 cpukit/libfs/src/pipe/fifo.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/cpukit/libfs/src/pipe/fifo.c b/cpukit/libfs/src/pipe/fifo.c
index 3275e5f..f7f186c 100644
--- a/cpukit/libfs/src/pipe/fifo.c
+++ b/cpukit/libfs/src/pipe/fifo.c
@@ -158,8 +158,6 @@ static int pipe_new(
   PIPE_LOCK(pipe);
 
   *pipep = pipe;
-
-out:
   pipe_unlock();
   return err;
 }
-- 
1.8.3.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 2/4] erc32/start/setvec.c: Fix warning

2019-03-22 Thread Joel Sherrill
---
 bsps/sparc/erc32/start/setvec.c | 11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/bsps/sparc/erc32/start/setvec.c b/bsps/sparc/erc32/start/setvec.c
index d3aa8ed..0200f42 100644
--- a/bsps/sparc/erc32/start/setvec.c
+++ b/bsps/sparc/erc32/start/setvec.c
@@ -40,10 +40,15 @@ rtems_isr_entry set_vector(   /* returns 
old vector */
   uint32_treal_trap;
   uint32_tsource;
 
-  if ( type )
+  if ( type ) {
 rtems_interrupt_catch( handler, vector, &previous_isr );
-  else
-_CPU_ISR_install_raw_handler( vector, handler, (void *)&previous_isr );
+  } else {
+_CPU_ISR_install_raw_handler(
+  vector,
+  (void *)handler,
+  (void *)&previous_isr
+);
+  }
 
   real_trap = SPARC_REAL_TRAP_NUMBER( vector );
 
-- 
1.8.3.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 1/4] pthreadcreate.c: Silence unused variable warning (CID 1399716)

2019-03-22 Thread Joel Sherrill
---
 cpukit/posix/src/pthreadcreate.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cpukit/posix/src/pthreadcreate.c b/cpukit/posix/src/pthreadcreate.c
index b70be00..211b2cf 100644
--- a/cpukit/posix/src/pthreadcreate.c
+++ b/cpukit/posix/src/pthreadcreate.c
@@ -137,6 +137,7 @@ int pthread_create(
 &schedparam
   );
   _Assert( error == 0 );
+  (void) error; /* error only used when debug enabled */
   break;
 
 case PTHREAD_EXPLICIT_SCHED:
-- 
1.8.3.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 4/4] psxhdrs/stdio/v*.c: Fix warnings in varargs tests

2019-03-22 Thread Joel Sherrill
---
 testsuites/psxtests/psxhdrs/stdio/vdprintf.c  | 6 --
 testsuites/psxtests/psxhdrs/stdio/vfprintf.c  | 6 --
 testsuites/psxtests/psxhdrs/stdio/vfscanf.c   | 5 +++--
 testsuites/psxtests/psxhdrs/stdio/vprintf.c   | 5 +++--
 testsuites/psxtests/psxhdrs/stdio/vscanf.c| 5 +++--
 testsuites/psxtests/psxhdrs/stdio/vsnprintf.c | 5 +++--
 testsuites/psxtests/psxhdrs/stdio/vsprintf.c  | 5 +++--
 testsuites/psxtests/psxhdrs/stdio/vsscanf.c   | 5 +++--
 8 files changed, 26 insertions(+), 16 deletions(-)

diff --git a/testsuites/psxtests/psxhdrs/stdio/vdprintf.c 
b/testsuites/psxtests/psxhdrs/stdio/vdprintf.c
index dac5027..43dfa1e 100644
--- a/testsuites/psxtests/psxhdrs/stdio/vdprintf.c
+++ b/testsuites/psxtests/psxhdrs/stdio/vdprintf.c
@@ -37,13 +37,15 @@
 #include 
 #include 
 
-int test( void );
+int test( int arg1, ... );
 
-int test( void )
+int test( int arg1, ... )
 {
   va_list ap;
   int result;
 
+  va_start(ap, arg1);
+
   result = vdprintf( 2, "%d", ap );
 
   return result;
diff --git a/testsuites/psxtests/psxhdrs/stdio/vfprintf.c 
b/testsuites/psxtests/psxhdrs/stdio/vfprintf.c
index 0ad6bcd..3ed24b3 100644
--- a/testsuites/psxtests/psxhdrs/stdio/vfprintf.c
+++ b/testsuites/psxtests/psxhdrs/stdio/vfprintf.c
@@ -37,14 +37,16 @@
 #include 
 #include 
 
-int test( void );
+int test( int arg1, ... );
 
-int test( void )
+int test( int arg1, ... )
 {
   FILE *stream;
   va_list ap;
   int result;
 
+  va_start(ap, arg1);
+
   stream = fopen( "myfile.dat", "w" );
   result = vfprintf( stream, "%d", ap );
 
diff --git a/testsuites/psxtests/psxhdrs/stdio/vfscanf.c 
b/testsuites/psxtests/psxhdrs/stdio/vfscanf.c
index 055d462..0c39b34 100644
--- a/testsuites/psxtests/psxhdrs/stdio/vfscanf.c
+++ b/testsuites/psxtests/psxhdrs/stdio/vfscanf.c
@@ -37,14 +37,15 @@
 #include 
 #include 
 
-int test( void );
+int test( int arg1, ... );
 
-int test( void )
+int test( int arg1, ... )
 {
   FILE *stream;
   va_list ap;
   int result;
 
+  va_start(ap, arg1);
   stream = fopen( "myfile.dat", "w" );
   result = vfscanf( stream, " %d %99s ", ap );
 
diff --git a/testsuites/psxtests/psxhdrs/stdio/vprintf.c 
b/testsuites/psxtests/psxhdrs/stdio/vprintf.c
index 09b4f8c..cd758cd 100644
--- a/testsuites/psxtests/psxhdrs/stdio/vprintf.c
+++ b/testsuites/psxtests/psxhdrs/stdio/vprintf.c
@@ -37,13 +37,14 @@
 #include 
 #include 
 
-int test( void );
+int test( int arg1, ... );
 
-int test( void )
+int test( int arg1, ... )
 {
   va_list ap;
   int result;
 
+  va_start(ap, arg1);
   result = vprintf( " %d %99s ", ap );
 
   return result;
diff --git a/testsuites/psxtests/psxhdrs/stdio/vscanf.c 
b/testsuites/psxtests/psxhdrs/stdio/vscanf.c
index 5ec0ddd..a39b43a 100644
--- a/testsuites/psxtests/psxhdrs/stdio/vscanf.c
+++ b/testsuites/psxtests/psxhdrs/stdio/vscanf.c
@@ -37,13 +37,14 @@
 #include 
 #include 
 
-int test( void );
+int test( int arg1, ... );
 
-int test( void )
+int test( int arg1, ... )
 {
   va_list ap;
   int result;
 
+  va_start(ap, arg1);
   result = vscanf( " %d %99s ", ap );
 
   return result;
diff --git a/testsuites/psxtests/psxhdrs/stdio/vsnprintf.c 
b/testsuites/psxtests/psxhdrs/stdio/vsnprintf.c
index da5066c..003de41 100644
--- a/testsuites/psxtests/psxhdrs/stdio/vsnprintf.c
+++ b/testsuites/psxtests/psxhdrs/stdio/vsnprintf.c
@@ -37,14 +37,15 @@
 #include 
 #include 
 
-int test( void );
+int test( int arg1, ... );
 
-int test( void )
+int test( int arg1, ... )
 {
   va_list ap;
   char string[128];
   int result;
 
+  va_start(ap, arg1);
   result = vsnprintf( string, sizeof(string), " %d %99s ", ap );
 
   return result;
diff --git a/testsuites/psxtests/psxhdrs/stdio/vsprintf.c 
b/testsuites/psxtests/psxhdrs/stdio/vsprintf.c
index d6a5a0f..a57aea8 100644
--- a/testsuites/psxtests/psxhdrs/stdio/vsprintf.c
+++ b/testsuites/psxtests/psxhdrs/stdio/vsprintf.c
@@ -37,14 +37,15 @@
 #include 
 #include 
 
-int test( void );
+int test( int arg1, ... );
 
-int test( void )
+int test( int arg1, ... )
 {
   va_list ap;
   char string[128];
   int result;
 
+  va_start(ap, arg1);
   result = vsprintf( string, " %d %99s ", ap );
 
   return result;
diff --git a/testsuites/psxtests/psxhdrs/stdio/vsscanf.c 
b/testsuites/psxtests/psxhdrs/stdio/vsscanf.c
index 0bb9d35..dffcc26 100644
--- a/testsuites/psxtests/psxhdrs/stdio/vsscanf.c
+++ b/testsuites/psxtests/psxhdrs/stdio/vsscanf.c
@@ -37,14 +37,15 @@
 #include 
 #include 
 
-int test( void );
+int test( int arg1, ... );
 
-int test( void )
+int test( int arg1, ... )
 {
   char *tokenstring = "15 12 14";
   va_list ap;
   int result;
 
+  va_start(ap, arg1);
   result = vsscanf( tokenstring, " %d %99s ", ap );
 
   return result;
-- 
1.8.3.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH] coverage: remove utf-8 encoding in symbolset names

2019-03-22 Thread Vijay Kumar Banerjee
---
 tester/rt/coverage.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tester/rt/coverage.py b/tester/rt/coverage.py
index eef88f7..3e722cb 100644
--- a/tester/rt/coverage.py
+++ b/tester/rt/coverage.py
@@ -256,10 +256,9 @@ class symbol_parser(object):
 self.ssets = self.symbol_set.split(',')
 else:
 self.ssets = config.get('symbol-sets', 'sets').split(',')
-self.ssets = [sset.encode('utf-8') for sset in self.ssets]
 for sset in self.ssets:
 lib = path.join(self.build_dir, config.get('libraries', sset))
-self.symbol_sets[sset] = lib.encode('utf-8')
+self.symbol_sets[sset] = lib
 ss = self.symbol_sets[sset]
 ss = ss.replace('@BSP@', self.bsp_name)
 ss = ss.replace('@BUILD-TARGET@', self.target)
-- 
2.20.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH] coverage: remove utf-8 encoding in symbolset names

2019-03-22 Thread Joel Sherrill
I am testing this now and then will apply.

On Fri, Mar 22, 2019 at 10:05 AM Vijay Kumar Banerjee <
vijaykumar9...@gmail.com> wrote:

> ---
>  tester/rt/coverage.py | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/tester/rt/coverage.py b/tester/rt/coverage.py
> index eef88f7..3e722cb 100644
> --- a/tester/rt/coverage.py
> +++ b/tester/rt/coverage.py
> @@ -256,10 +256,9 @@ class symbol_parser(object):
>  self.ssets = self.symbol_set.split(',')
>  else:
>  self.ssets = config.get('symbol-sets', 'sets').split(',')
> -self.ssets = [sset.encode('utf-8') for sset in self.ssets]
>  for sset in self.ssets:
>  lib = path.join(self.build_dir, config.get('libraries',
> sset))
> -self.symbol_sets[sset] = lib.encode('utf-8')
> +self.symbol_sets[sset] = lib
>  ss = self.symbol_sets[sset]
>  ss = ss.replace('@BSP@', self.bsp_name)
>  ss = ss.replace('@BUILD-TARGET@', self.target)
> --
> 2.20.1
>
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] coverage: remove utf-8 encoding in symbolset names

2019-03-22 Thread Joel Sherrill
This has been pushed. Thanks.

On Fri, Mar 22, 2019 at 10:26 AM Joel Sherrill  wrote:

> I am testing this now and then will apply.
>
> On Fri, Mar 22, 2019 at 10:05 AM Vijay Kumar Banerjee <
> vijaykumar9...@gmail.com> wrote:
>
>> ---
>>  tester/rt/coverage.py | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/tester/rt/coverage.py b/tester/rt/coverage.py
>> index eef88f7..3e722cb 100644
>> --- a/tester/rt/coverage.py
>> +++ b/tester/rt/coverage.py
>> @@ -256,10 +256,9 @@ class symbol_parser(object):
>>  self.ssets = self.symbol_set.split(',')
>>  else:
>>  self.ssets = config.get('symbol-sets', 'sets').split(',')
>> -self.ssets = [sset.encode('utf-8') for sset in
>> self.ssets]
>>  for sset in self.ssets:
>>  lib = path.join(self.build_dir, config.get('libraries',
>> sset))
>> -self.symbol_sets[sset] = lib.encode('utf-8')
>> +self.symbol_sets[sset] = lib
>>  ss = self.symbol_sets[sset]
>>  ss = ss.replace('@BSP@', self.bsp_name)
>>  ss = ss.replace('@BUILD-TARGET@', self.target)
>> --
>> 2.20.1
>>
>> ___
>> devel mailing list
>> devel@rtems.org
>> http://lists.rtems.org/mailman/listinfo/devel
>>
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: RTEMS Requirement Management Tools

2019-03-22 Thread Joel Sherrill
On Fri, Mar 22, 2019 at 8:03 AM Sebastian Huber <
sebastian.hu...@embedded-brains.de> wrote:

>
>
> On 21/03/2019 14:32, Joel Sherrill wrote:
> > 5. Is it possible to have custom fields? I worked on a project where
> > requirements were
> > tagged with project phase and HW/SW. Alternatively, can we add
> > comments to the YAML
> > files. Or who cares since the author information is in git.
>
> According to the Doorstep documentation:
>
> https://doorstop.readthedocs.io/en/latest/reference/items/
>
> "Extended attributes
>
> In addition to the standard attributes, Doorstop will allow any number
> of custom attributes (key-value pairs) in the YAML file. The extended
> attributes will not be part of a published document, but they can be
> queried by a 3rd party application through the REST interface or the
> Python API.
> Example:
>
> In this example, an extended attribute invented-by is added to the item.
>
> invented-by: some@email.com"
>
> Use of a standard format such as YAML is nice since it enables us to
> read these requirements files quite easily.
>

This is awesome! Chris and I discussed that it would be desirable to
generate
our requirement documents in Rest. If this is implemented, then that tool
could
know the extended attributes.

>
> [...]
> > Is the documentation and/or tutorial sufficient to get us started?
> > Whatever tool is adopted,
> > common tasks will have to be documented like we do with git use.
>
> Similar to the Git overview in
>
> https://docs.rtems.org/branches/master/eng/vc-authors.html
>
> we need something similar for the requirements tool.
>

+1

>
> --
> Sebastian Huber, embedded brains GmbH
>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone   : +49 89 189 47 41-16
> Fax : +49 89 189 47 41-09
> E-Mail  : sebastian.hu...@embedded-brains.de
> PGP : Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: RTEMS Requirement Management Tools

2019-03-22 Thread Joel Sherrill
On Fri, Mar 22, 2019 at 5:28 AM Sebastian Huber <
sebastian.hu...@embedded-brains.de> wrote:

> Hello,
>
> I searched a bit for Doorstop use cases. I found this:
>
> https://arxiv.org/abs/1807.05422
>
> It was used for this NASA mission:
>
> https://wfirst.gsfc.nasa.gov/observatory.html


Ironically enough, WFIRST uses RTEMS for at least one subsystem.

Plus we have the report on the list from DLR.

--joel


>
>
> --
> Sebastian Huber, embedded brains GmbH
>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone   : +49 89 189 47 41-16
> Fax : +49 89 189 47 41-09
> E-Mail  : sebastian.hu...@embedded-brains.de
> PGP : Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH] coverage: Add subdirectory name in HTML reports

2019-03-22 Thread Vijay Kumar Banerjee
---
 tester/rt/coverage.py | 18 ++
 1 file changed, 18 insertions(+)

diff --git a/tester/rt/coverage.py b/tester/rt/coverage.py
index 3e722cb..bdf3c5f 100644
--- a/tester/rt/coverage.py
+++ b/tester/rt/coverage.py
@@ -211,6 +211,23 @@ class report_gen_html:
 path.copy_tree(covoar_css_path, symbol_set_dir)
 path.copy_tree(table_js_path, symbol_set_dir)
 
+def add_dir_name(self):
+for symbol_set in self.symbol_sets:
+ symbol_set_dir = path.join(self.build_dir,
+self.bsp + '-coverage', symbol_set)
+ html_files = os.listdir(symbol_set_dir)
+ for html_file in html_files:
+ html_file = path.join(symbol_set_dir, html_file)
+ if path.exists(html_file) and 'html' in html_file:
+ with open(html_file, 'r') as f:
+ file_data = f.read()
+ text = file_data[file_data.find('')\
+ +len('') \
+ : file_data.find('' + 
symbol_set)
+ with open(html_file, 'w') as f:
+ f.write(file_data)
+
 class build_path_generator(object):
 '''
 Generates the build path from the path to executables
@@ -406,6 +423,7 @@ class coverage_run(object):
  self.macros['bsp'])
 report.generate()
 report.add_covoar_css()
+report.add_dir_name()
 
 def _cleanup(self):
 if not self.no_clean:
-- 
2.20.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: Sub-Tickets selected for POSIX Compilance GSoc Project

2019-03-22 Thread Vaibhav Gupta
Ticket #2974 - Enable search.h functionality in newlib. :
https://devel.rtems.org/ticket/2974
.
The following declarations are missing from
newlib-cygwin/newlib/libc/include/search.h:

void   insque(void *, void *);
void  *lfind(const void *, const void *, size_t *, size_t, int (*)(const
void *const void *));
void  *lsearch(const void *, void *, size_t *, size_t, int (*)(const void
*, const void *));
void   remque(void *);

This work can be added to POSIX Compilance for GSoC?

On Fri, Mar 22, 2019 at 12:35 AM Joel Sherrill  wrote:

>
>
> On Thu, Mar 21, 2019 at 9:05 AM Vaibhav Gupta 
> wrote:
>
>>
>>
>> On Thu, Mar 21, 2019 at 6:10 PM Joel Sherrill  wrote:
>>
>>>
>>>
>>> On Thu, Mar 21, 2019, 2:43 AM Vaibhav Gupta 
>>> wrote:
>>>
 Hello,
 After series of discussions and exploring things, I got Idea about
 various things in this project.
 I have got Interested in following sub-tickets:
 -- #2970 - Add ftw.h to Newlib : https://devel.rtems.org/ticket/2970
 -- #2971 - Add fenv.h to Newlib : https://devel.rtems.org/ticket/2971
 -- #2972 - Add ndbm.h support : https://devel.rtems.org/ticket/2972
 -- #3639 - Add fmtmsg.h to Newlib : https://devel.rtems.org/ticket/3639
 -- #3650 - Add sys/ipc.h to Newlib :
 https://devel.rtems.org/ticket/3650

>>>
>>> This should be low priority.
>>>
>>> -- #2973 - Enable getdate() in Newlib :
 https://devel.rtems.org/ticket/2973
 -- #2974 - Enable search.h functionality in Newlib :
 https://devel.rtems.org/ticket/2974
 -- Requrement from FACE GPP :

- -- math functions:
- fpclassify()
   - isfinite()
   - isgreater()
   - isgreaterequal()
   - isless()
   - islessequal()
   - islessgreater()
   - isnormal()
   - isunordered()
   - nexttowardf()
   - signbit()


>>> This is fenv.h and IMO is higher priority for architectures where you
>>> are porting existing implementations.
>>>
>> Yah, so during my SoC time I will start with them first.
>> I guess I may find them on FreeBSD, had a little search on net.
>> Will get deeper in the topic once the sub-tasks are confirmed,
>> as for now I am going through tickets for POSIX Compliance.
>>
>
> +1  Add them to rtems-libbsd
>
>
>>

- -- pselect() from 
- -- sockatmark() from 

 Sebastian.. are these not in the new tcpip stack?
>>>
>>> And agree with Sebastian on the *at methods.
>>>
>> That's great. I am ready to work on them.
>>
>>>
>>>
- -- confstr() from 



- -- spawn function:
- posix_spawn()
   - posix_spawn_file_actions_addclose()
   - posix_spawn_file_actions_adddup2()
   - posix_spawn_file_actions_addopen()
   - posix_spawn_file_actions_destroy()
   - posix_spawn_file_actions_init()
   - posix_spawnattr_destroy()
   - posix_spawnattr_getflags()
   - posix_spawnattr_getpgroup()
   - posix_spawnattr_getschedparam()
   - posix_spawnattr_getschedpolicy()
   - posix_spawnattr_getsigdefault()
   - posix_spawnattr_getsigmask()
   - posix_spawnattr_init()
   - posix_spawnattr_setflags()
   - posix_spawnattr_setpgroup()
   - posix_spawnattr_setschedparam()
   - posix_spawnattr_setschedpolicy()
   - posix_spawnattr_setsigdefault()
   - posix_spawnattr_setsigmask()
   - posix_spawnp(

 Spawn is a safer alternative to fork and exec. This requires
>>> multi-process support and thus these are not implementable on RTEMS.
>>>
>> Yah, i had this query in my mind, but then they were also not tagged as
>> POSIX_MULTI_PROCESS in FACE Technical Standards 3.0
>> and as you said about multi-process functions to be optional, i was not
>> able to conclude about them.
>> So I will leave it.
>>
>
> Good catch. The FACE ticket for allowing multiple processes to be optional
> missed _POSIX_SPAWN. Luckily it hasn't made a release and I was just
> addressing
> this earlier this week. So I need to correct the FACE ticket. :)
>
>>
>>> If there is an existing ticket, it needs to state this.
>>>
>>>
>>>
 If they all compile into a good GSoC project, I would like to start
 writing a draft proposal.

 Thanks
 Vaibhav Gupta

>>>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Sub-Tickets selected for POSIX Compilance GSoc Project

2019-03-22 Thread Vaibhav Gupta
For long double and complex methods,
I compared the given resources:
https://docs.rtems.org/branches/master/posix-compliance/posix-compliance.html
https://wiki.freebsd.org/Numerics
.
Following Function/Features are missing from newlib / RTEMS:
- CMPLX
- CMPLXF
- CMPLXL
- sincos
- sincosf
- sincosl
- FENV_ACCESS
- FENV_Contract
.
And for FENV_ACCESS, FP_CONTRACT, https://wiki.freebsd.org/Numerics, has
tagged them for change in compiler. So will they be feasible to implement
here?

On Sat, Mar 23, 2019 at 11:42 AM Vaibhav Gupta 
wrote:

> Ticket #2974 - Enable search.h functionality in newlib. :
> https://devel.rtems.org/ticket/2974
> .
> The following declarations are missing from
> newlib-cygwin/newlib/libc/include/search.h:
>
> void   insque(void *, void *);
> void  *lfind(const void *, const void *, size_t *, size_t, int (*)(const
> void *const void *));
> void  *lsearch(const void *, void *, size_t *, size_t, int (*)(const void
> *, const void *));
> void   remque(void *);
>
> This work can be added to POSIX Compilance for GSoC?
>
> On Fri, Mar 22, 2019 at 12:35 AM Joel Sherrill  wrote:
>
>>
>>
>> On Thu, Mar 21, 2019 at 9:05 AM Vaibhav Gupta 
>> wrote:
>>
>>>
>>>
>>> On Thu, Mar 21, 2019 at 6:10 PM Joel Sherrill  wrote:
>>>


 On Thu, Mar 21, 2019, 2:43 AM Vaibhav Gupta 
 wrote:

> Hello,
> After series of discussions and exploring things, I got Idea about
> various things in this project.
> I have got Interested in following sub-tickets:
> -- #2970 - Add ftw.h to Newlib : https://devel.rtems.org/ticket/2970
> -- #2971 - Add fenv.h to Newlib : https://devel.rtems.org/ticket/2971
> -- #2972 - Add ndbm.h support : https://devel.rtems.org/ticket/2972
> -- #3639 - Add fmtmsg.h to Newlib :
> https://devel.rtems.org/ticket/3639
> -- #3650 - Add sys/ipc.h to Newlib :
> https://devel.rtems.org/ticket/3650
>

 This should be low priority.

 -- #2973 - Enable getdate() in Newlib :
> https://devel.rtems.org/ticket/2973
> -- #2974 - Enable search.h functionality in Newlib :
> https://devel.rtems.org/ticket/2974
> -- Requrement from FACE GPP :
>
>- -- math functions:
>- fpclassify()
>   - isfinite()
>   - isgreater()
>   - isgreaterequal()
>   - isless()
>   - islessequal()
>   - islessgreater()
>   - isnormal()
>   - isunordered()
>   - nexttowardf()
>   - signbit()
>
>
 This is fenv.h and IMO is higher priority for architectures where you
 are porting existing implementations.

>>> Yah, so during my SoC time I will start with them first.
>>> I guess I may find them on FreeBSD, had a little search on net.
>>> Will get deeper in the topic once the sub-tasks are confirmed,
>>> as for now I am going through tickets for POSIX Compliance.
>>>
>>
>> +1  Add them to rtems-libbsd
>>
>>
>>>
>
>- -- pselect() from 
>- -- sockatmark() from 
>
> Sebastian.. are these not in the new tcpip stack?

 And agree with Sebastian on the *at methods.

>>> That's great. I am ready to work on them.
>>>


>- -- confstr() from 
>
>
>
>- -- spawn function:
>- posix_spawn()
>   - posix_spawn_file_actions_addclose()
>   - posix_spawn_file_actions_adddup2()
>   - posix_spawn_file_actions_addopen()
>   - posix_spawn_file_actions_destroy()
>   - posix_spawn_file_actions_init()
>   - posix_spawnattr_destroy()
>   - posix_spawnattr_getflags()
>   - posix_spawnattr_getpgroup()
>   - posix_spawnattr_getschedparam()
>   - posix_spawnattr_getschedpolicy()
>   - posix_spawnattr_getsigdefault()
>   - posix_spawnattr_getsigmask()
>   - posix_spawnattr_init()
>   - posix_spawnattr_setflags()
>   - posix_spawnattr_setpgroup()
>   - posix_spawnattr_setschedparam()
>   - posix_spawnattr_setschedpolicy()
>   - posix_spawnattr_setsigdefault()
>   - posix_spawnattr_setsigmask()
>   - posix_spawnp(
>
> Spawn is a safer alternative to fork and exec. This requires
 multi-process support and thus these are not implementable on RTEMS.

>>> Yah, i had this query in my mind, but then they were also not tagged as
>>> POSIX_MULTI_PROCESS in FACE Technical Standards 3.0
>>> and as you said about multi-process functions to be optional, i was not
>>> able to conclude about them.
>>> So I will leave it.
>>>
>>
>> Good catch. The FACE ticket for allowing multiple processes to be
>> optional
>> missed _POSIX_SPAWN. Luckily it hasn't made a release and I was just
>> addressing
>> this earlier this week. So I need to correct the FACE ticket. :)
>>
>>>
 If there is an existing ticket, it needs to state this.



> If they all compile into a good GSoC project, I would like to start
> wr