代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/iSulad 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 7941e0fcd8d7b8edb303a1661233fd9688c46819 Mon Sep 17 00:00:00 2001
From: zhangxiaoyu <[email protected]>
Date: Mon, 20 Feb 2023 15:42:40 +0800
Subject: [PATCH 20/53] add crictl timeout and sync for CI
Signed-off-by: zhangxiaoyu <[email protected]>
---
CI/test_cases/container_cases/bigdata_stream.sh | 7 +++++++
CI/test_cases/container_cases/bigdata_stream_runc.sh | 4 ++++
CI/test_cases/helpers.sh | 5 ++++-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/CI/test_cases/container_cases/bigdata_stream.sh b/CI/test_cases/container_cases/bigdata_stream.sh
index 7e74d700..3bfc2d50 100755
--- a/CI/test_cases/container_cases/bigdata_stream.sh
+++ b/CI/test_cases/container_cases/bigdata_stream.sh
@@ -124,6 +124,7 @@ function test_concurrent_bigdata_stream()
pids[${#pids[@]}]=$!
done
wait ${pids[*]// /|}
+ sync && sync
for index in $(seq 1 5); do
ls -l /home/iocopy_stream_data_500M_$index
@@ -151,6 +152,7 @@ function test_concurrent_bigdata_stream_without_pty()
pids[${#pids[@]}]=$!
done
wait ${pids[*]// /|}
+ sync && sync
for index in $(seq 1 5); do
ls -l /home/iocopy_stream_data_500M_$index
@@ -209,6 +211,7 @@ function test_stream_with_stop_client()
kill -18 $pid
wait $pid
+ sync && sync
ls -l /home/iocopy_stream_data_500M
total_size=$(stat -c"%s" /home/iocopy_stream_data_500M)
@@ -254,6 +257,7 @@ function test_stream_with_stop_attach()
kill -18 $pid
wait $exec_pid
+ sync && sync
ls -l /home/iocopy_stream_data_500M
total_size=$(stat -c"%s" /home/iocopy_stream_data_500M)
@@ -299,6 +303,7 @@ function test_stream_with_stop_lxc_monitor()
kill -18 $pid
wait $exec_pid
+ sync && sync
ls -l /home/iocopy_stream_data_500M
total_size=$(stat -c"%s" /home/iocopy_stream_data_500M)
@@ -347,6 +352,7 @@ function test_stream_with_stop_isulad()
kill -18 $(cat /var/run/isulad.pid)
wait $pid
+ sync && sync
ls -l /home/iocopy_stream_data_500M
total_size=$(stat -c"%s" /home/iocopy_stream_data_500M)
@@ -397,6 +403,7 @@ function test_stream_with_runc()
isula exec -it $RUNCID cat test_500M > /home/iocopy_stream_data_500M
[[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - failed to cat bigdata" && ((ret++))
+ sync && sync
total_size=$(stat -c"%s" /home/iocopy_stream_data_500M)
[[ $total_size -ne 524288000 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - stream iocopy loss data" && ((ret++))
diff --git a/CI/test_cases/container_cases/bigdata_stream_runc.sh b/CI/test_cases/container_cases/bigdata_stream_runc.sh
index 6933bef0..3a384cd8 100755
--- a/CI/test_cases/container_cases/bigdata_stream_runc.sh
+++ b/CI/test_cases/container_cases/bigdata_stream_runc.sh
@@ -117,6 +117,7 @@ function test_cat_bigdata()
pids[${#pids[@]}]=$!
done
wait ${pids[*]// /|}
+ sync && sync
for index in $(seq 1 5); do
ls -l /home/iocopy_stream_data_500M_$index
@@ -144,6 +145,7 @@ function test_cat_bigdata_without_pty()
pids[${#pids[@]}]=$!
done
wait ${pids[*]// /|}
+ sync && sync
for index in $(seq 1 5); do
ls -l /home/iocopy_stream_data_500M_$index
@@ -173,6 +175,7 @@ function test_stream_with_stop_client()
kill -18 $pid
wait $pid
+ sync && sync
ls -l /home/iocopy_stream_data_500M
total_size=$(stat -c"%s" /home/iocopy_stream_data_500M)
@@ -217,6 +220,7 @@ function test_stream_with_stop_isulad()
kill -18 $(cat /var/run/isulad.pid)
wait $pid
+ sync && sync
ls -l /home/iocopy_stream_data_500M
total_size=$(stat -c"%s" /home/iocopy_stream_data_500M)
diff --git a/CI/test_cases/helpers.sh b/CI/test_cases/helpers.sh
index bba4e7e3..5ea4ff94 100755
--- a/CI/test_cases/helpers.sh
+++ b/CI/test_cases/helpers.sh
@@ -69,7 +69,10 @@ function testcontainer() {
function crictl() {
CRICTL=$(which crictl)
- "$CRICTL" -i unix:///var/run/isulad.sock -r unix:///var/run/isulad.sock "$@"
+ # Default timeout is 2s.
+ # In some high IO testcase, isulad handle CRI request time maybe more than 2s.
+ # And the crictl will print error message "context deadline exceeded"
+ "$CRICTL" -i unix:///var/run/isulad.sock -r unix:///var/run/isulad.sock --timeout 5s "$@"
}
function msg_ok()
--
2.25.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。