summaryrefslogtreecommitdiff
path: root/0010-fix-cpu-rt-CI.patch
blob: 84d7604a57980453e158e1d3eb8aa562339ef8c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
From 21dc648ef93cd0fb858a408bc843d25a5e20e320 Mon Sep 17 00:00:00 2001
From: songbuhuang <544824346@qq.com>
Date: Wed, 15 Feb 2023 16:09:38 +0800
Subject: [PATCH 10/53] fix cpu-rt CI

Signed-off-by: songbuhuang <544824346@qq.com>
---
 CI/test_cases/container_cases/cpu_rt.sh | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/CI/test_cases/container_cases/cpu_rt.sh b/CI/test_cases/container_cases/cpu_rt.sh
index 42006bc8..39c0b427 100755
--- a/CI/test_cases/container_cases/cpu_rt.sh
+++ b/CI/test_cases/container_cases/cpu_rt.sh
@@ -50,14 +50,14 @@ function test_isula_update_normal()
     isulad --cpu-rt-period 1000000 --cpu-rt-runtime 950000 -l DEBUG > /dev/null 2>&1 &
     wait_isulad_running
     
-    c_id=`isula run -itd --cpu-rt-period 1000000 --cpu-rt-runtime 950000  ${image} sh`
+    c_id=`isula run -itd --cpu-rt-period 1000000 --cpu-rt-runtime 1000  ${image} sh`
     [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - failed to run container with image: ${image}" && ((ret++))
 
-    isula update --cpu-rt-period 900000 --cpu-rt-runtime 800000 $c_id
+    isula update --cpu-rt-period 900000 --cpu-rt-runtime 2000 $c_id
     [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - failed to update container cpu-rt-runtime" && ((ret++))
 
-    isula exec -it $c_id sh -c "cat /sys/fs/cgroup/cpu/cpu.rt_runtime_us" | grep "800000"
-    [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - failed to check container cpu.rt_runtime_us: 800000" && ((ret++))
+    isula exec -it $c_id sh -c "cat /sys/fs/cgroup/cpu/cpu.rt_runtime_us" | grep "2000"
+    [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - failed to check container cpu.rt_runtime_us: 2000" && ((ret++))
 
     isula exec -it $c_id sh -c "cat /sys/fs/cgroup/cpu/cpu.rt_period_us" | grep "900000"
     [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - failed to check container cpu.rt_period_us: 900000" && ((ret++))
@@ -84,7 +84,7 @@ function test_isula_update_abnormal()
     isulad --cpu-rt-period 1000000 --cpu-rt-runtime 950000 -l DEBUG > /dev/null 2>&1 &
     wait_isulad_running
     
-    c_id=`isula run -itd --cpu-rt-period 1000000 --cpu-rt-runtime 950000  ${image} sh`
+    c_id=`isula run -itd --cpu-rt-period 1000000 --cpu-rt-runtime 1000  ${image} sh`
     [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - failed to run container with image: ${image}" && ((ret++))
 
     isula update --cpu-rt-period 800000 --cpu-rt-runtime 900000 $c_id 2>&1 | grep "Invalid --cpu-rt-runtime: rt runtime cannot be higher than rt period"
@@ -177,7 +177,7 @@ function test_isula_run_normal()
     local ret=0
     local image="busybox"
 
-    isula run -itd -n box --cpu-rt-period 1000000 --cpu-rt-runtime 900000 $image /bin/sh 2>&1
+    isula run -itd -n box --cpu-rt-period 1000000 --cpu-rt-runtime 1000 $image /bin/sh 2>&1
     [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - failed to run container" && ((ret++))
 
     isula rm -f box
-- 
2.25.1