tests: ethtool: add tests for coalesce settings
This commit is contained in:
parent
3cb635b443
commit
566732321d
1 changed files with 199 additions and 1 deletions
|
@ -26,7 +26,29 @@ tests_init \
|
|||
up_dma_ring_rx \
|
||||
up_dma_ring_rx_jumbo \
|
||||
up_dma_ring_rx_mini \
|
||||
up_dma_ring_tx
|
||||
up_dma_ring_tx \
|
||||
up_coalesce_adaptive_rx \
|
||||
up_coalesce_adaptive_tx \
|
||||
up_coalesce_pkt_rate_low \
|
||||
up_coalesce_pkt_rate_high \
|
||||
up_coalesce_sample_interval \
|
||||
up_coalesce_stats_block_usecs \
|
||||
up_coalesce_rx_frames \
|
||||
up_coalesce_rx_frames_low \
|
||||
up_coalesce_rx_frames_irq \
|
||||
up_coalesce_rx_frames_high \
|
||||
up_coalesce_rx_usecs \
|
||||
up_coalesce_rx_usecs_low \
|
||||
up_coalesce_rx_usecs_irq \
|
||||
up_coalesce_rx_usecs_high \
|
||||
up_coalesce_tx_frames \
|
||||
up_coalesce_tx_frames_low \
|
||||
up_coalesce_tx_frames_irq \
|
||||
up_coalesce_tx_frames_high \
|
||||
up_coalesce_tx_usecs \
|
||||
up_coalesce_tx_usecs_low \
|
||||
up_coalesce_tx_usecs_irq \
|
||||
up_coalesce_tx_usecs_high
|
||||
|
||||
pre_up_msglvl_body() {
|
||||
export IFACE="eth0" PHASE="pre-up" IF_ETHTOOL_MSGLVL="debug on" MOCK="echo"
|
||||
|
@ -283,3 +305,179 @@ up_dma_ring_tx_body() {
|
|||
-o match:"tx '1024'" \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
||||
up_coalesce_adaptive_rx_body() {
|
||||
export IFACE="eth0" PHASE="up" IF_ETHTOOL_COALESCE_ADAPTIVE_RX="on" MOCK="echo"
|
||||
atf_check -s exit:0 \
|
||||
-o match:'ethtool --coalesce eth0' \
|
||||
-o match:"adaptive-rx 'on'" \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
||||
up_coalesce_adaptive_tx_body() {
|
||||
export IFACE="eth0" PHASE="up" IF_ETHTOOL_COALESCE_ADAPTIVE_TX="on" MOCK="echo"
|
||||
atf_check -s exit:0 \
|
||||
-o match:'ethtool --coalesce eth0' \
|
||||
-o match:"adaptive-tx 'on'" \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
||||
up_coalesce_pkt_rate_low_body() {
|
||||
export IFACE="eth0" PHASE="up" IF_ETHTOOL_COALESCE_PKT_RATE_LOW="1024" MOCK="echo"
|
||||
atf_check -s exit:0 \
|
||||
-o match:'ethtool --coalesce eth0' \
|
||||
-o match:"pkt-rate-low '1024'" \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
||||
up_coalesce_pkt_rate_high_body() {
|
||||
export IFACE="eth0" PHASE="up" IF_ETHTOOL_COALESCE_PKT_RATE_HIGH="1024" MOCK="echo"
|
||||
atf_check -s exit:0 \
|
||||
-o match:'ethtool --coalesce eth0' \
|
||||
-o match:"pkt-rate-high '1024'" \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
||||
up_coalesce_sample_interval_body() {
|
||||
export IFACE="eth0" PHASE="up" IF_ETHTOOL_COALESCE_SAMPLE_INTERVAL="1024" MOCK="echo"
|
||||
atf_check -s exit:0 \
|
||||
-o match:'ethtool --coalesce eth0' \
|
||||
-o match:"sample-interval '1024'" \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
||||
up_coalesce_stats_block_usecs_body() {
|
||||
export IFACE="eth0" PHASE="up" IF_ETHTOOL_COALESCE_STATS_BLOCK_USECS="1024" MOCK="echo"
|
||||
atf_check -s exit:0 \
|
||||
-o match:'ethtool --coalesce eth0' \
|
||||
-o match:"stats-block-usecs '1024'" \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
||||
up_coalesce_rx_frames_body() {
|
||||
export IFACE="eth0" PHASE="up" IF_ETHTOOL_COALESCE_RX_FRAMES="1024" MOCK="echo"
|
||||
atf_check -s exit:0 \
|
||||
-o match:'ethtool --coalesce eth0' \
|
||||
-o match:"rx-frames '1024'" \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
||||
up_coalesce_rx_frames_low_body() {
|
||||
export IFACE="eth0" PHASE="up" IF_ETHTOOL_COALESCE_RX_FRAMES_LOW="1024" MOCK="echo"
|
||||
atf_check -s exit:0 \
|
||||
-o match:'ethtool --coalesce eth0' \
|
||||
-o match:"rx-frames-low '1024'" \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
||||
up_coalesce_rx_frames_irq_body() {
|
||||
export IFACE="eth0" PHASE="up" IF_ETHTOOL_COALESCE_RX_FRAMES_IRQ="1024" MOCK="echo"
|
||||
atf_check -s exit:0 \
|
||||
-o match:'ethtool --coalesce eth0' \
|
||||
-o match:"rx-frames-irq '1024'" \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
||||
up_coalesce_rx_frames_high_body() {
|
||||
export IFACE="eth0" PHASE="up" IF_ETHTOOL_COALESCE_RX_FRAMES_HIGH="1024" MOCK="echo"
|
||||
atf_check -s exit:0 \
|
||||
-o match:'ethtool --coalesce eth0' \
|
||||
-o match:"rx-frames-high '1024'" \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
||||
up_coalesce_rx_usecs_body() {
|
||||
export IFACE="eth0" PHASE="up" IF_ETHTOOL_COALESCE_RX_USECS="1024" MOCK="echo"
|
||||
atf_check -s exit:0 \
|
||||
-o match:'ethtool --coalesce eth0' \
|
||||
-o match:"rx-usecs '1024'" \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
||||
up_coalesce_rx_usecs_low_body() {
|
||||
export IFACE="eth0" PHASE="up" IF_ETHTOOL_COALESCE_RX_USECS_LOW="1024" MOCK="echo"
|
||||
atf_check -s exit:0 \
|
||||
-o match:'ethtool --coalesce eth0' \
|
||||
-o match:"rx-usecs-low '1024'" \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
||||
up_coalesce_rx_usecs_irq_body() {
|
||||
export IFACE="eth0" PHASE="up" IF_ETHTOOL_COALESCE_RX_USECS_IRQ="1024" MOCK="echo"
|
||||
atf_check -s exit:0 \
|
||||
-o match:'ethtool --coalesce eth0' \
|
||||
-o match:"rx-usecs-irq '1024'" \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
||||
up_coalesce_rx_usecs_high_body() {
|
||||
export IFACE="eth0" PHASE="up" IF_ETHTOOL_COALESCE_RX_USECS_HIGH="1024" MOCK="echo"
|
||||
atf_check -s exit:0 \
|
||||
-o match:'ethtool --coalesce eth0' \
|
||||
-o match:"rx-usecs-high '1024'" \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
||||
up_coalesce_tx_frames_body() {
|
||||
export IFACE="eth0" PHASE="up" IF_ETHTOOL_COALESCE_TX_FRAMES="1024" MOCK="echo"
|
||||
atf_check -s exit:0 \
|
||||
-o match:'ethtool --coalesce eth0' \
|
||||
-o match:"tx-frames '1024'" \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
||||
up_coalesce_tx_frames_low_body() {
|
||||
export IFACE="eth0" PHASE="up" IF_ETHTOOL_COALESCE_TX_FRAMES_LOW="1024" MOCK="echo"
|
||||
atf_check -s exit:0 \
|
||||
-o match:'ethtool --coalesce eth0' \
|
||||
-o match:"tx-frames-low '1024'" \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
||||
up_coalesce_tx_frames_irq_body() {
|
||||
export IFACE="eth0" PHASE="up" IF_ETHTOOL_COALESCE_TX_FRAMES_IRQ="1024" MOCK="echo"
|
||||
atf_check -s exit:0 \
|
||||
-o match:'ethtool --coalesce eth0' \
|
||||
-o match:"tx-frames-irq '1024'" \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
||||
up_coalesce_tx_frames_high_body() {
|
||||
export IFACE="eth0" PHASE="up" IF_ETHTOOL_COALESCE_TX_FRAMES_HIGH="1024" MOCK="echo"
|
||||
atf_check -s exit:0 \
|
||||
-o match:'ethtool --coalesce eth0' \
|
||||
-o match:"tx-frames-high '1024'" \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
||||
up_coalesce_tx_usecs_body() {
|
||||
export IFACE="eth0" PHASE="up" IF_ETHTOOL_COALESCE_TX_USECS="1024" MOCK="echo"
|
||||
atf_check -s exit:0 \
|
||||
-o match:'ethtool --coalesce eth0' \
|
||||
-o match:"tx-usecs '1024'" \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
||||
up_coalesce_tx_usecs_low_body() {
|
||||
export IFACE="eth0" PHASE="up" IF_ETHTOOL_COALESCE_TX_USECS_LOW="1024" MOCK="echo"
|
||||
atf_check -s exit:0 \
|
||||
-o match:'ethtool --coalesce eth0' \
|
||||
-o match:"tx-usecs-low '1024'" \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
||||
up_coalesce_tx_usecs_irq_body() {
|
||||
export IFACE="eth0" PHASE="up" IF_ETHTOOL_COALESCE_TX_USECS_IRQ="1024" MOCK="echo"
|
||||
atf_check -s exit:0 \
|
||||
-o match:'ethtool --coalesce eth0' \
|
||||
-o match:"tx-usecs-irq '1024'" \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
||||
up_coalesce_tx_usecs_high_body() {
|
||||
export IFACE="eth0" PHASE="up" IF_ETHTOOL_COALESCE_TX_USECS_HIGH="1024" MOCK="echo"
|
||||
atf_check -s exit:0 \
|
||||
-o match:'ethtool --coalesce eth0' \
|
||||
-o match:"tx-usecs-high '1024'" \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue