diff options
author | kissiel <kissiel@gmail.com> | 2021-01-22 15:54:51 +0100 |
---|---|---|
committer | kissiel <kissiel@gmail.com> | 2021-01-22 17:22:39 +0100 |
commit | b420401465c6ad2229e618e59a2c7fa56126af46 (patch) | |
tree | 358372db0b61a21468f2b00c745a8471d5a7aeff /units/ethernet | |
parent | 2f07eecf80bb48420203b958d56a6402549a2fe9 (diff) |
remove old hotplugging tests
Diffstat (limited to 'units/ethernet')
-rw-r--r-- | units/ethernet/jobs.pxu | 153 |
1 files changed, 0 insertions, 153 deletions
diff --git a/units/ethernet/jobs.pxu b/units/ethernet/jobs.pxu index 6743eef..4aabac5 100644 --- a/units/ethernet/jobs.pxu +++ b/units/ethernet/jobs.pxu @@ -287,159 +287,6 @@ flags: preserve-locale unit: template template-resource: device template-filter: device.category == 'NETWORK' and device.interface != 'UNKNOWN' -template-engine: jinja2 -id: ethernet/hotplug-{{ interface }}-check-disconnected -_summary: Ensure ethernet port {{ interface }} is physically disconnected -_purpose: - Check that ethernet port {{ interface }} is detected as being in the correct state - to begin a hotplug connection test. -_steps: - 1. Ensure there is no ethernet cable attached to port {{ interface }}. - 2. Begin test. -plugin: user-interact -command: - if [ "$(cat /sys/class/net/{{ interface }}/carrier)" -ne 0 ]; then - # carrier indicating cable present - exit 1 - fi - exit 0 -category_id: com.canonical.plainbox::ethernet -estimated_duration: 1.0 -flags: preserve-locale -after: - {%- if __index__ > 1 %}ethernet/hotplug-{{ __index__ - 1 }}-end-cycle{%- endif %} - -unit: template -template-resource: device -template-filter: device.category == 'NETWORK' and device.interface != 'UNKNOWN' -id: ethernet/hotplug-{interface}-connect -_summary: Ethernet port {interface} hotplug detection test -_purpose: - Check ethernet port {interface} connects when cable inserted. Assumes an IP - address will be assigned by DHCP. Connection asserted by pinging the network - defined gateway. -_steps: - 1. Begin the test. - 2. Insert the ethernet cable in to ethernet port {interface}. - 3. This test will timeout and fail if the insertion and connection - establishment has not been detected (10 second timeout for each check). -plugin: user-interact -command: - LOOP=0 - CABLE_DETECT=0 - while [ $LOOP -lt 10 ] && [ "$CABLE_DETECT" -eq 0 ] - do - sleep 1 - CABLE_DETECT=$(cat /sys/class/net/{interface}/carrier) - LOOP=$((LOOP=LOOP+1)) - done - if [ "$CABLE_DETECT" -eq 0 ]; then - echo "Didn't detect a cable insertion" - exit 1 - fi - echo "Detected a cable insertion" - LOOP=0 - OPSTATE="unknown" - while [ $LOOP -lt 10 ] && [ "$OPSTATE" != "up" ] - do - sleep 1 - OPSTATE=$(cat /sys/class/net/{interface}/operstate) - LOOP=$((LOOP=LOOP+1)) - done - if [ "$OPSTATE" != "up" ]; then - echo "Interface did not up" - exit 1 - fi - echo "Interface up" - gateway_ping_test.py -v --interface {interface} - PING_TEST=$? - if [ $PING_TEST -ne 0 ]; then - echo "Ping test failed" - exit 1 - fi - exit 0 -category_id: com.canonical.plainbox::ethernet -estimated_duration: 60.0 -depends: ethernet/hotplug-{interface}-check-disconnected - -unit: template -template-resource: device -template-filter: device.category == 'NETWORK' and device.interface != 'UNKNOWN' -id: ethernet/hotplug-{interface}-disconnect -_summary: Ethernet port {interface} hotplug disconnect step -_purpose: - Check that when cable removed from ethernet port {interface} the system - detects this correctly. -_steps: - 1. Depends on previous hotplug connection test passing. We will now test - cable disconnection. - 2. Begin the test. - 3. Remove the ethernet cable from ethernet port {interface}. - 4. This test will timeout and fail if the removal has not been detected and - interface marked as down (10 second timeout for each check). -plugin: user-interact -command: - LOOP=0 - CABLE_DETECT=1 - while [ $LOOP -lt 10 ] && [ "$CABLE_DETECT" -ne 0 ] - do - sleep 1 - CABLE_DETECT=$(cat /sys/class/net/{interface}/carrier) - LOOP=$((LOOP=LOOP+1)) - done - if [ "$CABLE_DETECT" -ne 0 ]; then - echo "Didn't detect a cable removal" - exit 1 - fi - echo "Detected a cable removal" - LOOP=0 - OPSTATE="up" - while [ $LOOP -lt 10 ] && [ "$OPSTATE" == "up" ] - do - sleep 1 - OPSTATE=$(cat /sys/class/net/{interface}/operstate) - LOOP=$((LOOP=LOOP+1)) - done - if [ "$OPSTATE" == "up" ]; then - echo "Interface did not go down" - exit 1 - fi - echo "Interface went down" - exit 0 -category_id: com.canonical.plainbox::ethernet -estimated_duration: 20.0 -depends: ethernet/hotplug-{interface}-connect - -unit: template -template-resource: device -template-filter: device.category == 'NETWORK' and device.interface != 'UNKNOWN' -id: ethernet/hotplug-{__index__}-end-cycle -category_id: com.canonical.plainbox::ethernet -after: ethernet/hotplug-{interface}-disconnect -command: true -flags: simple - -unit: template -template-resource: device -template-filter: device.category == 'NETWORK' and device.interface != 'UNKNOWN' -template-unit: job -id: ethernet/iperf3_{interface} -plugin: shell -_summary: Iperf3 stress testing for {interface} -category_id: com.canonical.plainbox::ethernet -estimated_duration: 740.0 -user: root -environ: - TEST_TARGET_IPERF - LD_LIBRARY_PATH -command: network.py test -i {interface} -t iperf --iperf3 --scan-timeout 3600 --fail-threshold 80 --cpu-load-fail-threshold 90 --runtime 90 --num_runs 4 -_description: - This test uses iperf3 to ensure network devices pass data at an acceptable - minimum percentage of advertized speed. - -unit: template -template-resource: device -template-filter: device.category == 'NETWORK' and device.interface != 'UNKNOWN' template-unit: job id: ethernet/iperf3_reverse_{interface} plugin: shell |