On Tue, May 30, 2017 at 05:31:05PM -0600, Shuah Khan wrote: > On 05/30/2017 03:43 PM, Eugeniu Rosca wrote: > > On Tue, May 30, 2017 at 03:24:37PM -0600, Shuah Khan wrote: > >> On 05/28/2017 01:53 PM, Eugeniu Rosca wrote: > >>> Implement WDIOC_GETBOOTSTATUS in test code to be able to check if > >>> watchdog drivers have proper support of WDIOF_CARDRESET. Include a > >>> segmentation fault fix, as it might generate merge conflicts if > >>> provided separately. > >>> > >>> v2: > >>> - Fix segmentation fault caused by a previous commit. > >>> - Don't break processing of other arguments when passing `-s`. > >>> > >>> Eugeniu Rosca (2): > >>> selftests: watchdog: fix segmentation fault due to wrong argv parsing > >> > >> Please fix this using getopt. The argument processing is getting very > >> complex. You can void these wrong index type that way. > > > > Many thanks for the feedback. I agree that there is room for this test > > to grow (more ioctls can be added) and then it easily goes out of > > control without proper parameter handling. Just to avoid breaking your > > expectations in the next revision of the patch-set, since there are > > multiple examples of using getopt in `tools/testing`, would you please > > pick your favorite choice from [1], so that I can take it as reference. > > Thanks in advance. > > take a look at the following. > > tools/testing/selftests/breakpoints/step_after_suspend_test.c > tools/testing/selftests/media_tests/media_device_open.c > tools/testing/selftests/timers/inconsistency-check.c > > This might be sufficient for the args in this test. > What is the coding style policy of `tools/testing/selftests`? Does it follow the kernel-space guidelines? Should the modifications comply with checkpatch? Thanks, Eugeniu. -- To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html