From 6184c5f5c234813416936651695b16f055b99e1b Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Thu, 9 Nov 2023 23:16:22 -0500 Subject: [PATCH] tests/utils/utils.sh: bt_grep_ok(): use `local -r` when possible Signed-off-by: Philippe Proulx Change-Id: Ifbe0ccbd2c42d929331eb87e5f7743083d9c1a1a --- tests/utils/utils.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/utils/utils.sh b/tests/utils/utils.sh index 9291db88..393cf163 100644 --- a/tests/utils/utils.sh +++ b/tests/utils/utils.sh @@ -359,13 +359,13 @@ bt_grep() { # ok() with the test name `$3` on the result of bt_grep() matching the # pattern `$1` within the file `$2`. bt_grep_ok() { - local pattern=$1 - local file=$2 - local test_name=$3 + local -r pattern=$1 + local -r file=$2 + local -r test_name=$3 bt_grep --silent "$pattern" "$file" - local ret=$? + local -r ret=$? if ! ok $ret "$test_name"; then { -- 2.34.1