-
Notifications
You must be signed in to change notification settings - Fork 278
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 some basic usb tests for ethernet and mass storage #18460
Conversation
63445ac
to
53bf2fe
Compare
12d3a69
to
0d30a57
Compare
1202972
to
f407a92
Compare
Latest verification run was looping for couple of hours. I had to cancel the job, it was blocking maintenance jobs. https://openqa.suse.de/tests/13503758#step/usb_nic/1 |
3e4c252
to
2d0429a
Compare
0393494
to
c0db7f1
Compare
New Verification run: https://openqa.suse.de/tests/14068259 |
Its using ipv6 for some reason, but I don't see it as an issue. |
That's a local link address though, the USB NIC might not have been configured through DHCP at all. Could you also add |
fed1358
to
6f78209
Compare
We assume the system has a network interface connected via USB, and will bring it up, configure it and do a simple ping test to a host. USB_ETH_PING_PEER the host to ping, defaults to openqa.oqa.prg2.suse.org
1883def
to
ef078d6
Compare
https://openqa.suse.de/tests/14123184 adds some information on IP address and error checking |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to see another verification run on a worker machine without the expected USB devices to simulate broken usbcore. Otherwise LGTM.
|
||
# sync, unmount and flush slab and page cache | ||
assert_script_run 'sync'; | ||
assert_script_run "umount $mountpoint"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be better to drop the sync
because it should be done automatically by umount
.
tests/kernel/usb_nic.pm
Outdated
my $usb_net_devs = script_output('readlink /sys/class/net/* | grep usb', proceed_on_failure => 1); | ||
die "no USB network interfaces found" unless $usb_net_devs ne ""; | ||
|
||
my $interface = script_output "basename $usb_net_devs"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my $interface = $usb_net_devs =~ s#^.*/##r;
Also adding head -n1
to the script_output() pipeline would be a good idea in case there are multiple USB devices.
Assuming a single usb mass storage device is connected to the machine, randomly create a small file, write it to the device, remount it and compare MD5 sums.
Signed-off-by: Michael Moese <[email protected]>
Module breaks shutdown on the the bare metal system with gnome installed. This module is useful for qemu backends only, which is not our case.
Sometimes, it takes a lot of time to setup network interface. Timeout for interface setup was increased. There was also added debug option to display more details. There is no need for loop before ping, network is already setup when is ifup done. Ping peer was changed to gateway to fully validate network functionality.
- Check for USB network interfaces before doing anything else - try pinging each neighbour of interface instead of the default gateway Co-authored-by: Martin Doucha <[email protected]>
ef078d6
to
6566386
Compare
New VRs: https://openqa.suse.de/tests/14145292 and without connected USB devices: https://openqa.suse.de/tests/14145722 |
One of the VRs seems to be misconfigured: |
That's why I did not ping you yet |
https://openqa.suse.de/tests/14155003 is the VR with no devices connected |
Great. I'll give everyone else time to look at this again until Monday afternoon and then merge it. |
We have some USB devices physically plugged into a baremetal machine. This adds some basic smoke tests for both mass storage and Ethernet connected via USB.