public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH 0/2] shellcheck: post-merge fixups
@ 2024-05-03  5:25 Nicholas Piggin
  2024-05-03  5:25 ` [kvm-unit-tests PATCH 1/2] shellcheck: Fix shellcheck target with out of tree build Nicholas Piggin
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Nicholas Piggin @ 2024-05-03  5:25 UTC (permalink / raw)
  To: Thomas Huth, Andrew Jones; +Cc: Nicholas Piggin, kvm

Thomas noticed a couple of issues after merge (did you report at
least one before merge and I didn't notice? -- apologies if yes).

Thanks,
Nick

Nicholas Piggin (2):
  shellcheck: Fix shellcheck target with out of tree build
  shellcheck: Suppress SC2209 quoting warning in config.mak

 Makefile  | 2 +-
 configure | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [kvm-unit-tests PATCH 1/2] shellcheck: Fix shellcheck target with out of tree build
  2024-05-03  5:25 [kvm-unit-tests PATCH 0/2] shellcheck: post-merge fixups Nicholas Piggin
@ 2024-05-03  5:25 ` Nicholas Piggin
  2024-05-03  6:31   ` Thomas Huth
  2024-05-03  5:25 ` [kvm-unit-tests PATCH 2/2] shellcheck: Suppress SC2209 quoting warning in config.mak Nicholas Piggin
  2024-05-03  6:35 ` [kvm-unit-tests PATCH 0/2] shellcheck: post-merge fixups Thomas Huth
  2 siblings, 1 reply; 6+ messages in thread
From: Nicholas Piggin @ 2024-05-03  5:25 UTC (permalink / raw)
  To: Thomas Huth, Andrew Jones; +Cc: Nicholas Piggin, kvm

Prepend source directory to script names, and include source directory
in shellcheck search path.

Fixes: ddfdcc3929aef ("Add initial shellcheck checking")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 6240d8dfa..b0f7ad08b 100644
--- a/Makefile
+++ b/Makefile
@@ -143,7 +143,7 @@ cscope:
 
 .PHONY: shellcheck
 shellcheck:
-	shellcheck -a run_tests.sh */run */efi/run scripts/mkstandalone.sh
+	shellcheck -P $(SRCDIR) -a $(SRCDIR)/run_tests.sh $(SRCDIR)/*/run $(SRCDIR)/*/efi/run $(SRCDIR)/scripts/mkstandalone.sh
 
 .PHONY: tags
 tags:
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [kvm-unit-tests PATCH 2/2] shellcheck: Suppress SC2209 quoting warning in config.mak
  2024-05-03  5:25 [kvm-unit-tests PATCH 0/2] shellcheck: post-merge fixups Nicholas Piggin
  2024-05-03  5:25 ` [kvm-unit-tests PATCH 1/2] shellcheck: Fix shellcheck target with out of tree build Nicholas Piggin
@ 2024-05-03  5:25 ` Nicholas Piggin
  2024-05-03  6:31   ` Thomas Huth
  2024-05-03  6:35 ` [kvm-unit-tests PATCH 0/2] shellcheck: post-merge fixups Thomas Huth
  2 siblings, 1 reply; 6+ messages in thread
From: Nicholas Piggin @ 2024-05-03  5:25 UTC (permalink / raw)
  To: Thomas Huth, Andrew Jones; +Cc: Nicholas Piggin, kvm

It's not necessary to quote strings in simple command variables like
this where the pattern makes the intention quite clear.

config.mak is also included as Makefile, and in that case the quotes
do slightly change behaviour (the quotes are used when invoking the
command), and is not the typical Makefile style.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 configure | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configure b/configure
index a8520a35f..0e0a28825 100755
--- a/configure
+++ b/configure
@@ -420,6 +420,8 @@ ln -sf "$asm" lib/asm
 cat <<EOF > config.mak
 # Shellcheck does not see these are used
 # shellcheck disable=SC2034
+# Shellcheck can give pointless quoting warnings for some commands
+# shellcheck disable=SC2209
 SRCDIR=$srcdir
 PREFIX=$prefix
 HOST=$host
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [kvm-unit-tests PATCH 2/2] shellcheck: Suppress SC2209 quoting warning in config.mak
  2024-05-03  5:25 ` [kvm-unit-tests PATCH 2/2] shellcheck: Suppress SC2209 quoting warning in config.mak Nicholas Piggin
@ 2024-05-03  6:31   ` Thomas Huth
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2024-05-03  6:31 UTC (permalink / raw)
  To: Nicholas Piggin, Andrew Jones; +Cc: kvm

On 03/05/2024 07.25, Nicholas Piggin wrote:
> It's not necessary to quote strings in simple command variables like
> this where the pattern makes the intention quite clear.
> 
> config.mak is also included as Makefile, and in that case the quotes
> do slightly change behaviour (the quotes are used when invoking the
> command), and is not the typical Makefile style.
> 
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
>   configure | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/configure b/configure
> index a8520a35f..0e0a28825 100755
> --- a/configure
> +++ b/configure
> @@ -420,6 +420,8 @@ ln -sf "$asm" lib/asm
>   cat <<EOF > config.mak
>   # Shellcheck does not see these are used
>   # shellcheck disable=SC2034
> +# Shellcheck can give pointless quoting warnings for some commands
> +# shellcheck disable=SC2209
>   SRCDIR=$srcdir
>   PREFIX=$prefix
>   HOST=$host

Tested-by: Thomas Huth <thuth@redhat.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [kvm-unit-tests PATCH 1/2] shellcheck: Fix shellcheck target with out of tree build
  2024-05-03  5:25 ` [kvm-unit-tests PATCH 1/2] shellcheck: Fix shellcheck target with out of tree build Nicholas Piggin
@ 2024-05-03  6:31   ` Thomas Huth
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2024-05-03  6:31 UTC (permalink / raw)
  To: Nicholas Piggin, Andrew Jones; +Cc: kvm

On 03/05/2024 07.25, Nicholas Piggin wrote:
> Prepend source directory to script names, and include source directory
> in shellcheck search path.
> 
> Fixes: ddfdcc3929aef ("Add initial shellcheck checking")
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
>   Makefile | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index 6240d8dfa..b0f7ad08b 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -143,7 +143,7 @@ cscope:
>   
>   .PHONY: shellcheck
>   shellcheck:
> -	shellcheck -a run_tests.sh */run */efi/run scripts/mkstandalone.sh
> +	shellcheck -P $(SRCDIR) -a $(SRCDIR)/run_tests.sh $(SRCDIR)/*/run $(SRCDIR)/*/efi/run $(SRCDIR)/scripts/mkstandalone.sh
>   
>   .PHONY: tags
>   tags:

Tested-by: Thomas Huth <thuth@redhat.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [kvm-unit-tests PATCH 0/2] shellcheck: post-merge fixups
  2024-05-03  5:25 [kvm-unit-tests PATCH 0/2] shellcheck: post-merge fixups Nicholas Piggin
  2024-05-03  5:25 ` [kvm-unit-tests PATCH 1/2] shellcheck: Fix shellcheck target with out of tree build Nicholas Piggin
  2024-05-03  5:25 ` [kvm-unit-tests PATCH 2/2] shellcheck: Suppress SC2209 quoting warning in config.mak Nicholas Piggin
@ 2024-05-03  6:35 ` Thomas Huth
  2 siblings, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2024-05-03  6:35 UTC (permalink / raw)
  To: Nicholas Piggin, Andrew Jones; +Cc: kvm

On 03/05/2024 07.25, Nicholas Piggin wrote:
> Thomas noticed a couple of issues after merge (did you report at
> least one before merge and I didn't notice? -- apologies if yes).

No worries, I just started testing at the same time as Drew pushed the 
patches to the master branch.

> Thanks,
> Nick
> 
> Nicholas Piggin (2):
>    shellcheck: Fix shellcheck target with out of tree build
>    shellcheck: Suppress SC2209 quoting warning in config.mak
> 
>   Makefile  | 2 +-
>   configure | 2 ++
>   2 files changed, 3 insertions(+), 1 deletion(-)

Thanks! Fixes applied.

  Thomas



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-05-03  6:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-03  5:25 [kvm-unit-tests PATCH 0/2] shellcheck: post-merge fixups Nicholas Piggin
2024-05-03  5:25 ` [kvm-unit-tests PATCH 1/2] shellcheck: Fix shellcheck target with out of tree build Nicholas Piggin
2024-05-03  6:31   ` Thomas Huth
2024-05-03  5:25 ` [kvm-unit-tests PATCH 2/2] shellcheck: Suppress SC2209 quoting warning in config.mak Nicholas Piggin
2024-05-03  6:31   ` Thomas Huth
2024-05-03  6:35 ` [kvm-unit-tests PATCH 0/2] shellcheck: post-merge fixups Thomas Huth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox