From cb1341c451c2b6a8e89d8b128da8dc393d98d3d8 Mon Sep 17 00:00:00 2001 From: Jingkun Zheng Date: Thu, 18 Dec 2025 20:04:45 +0800 Subject: [PATCH] cli-test: ltrace: do not invoke ls with bash Signed-off-by: Jingkun Zheng --- testcases/cli-test/ltrace/oe_test_ltrace_04.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/testcases/cli-test/ltrace/oe_test_ltrace_04.sh b/testcases/cli-test/ltrace/oe_test_ltrace_04.sh index b85e6cb51..2b46e4c08 100644 --- a/testcases/cli-test/ltrace/oe_test_ltrace_04.sh +++ b/testcases/cli-test/ltrace/oe_test_ltrace_04.sh @@ -1,3 +1,4 @@ +#!/bin/bash # Copyright (c) 2022. Huawei Technologies Co.,Ltd.ALL rights reserved. # This program is licensed under Mulan PSL v2. # You can use it according to the terms and conditions of the Mulan PSL v2. @@ -14,7 +15,7 @@ # @Desc : the test of ltrace package #################################### -source ${OET_PATH}/libs/locallibs/common_lib.sh +source "${OET_PATH}"/libs/locallibs/common_lib.sh function pre_test() { LOG_INFO "Start to prepare the test environment." @@ -40,15 +41,15 @@ function run_test() { CHECK_RESULT $? 0 0 "Failed to run command: ltrace -w" ltrace --where=1 ./tst 2>&1 | grep "> tst" CHECK_RESULT $? 0 0 "Failed to run command: ltrace --where" - ltrace -s 1 bash ls ./common 2>&1 | grep -m 1 "\"t\"" + ltrace -s 1 ls ./common 2>&1 | grep -m 1 "\"t\"" CHECK_RESULT $? 0 0 "Failed to run command: ltrace -s" LOG_INFO "End to run test." } function post_test() { LOG_INFO "Start to restore the test environment." - DNF_REMOVE - rm -rf *.log tst libtst.so + DNF_REMOVE "$@" + rm -rf ./*.log tst libtst.so LOG_INFO "End to restore the test environment." } -- Gitee