selftests/mm: switch to bash from sh
authorMuhammad Usama Anjum <usama.anjum@collabora.com>
Tue, 16 Jan 2024 09:04:54 +0000 (14:04 +0500)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 26 Jan 2024 07:52:20 +0000 (23:52 -0800)
commitbc29036e1da1cf66e5f8312649aeec2d51ea3d86
tree40e483bfa7add8d626b5903ade59998a3ad3b0c2
parent0d7e68c0271853c30655b05934d66cec81dc6afc
selftests/mm: switch to bash from sh

Running charge_reserved_hugetlb.sh generates errors if sh is set to
dash:

./charge_reserved_hugetlb.sh: 9: [[: not found
./charge_reserved_hugetlb.sh: 19: [[: not found
./charge_reserved_hugetlb.sh: 27: [[: not found
./charge_reserved_hugetlb.sh: 37: [[: not found
./charge_reserved_hugetlb.sh: 45: Syntax error: "(" unexpected

Switch to using /bin/bash instead of /bin/sh.  Make the switch for
write_hugetlb_memory.sh as well which is called from
charge_reserved_hugetlb.sh.

Link: https://lkml.kernel.org/r/20240116090455.3407378-1-usama.anjum@collabora.com
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Cc: Muhammad Usama Anjum <usama.anjum@collabora.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: David Laight <David.Laight@ACULAB.COM>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/mm/charge_reserved_hugetlb.sh
tools/testing/selftests/mm/write_hugetlb_memory.sh