Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
temp: just a debug of devmapper test issues
Browse files Browse the repository at this point in the history
Fixes:#00000000

Signed-off-by: fupan <[email protected]>
  • Loading branch information
fupan committed Jun 25, 2023
1 parent 75567d0 commit bb4a691
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
2 changes: 2 additions & 0 deletions integration/kubernetes/k8s-configmap.bats
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ setup() {
# Create a pod that consumes the ConfigMap
kubectl create -f "${pod_config_dir}/pod-configmap.yaml"

date >&3
# Check pod creation
kubectl wait --for=condition=Ready --timeout=$timeout pod "$pod_name"
date >&3

# Check env
cmd="env"
Expand Down
7 changes: 7 additions & 0 deletions integration/kubernetes/k8s-copy-file.bats
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,16 @@ setup() {
kubectl describe pod "$pod_name" || true
kubectl get pods --all-namespaces


date >&3
# Copy file from pod to host
kubectl cp "$pod_name":/tmp/"$file_name" "$file_name"
date >&3

echo "# ===============cat $file_name =========" >&3
ls -al >&3
cat $file_name >&3
echo "# ============end" >&3
# Verify content
cat "$file_name" | grep "$content"
}
Expand Down
1 change: 1 addition & 0 deletions integration/kubernetes/k8s-cpu-ns.bats
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ setup() {
total_cpu_period=$(kubectl exec $pod_name -c $container_name \
-- sh -c "cat $periodsyspath")

echo "==========total_cpu_quota=$total_cpu_quota total_cpu_period=$total_cpu_period=======" >&3
division_quota_period=$(echo $((total_cpu_quota/total_cpu_period)))

[ "$division_quota_period" -eq "$total_cpu_container" ]
Expand Down
9 changes: 7 additions & 2 deletions integration/kubernetes/k8s-pid-ns.bats
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,22 @@ setup() {

# Check PID from first container
first_pid_container=$(kubectl exec $pod_name -c $first_container_name \
-- ps | grep "/pause")
-- ps | grep "/pause") || echo "#=========first_pid_container=$first_pid_container" >&3

# Verify that is not empty
check_first_pid=$(echo $first_pid_container | wc -l)
[ "$check_first_pid" == "1" ]

tmp=$(kubectl exec $pod_name -c $second_container_name -- ps)
echo "#----------$tmp" >&3
# Check PID from second container
second_pid_container=$(kubectl exec $pod_name -c $second_container_name \
-- ps | grep "/pause")
-- ps | grep "/pause") || echo "#========second_pid_container=$second_pid_container" >&3

# Verify that is not empty
check_second_pid=$(echo $second_pid_container | wc -l)
[ "$check_second_pid" == "1" ]


[ "$first_pid_container" == "$second_pid_container" ]
}
Expand Down
4 changes: 2 additions & 2 deletions integration/kubernetes/tests_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@

# Timeout options, mainly for use with waitForProcess(). Use them unless the
# operation needs to wait longer.
wait_time=90
wait_time=180
sleep_time=3

# Timeout for use with `kubectl wait`, unless it needs to wait longer.
# Note: try to keep timeout and wait_time equal.
timeout=90s
timeout=180s

# issues that can't test yet.
fc_limitations="https://github.com/kata-containers/documentation/issues/351"
Expand Down

0 comments on commit bb4a691

Please sign in to comment.