1st Milestone Achieved
Passed 1st evaluation of Google Summer of Code
In first words of this blog, I want to thanks my mentors and community members for helping me and guiding me, whenever I got Stuck. I got to learn a lot many things during this 1 month work. My pace got slow at last few days, but then my mentors guided me to manage tasks and time and make it fruitful. I would love to describe my journey in as simple manner as possible.
My Project
As mentioned in previous blogs of this publication, my org is RTEMS (Real Time Executive for Multiprocessor System) Project. It is an Real Time Operating System (RTOS) working on the principle of “Single Process, Multi-Threaded ”.
Not going into technicalities, but above information was necessary to explain my project. It’s an RTOS, supports embedded systems, hence it has to follow one or more standards to make it a handy-executive for others. Surprisingly RTEMS is compliant to many standards such as POSIX, IEEE, FACE, etc. And my project deals with maintaining its compliance with latest updates of these standards.
Since, Newlib is the standard C library for RTEMS, most of my contribution will go to it.
Tasks I completed
Task 1 : Testsuite for psxinttpes01
My first task was to refactor the testsuite made by my mentor. He participated as a GSoC student in 2017 for this same project, and since last year he is mentoring this project. He build a testsuite for the contributions he made, and some modifications were required.
It was a testsuite for inttypes.h
, I had to test for the following:
1- Checks for strtoimax Testcases
— checks for output for string having a positive number
— checks for output for string having a negative number
— checks for output for string having a positive number - Number Out of Range
— checks for output for string having a negative number — Number Out of Range
— checks for final string pointed by endptr
— checks for output for invalid argument — NULL Pointer
— checks for output for invalid argument — Invalid Base2- Checks for strtoumax Test Cases
— checks for output for string having a positive number
— checks for output for string having a negative number
— checks for output for string having a positive number — Number Out of Range
— checks for output for string having a negative number — Number Out of Range
— checks for final string pointed by endptr
— checks for output for invalid argument — NULL Pointer
— checks for output for invalid argument — Invalid Base3- Checks for wcstoimax Testcases
— checks for output for string having a positive number
— checks for output for string having a negative number
— checks for output for string having a positive number — Number Out of Range
— checks for output for string having a negative number — Number Out of Range
— checks for final string pointed by endptr
— checks for output for invalid argument — NULL Pointer
— checks for output for invalid argument — Invalid Base4- Checks for wcstoumax Testcases
— checks for output for string having a positive number
— checks for output for string having a negative number
— checks for output for string having a positive number — Number Out of Range
— checks for output for string having a negative number — Number Out of Range
— checks for final string pointed by endptr
— checks for output for invalid argument — NULL Pointer
— checks for output for invalid argument — Invalid Base
The testsuite was a success and it got merged in main branch.
Task 2 : Port ndbm.h
ndbm
is a library to store records, in a key-data pair form, inside a database. The function declarations are stored in ndbm.h
and their definitions are stored inside ndbm.c
.
ndbm.h
requires struct DB
which is defined and supported in db_local.h
. The scenario was:
ndbm.h
has to be stored innewlib-cygwin/newlib/libc/include
, so as it should be present in library path, when compiled.db_local.h
is stored innewlib-cygwin/newlib/libc/search
.ndbm.c
requireshash.h
which is again present innewlib-cygwin/newlib/libc/search
. This is why I placedndbm.c
in the same directory as ofhash.h
, and made entry inMakefile.am
.
The blocker was that, while building library, ndbm.h
got compiled successfully, but when added to RTEMS, only ndbm.h
was generated in include directory if it. And since, ndbm.h
include db_local.h
. The testsuites showed compilation error of header not found.
So, on the guidance of my mentors, I used the method of forward declaration and it got successful. The library got successfully generated and functions symbols could be found using nm
command.
Still, some work is needed to build a successful testsuite for this port.
Task 3 : Port ftw.h
The function declarations are mentioned ftw.h
and their definitions are inside ftw.c
.
The blocker is that ftw.c
requires another header file. And that header requires other multiple headers. Those headers require other multiple headers, and hence a dependency chain is formed. This work is in progress.
Task 4 : Update search directory
While porting ndbm
, mentors felt that maybe we can update whole newlib-cygwin/newlib/libc/search
directory. This task has also same dependency chain like ftw.h
case. The scenario was mailed to newlib mailing list. This will be done accordingly.
With this, my first evaluation was completed. And now I am headed to 2nd Phase with much more enthusiasm and motivation.
Let’s get connected
Follow/ Connect with me anytime.
- LinkedIn- https://www.linkedin.com/in/varodek/
- GitHub- https://www.github.com/VARoDeK
- Facebook- https://www.facebook.com/vaibhav.gupta.1004837
- Twitter- https://twitter.com/varodek
Follow this Publication for more stories on this subject. If you find this blog helpful, please click the 👏 button and share to help others find it! Feel free to leave a comment 💬 below :).