[PATCH] selftests: zram: use bash as script uses bash syntax

Kathara Sasikumar posted 1 patch 2 months ago
tools/testing/selftests/zram/zram_lib.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] selftests: zram: use bash as script uses bash syntax
Posted by Kathara Sasikumar 2 months ago
The zram_lib.sh script uses bash-specific syntax,
so the shebang must be /bin/bash instead of /bin/sh.

Signed-off-by: Kathara Sasikumar <katharasasikumar007@gmail.com>
---
 tools/testing/selftests/zram/zram_lib.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/zram/zram_lib.sh b/tools/testing/selftests/zram/zram_lib.sh
index 21ec1966de76..16b108db450b 100755
--- a/tools/testing/selftests/zram/zram_lib.sh
+++ b/tools/testing/selftests/zram/zram_lib.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # SPDX-License-Identifier: GPL-2.0-or-later
 # Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved.
 #
-- 
2.51.0
Re: [PATCH] selftests: zram: use bash as script uses bash syntax
Posted by Shuah Khan 1 month, 1 week ago
On 12/5/25 16:32, Kathara Sasikumar wrote:
> The zram_lib.sh script uses bash-specific syntax,
> so the shebang must be /bin/bash instead of /bin/sh.

What errors are you seeing without this change?

> 
> Signed-off-by: Kathara Sasikumar <katharasasikumar007@gmail.com>
> ---
>   tools/testing/selftests/zram/zram_lib.sh | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/zram/zram_lib.sh b/tools/testing/selftests/zram/zram_lib.sh
> index 21ec1966de76..16b108db450b 100755
> --- a/tools/testing/selftests/zram/zram_lib.sh
> +++ b/tools/testing/selftests/zram/zram_lib.sh
> @@ -1,4 +1,4 @@
> -#!/bin/sh
> +#!/bin/bash
>   # SPDX-License-Identifier: GPL-2.0-or-later
>   # Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved.
>   #

thanks,
-- Shuah