aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/membarrier (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2017-07-24selftests: watchdog: use getopt_long()Eugeniu Rosca1-17/+39
Switch from manual argv[] parsing to getopt_long() argument processing. This creates more readable code and allows easier feature addition. This also fixes some segmentation faults introduced by commit 1dbdcc810928 ("selftests: watchdog: accept multiple params on command line"), when options -t or -p are not given the required value: ./watchdog-test -p 1 -t ./watchdog-test -t 1 -p No changes are intended in the way watchdog-test interacts with the kernel. The only noticible changes, tightly related to the addition of getopt (and done for easier maintenance), are: - help message has been reworked and migrated to a dedicated function. - all short/long options and the help message are sorted alphabetically. - all case statements inside the getopt loop are sorted alphabetically. Fixes: 1dbdcc810928 ("selftests: watchdog: accept multiple params on command line") Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2017-07-24selftests: watchdog: fix mixed whitespaceEugeniu Rosca1-63/+63
Convert spaces to tabs for checkpatch compliance. Quick way to verify this is by running `git show -w <commit-id>`, which returns an empty commit body. No functional change intended. Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>