GSoC Project work - Week 7

This post summarizes the progress in the Seventh week of the coding period.
This week pcp-pidstat was merged with the pcp master. My first contribution to PCP.
PCP-Pidstat merged into PCP
Finally a big moment, pcp-pidstat getting merged into pcp was the first milestone in the journey of GSoC.
Since last week, the man-pages(1) were set and only thing left was to write regression tests.
Writing regression tests
pcp maintains a qa/ directory which has regression tests with a number; say N and N.out as a output file, which is checked by the ./check script present in the same directory. Regression test for pcp includes the following steps:
- Create a new test file using
./new. It will create a new test with a suitable number. - The test file generated contains basic instructions to help to write the new test cases.
- Create an archive using
pmloggerwhich contains 3-4 samples to be used for the qa. Store it into the/qa/archivesdirectory. - Write the test cases for various input commands and options.The script should use the archives store in the previous step.
- Once the script is written, generate the
N.outfile using./remakescript. All the./checkscript does is, it executes the commands from this script and tries to (near)match the output with theN.outfile.
Overriding pcp options to match pcp-pidstat
One of the many good things pcp APIs provides is, provision to override default pcp options to perform different operations. After pcp-pidstat was merged, some pcp developers tried to use it and suggested using -p option same as the pidstat instead of -P. Then Nathan hinted an example about overriding default options. After looking at the example, I was able to replace that option.
So far everything looks great!
Thank you, Ryan and Nathan for the help so far. :)
That’s all folks.