From 5d9cbc6d3769ceaf5800777e0004f591084c735a Mon Sep 17 00:00:00 2001 From: wangyu Date: Wed, 10 May 2023 09:37:50 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=84=9A=E6=9C=ACoe=5Fte?= =?UTF-8?q?st=5Fconmon=5F01.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- testcases/cli-test/conmon/oe_test_conmon_01.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcases/cli-test/conmon/oe_test_conmon_01.sh b/testcases/cli-test/conmon/oe_test_conmon_01.sh index dd8b06cba..620f5ed9e 100755 --- a/testcases/cli-test/conmon/oe_test_conmon_01.sh +++ b/testcases/cli-test/conmon/oe_test_conmon_01.sh @@ -29,7 +29,7 @@ function pre_test() { function run_test() { LOG_INFO "Start to run test." - conmon --help |grep "conmon \[OPTION?\]" + conmon --help |grep "conmon \[OPTION.\?\]" CHECK_RESULT $? 0 0 "Failed to check the --help" conmon --version|grep "conmon version" CHECK_RESULT $? 0 0 "Failed to check the --version" -- Gitee From 653e649e2e54a6806015539917dd9b64aea189c2 Mon Sep 17 00:00:00 2001 From: wangyu Date: Mon, 22 May 2023 10:15:41 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=84=9A=E6=9C=ACoe=5Fte?= =?UTF-8?q?st=5Fconmon=5F01.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cli-test/conmon/oe_test_conmon_01.sh | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/testcases/cli-test/conmon/oe_test_conmon_01.sh b/testcases/cli-test/conmon/oe_test_conmon_01.sh index 620f5ed9e..bf66f7beb 100755 --- a/testcases/cli-test/conmon/oe_test_conmon_01.sh +++ b/testcases/cli-test/conmon/oe_test_conmon_01.sh @@ -16,7 +16,7 @@ # @Desc : Test conmon command # ################################## source "$OET_PATH/libs/locallibs/common_lib.sh" -source "./conmon_podman.sh" +source "$OET_PATH/testcases/cli-test/conmon/conmon_podman.sh" function pre_test() { LOG_INFO "Start to prepare the test environment." @@ -33,19 +33,19 @@ function run_test() { CHECK_RESULT $? 0 0 "Failed to check the --help" conmon --version|grep "conmon version" CHECK_RESULT $? 0 0 "Failed to check the --version" - conmon -c $podman_build_id -u $podman_build_id --runtime /usr/bin/runc -l /var/lib/containers/storage/overlay-containers/$podman_build_id/userdata/ctr.log + conmon -c "$podman_build_id" -u "$podman_build_id" --runtime /usr/bin/runc -l /var/lib/containers/storage/overlay-containers/"$podman_build_id"/userdata/ctr.log CHECK_RESULT $? 0 0 "Failed to check the -c" - conmon -c $podman_build_id -u $podman_build_id -n busybox2 --runtime /usr/bin/runc -l /var/lib/containers/storage/overlay-containers/$podman_build_id/userdata/ctr.log + conmon -c "$podman_build_id" -u "$podman_build_id" -n busybox2 --runtime /usr/bin/runc -l /var/lib/containers/storage/overlay-containers/"$podman_build_id"/userdata/ctr.log CHECK_RESULT $? 0 0 "Failed to check the -n" - conmon -c $podman_build_id -u $podman_build_id -n busybox2 --runtime /usr/bin/runc -l /var/lib/containers/storage/overlay-containers/$podman_build_id/userdata/ctr.log -i + conmon -c "$podman_build_id" -u "$podman_build_id" -n busybox2 --runtime /usr/bin/runc -l /var/lib/containers/storage/overlay-containers/"$podman_build_id"/userdata/ctr.log -i CHECK_RESULT $? 0 0 "Failed to check the -i" - conmon -c $podman_build_id -u $podman_build_id --runtime /usr/bin/runc -l /var/lib/containers/storage/overlay-containers/$podman_build_id/userdata/ctr.log + conmon -c "$podman_build_id" -u "$podman_build_id" --runtime /usr/bin/runc -l /var/lib/containers/storage/overlay-containers/"$podman_build_id"/userdata/ctr.log CHECK_RESULT $? 0 0 "Failed to check the -u" - conmon -c $podman_build_id -u $podman_build_id --runtime /usr/bin/runc -l /var/lib/containers/storage/overlay-containers/$podman_build_id/userdata/ctr.log + conmon -c "$podman_build_id" -u "$podman_build_id" --runtime /usr/bin/runc -l /var/lib/containers/storage/overlay-containers/"$podman_build_id"/userdata/ctr.log CHECK_RESULT $? 0 0 "Failed to check the --runtime" - conmon -c $podman_build_id -u $podman_build_id --runtime /usr/bin/runc -l /var/lib/containers/storage/overlay-containers/$podman_build_id/userdata/ctr.log + conmon -c "$podman_build_id" -u "$podman_build_id" --runtime /usr/bin/runc -l /var/lib/containers/storage/overlay-containers/"$podman_build_id"/userdata/ctr.log CHECK_RESULT $? 0 0 "Failed to check the -l" - conmon -c $podman_build_id -u $podman_build_id --runtime /usr/bin/runc -l /var/lib/containers/storage/overlay-containers/$podman_build_id/userdata/ctr.log -p /var/run/containers/storage/overlay-containers/$podman_build_id/userdata/pidfile + conmon -c "$podman_build_id" -u "$podman_build_id" --runtime /usr/bin/runc -l /var/lib/containers/storage/overlay-containers/"$podman_build_id"/userdata/ctr.log -p /var/run/containers/storage/overlay-containers/"$podman_build_id"/userdata/pidfile CHECK_RESULT $? 0 0 "Failed to check the -p" LOG_INFO "End to run test." } @@ -53,10 +53,10 @@ function run_test() { function post_test() { LOG_INFO "Start to restore the test environment." podman stop busybox2 - podman ps -a|grep busybox:latest|awk {'print $1'}|xargs podman rm + podman ps -a|grep busybox:latest|awk "{'print $1'}"|xargs podman rm podman rmi docker.io/library/busybox clear_env - DNF_REMOVE + DNF_REMOVE "$@" rm -rf attach ctl uuid_file LOG_INFO "Finish restoring the test environment." } -- Gitee