镜像自地址
https://github.com/tuna/tunasync.git
已同步 2025-12-05 22:16:47 +00:00
cgroupv2: add test for reexec
这个提交包含在:
17
.github/workflows/tunasync.yml
vendored
17
.github/workflows/tunasync.yml
vendored
@@ -71,6 +71,20 @@ jobs:
|
||||
run: |
|
||||
make build-test-worker
|
||||
sudo cgexec -g "*:/" bash -c "echo 0 > /sys/fs/cgroup/systemd/tasks; exec sudo -u $USER env USECURCGROUP=1 TERM=xterm-256color cgexec -g cpu,memory:tunasync ./worker.test -test.v=true -test.coverprofile profile2.cov -test.run TestCgroup"
|
||||
touch /tmp/dummy_exec
|
||||
chmod +x /tmp/dummy_exec
|
||||
run_test_reexec (){
|
||||
case="$1"
|
||||
shift
|
||||
argv0="$1"
|
||||
shift
|
||||
(TESTREEXEC="$case" TERM=xterm-256color exec -a "$argv0" ./worker.test -test.v=true -test.coverprofile "profile5_$case.cov" -test.run TestReexec -- "$@")
|
||||
}
|
||||
run_test_reexec 1 tunasync-exec __dummy__
|
||||
run_test_reexec 2 tunasync-exec /tmp/dummy_exec
|
||||
run_test_reexec 3 tunasync-exec /tmp/dummy_exec 3< <(echo -n "abrt")
|
||||
run_test_reexec 4 tunasync-exec /tmp/dummy_exec 3< <(echo -n "cont")
|
||||
run_test_reexec 5 tunasync-exec2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
@@ -209,7 +223,8 @@ jobs:
|
||||
CUSER="$(id --user --name)"
|
||||
"${HOME}/go/bin/gocovmerge" profile.cov profile2.cov \
|
||||
"umlrootfs/home/${CUSER}/profile3.cov" \
|
||||
"umlrootfs/home/${CUSER}/profile4.cov" > profile-all.cov
|
||||
"umlrootfs/home/${CUSER}/profile4.cov" \
|
||||
profile5_*.cov > profile-all.cov
|
||||
|
||||
- name: Convert coverage to lcov
|
||||
uses: jandelgado/gcov2lcov-action@v1.0.0
|
||||
|
||||
在新工单中引用
屏蔽一个用户