Skip to content

Conversation

@kolyshkin
Copy link
Contributor

@kolyshkin kolyshkin commented Aug 19, 2020

1. tests/int/delete.bats: fix shellcheck warnings.

Those are caused by merging #2506 after #2549 without a rebase.
Fixes: #2559

The failures were:

In tests/integration/delete.bats line 64:
  for i in $(seq 1); do
  ^-^ SC2034: i appears unused. Verify use (or export if used externally).


In tests/integration/delete.bats line 65:
    runc run -d --console-socket $CONSOLE_SOCKET test_busybox
                                 ^-------------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    runc run -d --console-socket "$CONSOLE_SOCKET" test_busybox


In tests/integration/delete.bats line 92:
      eval path=\$${name}/foo
                  ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
      eval path=\$"${name}"/foo


In tests/integration/delete.bats line 93:
      echo $path
           ^---^ SC2154: path is referenced but not assigned.
           ^---^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
      echo "$path"


In tests/integration/delete.bats line 94:
      [ -d ${path} ] || fail "test failed to create memory sub-cgroup"
           ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
      [ -d "${path}" ] || fail "test failed to create memory sub-cgroup"


In tests/integration/tty.bats line 73:
	runc run -d --console-socket $CONSOLE_SOCKET test_busybox
                                     ^-------------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
	runc run -d --console-socket "$CONSOLE_SOCKET" test_busybox

For more information:
  https://www.shellcheck.net/wiki/SC2034 -- i appears unused. Verify use (or ...
  https://www.shellcheck.net/wiki/SC2154 -- path is referenced but not assign...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

2. tests/int: alt fix for shellcheck SC2034

Instead of ignoring it, use a throwaway variable _
(yes, just like in Go).

Instead of ignoring it, use a throwaway variable _
(yes, just like in Go).

Signed-off-by: Kir Kolyshkin <[email protected]>
@kolyshkin kolyshkin force-pushed the shellcheck-followup branch from af95b8b to 0d09d62 Compare August 19, 2020 23:58
@kolyshkin
Copy link
Contributor Author

@AkihiroSuda @mrunalp PTAL

Commit 335f080 added a test case doing

```bash
for i in $(seq 1); do
   ...
done
```

and it does not make any sense to have it since we're only performing
a single iteration.

Remove the code.

I have not touched the indentation, for the sake of cleaner review,
also because already have different intentation in different tests;
this should be addressed separately.

Signed-off-by: Kir Kolyshkin <[email protected]>
@kolyshkin kolyshkin force-pushed the shellcheck-followup branch from 0d09d62 to b8efb02 Compare August 20, 2020 01:00
@AkihiroSuda AkihiroSuda merged commit e949339 into opencontainers:master Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: shellcheck is failing on master

4 participants