removable_storage: Allow sysfs_path to be a list.

BUG=chrome-os-partner:29583
TEST=manually on DUT

Change-Id: Ib39767f5c5b3f8fdea1bad17769ee9393e9188a3
Reviewed-on: https://chromium-review.googlesource.com/205740
Reviewed-by: Ricky Liang <jcliang@chromium.org>
Commit-Queue: Ricky Liang <jcliang@chromium.org>
Tested-by: Ricky Liang <jcliang@chromium.org>
diff --git a/py/test/pytests/removable_storage/removable_storage.py b/py/test/pytests/removable_storage/removable_storage.py
index 3b4623c..9ff8137 100644
--- a/py/test/pytests/removable_storage/removable_storage.py
+++ b/py/test/pytests/removable_storage/removable_storage.py
@@ -20,6 +20,7 @@
 import time
 import unittest
 
+from cros.factory import common
 from cros.factory.event_log import Log
 from cros.factory.test.fixture.bft_fixture import (BFTFixture,
                                                    BFTFixtureException,
@@ -135,7 +136,8 @@
     Arg('vidpid', (str, list),
         'Vendor ID and Product ID of the target testing device', None,
         optional=True),
-    Arg('sysfs_path', str, 'The expected sysfs path that udev events should'
+    Arg('sysfs_path', (str, list),
+        'The expected sysfs path that udev events should'
         'come from, ex: /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2',
         None, optional=True),
     Arg('block_size', int,
@@ -555,8 +557,9 @@
             return
           logging.info('VID:PID == %s', self.args.vidpid)
         elif self.args.sysfs_path:
-          if (not os.path.exists(self.args.sysfs_path) or
-              not self.args.sysfs_path in device.sys_path):
+          self.args.sysfs_path = common.MakeList(self.args.sysfs_path)
+          if (not any(os.path.exists(p) for p in self.args.sysfs_path) or
+              not any(p in device.sys_path for p in self.args.sysfs_path)):
             return
           logging.info('sys path = %s', self.args.sysfs_path)
         else: