1
0
mirror of https://github.com/systemd/systemd synced 2025-10-02 18:24:46 +02:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Luca Boccassi
998bb9600e test-cgroup: cleanup test cgroup
One test cgroup gets left behind by the test, as it moves itself
into it. Move itself and back to the original cgroup at the end
and clean up.

This fixes a failure when running the test first as root, and then
as unprivileged (initial cleanup fails as the leftover test cgroup
is owned by root).
2025-08-13 10:00:33 +09:00
Luca Boccassi
e1311b10f8 CI: run ruff format before ruff check
Otherwise you get a failure but no hint on how to fix it
2025-08-13 10:00:21 +09:00
2 changed files with 9 additions and 6 deletions

View File

@ -58,11 +58,6 @@ jobs:
mkosi box -- mypy --version mkosi box -- mypy --version
mkosi box -- mypy src/core/generate-bpf-delegate-configs.py src/boot/generate-hwids-section.py src/test/generate-sym-test.py src/ukify/ukify.py test/integration-tests/integration-test-wrapper.py mkosi box -- mypy src/core/generate-bpf-delegate-configs.py src/boot/generate-hwids-section.py src/test/generate-sym-test.py src/ukify/ukify.py test/integration-tests/integration-test-wrapper.py
- name: Run ruff check
run: |
mkosi box -- ruff --version
mkosi box -- ruff check src/core/generate-bpf-delegate-configs.py src/boot/generate-hwids-section.py src/test/generate-sym-test.py src/ukify/ukify.py test/integration-tests/integration-test-wrapper.py
- name: Run ruff format - name: Run ruff format
run: | run: |
mkosi box -- ruff --version mkosi box -- ruff --version
@ -72,6 +67,11 @@ jobs:
mkosi box -- ruff format --check --quiet --diff src/core/generate-bpf-delegate-configs.py src/boot/generate-hwids-section.py src/test/generate-sym-test.py src/ukify/ukify.py test/integration-tests/integration-test-wrapper.py mkosi box -- ruff format --check --quiet --diff src/core/generate-bpf-delegate-configs.py src/boot/generate-hwids-section.py src/test/generate-sym-test.py src/ukify/ukify.py test/integration-tests/integration-test-wrapper.py
fi fi
- name: Run ruff check
run: |
mkosi box -- ruff --version
mkosi box -- ruff check src/core/generate-bpf-delegate-configs.py src/boot/generate-hwids-section.py src/test/generate-sym-test.py src/ukify/ukify.py test/integration-tests/integration-test-wrapper.py
- name: Configure meson - name: Configure meson
run: mkosi box -- env CC=clang CXX=clang++ meson setup -Dlocalegen-path=/usr/bin/locale-gen -Dcompat-mutable-uid-boundaries=true build run: mkosi box -- env CC=clang CXX=clang++ meson setup -Dlocalegen-path=/usr/bin/locale-gen -Dcompat-mutable-uid-boundaries=true build

View File

@ -61,7 +61,7 @@ TEST(cg_create) {
log_info("Paths for test:\n%s\n%s", test_a, test_b); log_info("Paths for test:\n%s\n%s", test_a, test_b);
/* Possibly clean up left-overs from aboted previous runs */ /* Possibly clean up left-overs from aborted previous runs */
(void) cg_trim(test_a, /* delete_root= */ true); (void) cg_trim(test_a, /* delete_root= */ true);
(void) cg_trim(test_b, /* delete_root= */ true); (void) cg_trim(test_b, /* delete_root= */ true);
@ -113,6 +113,9 @@ TEST(cg_create) {
ASSERT_OK(cg_trim(test_a, true)); ASSERT_OK(cg_trim(test_a, true));
ASSERT_ERROR(cg_trim(test_b, true), EBUSY); ASSERT_ERROR(cg_trim(test_b, true), EBUSY);
ASSERT_OK_ZERO(cg_attach(here, 0));
ASSERT_OK(cg_trim(test_b, true));
} }
TEST(id) { TEST(id) {