1*9b18942eSPetr Machata#!/bin/bash 2*9b18942eSPetr Machata# SPDX-License-Identifier: GPL-2.0 3*9b18942eSPetr Machata 4*9b18942eSPetr Machatalib_dir=$(dirname $0)/../../../net/forwarding 5*9b18942eSPetr Machata 6*9b18942eSPetr MachataALL_TESTS=" 7*9b18942eSPetr Machata l3_reporting_test 8*9b18942eSPetr Machata l3_fail_next_test 9*9b18942eSPetr Machata l3_counter_test 10*9b18942eSPetr Machata l3_rollback_test 11*9b18942eSPetr Machata l3_monitor_test 12*9b18942eSPetr Machata" 13*9b18942eSPetr Machata 14*9b18942eSPetr MachataNETDEVSIM_PATH=/sys/bus/netdevsim/ 15*9b18942eSPetr MachataDEV_ADDR_1=1337 16*9b18942eSPetr MachataDEV_ADDR_2=1057 17*9b18942eSPetr MachataDEV_ADDR_3=5417 18*9b18942eSPetr MachataNUM_NETIFS=0 19*9b18942eSPetr Machatasource $lib_dir/lib.sh 20*9b18942eSPetr Machata 21*9b18942eSPetr MachataDUMMY_IFINDEX= 22*9b18942eSPetr Machata 23*9b18942eSPetr MachataDEV_ADDR() 24*9b18942eSPetr Machata{ 25*9b18942eSPetr Machata local n=$1; shift 26*9b18942eSPetr Machata local var=DEV_ADDR_$n 27*9b18942eSPetr Machata 28*9b18942eSPetr Machata echo ${!var} 29*9b18942eSPetr Machata} 30*9b18942eSPetr Machata 31*9b18942eSPetr MachataDEV() 32*9b18942eSPetr Machata{ 33*9b18942eSPetr Machata echo netdevsim$(DEV_ADDR $1) 34*9b18942eSPetr Machata} 35*9b18942eSPetr Machata 36*9b18942eSPetr MachataDEVLINK_DEV() 37*9b18942eSPetr Machata{ 38*9b18942eSPetr Machata echo netdevsim/$(DEV $1) 39*9b18942eSPetr Machata} 40*9b18942eSPetr Machata 41*9b18942eSPetr MachataSYSFS_NET_DIR() 42*9b18942eSPetr Machata{ 43*9b18942eSPetr Machata echo /sys/bus/netdevsim/devices/$(DEV $1)/net/ 44*9b18942eSPetr Machata} 45*9b18942eSPetr Machata 46*9b18942eSPetr MachataDEBUGFS_DIR() 47*9b18942eSPetr Machata{ 48*9b18942eSPetr Machata echo /sys/kernel/debug/netdevsim/$(DEV $1)/ 49*9b18942eSPetr Machata} 50*9b18942eSPetr Machata 51*9b18942eSPetr Machatansim_add() 52*9b18942eSPetr Machata{ 53*9b18942eSPetr Machata local n=$1; shift 54*9b18942eSPetr Machata 55*9b18942eSPetr Machata echo "$(DEV_ADDR $n) 1" > ${NETDEVSIM_PATH}/new_device 56*9b18942eSPetr Machata while [ ! -d $(SYSFS_NET_DIR $n) ] ; do :; done 57*9b18942eSPetr Machata} 58*9b18942eSPetr Machata 59*9b18942eSPetr Machatansim_reload() 60*9b18942eSPetr Machata{ 61*9b18942eSPetr Machata local n=$1; shift 62*9b18942eSPetr Machata local ns=$1; shift 63*9b18942eSPetr Machata 64*9b18942eSPetr Machata devlink dev reload $(DEVLINK_DEV $n) netns $ns 65*9b18942eSPetr Machata 66*9b18942eSPetr Machata if [ $? -ne 0 ]; then 67*9b18942eSPetr Machata echo "Failed to reload $(DEV $n) into netns \"testns1\"" 68*9b18942eSPetr Machata exit 1 69*9b18942eSPetr Machata fi 70*9b18942eSPetr Machata 71*9b18942eSPetr Machata} 72*9b18942eSPetr Machata 73*9b18942eSPetr Machatansim_del() 74*9b18942eSPetr Machata{ 75*9b18942eSPetr Machata local n=$1; shift 76*9b18942eSPetr Machata 77*9b18942eSPetr Machata echo "$(DEV_ADDR $n)" > ${NETDEVSIM_PATH}/del_device 78*9b18942eSPetr Machata} 79*9b18942eSPetr Machata 80*9b18942eSPetr Machatansim_hwstats_toggle() 81*9b18942eSPetr Machata{ 82*9b18942eSPetr Machata local action=$1; shift 83*9b18942eSPetr Machata local instance=$1; shift 84*9b18942eSPetr Machata local netdev=$1; shift 85*9b18942eSPetr Machata local type=$1; shift 86*9b18942eSPetr Machata 87*9b18942eSPetr Machata local ifindex=$($IP -j link show dev $netdev | jq '.[].ifindex') 88*9b18942eSPetr Machata 89*9b18942eSPetr Machata echo $ifindex > $(DEBUGFS_DIR $instance)/hwstats/$type/$action 90*9b18942eSPetr Machata} 91*9b18942eSPetr Machata 92*9b18942eSPetr Machatansim_hwstats_enable() 93*9b18942eSPetr Machata{ 94*9b18942eSPetr Machata nsim_hwstats_toggle enable_ifindex "$@" 95*9b18942eSPetr Machata} 96*9b18942eSPetr Machata 97*9b18942eSPetr Machatansim_hwstats_disable() 98*9b18942eSPetr Machata{ 99*9b18942eSPetr Machata nsim_hwstats_toggle disable_ifindex "$@" 100*9b18942eSPetr Machata} 101*9b18942eSPetr Machata 102*9b18942eSPetr Machatansim_hwstats_fail_next_enable() 103*9b18942eSPetr Machata{ 104*9b18942eSPetr Machata nsim_hwstats_toggle fail_next_enable "$@" 105*9b18942eSPetr Machata} 106*9b18942eSPetr Machata 107*9b18942eSPetr Machatasetup_prepare() 108*9b18942eSPetr Machata{ 109*9b18942eSPetr Machata modprobe netdevsim &> /dev/null 110*9b18942eSPetr Machata nsim_add 1 111*9b18942eSPetr Machata nsim_add 2 112*9b18942eSPetr Machata nsim_add 3 113*9b18942eSPetr Machata 114*9b18942eSPetr Machata ip netns add testns1 115*9b18942eSPetr Machata 116*9b18942eSPetr Machata if [ $? -ne 0 ]; then 117*9b18942eSPetr Machata echo "Failed to add netns \"testns1\"" 118*9b18942eSPetr Machata exit 1 119*9b18942eSPetr Machata fi 120*9b18942eSPetr Machata 121*9b18942eSPetr Machata nsim_reload 1 testns1 122*9b18942eSPetr Machata nsim_reload 2 testns1 123*9b18942eSPetr Machata nsim_reload 3 testns1 124*9b18942eSPetr Machata 125*9b18942eSPetr Machata IP="ip -n testns1" 126*9b18942eSPetr Machata 127*9b18942eSPetr Machata $IP link add name dummy1 type dummy 128*9b18942eSPetr Machata $IP link set dev dummy1 up 129*9b18942eSPetr Machata DUMMY_IFINDEX=$($IP -j link show dev dummy1 | jq '.[].ifindex') 130*9b18942eSPetr Machata} 131*9b18942eSPetr Machata 132*9b18942eSPetr Machatacleanup() 133*9b18942eSPetr Machata{ 134*9b18942eSPetr Machata pre_cleanup 135*9b18942eSPetr Machata 136*9b18942eSPetr Machata $IP link del name dummy1 137*9b18942eSPetr Machata ip netns del testns1 138*9b18942eSPetr Machata nsim_del 3 139*9b18942eSPetr Machata nsim_del 2 140*9b18942eSPetr Machata nsim_del 1 141*9b18942eSPetr Machata modprobe -r netdevsim &> /dev/null 142*9b18942eSPetr Machata} 143*9b18942eSPetr Machata 144*9b18942eSPetr Machatanetdev_hwstats_used() 145*9b18942eSPetr Machata{ 146*9b18942eSPetr Machata local netdev=$1; shift 147*9b18942eSPetr Machata local type=$1; shift 148*9b18942eSPetr Machata 149*9b18942eSPetr Machata $IP -j stats show dev "$netdev" group offload subgroup hw_stats_info | 150*9b18942eSPetr Machata jq '.[].info.l3_stats.used' 151*9b18942eSPetr Machata} 152*9b18942eSPetr Machata 153*9b18942eSPetr Machatanetdev_check_used() 154*9b18942eSPetr Machata{ 155*9b18942eSPetr Machata local netdev=$1; shift 156*9b18942eSPetr Machata local type=$1; shift 157*9b18942eSPetr Machata 158*9b18942eSPetr Machata [[ $(netdev_hwstats_used $netdev $type) == "true" ]] 159*9b18942eSPetr Machata} 160*9b18942eSPetr Machata 161*9b18942eSPetr Machatanetdev_check_unused() 162*9b18942eSPetr Machata{ 163*9b18942eSPetr Machata local netdev=$1; shift 164*9b18942eSPetr Machata local type=$1; shift 165*9b18942eSPetr Machata 166*9b18942eSPetr Machata [[ $(netdev_hwstats_used $netdev $type) == "false" ]] 167*9b18942eSPetr Machata} 168*9b18942eSPetr Machata 169*9b18942eSPetr Machatanetdev_hwstats_request() 170*9b18942eSPetr Machata{ 171*9b18942eSPetr Machata local netdev=$1; shift 172*9b18942eSPetr Machata local type=$1; shift 173*9b18942eSPetr Machata 174*9b18942eSPetr Machata $IP -j stats show dev "$netdev" group offload subgroup hw_stats_info | 175*9b18942eSPetr Machata jq ".[].info.${type}_stats.request" 176*9b18942eSPetr Machata} 177*9b18942eSPetr Machata 178*9b18942eSPetr Machatanetdev_check_requested() 179*9b18942eSPetr Machata{ 180*9b18942eSPetr Machata local netdev=$1; shift 181*9b18942eSPetr Machata local type=$1; shift 182*9b18942eSPetr Machata 183*9b18942eSPetr Machata [[ $(netdev_hwstats_request $netdev $type) == "true" ]] 184*9b18942eSPetr Machata} 185*9b18942eSPetr Machata 186*9b18942eSPetr Machatanetdev_check_unrequested() 187*9b18942eSPetr Machata{ 188*9b18942eSPetr Machata local netdev=$1; shift 189*9b18942eSPetr Machata local type=$1; shift 190*9b18942eSPetr Machata 191*9b18942eSPetr Machata [[ $(netdev_hwstats_request $netdev $type) == "false" ]] 192*9b18942eSPetr Machata} 193*9b18942eSPetr Machata 194*9b18942eSPetr Machatareporting_test() 195*9b18942eSPetr Machata{ 196*9b18942eSPetr Machata local type=$1; shift 197*9b18942eSPetr Machata local instance=1 198*9b18942eSPetr Machata 199*9b18942eSPetr Machata RET=0 200*9b18942eSPetr Machata 201*9b18942eSPetr Machata [[ -n $(netdev_hwstats_used dummy1 $type) ]] 202*9b18942eSPetr Machata check_err $? "$type stats not reported" 203*9b18942eSPetr Machata 204*9b18942eSPetr Machata netdev_check_unused dummy1 $type 205*9b18942eSPetr Machata check_err $? "$type stats reported as used before either device or netdevsim request" 206*9b18942eSPetr Machata 207*9b18942eSPetr Machata nsim_hwstats_enable $instance dummy1 $type 208*9b18942eSPetr Machata netdev_check_unused dummy1 $type 209*9b18942eSPetr Machata check_err $? "$type stats reported as used before device request" 210*9b18942eSPetr Machata netdev_check_unrequested dummy1 $type 211*9b18942eSPetr Machata check_err $? "$type stats reported as requested before device request" 212*9b18942eSPetr Machata 213*9b18942eSPetr Machata $IP stats set dev dummy1 ${type}_stats on 214*9b18942eSPetr Machata netdev_check_used dummy1 $type 215*9b18942eSPetr Machata check_err $? "$type stats reported as not used after both device and netdevsim request" 216*9b18942eSPetr Machata netdev_check_requested dummy1 $type 217*9b18942eSPetr Machata check_err $? "$type stats reported as not requested after device request" 218*9b18942eSPetr Machata 219*9b18942eSPetr Machata nsim_hwstats_disable $instance dummy1 $type 220*9b18942eSPetr Machata netdev_check_unused dummy1 $type 221*9b18942eSPetr Machata check_err $? "$type stats reported as used after netdevsim request withdrawn" 222*9b18942eSPetr Machata 223*9b18942eSPetr Machata nsim_hwstats_enable $instance dummy1 $type 224*9b18942eSPetr Machata netdev_check_used dummy1 $type 225*9b18942eSPetr Machata check_err $? "$type stats reported as not used after netdevsim request reenabled" 226*9b18942eSPetr Machata 227*9b18942eSPetr Machata $IP stats set dev dummy1 ${type}_stats off 228*9b18942eSPetr Machata netdev_check_unused dummy1 $type 229*9b18942eSPetr Machata check_err $? "$type stats reported as used after device request withdrawn" 230*9b18942eSPetr Machata netdev_check_unrequested dummy1 $type 231*9b18942eSPetr Machata check_err $? "$type stats reported as requested after device request withdrawn" 232*9b18942eSPetr Machata 233*9b18942eSPetr Machata nsim_hwstats_disable $instance dummy1 $type 234*9b18942eSPetr Machata netdev_check_unused dummy1 $type 235*9b18942eSPetr Machata check_err $? "$type stats reported as used after both requests withdrawn" 236*9b18942eSPetr Machata 237*9b18942eSPetr Machata log_test "Reporting of $type stats usage" 238*9b18942eSPetr Machata} 239*9b18942eSPetr Machata 240*9b18942eSPetr Machatal3_reporting_test() 241*9b18942eSPetr Machata{ 242*9b18942eSPetr Machata reporting_test l3 243*9b18942eSPetr Machata} 244*9b18942eSPetr Machata 245*9b18942eSPetr Machata__fail_next_test() 246*9b18942eSPetr Machata{ 247*9b18942eSPetr Machata local instance=$1; shift 248*9b18942eSPetr Machata local type=$1; shift 249*9b18942eSPetr Machata 250*9b18942eSPetr Machata RET=0 251*9b18942eSPetr Machata 252*9b18942eSPetr Machata netdev_check_unused dummy1 $type 253*9b18942eSPetr Machata check_err $? "$type stats reported as used before either device or netdevsim request" 254*9b18942eSPetr Machata 255*9b18942eSPetr Machata nsim_hwstats_enable $instance dummy1 $type 256*9b18942eSPetr Machata nsim_hwstats_fail_next_enable $instance dummy1 $type 257*9b18942eSPetr Machata netdev_check_unused dummy1 $type 258*9b18942eSPetr Machata check_err $? "$type stats reported as used before device request" 259*9b18942eSPetr Machata netdev_check_unrequested dummy1 $type 260*9b18942eSPetr Machata check_err $? "$type stats reported as requested before device request" 261*9b18942eSPetr Machata 262*9b18942eSPetr Machata $IP stats set dev dummy1 ${type}_stats on 2>/dev/null 263*9b18942eSPetr Machata check_fail $? "$type stats request not bounced as it should have been" 264*9b18942eSPetr Machata netdev_check_unused dummy1 $type 265*9b18942eSPetr Machata check_err $? "$type stats reported as used after bounce" 266*9b18942eSPetr Machata netdev_check_unrequested dummy1 $type 267*9b18942eSPetr Machata check_err $? "$type stats reported as requested after bounce" 268*9b18942eSPetr Machata 269*9b18942eSPetr Machata $IP stats set dev dummy1 ${type}_stats on 270*9b18942eSPetr Machata check_err $? "$type stats request failed when it shouldn't have" 271*9b18942eSPetr Machata netdev_check_used dummy1 $type 272*9b18942eSPetr Machata check_err $? "$type stats reported as not used after both device and netdevsim request" 273*9b18942eSPetr Machata netdev_check_requested dummy1 $type 274*9b18942eSPetr Machata check_err $? "$type stats reported as not requested after device request" 275*9b18942eSPetr Machata 276*9b18942eSPetr Machata $IP stats set dev dummy1 ${type}_stats off 277*9b18942eSPetr Machata nsim_hwstats_disable $instance dummy1 $type 278*9b18942eSPetr Machata 279*9b18942eSPetr Machata log_test "Injected failure of $type stats enablement (netdevsim #$instance)" 280*9b18942eSPetr Machata} 281*9b18942eSPetr Machata 282*9b18942eSPetr Machatafail_next_test() 283*9b18942eSPetr Machata{ 284*9b18942eSPetr Machata __fail_next_test 1 "$@" 285*9b18942eSPetr Machata __fail_next_test 2 "$@" 286*9b18942eSPetr Machata __fail_next_test 3 "$@" 287*9b18942eSPetr Machata} 288*9b18942eSPetr Machata 289*9b18942eSPetr Machatal3_fail_next_test() 290*9b18942eSPetr Machata{ 291*9b18942eSPetr Machata fail_next_test l3 292*9b18942eSPetr Machata} 293*9b18942eSPetr Machata 294*9b18942eSPetr Machataget_hwstat() 295*9b18942eSPetr Machata{ 296*9b18942eSPetr Machata local netdev=$1; shift 297*9b18942eSPetr Machata local type=$1; shift 298*9b18942eSPetr Machata local selector=$1; shift 299*9b18942eSPetr Machata 300*9b18942eSPetr Machata $IP -j stats show dev $netdev group offload subgroup ${type}_stats | 301*9b18942eSPetr Machata jq ".[0].stats64.${selector}" 302*9b18942eSPetr Machata} 303*9b18942eSPetr Machata 304*9b18942eSPetr Machatacounter_test() 305*9b18942eSPetr Machata{ 306*9b18942eSPetr Machata local type=$1; shift 307*9b18942eSPetr Machata local instance=1 308*9b18942eSPetr Machata 309*9b18942eSPetr Machata RET=0 310*9b18942eSPetr Machata 311*9b18942eSPetr Machata nsim_hwstats_enable $instance dummy1 $type 312*9b18942eSPetr Machata $IP stats set dev dummy1 ${type}_stats on 313*9b18942eSPetr Machata netdev_check_used dummy1 $type 314*9b18942eSPetr Machata check_err $? "$type stats reported as not used after both device and netdevsim request" 315*9b18942eSPetr Machata 316*9b18942eSPetr Machata # Netdevsim counts 10pps on ingress. We should see maybe a couple 317*9b18942eSPetr Machata # packets, unless things take a reeealy long time. 318*9b18942eSPetr Machata local pkts=$(get_hwstat dummy1 l3 rx.packets) 319*9b18942eSPetr Machata ((pkts < 10)) 320*9b18942eSPetr Machata check_err $? "$type stats show >= 10 packets after first enablement" 321*9b18942eSPetr Machata 322*9b18942eSPetr Machata sleep 2 323*9b18942eSPetr Machata 324*9b18942eSPetr Machata local pkts=$(get_hwstat dummy1 l3 rx.packets) 325*9b18942eSPetr Machata ((pkts >= 20)) 326*9b18942eSPetr Machata check_err $? "$type stats show < 20 packets after 2s passed" 327*9b18942eSPetr Machata 328*9b18942eSPetr Machata $IP stats set dev dummy1 ${type}_stats off 329*9b18942eSPetr Machata 330*9b18942eSPetr Machata sleep 2 331*9b18942eSPetr Machata 332*9b18942eSPetr Machata $IP stats set dev dummy1 ${type}_stats on 333*9b18942eSPetr Machata local pkts=$(get_hwstat dummy1 l3 rx.packets) 334*9b18942eSPetr Machata ((pkts < 10)) 335*9b18942eSPetr Machata check_err $? "$type stats show >= 10 packets after second enablement" 336*9b18942eSPetr Machata 337*9b18942eSPetr Machata $IP stats set dev dummy1 ${type}_stats off 338*9b18942eSPetr Machata nsim_hwstats_fail_next_enable $instance dummy1 $type 339*9b18942eSPetr Machata $IP stats set dev dummy1 ${type}_stats on 2>/dev/null 340*9b18942eSPetr Machata check_fail $? "$type stats request not bounced as it should have been" 341*9b18942eSPetr Machata 342*9b18942eSPetr Machata sleep 2 343*9b18942eSPetr Machata 344*9b18942eSPetr Machata $IP stats set dev dummy1 ${type}_stats on 345*9b18942eSPetr Machata local pkts=$(get_hwstat dummy1 l3 rx.packets) 346*9b18942eSPetr Machata ((pkts < 10)) 347*9b18942eSPetr Machata check_err $? "$type stats show >= 10 packets after post-fail enablement" 348*9b18942eSPetr Machata 349*9b18942eSPetr Machata $IP stats set dev dummy1 ${type}_stats off 350*9b18942eSPetr Machata 351*9b18942eSPetr Machata log_test "Counter values in $type stats" 352*9b18942eSPetr Machata} 353*9b18942eSPetr Machata 354*9b18942eSPetr Machatal3_counter_test() 355*9b18942eSPetr Machata{ 356*9b18942eSPetr Machata counter_test l3 357*9b18942eSPetr Machata} 358*9b18942eSPetr Machata 359*9b18942eSPetr Machatarollback_test() 360*9b18942eSPetr Machata{ 361*9b18942eSPetr Machata local type=$1; shift 362*9b18942eSPetr Machata 363*9b18942eSPetr Machata RET=0 364*9b18942eSPetr Machata 365*9b18942eSPetr Machata nsim_hwstats_enable 1 dummy1 l3 366*9b18942eSPetr Machata nsim_hwstats_enable 2 dummy1 l3 367*9b18942eSPetr Machata nsim_hwstats_enable 3 dummy1 l3 368*9b18942eSPetr Machata 369*9b18942eSPetr Machata # The three netdevsim instances are registered in order of their number 370*9b18942eSPetr Machata # one after another. It is reasonable to expect that whatever 371*9b18942eSPetr Machata # notifications take place hit no. 2 in between hitting nos. 1 and 3, 372*9b18942eSPetr Machata # whatever the actual order. This allows us to test that a fail caused 373*9b18942eSPetr Machata # by no. 2 does not leave the system in a partial state, and rolls 374*9b18942eSPetr Machata # everything back. 375*9b18942eSPetr Machata 376*9b18942eSPetr Machata nsim_hwstats_fail_next_enable 2 dummy1 l3 377*9b18942eSPetr Machata $IP stats set dev dummy1 ${type}_stats on 2>/dev/null 378*9b18942eSPetr Machata check_fail $? "$type stats request not bounced as it should have been" 379*9b18942eSPetr Machata 380*9b18942eSPetr Machata netdev_check_unused dummy1 $type 381*9b18942eSPetr Machata check_err $? "$type stats reported as used after bounce" 382*9b18942eSPetr Machata netdev_check_unrequested dummy1 $type 383*9b18942eSPetr Machata check_err $? "$type stats reported as requested after bounce" 384*9b18942eSPetr Machata 385*9b18942eSPetr Machata sleep 2 386*9b18942eSPetr Machata 387*9b18942eSPetr Machata $IP stats set dev dummy1 ${type}_stats on 388*9b18942eSPetr Machata check_err $? "$type stats request not upheld as it should have been" 389*9b18942eSPetr Machata 390*9b18942eSPetr Machata local pkts=$(get_hwstat dummy1 l3 rx.packets) 391*9b18942eSPetr Machata ((pkts < 10)) 392*9b18942eSPetr Machata check_err $? "$type stats show $pkts packets after post-fail enablement" 393*9b18942eSPetr Machata 394*9b18942eSPetr Machata $IP stats set dev dummy1 ${type}_stats off 395*9b18942eSPetr Machata 396*9b18942eSPetr Machata nsim_hwstats_disable 3 dummy1 l3 397*9b18942eSPetr Machata nsim_hwstats_disable 2 dummy1 l3 398*9b18942eSPetr Machata nsim_hwstats_disable 1 dummy1 l3 399*9b18942eSPetr Machata 400*9b18942eSPetr Machata log_test "Failure in $type stats enablement rolled back" 401*9b18942eSPetr Machata} 402*9b18942eSPetr Machata 403*9b18942eSPetr Machatal3_rollback_test() 404*9b18942eSPetr Machata{ 405*9b18942eSPetr Machata rollback_test l3 406*9b18942eSPetr Machata} 407*9b18942eSPetr Machata 408*9b18942eSPetr Machatal3_monitor_test() 409*9b18942eSPetr Machata{ 410*9b18942eSPetr Machata hw_stats_monitor_test dummy1 l3 \ 411*9b18942eSPetr Machata "nsim_hwstats_enable 1 dummy1 l3" \ 412*9b18942eSPetr Machata "nsim_hwstats_disable 1 dummy1 l3" \ 413*9b18942eSPetr Machata "$IP" 414*9b18942eSPetr Machata} 415*9b18942eSPetr Machata 416*9b18942eSPetr Machatatrap cleanup EXIT 417*9b18942eSPetr Machata 418*9b18942eSPetr Machatasetup_prepare 419*9b18942eSPetr Machatatests_run 420*9b18942eSPetr Machata 421*9b18942eSPetr Machataexit $EXIT_STATUS 422