Skip to content

WIP: Fix shellcheck issues #4491

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 981 commits into
base: devel
Choose a base branch
from

Conversation

ThalesBarretto
Copy link
Contributor

@ThalesBarretto ThalesBarretto commented Mar 6, 2025

This series is bound to address shellcheck reported issues.

It should minimize the linter logs whitout changing script behaviour.
Most of the linter reports are trivial, but some errors may also linger in the scripts.

Most important of all is that we change the shell to BASH.
This by itself prevents lots of mistakes where /bin/sh is not a link to /bin/bash.
Also, the use of /usr/bin/env BASH is set as the standard shebang line.

@gluster-ant
Copy link
Collaborator

Can one of the admins verify this patch?

1 similar comment
@gluster-ant
Copy link
Collaborator

Can one of the admins verify this patch?

@ThalesBarretto ThalesBarretto force-pushed the thales_linter_shellcheck branch from 71de237 to 8594554 Compare March 7, 2025 10:09
…-split-brain-detection.t

	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tests/bugs/replicate/bug-1717819-metadata-split-brain-detection.t | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
…match-error-handling.t

	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tests/bugs/replicate/bug-1722507-type-mismatch-error-handling.t | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
…trs.t

	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tests/bugs/replicate/bug-1728770-pass-xattrs.t | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
…al-restore-time.t

	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tests/bugs/replicate/bug-1734370-entry-heal-restore-time.t | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
…eout.t

	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tests/bugs/replicate/bug-1744548-heal-timeout.t | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
…al-not-happening.t

	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tests/bugs/replicate/bug-1749322-entry-heal-not-happening.t | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
…3-sbrain-cli.t

	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tests/bugs/replicate/bug-1756938-replica-3-sbrain-cli.t | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
…-heal-restore-time.t

	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tests/bugs/replicate/bug-1761531-metadata-heal-restore-time.t | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
…al.t

	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tests/bugs/replicate/bug-1801624-entry-heal.t | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tests/bugs/replicate/bug-765564.t | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tests/bugs/replicate/bug-767585-gfid.t | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tests/bugs/replicate/bug-802417.t | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tests/bugs/replicate/bug-821056.t | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tests/bugs/replicate/bug-830665.t | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tests/bugs/replicate/bug-859581.t | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tests/bugs/replicate/bug-865825.t | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tests/bugs/replicate/bug-880898.t | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tests/bugs/replicate/bug-884328.t | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tests/bugs/replicate/bug-886998.t | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tests/bugs/replicate/bug-888174.t | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tests/bugs/replicate/bug-913051.t | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tests/bugs/replicate/bug-916226.t | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tests/bugs/replicate/bug-918437-sh-mtime.t | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tests/bugs/replicate/bug-921231.t | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tests/bugs/replicate/bug-957877.t | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tests/bugs/replicate/bug-976800.t | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tests/bugs/replicate/bug-977797.t | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
…inux-label-brick.sh

	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  extras/hook-scripts/add-brick/post/S10selinux-label-brick.sh | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
…-start.sh

	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  extras/hook-scripts/start/post/S31ganesha-start.sh | 32 +++++++++++-----------
#  1 file changed, 16 insertions(+), 16 deletions(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  geo-replication/unittests.sh | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  run-tests.sh | 144 +++++++++++++++++++++++++++++------------------------------
#  1 file changed, 72 insertions(+), 72 deletions(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  submit-for-review.sh | 30 +++++++++++++++---------------
#  1 file changed, 15 insertions(+), 15 deletions(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  extras/clang-checker.sh | 142 ++++++++++++++++++++++++------------------------
#  1 file changed, 71 insertions(+), 71 deletions(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  geo-replication/unittests.sh | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  rfc.sh | 42 +++++++++++++++++++++---------------------
#  1 file changed, 21 insertions(+), 21 deletions(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  extras/ganesha/scripts/ganesha-ha.sh | 352 +++++++++++++++++------------------
#  1 file changed, 176 insertions(+), 176 deletions(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  xlators/mount/fuse/utils/mount.glusterfs.in | 72 ++++++++++++++---------------
#  1 file changed, 36 insertions(+), 36 deletions(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  extras/clang-checker.sh | 14 +++++++-------
#  1 file changed, 7 insertions(+), 7 deletions(-)
…ate-subdir-mounts.sh

	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  .../add-brick/post/S13create-subdir-mounts.sh          | 18 +++++++++---------
#  1 file changed, 9 insertions(+), 9 deletions(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  extras/quota/contri-add.sh | 26 +++++++++++++-------------
#  1 file changed, 13 insertions(+), 13 deletions(-)
…terfs.sh

	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  extras/who-wrote-glusterfs/who-wrote-glusterfs.sh | 10 +++++-----
#  1 file changed, 5 insertions(+), 5 deletions(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tools/tests/prove_run | 8 ++++----
#  1 file changed, 4 insertions(+), 4 deletions(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  extras/benchmarking/launch-script.sh | 6 +++---
#  1 file changed, 3 insertions(+), 3 deletions(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  extras/benchmarking/local-script.sh | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  extras/quota/contri-add.sh | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  extras/ganesha/scripts/ganesha-ha.sh | 3 ++-
#  1 file changed, 2 insertions(+), 1 deletion(-)
…p.sh

	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  extras/devel-tools/devel-vagrant/bootstrap.sh | 1 +
#  1 file changed, 1 insertion(+)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  extras/devel-tools/print-backtrace.sh | 48 +++++++++++++++++------------------
#  1 file changed, 24 insertions(+), 24 deletions(-)
…st-build.sh

	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  extras/distributed-testing/distributed-test-build.sh | 8 ++++----
#  1 file changed, 4 insertions(+), 4 deletions(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  extras/ganesha/scripts/ganesha-ha.sh | 6 +++---
#  1 file changed, 3 insertions(+), 3 deletions(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tests/basic/ec/gfapi-ec-open-truncate.sh | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tests/basic/symbol-check.sh | 4 ++--
#  1 file changed, 2 insertions(+), 2 deletions(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tests/bugs/fuse/setup.sh | 8 ++++----
#  1 file changed, 4 insertions(+), 4 deletions(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  tests/utils/testn.sh | 4 ++--
#  1 file changed, 2 insertions(+), 2 deletions(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  extras/devel-tools/print-backtrace.sh | 4 ++--
#  1 file changed, 2 insertions(+), 2 deletions(-)
	This commit changes the shell to #!/usr/bin/env bash.

        This series aim to reduce the shellcheck logs.

Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
#  extras/devel-tools/strace-brick.sh | 21 ++++++++++++---------
#  1 file changed, 12 insertions(+), 9 deletions(-)
@ThalesBarretto ThalesBarretto force-pushed the thales_linter_shellcheck branch from 3e3a59e to 4c212f3 Compare June 10, 2025 17:31
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.

2 participants