Skip to content

Commit 35d5829

Browse files
pmachatadavem330
authored andcommitted
selftests: mlxsw: resource_scale: Pass target count to cleanup
The scale tests are verifying behavior of mlxsw when number of instances of some resource reaches the ASIC capacity. The number of instances is referred to as "target" number. No scale tests so far needed to know this target number to clean up. E.g. the tc_flower simply removes the clsact qdisc that all the tested filters are hooked onto, and that takes care of collecting all the filters. However, for the RIF counter test, which is being added in a future patch, VLAN netdevices are created. These are created as part of the test, but of course the cleanup needs to undo them again. For that it needs to know how many there were. To support this usage, pass the target number to the cleanup callback. Signed-off-by: Petr Machata <[email protected]> Reviewed-by: Amit Cohen <[email protected]> Signed-off-by: Ido Schimmel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 8cad339 commit 35d5829

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tools/testing/selftests/drivers/net/mlxsw/spectrum-2/resource_scale.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ for current_test in ${TESTS:-$ALL_TESTS}; do
6060
else
6161
log_test "'$current_test' overflow $target"
6262
fi
63-
${current_test}_cleanup
63+
${current_test}_cleanup $target
6464
devlink_reload
6565
RET_FIN=$(( RET_FIN || RET ))
6666
done

tools/testing/selftests/drivers/net/mlxsw/spectrum/resource_scale.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ for current_test in ${TESTS:-$ALL_TESTS}; do
6565
else
6666
log_test "'$current_test' [$profile] overflow $target"
6767
fi
68-
${current_test}_cleanup
68+
${current_test}_cleanup $target
6969
RET_FIN=$(( RET_FIN || RET ))
7070
done
7171
done

0 commit comments

Comments
 (0)