canonical / checkbox

Checkbox
https://checkbox.readthedocs.io
GNU General Public License v3.0
30 stars 47 forks source link

[checkbox-ce-oem] Modify tcpecho_stress script (Bugfix) #1219

Closed rickwu666666 closed 4 months ago

rickwu666666 commented 5 months ago

To prevent parent eth of ethernet switch been disable

Description

Add condition to not disable parent interface for test multi-ports switch. e.g. We have a platform which have 7-ports switch as follows. As it shows, eth0 is the parent interface of lan1 to lan6. In this case, we can not disable eth0 if we are intend to test lan1 to lan6.

beats@ubuntu:~$ ip -c a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1502 qdisc mq state UP group default qlen 1000
    link/ether 52:28:41:56:75:47 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::5028:41ff:fe56:7547/64 scope link 
       valid_lft forever preferred_lft forever
3: mstp1: <BROADCAST,NOARP> mtu 1497 qdisc noop state DOWN group default qlen 10
    link/[261] 78 brd ff
4: mstp2: <BROADCAST,NOARP> mtu 1497 qdisc noop state DOWN group default qlen 10
    link/[261] 78 brd ff
5: lan1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 52:28:41:56:75:47 brd ff:ff:ff:ff:ff:ff
    inet 10.102.89.216/23 brd 10.102.89.255 scope global dynamic lan1
       valid_lft 376sec preferred_lft 376sec
    inet6 fe80::5028:41ff:fe56:7547/64 scope link 
       valid_lft forever preferred_lft forever
6: lan2@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN group default qlen 1000
    link/ether 52:28:41:56:75:47 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::5028:41ff:fe56:7547/64 scope link 
       valid_lft forever preferred_lft forever
7: lan3@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 52:28:41:56:75:47 brd ff:ff:ff:ff:ff:ff
8: lan4@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 52:28:41:56:75:47 brd ff:ff:ff:ff:ff:ff
9: lan5@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 52:28:41:56:75:47 brd ff:ff:ff:ff:ff:ff
10: lan6@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 52:28:41:56:75:47 brd ff:ff:ff:ff:ff:ff

Resolved issues

Documentation

Tests

Test result: https://certification.canonical.com/hardware/202402-33505/submission/366205/test-results/pass/

rickwu666666 commented 4 months ago

Add the comment to explain the added logic in the script.

rickwu666666 commented 4 months ago

Fix the typo of function name

rickwu666666 commented 4 months ago

Fix typo and wording in the script.