• Ido Schimmel's avatar
    selftests: netdevsim: Always initialize 'RET' variable · 4d59e59c
    Ido Schimmel authored
    The variable is used by log_test() to check if the test case completely
    successfully or not. In case it is not initialized at the start of a
    test case, it is possible for the test case to fail despite not
    encountering any errors.
    
    Example:
    
    ```
    ...
    TEST: Trap group statistics                                         [ OK ]
    TEST: Trap policer                                                  [FAIL]
    	Policer drop counter was not incremented
    TEST: Trap policer binding                                          [FAIL]
    	Policer drop counter was not incremented
    ```
    
    Failure of trap_policer_test() caused trap_policer_bind_test() to fail
    as well.
    
    Fix by adding missing initialization of the variable.
    
    Fixes: 5fbff58e ("selftests: netdevsim: Add test cases for devlink-trap policers")
    Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
    Reviewed-by: default avatarJiri Pirko <jiri@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    4d59e59c
devlink_trap.sh 11.9 KB