Re: GSoC Project | Basic Support for Trace Compass

2019-07-04 Thread Ravindra Kumar Meena
>
> Your latest versions has a warning:
>
> ../misc/record/record-main.c: In function ‘main’:
> ../misc/record/record-main.c:135:59: warning: ‘input_file’ may be used
> uninitialized in this function [-Wmaybe-uninitialized]
> fd = ( input_file_flag ) ? open( input_file, O_RDONLY ) :
>  ~~~^
> socket( PF_INET, SOCK_STREAM, 0 );
> ~
> ../misc/record/record-main.c:278:15: note: ‘input_file’ was declared here
> const char *input_file;
> ^~
>
> Do you see this warning in your build? If no, then we should find out,
> why you don't see warnings. If yes, then you should fix the warnings
> before a commit. If you don't know how to fix the warning, then ask on
> the mailing list. I don't want to see a warning the next time I build
> your program. I think I mentioned this a couple of times before.
> Normally it should be enough to mention it once.
>

I really didn't see these warnings in my build. Which gcc version are you
using?

I am using gcc version 5.4.0.

I used the following commands to configure and build:

./waf configure --prefix=$HOME/sandbox/rtems/5
./waf build install


-- 
*Ravindra Kumar Meena*,
B. Tech. Computer Science and Engineering,
Indian Institute of Technology (Indian School of Mines)
, Dhanbad
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: GSoC Project | Basic Support for Trace Compass

2019-07-04 Thread Sebastian Huber

On 04/07/2019 08:58, Ravindra Kumar Meena wrote:

Your latest versions has a warning:

../misc/record/record-main.c: In function ‘main’:
../misc/record/record-main.c:135:59: warning: ‘input_file’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
     fd = ( input_file_flag ) ? open( input_file, O_RDONLY ) :
          ~~~^
     socket( PF_INET, SOCK_STREAM, 0 );
     ~
../misc/record/record-main.c:278:15: note: ‘input_file’ was declared
here
     const char *input_file;
                 ^~

Do you see this warning in your build? If no, then we should find out,
why you don't see warnings. If yes, then you should fix the warnings
before a commit. If you don't know how to fix the warning, then ask on
the mailing list. I don't want to see a warning the next time I build
your program. I think I mentioned this a couple of times before.
Normally it should be enough to mention it once.

I really didn't see these warnings in my build. Which gcc version are 
you using?


I am using gcc version 5.4.0.


Ok, this explains a lot. This GCC version is quite old. Which Linux 
distribution do you use?


--
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: GSoC Project | Basic Support for Trace Compass

2019-07-04 Thread Ravindra Kumar Meena
>
> > I really didn't see these warnings in my build. Which gcc version are
> > you using?
> >
> > I am using gcc version 5.4.0.
>
> Ok, this explains a lot. This GCC version is quite old. Which Linux
> distribution do you use?
>
I am using Ubuntu 16.04 LTS.


-- 
*Ravindra Kumar Meena*,
B. Tech. Computer Science and Engineering,
Indian Institute of Technology (Indian School of Mines)
, Dhanbad
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: GSoC Project | Basic Support for Trace Compass

2019-07-04 Thread Sebastian Huber

On 04/07/2019 09:12, Ravindra Kumar Meena wrote:

 > I really didn't see these warnings in my build. Which gcc version
are
 > you using?
 >
 > I am using gcc version 5.4.0.

Ok, this explains a lot. This GCC version is quite old. Which Linux
distribution do you use?

I am using Ubuntu 16.04 LTS.


It may help to use a newer GCC or clang version for development. It can 
help you to avoid some time spent on debugging. Especially bugs related 
to uninitialized variables can be hard to find.


--
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

GSoC 2019 | POSIX Compliance - NDBM Port Successful. Minimal Testsuite working Successfully.

2019-07-04 Thread Vaibhav Gupta
Hello,
As I mentioned in previous threads, RSB patch was not generating function
symbols defined
in ndbm.c, but they were generated when I build newlib repository for SPARC.
.
.
So, I made a script to add them manually, from newlib build, to
rtems/5/.
https://github.com/VARoDeK/MiniProject_1-Add_newlib_object_files_to_rtems_libraries/blob/master/script.sh
.
.
The compilation of minimal Testsuite was Successful this time and is
generating
expected correct results.

OUTPUT

*** BEGIN OF TEST PSXNDBM 01 ***
*** TEST VERSION: 5.0.0.5cbee18e0030981cd61b8c9d556cc5c57f6ee082-modified
*** TEST STATE: EXPECTED-PASS
*** TEST BUILD: RTEMS_POSIX_API
*** TEST TOOLS: 7.4.1 20190514 (RTEMS 5, RSB
d694d16e5a7241827471af98c8f978ff3eb331fd, Newlib 5c2a3661c)
Open Database
Store Records in Database
Fetch Records from Database

Name: VARoDeK,
Phone Number: 123-321-777-888

Close Database

*** END OF TEST PSXNDBM 01 ***


*** FATAL ***
fatal source: 5 (RTEMS_FATAL_SOURCE_EXIT)
fatal code: 0 (0x)
RTEMS version: 5.0.0.5cbee18e0030981cd61b8c9d556cc5c57f6ee082-modified
RTEMS tools: 7.4.1 20190514 (RTEMS 5, RSB
d694d16e5a7241827471af98c8f978ff3eb331fd, Newlib 5c2a3661c)
executing thread ID: 0x08a010001
executing thread name: UI1

.
I will now make a Testsuite for each and every error and output.
Should I send the ndbm patch to newlib now?
.
.
.
.
.

Patch for Testsuite

---
 testsuites/psxtests/Makefile.am  |   8 +++
 testsuites/psxtests/configure.ac |   1 +
 testsuites/psxtests/psxndbm01/init.c | 103 +++
 3 files changed, 112 insertions(+)
 create mode 100644 testsuites/psxtests/psxndbm01/init.c

diff --git a/testsuites/psxtests/Makefile.am
b/testsuites/psxtests/Makefile.am
index 59c9f2085b..c805973afb 100755
--- a/testsuites/psxtests/Makefile.am
+++ b/testsuites/psxtests/Makefile.am
@@ -694,6 +694,14 @@ psxmutexattr01_CPPFLAGS = $(AM_CPPFLAGS)
$(TEST_FLAGS_psxmutexattr01) \
  $(support_includes) -I$(top_srcdir)/include
 endif

+if TEST_psxndbm01
+psx_tests += psxndbm01
+psxndbm01_SOURCES = psxndbm01/init.c
+psxndbm01_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_psxndbm01) \
+   $(support_includes)
+endif
+
+
 if TEST_psxobj01
 psx_tests += psxobj01
 psx_screens += psxobj01/psxobj01.scn
diff --git a/testsuites/psxtests/configure.ac b/testsuites/psxtests/
configure.ac
index 85559e4aa5..07d7ccaf55 100644
--- a/testsuites/psxtests/configure.ac
+++ b/testsuites/psxtests/configure.ac
@@ -110,6 +110,7 @@ RTEMS_TEST_CHECK([psxmsgq02])
 RTEMS_TEST_CHECK([psxmsgq03])
 RTEMS_TEST_CHECK([psxmsgq04])
 RTEMS_TEST_CHECK([psxmutexattr01])
+RTEMS_TEST_CHECK([psxndbm01])
 RTEMS_TEST_CHECK([psxobj01])
 RTEMS_TEST_CHECK([psxonce01])
 RTEMS_TEST_CHECK([psxpasswd01])
diff --git a/testsuites/psxtests/psxndbm01/init.c
b/testsuites/psxtests/psxndbm01/init.c
new file mode 100644
index 00..74dec0c969
--- /dev/null
+++ b/testsuites/psxtests/psxndbm01/init.c
@@ -0,0 +1,103 @@
+/**
+ *  @file
+ *  @brief Test suite for inttypes.h methods
+ */
+
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2019 Vaibhav Gupta
+ *
+ * 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+
+const char rtems_test_name[] = "PSXNDBM 01";
+
+#define NAME "VARoDeK"
+#define PHONE_NO "123-321-777-888"
+#define DB_NAME  "phones_test"
+
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument ignored);
+DBM *db;
+
+rtems_task Init(rtems_task_argument ignored)
+{
+  datum