-
Notifications
You must be signed in to change notification settings - Fork 17
Add scripts to test USB Device enumeration on Host PCs #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add scripts to test USB Device enumeration on Host PCs #45
Conversation
The script verifies successful USB enumeration on Host PC for given PID when DUT is connected via USB. Signed-off-by: Aanchal Chaurasia <achauras@qti.qualcomm.com>
The script verifies successful enumeration on Ubuntu/Mac PCs with given PID when DUT is connected via USB. Signed-off-by: Aanchal Chaurasia <achauras@qti.qualcomm.com>
The documentation includes setup details, usage and examples for running USB Device mode test scripts. Signed-off-by: Aanchal Chaurasia <achauras@qti.qualcomm.com>
@achauras-qcom As far as I know, this host-based test isn't applicable for Lava. It might become relevant once we migrate to Axiom. Would you prefer to wait until the migration is complete? @mwasilew could you please confirm whether this test works on Lava? |
It might work in LAVA with container, but I don't know how useful this is. It tests the host rather than the device. In addition, there is no test script here, just a script that should be called with specific parameter. I'll try do demo this in LAVA if I have some time later today |
https://lava.infra.foundries.io/scheduler/job/75731#L1974 My changes are here: mwasilew@9847816 I only did minimal changes to show the concept. This test can be written without python (at least for linux). If you write the test in python, please use |
Thanks @mwasilew for the example. I'll try incorporating it. |
Regarding the use of the script for Host PC: Since USB is a master-slave protocol where master drives all communication, we need to test successful enumeration from master/host perspective only, which is the PC in this case. Our Axiom test scripts do the same. |
As far as I understand pyusb works on Linux, Windows and Mac. Do you have any logs/traces of the issue you're facing? The builds we currently use don't include any gadged/adb drivers, so this test isn't very useful. It may change later though. |
In Windows, usb.core.find(find_all=True) is returning an empty list, probably due to missing libusb drivers. If current builds don't include usb gadget drivers, then sure we can park this change for later. I will meanwhile work on resolving issues with my current script. |
Added test scripts to verify successful USB enumeration with user-input PID when DUT is connected to Host PC.