Merge ~liaou3/checkbox-iiotg/+git/checkbox-provider-intliotg:tsn_automation into ~checkbox-dev/checkbox-iiotg/+git/checkbox-provider-intliotg:master

Proposed by Vincent Liao
Status: Merged
Approved by: Vincent Liao
Approved revision: 6c5d9a9a9f3083af68665f8479d5bc922264a943
Merged at revision: 609a8aa16824e83497250f82694241189bb52cec
Proposed branch: ~liaou3/checkbox-iiotg/+git/checkbox-provider-intliotg:tsn_automation
Merge into: ~checkbox-dev/checkbox-iiotg/+git/checkbox-provider-intliotg:master
Diff against target: 63 lines (+16/-8)
2 files modified
units/tsn/jobs.pxu (+15/-7)
units/tsn/test-plan.pxu (+1/-1)
Reviewer Review Type Date Requested Status
PeiYao Chang Approve
StanleyHuang Approve
Rick Wu Pending
Patrick Liu Pending
Vic Liu Pending
Review via email: mp+453384@code.launchpad.net

Commit message

TSN test cases automation: 802.1qbu

Description of the change

This MR is to make TSN test cases automated.
This fail of this test case is predictable.
submissions: https://certification.canonical.com/hardware/202308-31958/submission/336746/test/203230/result/36748430/

To post a comment you must log in.
Revision history for this message
StanleyHuang (stanley31) wrote :

LGTM

review: Approve
Revision history for this message
PeiYao Chang (baconyao) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/units/tsn/jobs.pxu b/units/tsn/jobs.pxu
2index 96f4ab3..e975c30 100644
3--- a/units/tsn/jobs.pxu
4+++ b/units/tsn/jobs.pxu
5@@ -346,23 +346,31 @@ template-resource: tsn/tsn-devices
6 template-unit: job
7 id: tsn/ieee802.1qbu/check-frame-preemption-{interface}
8 category_id: tsn
9-_summary: Check if could set frame preemption
10+_summary: Frame preemption check
11 depends:
12 tsn/tsn-detected
13-plugin: user-interact-verify
14+plugin: shell
15 user: root
16 _purpose:
17 To check if the system can setup frame preemption
18 command:
19 if ! command -v ethtool-rt.ethtool > /dev/null; then
20- echo "ERROR: snap ethtool-rt si required for this test and it's probably not installed."
21+ echo "ERROR: snap ethtool-rt is required for this test and it's probably not installed."
22 echo "Please install it with the following command."
23 echo "$ sudo snap install ethtool-rt --edge --devmode"
24 exit 1
25 fi
26 echo "## Setting frame preemption on..."
27- ethtool-rt.ethtool --set-frame-preemption {interface} fp on
28+ ret=$(ethtool-rt.ethtool --set-frame-preemption {interface} fp on)
29+ if [[ "$ret" != "0" ]]; then
30+ echo "FAIL: Cannot set frame preemption via command below"
31+ echo "ethtool-rt.ethtool --set-frame-preemption {interface} fp on"
32+ exit 1
33+ fi
34 echo "## Showing frame preemption settings..."
35- ethtool-rt.ethtool --show-frame-preemption {interface}
36-_verification:
37- Is the frame preemption enabled for {interface}?
38+ output=$(ethtool-rt.ethtool --show-frame-preemption {interface})
39+ echo "$output"
40+ if ! echo "$output" | grep -q "enabled: enabled"; then
41+ echo "FAIL: frame preemption is not enabled!"
42+ exit 1
43+ fi
44diff --git a/units/tsn/test-plan.pxu b/units/tsn/test-plan.pxu
45index 696e61b..69b1e9f 100644
46--- a/units/tsn/test-plan.pxu
47+++ b/units/tsn/test-plan.pxu
48@@ -20,7 +20,6 @@ nested_part:
49 tsn-ieee802.1as-2011
50 tsn-time-based-shaping
51 tsn-ieee802.1qbv
52- tsn-ieee802.1qbu
53
54 id: tsn-automated
55 _name: Time Sensitive Networking (TSN) test (automated)
56@@ -32,6 +31,7 @@ include:
57 tsn/test-env-setup-for-.*
58 nested_part:
59 tsn-ieee802.1qav
60+ tsn-ieee802.1qbu
61
62 id: tsn-ieee802.1as-2011
63 _name: Time Sensitive Networking Test Plan for IEEE 802.1AS-2011

Subscribers

People subscribed via source and target branches