1
0
Fork 0
Commit Graph

9 Commits (7dea1d5f8a9d3141881dab40bb55c1a7ae84d8ab)

Author SHA1 Message Date
Axel Haslam b797c43271 greybus: Fix loopback app after rename to gpphy
commit 6d94670 gpbridge: rename 'gpbridge' to 'gbphy' everywhere
missed renaming the loopback test app. So do it too.

Testing done: complie and run loopback test

Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-05-26 22:23:25 -07:00
Axel Haslam 3b90040de8 greybus: loopback_test: handle SIGINT signal
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-16 21:49:31 -07:00
Axel Haslam 4b82dd7be3 greybus: loopback_test: Use timeout argument
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-03-08 06:22:53 -08:00
Axel Haslam 9250c0ee26 greybus: Loopback_test: use poll instead of inotify
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-29 14:51:38 -08:00
Axel Haslam 3f830562de greybus: loopback_test: Decrease the max number of devices
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-02-01 17:52:20 -08:00
Axel Haslam 5bee760890 greybus: loopback_test: make output to csv file a parameter option
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>
2016-01-26 17:07:27 -08:00
Greg Kroah-Hartman d5bc9607f7 greybus: loopback_test: null terminate the dict structure
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-17 18:17:07 -08:00
Greg Kroah-Hartman 6bfff1dcb2 greybus: loopback_test: fix warning about signed/unsigned comparison
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-17 18:17:07 -08:00
Greg Kroah-Hartman 6b0658f687 greybus: tools: Add tools directory to greybus repo and add loopback
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>
2015-12-17 18:17:07 -08:00