From cf7effbfaf81d1982d81bbc6ca1c5eafbc07d07b Mon Sep 17 00:00:00 2001
From: zhongtao <zhongtao17@huawei.com>
Date: Tue, 26 Dec 2023 10:24:52 +0800
Subject: [PATCH 70/71] add testcases for exec --workdir

Signed-off-by: zhongtao <zhongtao17@huawei.com>
---
 CI/test_cases/container_cases/runc_exec.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/CI/test_cases/container_cases/runc_exec.sh b/CI/test_cases/container_cases/runc_exec.sh
index f963724e..aa7020ee 100755
--- a/CI/test_cases/container_cases/runc_exec.sh
+++ b/CI/test_cases/container_cases/runc_exec.sh
@@ -53,6 +53,9 @@ function exec_runc_test()
     isula exec -tid $container_name /bin/sh -c 'exit 2'
     [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - exit code should be 0" && ((ret++))
 
+    isula exec -ti --workdir /tmp $container_name pwd | grep "/tmp"
+    [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - workdir is not /workdir failed" && ((ret++))
+
     ls /var/run/isulad/runc/${ID}/exec/
     ls /var/run/isulad/runc/${ID}/exec/ | wc -l | grep 0
     [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - residual dir after success exec" && ((ret++))
-- 
2.25.1

