@@ -8,54 +8,58 @@ NSIM_NETDEV=$(make_netdev)
8
8
9
9
set -o pipefail
10
10
11
+ # Since commit 2b3ddcb35357 ("ethtool: fec: Change the prompt ...")
12
+ # in ethtool CLI the Configured lines start with Supported/Configured.
13
+ configured=$( $ETHTOOL --show-fec $NSIM_NETDEV | tail -2 | head -1 | cut -d' ' -f1)
14
+
11
15
# netdevsim starts out with None/None
12
16
s=$( $ETHTOOL --show-fec $NSIM_NETDEV | tail -2)
13
- check $? " $s " " Configured FEC encodings: None
17
+ check $? " $s " " $configured FEC encodings: None
14
18
Active FEC encoding: None"
15
19
16
20
# Test Auto
17
21
$ETHTOOL --set-fec $NSIM_NETDEV encoding auto
18
22
check $?
19
23
s=$( $ETHTOOL --show-fec $NSIM_NETDEV | tail -2)
20
- check $? " $s " " Configured FEC encodings: Auto
24
+ check $? " $s " " $configured FEC encodings: Auto
21
25
Active FEC encoding: Off"
22
26
23
27
# Test case in-sensitivity
24
28
for o in off Off OFF; do
25
29
$ETHTOOL --set-fec $NSIM_NETDEV encoding $o
26
30
check $?
27
31
s=$( $ETHTOOL --show-fec $NSIM_NETDEV | tail -2)
28
- check $? " $s " " Configured FEC encodings: Off
32
+ check $? " $s " " $configured FEC encodings: Off
29
33
Active FEC encoding: Off"
30
34
done
31
35
32
36
for o in BaseR baser BAser; do
33
37
$ETHTOOL --set-fec $NSIM_NETDEV encoding $o
34
38
check $?
35
39
s=$( $ETHTOOL --show-fec $NSIM_NETDEV | tail -2)
36
- check $? " $s " " Configured FEC encodings: BaseR
40
+ check $? " $s " " $configured FEC encodings: BaseR
37
41
Active FEC encoding: BaseR"
38
42
done
39
43
40
44
for o in llrs rs; do
41
45
$ETHTOOL --set-fec $NSIM_NETDEV encoding $o
42
46
check $?
43
47
s=$( $ETHTOOL --show-fec $NSIM_NETDEV | tail -2)
44
- check $? " $s " " Configured FEC encodings: ${o^^}
48
+ check $? " $s " " $configured FEC encodings: ${o^^}
45
49
Active FEC encoding: ${o^^} "
46
50
done
47
51
48
52
# Test mutliple bits
49
53
$ETHTOOL --set-fec $NSIM_NETDEV encoding rs llrs
50
54
check $?
51
55
s=$( $ETHTOOL --show-fec $NSIM_NETDEV | tail -2)
52
- check $? " $s " " Configured FEC encodings: RS LLRS
56
+ check $? " $s " " $configured FEC encodings: RS LLRS
53
57
Active FEC encoding: LLRS"
54
58
55
59
$ETHTOOL --set-fec $NSIM_NETDEV encoding rs off auto
56
60
check $?
57
61
s=$( $ETHTOOL --show-fec $NSIM_NETDEV | tail -2)
58
- check $? " $s " " Configured FEC encodings: Auto Off RS
62
+ check $? " $s " " $configured FEC encodings: Auto Off RS
59
63
Active FEC encoding: RS"
60
64
61
65
# Make sure other link modes are rejected
0 commit comments