diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9abcb32..00edab6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,7 @@ jobs: build: name: Build - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 permissions: contents: write steps: diff --git a/.github/workflows/tunasync.yml b/.github/workflows/tunasync.yml index cfc15a6..13a73fa 100644 --- a/.github/workflows/tunasync.yml +++ b/.github/workflows/tunasync.yml @@ -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 @@ -36,7 +36,7 @@ jobs: test: name: Test - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 services: registry: image: registry:2 @@ -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 @@ -190,10 +183,14 @@ jobs: run: | CUSER="$(id --user --name)" sudo rsh 254.255.255.2 bash --noprofile --norc -eo pipefail << EOF + exec 2>&1 cd "/home/${CUSER}" 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,acct + 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" diff --git a/.umlrootfs/Dockerfile b/.umlrootfs/Dockerfile index 8026f67..0a4fa73 100644 --- a/.umlrootfs/Dockerfile +++ b/.umlrootfs/Dockerfile @@ -1,5 +1,8 @@ FROM debian:bullseye RUN apt-get update && apt-get install -y systemd rsh-redone-server ifupdown sudo kmod cgroup-tools systemd-sysv +RUN echo "deb http://deb.debian.org/debian bookworm main" > /etc/apt/sources.list.d/bookworm.list && \ + apt-get update && \ + apt-get install -y --no-install-recommends -t bookworm libc6 RUN echo "host" > /root/.rhosts && \ chmod 600 /root/.rhosts && \ /bin/echo -e "auto eth0\niface eth0 inet static\naddress 254.255.255.2/24" > /etc/network/interfaces.d/eth0 && \