tests: ethtool: add tests for pause parameters
This commit is contained in:
parent
6ae3414329
commit
e8a2aab7e1
1 changed files with 46 additions and 1 deletions
|
@ -11,7 +11,10 @@ tests_init \
|
|||
up_wol \
|
||||
up_wol_sopass \
|
||||
up_autoneg_simple \
|
||||
up_autoneg_mask
|
||||
up_autoneg_mask \
|
||||
up_pause_autoneg \
|
||||
up_pause_tx \
|
||||
up_pause_rx
|
||||
|
||||
pre_up_msglvl_body() {
|
||||
export IFACE="eth0" PHASE="pre-up" IF_ETHTOOL_MSGLVL="debug on" MOCK="echo"
|
||||
|
@ -82,3 +85,45 @@ up_autoneg_mask_body() {
|
|||
-o match:'autoneg on advertise 1000/full' \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
||||
up_pause_autoneg_body() {
|
||||
export IFACE="eth0" PHASE="up" IF_ETHTOOL_PAUSE_AUTONEG="on" MOCK="echo"
|
||||
atf_check -s exit:0 \
|
||||
-o match:'ethtool --pause eth0' \
|
||||
-o match:"autoneg 'on'" \
|
||||
${EXECUTOR}
|
||||
|
||||
export IFACE="eth0" PHASE="up" IF_ETHTOOL_PAUSE_AUTONEG="off" MOCK="echo"
|
||||
atf_check -s exit:0 \
|
||||
-o match:'ethtool --pause eth0' \
|
||||
-o match:"autoneg 'off'" \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
||||
up_pause_tx_body() {
|
||||
export IFACE="eth0" PHASE="up" IF_ETHTOOL_PAUSE_TX="on" MOCK="echo"
|
||||
atf_check -s exit:0 \
|
||||
-o match:'ethtool --pause eth0' \
|
||||
-o match:"tx 'on'" \
|
||||
${EXECUTOR}
|
||||
|
||||
export IFACE="eth0" PHASE="up" IF_ETHTOOL_PAUSE_TX="off" MOCK="echo"
|
||||
atf_check -s exit:0 \
|
||||
-o match:'ethtool --pause eth0' \
|
||||
-o match:"tx 'off'" \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
||||
up_pause_rx_body() {
|
||||
export IFACE="eth0" PHASE="up" IF_ETHTOOL_PAUSE_RX="on" MOCK="echo"
|
||||
atf_check -s exit:0 \
|
||||
-o match:'ethtool --pause eth0' \
|
||||
-o match:"rx 'on'" \
|
||||
${EXECUTOR}
|
||||
|
||||
export IFACE="eth0" PHASE="up" IF_ETHTOOL_PAUSE_RX="off" MOCK="echo"
|
||||
atf_check -s exit:0 \
|
||||
-o match:'ethtool --pause eth0' \
|
||||
-o match:"rx 'off'" \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue