]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: mlxsw: qos_dscp_bridge: Fix
authorPetr Machata <petrm@mellanox.com>
Fri, 27 Jul 2018 22:48:13 +0000 (00:48 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 29 Jul 2018 20:00:01 +0000 (13:00 -0700)
commitffa427da52e69fb8d972ae03e9029cd83c8080bc
tree8edd1138f473db6cb15f23de723bbaaea75ccb41
parent274a274704ac7fc0ea8cb1039d88d47ee5ce1415
selftests: mlxsw: qos_dscp_bridge: Fix

There are two problems in this test case:

- When indexing in bash associative array, the subscript is interpreted as
  string, not as a variable name to be expanded.

- The keys stored to t0s and t1s are not DSCP values, but priority +
  base (i.e. the logical DSCP value, not the full bitfield value).

In combination these two bugs conspire to make the test just work,
except it doesn't really test anything and always passes.

Fix the above two problems in obvious manner.

Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/drivers/net/mlxsw/qos_dscp_bridge.sh