From e3612a7a33c1ecc8d8a63489b8874bb0f029b908 Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Sun, 12 Jan 2025 01:49:39 +0800 Subject: [PATCH] Debug --- .github/workflows/tunasync.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tunasync.yml b/.github/workflows/tunasync.yml index 8d0a01d..d1f31e2 100644 --- a/.github/workflows/tunasync.yml +++ b/.github/workflows/tunasync.yml @@ -59,17 +59,10 @@ jobs: go-version: '^1.22' id: go - - name: Run Unit tests. - run: | - go install github.com/wadey/gocovmerge@latest - sudo systemd-run --service-type=oneshot --uid="$(id --user)" --pipe --wait \ - --property=Delegate=yes --setenv=USECURCGROUP=1 \ - --setenv=TERM=xterm-256color --same-dir \ - make test - - name: Run Additional Unit tests. run: | make build-test-worker + readelf --dyn-syms -W worker.test sudo mkdir /sys/fs/cgroup/tunasync sudo ./worker.test -test.v=true -test.coverprofile profile2.cov -test.run TestCgroup sudo rmdir /sys/fs/cgroup/tunasync @@ -195,6 +188,9 @@ jobs: lssubsys -am cgcreate -a "$CUSER" -t "$CUSER" -g cpu:tunasync cgcreate -a "$CUSER" -t "$CUSER" -g memory:tunasync + ls -la /sys/fs/cgroup/cpuacct + ls -la /sys/fs/cgroup/cpu,cpuacct + ls -la /sys/fs/cgroup/memory TERM=xterm-256color ./worker.test -test.v=true -test.coverprofile \ profile3.cov -test.run TestCgroup cgexec -g "*:/" bash -c "echo 0 > /sys/fs/cgroup/systemd/tasks; exec sudo -u $CUSER env USECURCGROUP=1 TERM=xterm-256color cgexec -g cpu,memory:tunasync ./worker.test -test.v=true -test.coverprofile profile4.cov -test.run TestCgroup"