Changes between Version 10 and Version 11 of GCI/Coding/POSIXTimingTest


Ignore:
Timestamp:
Nov 16, 2018, 7:27:24 AM (7 months ago)
Author:
shashvat jain
Comment:

Made changes to some the instructions

Legend:

Unmodified
Added
Removed
Modified
  • GCI/Coding/POSIXTimingTest

    v10 v11  
    8787This will take some time
    8888
     89== Calling Functions in the test ==
     90Now that the test has been added to the build system, find working examples of the functions to call.Look into init.c files of different tests made through the same template
     91For example consider the test psxtmcond04 in you need to call functions. Note that this test belongs to psxtmtest_unblocking_preempt , look into tests belonging to the same template like psxtmcond07 , these will differ in their tests but will have the same common skeleton that will give you an idea for what functions to call.
    8992
    9093
    91 ===  Finding an Example  ===
     94Use grep -r to search for the uses of a pirticular function that you would like to call in the test . For this open the terminal and cd into the rtems tree and testsuites , then for a function "name_of_function()" use
     95{{{
     96  grep -r name\_of\_function
     97}}}
    9298
    93 Now that the test has been added to the build system, find working examples of the functions to call.  One way to do that is to use grep -r.  From the terminal, there may be characters that have to be "escaped" \. For example to create a test of pthread_cond_init() put the following in the command line:
     99For example to create a test of pthread_cond_init() put the following in the command line:
     100
    94101{{{
    95  grep -r pthread\_cond\_init ~/rtems/testsuites/
     102 grep -r pthread\_cond\_init
    96103}}}
    97 ===  !Simulator/Emulator  ===
    98104
    99 Finally use a simulator/emulator
    100 See http://www.rtems.org/wiki/index.php/Quick_Start
    101 ===  Lather, Rinse, Repeat  ===
    102 
    103 Add all the #includes, at the top, compare the macros at the bottom, cut-and-paste from working example of the source code into the generated test, see what happens.
    104 
    105 After each change, clean the build directory, rebuild the source, and try again, depending on the simulator something like:
     105Use the **man** command to load an manual for a specific function , this manual will give you a detailed description of what is the use of this function , arguments of this function and how to use them.
     106If you cannot find the manual for a particular function , ping a mentor .
     107Now that you have made the desired changes in the test/init.c file , go ahead and rebuild the psxtmtests module of your BSP
    106108
    107109{{{
     
    113115}}}
    114116
     117If you find errors while compiling ,search for their location in the init.c file and debug them , after debugging them run the above script again to record the changes in the bsp.
     118You will have to repeat this after every change you make in the init.c file
    115119
     120Once you compile without getting any error , Run the simulator using the following steps   
     121
     122===  Simulator/Emulator  ===
     123
     124The use of simulator is pretty much the same as you did while running the Hello.exe
     125{{{
     126     cd ~/development/erc32/sparc-rtems5/c/erc32/testsuites/psxtmtests/
     127     sparc-rtems5-gdb "nameoftest.exe"
     128....
     129(gdb)tar sim
     130....
     131(gdb)load
     132....
     133(gdb)r
     134....
     135}}}
     136 
     137See [http://www.rtems.org/wiki/index.php/Quick_Start] for more help
     138
     139
     140===  Lather, Rinse, Repeat  ===
     141
     142After each change, clean the build directory, rebuild the source, and try again.
     143
     144=== SUGGESTIONS ===
     145 * run other test to see what output they give and compare it with yours
     146 * This Task will test your knowledge regarding code (mostly C/C++). Try to use the man command as much as possible to know more about necessary functions.
     147 
    116148This is a particularly challenging task, so asking questions, and making suggestions for improving the directions on this task would be greatly appreciated.
     149
    117150===  Posix Time Test Plan (for generating more GCI tasks)  ===
    118151