1
0
Fork 0

greybus: loopback_test: Cancel only the tests running on selected devices

When starting a loopback test, it cancels all currently running tests on
all loopback devices. When -m argument is given, which runs the test on
specific loopback devices, only the tests running on the selected
devices need to be cancelled before starting new tests.

Signed-off-by: Ryan Lim <limryan@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
hifive-unleashed-5.1
Ryan Lim 2016-07-20 08:14:02 -07:00 committed by Greg Kroah-Hartman
parent 93a7388943
commit 2861e20790
1 changed files with 2 additions and 1 deletions

View File

@ -780,7 +780,8 @@ static void prepare_devices(struct loopback_test *t)
/* Cancel any running tests */
for (i = 0; i < t->device_count; i++)
write_sysfs_val(t->devices[i].sysfs_entry, "type", 0);
if (device_enabled(t, i))
write_sysfs_val(t->devices[i].sysfs_entry, "type", 0);
for (i = 0; i < t->device_count; i++) {