Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
shankerwangmiao committed Jan 11, 2025
1 parent 181fddb commit 933a1e4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

build:
name: Build
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
Expand Down
16 changes: 6 additions & 10 deletions .github/workflows/tunasync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:

build:
name: Build
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:

- name: Check out code into the Go module directory
Expand Down Expand Up @@ -36,7 +36,7 @@ jobs:

test:
name: Test
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
services:
registry:
image: registry:2
Expand All @@ -59,14 +59,6 @@ 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
Expand Down Expand Up @@ -196,7 +188,11 @@ jobs:
cgcreate -a "$CUSER" -t "$CUSER" -g memory:tunasync
TERM=xterm-256color ./worker.test -test.v=true -test.coverprofile \
profile3.cov -test.run TestCgroup
cgexec -g "*:/" bash -c "echo Debug1"
cgexec -g "*:/" bash -c "echo 0 > /sys/fs/cgroup/systemd/tasks; exec sudo -u $CUSER env USECURCGROUP=0 TERM=xterm-256color echo Debug2"
cgexec -g "*:/" bash -c "echo 0 > /sys/fs/cgroup/systemd/tasks; exec sudo -u $CUSER env USECURCGROUP=0 TERM=xterm-256color cgexec -g cpu,memory:tunasync echo Debug3"
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"
echo "Debug4"
EOF
- name: Stop Uml
Expand Down
2 changes: 1 addition & 1 deletion .umlrootfs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:bullseye
FROM debian:bookworm
RUN apt-get update && apt-get install -y systemd rsh-redone-server ifupdown sudo kmod cgroup-tools systemd-sysv
RUN echo "host" > /root/.rhosts && \
chmod 600 /root/.rhosts && \
Expand Down

0 comments on commit 933a1e4

Please sign in to comment.