[opensuse-project] LTP GSoC report
Hi all, Since this is my first report, i will summarize all the work done till now for the Linux Test Project GSoC project. As proposed, the first phase of the project is to document/fix and test the test library, therefore the work started with an easy task/file in order to get up to speed with how things are done. The first patch-set was: 1) Indentation and coding style fixes on /lib/str_to_bytes.c as well as /include/str_to_bytes.h Fixed broken indentation as well as replaced the old K&R function declarations. https://github.com/linux-test-project/ltp/commit/9a769aae5e3db79c1189c2c9da5... 2) Renamed /lib/str_to_bytes.c and /include str_to bytes.h The str_to_bytes files have been renamed to bytes_by_prefix in order to make it easier for anyone to understand the purpose of the file, the functions of the file have also been ranmed accordingly. Furthermore any call to the file or its functions by other functions, manpages etc. have been modified to comply with the new names. https://github.com/linux-test-project/ltp/commit/1475f67b0c77392df6d5bca84c3... 3) Changed nconv variable from long to int in /lib/bytes_by_prefix.c According to sscanf man page the return value is int therefore the holding variable should be int as well. Also changed the loop variable name of the main method from ind to i in order to better represent that it is just a loop variable. https://github.com/linux-test-project/ltp/commit/3d3e94e7c0f056041a713898587... After this patch-set, the next goal was to create an "automated" test for this file in order to ensure reliability and enable us to easily detect if something breaks, this test file also lead to a logical fix on the file being tested. The patch-set: 1) Return -1 on negative input/output (/lib/bytes_by_prefix.c) -1 is returned as error value therefore it wouldn't be correct to allow negative numbers to be parsed and returned as normal multiplication. Therefore a check has been added in order to return any negative output as -1 (error). https://github.com/linux-test-project/ltp/commit/5f017a0976a32445b0925bf3654... 2) Created an automated test for the /lib/bytes_by_prefix.c Created a test for the bytes_by_prefix.c file in order to make sure that everything works well and make it easy to test if some change breaks something. The UNIT_TEST main method from lib/bytes_by_prefix.c has been removed as it isn't needed anymore nor compiled by default. Necessary changes in the makefiles have been done. https://github.com/linux-test-project/ltp/commit/33bb7130addb59c28f0c6834aab... Now i am working on the much more used part of the library the tst_* interface/files and hopefully the next patch-set will be sent for review/commit within a few days. To conclude, this is a great experience, learning to contribute to open-source projects and collaborating with other people that i have never met :) I would like to thank my mentor Cyril Hrubis for his invaluable help showing me around the project, sharing some nice tricks and being very helpful by just pointing me to the right direction as well as always replying very fast to my questions :) great guy. P.S. You can watch the project development on the ltp-list: http://sourceforge.net/mailarchive/forum.php?forum_name=ltp-list -- Marios Makris -- To unsubscribe, e-mail: opensuse-project+unsubscribe@opensuse.org To contact the owner, email: opensuse-project+owner@opensuse.org
participants (1)
-
Marioh mrs