• Matthieu Baerts's avatar
    selftests: mptcp: userspace_pm: fix shellcheck warnings · 8320b138
    Matthieu Baerts authored
    shellcheck recently helped to find an issue where a wrong variable name
    was used. It is then good to fix the other harmless issues in order to
    spot "real" ones later.
    
    Here, three categories of warnings are ignored:
    
    - SC2317: Command appears to be unreachable. The cleanup() function is
      invoke indirectly via the EXIT trap.
    
    - SC2034: Variable appears unused. The check_expected_one() function
      takes the name of the variable in argument but it ends up reading the
      content: indirect usage.
    
    - SC2086: Double quote to prevent globbing and word splitting. This is
      recommended but the current usage is correct and there is no need to
      do all these modifications to be compliant with this rule.
    
    One error has been fixed with SC2181: Check exit code directly with e.g.
    'if ! mycmd;', not indirectly with $?.
    Acked-by: default avatarPaolo Abeni <pabeni@redhat.com>
    Signed-off-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    8320b138
userspace_pm.sh 30.4 KB