summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/tools
AgeCommit message (Collapse)Author
2016-03-16greybus: loopback_test: handle SIGINT signalAxel Haslam
Adding a default timeout may not be representative of every usecase for gb_loopback. Also, tests may continue to run on the driver in case of a timeout. To avoid adding a default timeout, handle SIGINT so that when the user presses ctrl-c the test are stoped. The user can still specify a timeout value with the -O option. Signed-off-by: Axel Haslam <ahaslam@baylibre.com> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-03-08greybus: loopback_test: Use timeout argumentAxel Haslam
Patch "c3b0a32 Loopback_test: use poll instead of inotify" added a optional argument for the user to specify a timeout value, but did not use this parameter in the actual poll function. The default of 30 seconds is always used. Fix this by actually using the the poll_timeout parameter so the user can run long tests. Signed-off-by: Axel Haslam <ahaslam@baylibre.com> Reviewed-by: Patrick Titiano <ptitiano@baylibre.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-02-29greybus: Loopback_test: use poll instead of inotifyAxel Haslam
Inotify does not handle sysfs events, so use poll instead. The loopback kernel driver will send a notification when the test is complete. So, open a poll file descriptor for every enabled device, and after starting the test, wait for an event from each device. After all events are received, read the total number of iterations and make sure the test is complete. Also, add missing stdint header which was included in inotify. Signed-off-by: Axel Haslam <ahaslam@baylibre.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-02-01greybus: loopback_test: Decrease the max number of devicesAxel Haslam
Its unrealistic to expect 50 loopback devices, and the mask parameter can hold up to "int" anyways so decrease to max number of devices to sane value. Signed-off-by: Axel Haslam <ahaslam@baylibre.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-26greybus: loopback_test: make output to csv file a parameter optionAxel Haslam
Its useful to get a CSV output on stdout for test frameworks to read and parse the results. However, a csv file is not always needed. Add the -z option to create/append a csv file only when the user asks for it. Signed-off-by: Axel Haslam <ahaslam@baylibre.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-17greybus: loopback_test: null terminate the dict structureGreg Kroah-Hartman
This lets us test for any number of entries, no need to do an ARRAY_SIZE-type comparison. This fixes a build warning of comparing signed/unsigned values.) Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-17greybus: loopback_test: fix warning about signed/unsigned comparisonGreg Kroah-Hartman
We read an int, don't treat it as a unsigned value, especially when comparing it to a signed value. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-17greybus: tools: Add tools directory to greybus repo and add loopbackGreg Kroah-Hartman
Move the loopback test to the greybus main repo, as we will be adding more tests over time and it doesn't need to be burried in the gbsim repo. This moves the latest version from gbsim to this repo and fixes up the Makefile to be a bit more "smart" when building the code. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>