Skip to content

Commit

Permalink
test: add missing capability CAP_SYS_RESOURCE
Browse files Browse the repository at this point in the history
  • Loading branch information
spencercjh committed Jan 3, 2025
1 parent 6d9ca34 commit 1c7f97c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions testdata/run_cap_bpf_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ else
fi
CAP_TO_ADD="$2"

sudo docker run -d --ulimit memlock=100000000000:100000000000 --cap-add=$CAP_TO_ADD --name alpine $DOCKER_REGISTRY'alpine' sh -c 'sleep 120' || true
sudo docker run -d --ulimit memlock=100000000000:100000000000 --cap-add=$CAP_TO_ADD --cap-add=CAP_SYS_RESOURCE --name alpine $DOCKER_REGISTRY'alpine' sh -c 'sleep 120' || true
sudo docker cp /host/kyanos/kyanos alpine:/
sudo docker cp ./testdata/test_add_cap_bpf.sh alpine:/
sudo docker cp /var/lib/kyanos/btf/current.btf alpine:/
sudo docker exec alpine sh -c 'sh /test_add_cap_bpf.sh "/kyanos --btf /current.btf"'
sudo docker stop alpine && sudo docker rm alpine

sudo docker run -d --ulimit memlock=100000000000:100000000000 --name alpine $DOCKER_REGISTRY'alpine' sh -c 'sleep 120' || true
sudo docker run -d --ulimit memlock=100000000000:100000000000 --cap-add=CAP_SYS_RESOURCE --name alpine $DOCKER_REGISTRY'alpine' sh -c 'sleep 120' || true
sudo docker cp /host/kyanos/kyanos alpine:/
sudo docker cp ./testdata/test_not_add_cap_bpf.sh alpine:/
sudo docker cp /var/lib/kyanos/btf/current.btf alpine:/
Expand Down

0 comments on commit 1c7f97c

Please sign in to comment.