@@ -2,7 +2,7 @@ name: GnuTests
22
33# spell-checker:ignore (abbrev/names) CodeCov gnulib GnuTests Swatinem
44# spell-checker:ignore (jargon) submodules devel
5- # spell-checker:ignore (libs/utils) autopoint chksum dpkg getenforce getlimits gperf lcov libexpect limactl pyinotify setenforce shopt texinfo valgrind libattr libcap taiki-e zstd cpio
5+ # spell-checker:ignore (libs/utils) chksum dpkg getenforce getlimits gperf lcov libexpect limactl pyinotify setenforce shopt valgrind libattr libcap taiki-e zstd cpio
66# spell-checker:ignore (options) Ccodegen Coverflow Cpanic Zpanic
77# spell-checker:ignore (people) Dawid Dziurla * dawidd dtolnay
88# spell-checker:ignore (vars) FILESET SUBDIRS XPASS
3131 TEST_STTY_FULL_SUMMARY_FILE : ' gnu-stty-full-result.json'
3232 TEST_SELINUX_FULL_SUMMARY_FILE : ' selinux-gnu-full-result.json'
3333 TEST_SELINUX_ROOT_FULL_SUMMARY_FILE : ' selinux-root-gnu-full-result.json'
34- TEST_SMACK_FULL_SUMMARY_FILE : ' smack -gnu-full-result.json'
34+ TEST_QEMU_FULL_SUMMARY_FILE : ' qemu -gnu-full-result.json'
3535
3636jobs :
3737 native :
4747 - uses : dtolnay/rust-toolchain@master
4848 with :
4949 toolchain : stable
50- components : rustfmt
5150 - uses : Swatinem/rust-cache@v2
5251 with :
5352 workspaces : " ./uutils -> target"
6968 ## Install dependencies
7069 sudo apt-get update
7170 ## Check that build-gnu.sh works on the non SELinux system by installing libselinux only on lima
72- sudo apt-get install -y autopoint gperf gdb python3-pyinotify valgrind libexpect-perl libacl1-dev libattr1-dev libcap-dev attr quilt
71+ sudo apt-get install -y gperf gdb python3-pyinotify valgrind libexpect-perl libacl1-dev libattr1-dev libcap-dev attr quilt
7372 curl http://launchpadlibrarian.net/831710181/automake_1.18.1-3_all.deb > automake-1.18.deb
7473 sudo dpkg -i --force-depends automake-1.18.deb
7574 - name : Add various locales
@@ -105,7 +104,7 @@ jobs:
105104 ## Build binaries
106105 cd 'uutils'
107106 env PROFILE=release-small bash util/build-gnu.sh
108-
107+
109108 - name : Save files for faster configure and skipping make
110109 uses : actions/cache/save@v5
111110 if : always() && steps.cache-config-gnu.outputs.cache-hit != 'true'
@@ -211,7 +210,6 @@ jobs:
211210 - uses : dtolnay/rust-toolchain@master
212211 with :
213212 toolchain : stable
214- components : rustfmt
215213 - uses : Swatinem/rust-cache@v2
216214 with :
217215 workspaces : " ./uutils -> target"
@@ -235,20 +233,11 @@ jobs:
235233 lima ls -laZ /etc/selinux
236234 lima sudo sestatus
237235
238- # Ensure we're running in enforcing mode
239- lima sudo setenforce 1
240- lima getenforce
241-
242- # Create test files with SELinux contexts for testing
243- lima sudo mkdir -p /var/test_selinux
244- lima sudo touch /var/test_selinux/test_file
245- lima sudo chcon -t etc_t /var/test_selinux/test_file
246- lima ls -Z /var/test_selinux/test_file # Verify context
247236 - name : Install dependencies in VM
248237 run : |
249238 lima sudo dnf -y update
250- lima sudo dnf -y install git autoconf autopoint bison texinfo gperf gcc gdb jq libacl-devel libattr-devel libcap-devel libselinux-devel attr rustup clang-devel texinfo-tex automake patch quilt
251- lima rustup-init -y --default-toolchain stable
239+ lima sudo dnf -y install autoconf bison gperf gcc gdb jq libacl-devel libattr-devel libcap-devel libselinux-devel attr rustup clang-devel automake patch quilt
240+ lima rustup-init -y --profile=minimal -- default-toolchain stable
252241 - name : Copy the sources to VM
253242 run : |
254243 rsync -a -e ssh . lima-default:~/work/
@@ -269,8 +258,16 @@ jobs:
269258 lima bash -c "cd ~/work/uutils/ && echo 'Found SELinux tests:'; wc -l selinux-tests.txt"
270259 - name : Run GNU SELinux tests
271260 run : |
261+ # Ensure we're running in enforcing mode
272262 lima sudo setenforce 1
273263 lima getenforce
264+
265+ # Create test files with SELinux contexts for testing
266+ lima sudo mkdir -p /var/test_selinux
267+ lima sudo touch /var/test_selinux/test_file
268+ lima sudo chcon -t etc_t /var/test_selinux/test_file
269+ lima ls -Z /var/test_selinux/test_file # Verify context
270+
274271 lima cat /proc/filesystems
275272 lima bash -c "cd ~/work/uutils/ && bash util/run-gnu-test.sh \$(cat selinux-tests.txt)"
276273 - name : Extract testing info from individual logs into JSON
@@ -319,8 +316,8 @@ jobs:
319316 gnu/tests-selinux/*.log
320317 gnu/tests-selinux/*/*.log.gz
321318
322- smack :
323- name : Run GNU tests (SMACK)
319+ qemu :
320+ name : Run GNU tests (SMACK/ROOTFS )
324321 runs-on : ubuntu-24.04
325322 steps :
326323 - name : Checkout code (uutils)
@@ -331,7 +328,6 @@ jobs:
331328 - uses : dtolnay/rust-toolchain@master
332329 with :
333330 toolchain : stable
334- components : rustfmt
335331 - uses : Swatinem/rust-cache@v2
336332 with :
337333 workspaces : " ./uutils -> target"
@@ -341,30 +337,30 @@ jobs:
341337 run : |
342338 sudo apt-get update
343339 sudo apt-get install -y qemu-system-x86 zstd cpio
344- - name : Run GNU SMACK tests
340+ - name : Run GNU SMACK/ROOTFS tests
345341 run : |
346342 cd uutils
347- bash util/run-gnu-tests-smack-ci.sh "$GITHUB_WORKSPACE/gnu" "$GITHUB_WORKSPACE/gnu/tests-smack "
343+ bash util/run-gnu-tests-smack-ci.sh "$GITHUB_WORKSPACE/gnu" "$GITHUB_WORKSPACE/gnu/tests-qemu "
348344 - name : Extract testing info into JSON
349345 run : |
350- python3 uutils/util/gnu-json-result.py gnu/tests-smack > ${{ env.TEST_SMACK_FULL_SUMMARY_FILE }}
351- - name : Upload SMACK json results
346+ python3 uutils/util/gnu-json-result.py gnu/tests-qemu > ${{ env.TEST_QEMU_FULL_SUMMARY_FILE }}
347+ - name : Upload SMACK/ROOTFS json results
352348 uses : actions/upload-artifact@v6
353349 with :
354- name : smack -gnu-full-result
355- path : ${{ env.TEST_SMACK_FULL_SUMMARY_FILE }}
356- - name : Compress SMACK test logs
357- run : gzip gnu/tests-smack /*/*.log 2>/dev/null || true
358- - name : Upload SMACK test logs
350+ name : qemu -gnu-full-result
351+ path : ${{ env.TEST_QEMU_FULL_SUMMARY_FILE }}
352+ - name : Compress SMACK/ROOTFS test logs
353+ run : gzip gnu/tests-qemu /*/*.log 2>/dev/null || true
354+ - name : Upload SMACK/ROOTFS test logs
359355 uses : actions/upload-artifact@v6
360356 with :
361- name : smack -test-logs
357+ name : qemu -test-logs
362358 path : |
363- gnu/tests-smack /*.log
364- gnu/tests-smack /*/*.log.gz
359+ gnu/tests-qemu /*.log
360+ gnu/tests-qemu /*/*.log.gz
365361
366362 aggregate :
367- needs : [native, selinux, smack ]
363+ needs : [native, selinux, qemu ]
368364 permissions :
369365 actions : read # for dawidd6/action-download-artifact to query and download artifacts
370366 contents : read # for actions/checkout to fetch code
@@ -429,10 +425,10 @@ jobs:
429425 name : selinux-root-gnu-full-result
430426 path : results
431427 merge-multiple : true
432- - name : Download smack json results
428+ - name : Download SMACK/ROOTFS json results
433429 uses : actions/download-artifact@v7
434430 with :
435- name : smack -gnu-full-result
431+ name : qemu -gnu-full-result
436432 path : results
437433 merge-multiple : true
438434 - name : Extract/summarize testing info
0 commit comments