cgroupv2: add tests on cgv1 for implicit cgroup

This commit is contained in:
Miao Wang 2021-07-26 23:58:13 +08:00
parent e719dc443b
commit c26e9fb64a
2 changed files with 9 additions and 1 deletions

View File

@ -60,6 +60,11 @@ jobs:
- name: Run Unit tests.
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
uses: jandelgado/gcov2lcov-action@v1.0.0
with:

View File

@ -19,4 +19,7 @@ $(BUILDBIN:%=build-$(ARCH)/%) : build-$(ARCH)/% : cmd/%
test:
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