summaryrefslogtreecommitdiff
path: root/trusty/coverage/coverage_test.cpp
diff options
context:
space:
mode:
authorAndrew Chant <achant@google.com>2017-11-01 17:32:35 -0700
committerAndrew Chant <achant@google.com>2017-11-07 18:15:49 -0800
commit3af9e40c66839c72c0e4f52ead0c60f20873560a (patch)
treeaf85218629d1ed7d142eac50ece92085a919317d /trusty/coverage/coverage_test.cpp
parentdbef1eeb45846a7c656f9b627033b98ce5c80569 (diff)
usblib: fix race & delay waiting for perms on open
in usb_device_open, if permission is denied for a USB device node, the current code retries read-only, then sleeps for a second before retrying. If the permission was changed to +rw between the two file opens, the device could be inadvertently opened read-only. Also, change the polling interval to 100ms. 1s is a long wait for a function on the critical path of a user interaction. Bug: 68337205 Bug: 68782236 Test: with debug messages enabled, connected & disconnected a USB audio headset. Saw the writeable file descriptor returned. Change-Id: I06048cc2c09bf6ed1abada5d12b5559be768fbaf
Diffstat (limited to 'trusty/coverage/coverage_test.cpp')
0 files changed, 0 insertions, 0 deletions