镜像自地址
https://github.com/tuna/tunasync.git
已同步 2025-12-08 23:46:47 +00:00
cgroupv2: add tests on cgv1 for implicit cgroup
这个提交包含在:
5
.github/workflows/tunasync.yml
vendored
5
.github/workflows/tunasync.yml
vendored
@@ -60,6 +60,11 @@ jobs:
|
|||||||
- name: Run Unit tests.
|
- name: Run Unit tests.
|
||||||
run: make test
|
run: make test
|
||||||
|
|
||||||
|
- name: Run Additional Unit tests.
|
||||||
|
run: |
|
||||||
|
make build-test-worker
|
||||||
|
sudo cgexec -g "*:/" -g cpu,memory:tunasync bash -c "echo 0 > /sys/fs/cgroup/systemd/tasks; exec sudo -u $USER env USECURCGROUP=1 ./worker.test -test.v -test.coverprofile profile.cov -test.run TestCgroup"
|
||||||
|
|
||||||
- name: Convert coverage to lcov
|
- name: Convert coverage to lcov
|
||||||
uses: jandelgado/gcov2lcov-action@v1.0.0
|
uses: jandelgado/gcov2lcov-action@v1.0.0
|
||||||
with:
|
with:
|
||||||
|
|||||||
5
Makefile
5
Makefile
@@ -19,4 +19,7 @@ $(BUILDBIN:%=build-$(ARCH)/%) : build-$(ARCH)/% : cmd/%
|
|||||||
test:
|
test:
|
||||||
go test -v -covermode=count -coverprofile=profile.cov ./...
|
go test -v -covermode=count -coverprofile=profile.cov ./...
|
||||||
|
|
||||||
.PHONY: all test $(BUILDBIN)
|
build-test-worker:
|
||||||
|
go test -c -covermode=count ./worker
|
||||||
|
|
||||||
|
.PHONY: all test $(BUILDBIN) build-test-worker
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户