@@ -2,11 +2,11 @@ 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
9- # spell-checker:ignore userns
9+ # spell-checker:ignore userns nodocs
1010
1111# * note: to run a single test => `REPO/util/run-gnu-test.sh PATH/TO/TEST/SCRIPT`
1212
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 :
4444 with :
4545 path : ' uutils'
4646 persist-credentials : false
47- - uses : dtolnay/rust-toolchain@master
48- with :
49- toolchain : stable
50- components : rustfmt
5147 - uses : Swatinem/rust-cache@v2
5248 with :
5349 workspaces : " ./uutils -> target"
6965 ## Install dependencies
7066 sudo apt-get update
7167 ## 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
68+ sudo apt-get install -y gperf gdb python3-pyinotify valgrind libexpect-perl libacl1-dev libattr1-dev libcap-dev attr quilt
7369 curl http://launchpadlibrarian.net/831710181/automake_1.18.1-3_all.deb > automake-1.18.deb
7470 sudo dpkg -i --force-depends automake-1.18.deb
7571 - name : Add various locales
@@ -105,7 +101,7 @@ jobs:
105101 ## Build binaries
106102 cd 'uutils'
107103 env PROFILE=release-small bash util/build-gnu.sh
108-
104+
109105 - name : Save files for faster configure and skipping make
110106 uses : actions/cache/save@v5
111107 if : always() && steps.cache-config-gnu.outputs.cache-hit != 'true'
@@ -208,13 +204,6 @@ jobs:
208204 with :
209205 path : ' uutils'
210206 persist-credentials : false
211- - uses : dtolnay/rust-toolchain@master
212- with :
213- toolchain : stable
214- components : rustfmt
215- - uses : Swatinem/rust-cache@v2
216- with :
217- workspaces : " ./uutils -> target"
218207 - name : Checkout code (GNU coreutils)
219208 run : (mkdir -p gnu && cd gnu && bash ../uutils/util/fetch-gnu.sh)
220209
@@ -235,20 +224,10 @@ jobs:
235224 lima ls -laZ /etc/selinux
236225 lima sudo sestatus
237226
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
247227 - name : Install dependencies in VM
248228 run : |
249- 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
229+ lima sudo dnf -y install --nodocs autoconf bison gperf gcc gdb jq libacl-devel libattr-devel libcap-devel libselinux-devel attr rustup clang-devel automake patch quilt
230+ lima rustup-init -y --profile=minimal --default-toolchain stable
252231 - name : Copy the sources to VM
253232 run : |
254233 rsync -a -e ssh . lima-default:~/work/
@@ -269,8 +248,16 @@ jobs:
269248 lima bash -c "cd ~/work/uutils/ && echo 'Found SELinux tests:'; wc -l selinux-tests.txt"
270249 - name : Run GNU SELinux tests
271250 run : |
251+ # Ensure we're running in enforcing mode
272252 lima sudo setenforce 1
273253 lima getenforce
254+
255+ # Create test files with SELinux contexts for testing
256+ lima sudo mkdir -p /var/test_selinux
257+ lima sudo touch /var/test_selinux/test_file
258+ lima sudo chcon -t etc_t /var/test_selinux/test_file
259+ lima ls -Z /var/test_selinux/test_file # Verify context
260+
274261 lima cat /proc/filesystems
275262 lima bash -c "cd ~/work/uutils/ && bash util/run-gnu-test.sh \$(cat selinux-tests.txt)"
276263 - name : Extract testing info from individual logs into JSON
@@ -319,19 +306,15 @@ jobs:
319306 gnu/tests-selinux/*.log
320307 gnu/tests-selinux/*/*.log.gz
321308
322- smack :
323- name : Run GNU tests (SMACK)
309+ qemu :
310+ name : Run GNU tests (SMACK/ROOTFS )
324311 runs-on : ubuntu-24.04
325312 steps :
326313 - name : Checkout code (uutils)
327314 uses : actions/checkout@v6
328315 with :
329316 path : ' uutils'
330317 persist-credentials : false
331- - uses : dtolnay/rust-toolchain@master
332- with :
333- toolchain : stable
334- components : rustfmt
335318 - uses : Swatinem/rust-cache@v2
336319 with :
337320 workspaces : " ./uutils -> target"
@@ -341,30 +324,30 @@ jobs:
341324 run : |
342325 sudo apt-get update
343326 sudo apt-get install -y qemu-system-x86 zstd cpio
344- - name : Run GNU SMACK tests
327+ - name : Run GNU SMACK/ROOTFS tests
345328 run : |
346329 cd uutils
347- bash util/run-gnu-tests-smack-ci.sh "$GITHUB_WORKSPACE/gnu" "$GITHUB_WORKSPACE/gnu/tests-smack "
330+ bash util/run-gnu-tests-smack-ci.sh "$GITHUB_WORKSPACE/gnu" "$GITHUB_WORKSPACE/gnu/tests-qemu "
348331 - name : Extract testing info into JSON
349332 run : |
350- python3 uutils/util/gnu-json-result.py gnu/tests-smack > ${{ env.TEST_SMACK_FULL_SUMMARY_FILE }}
351- - name : Upload SMACK json results
333+ python3 uutils/util/gnu-json-result.py gnu/tests-qemu > ${{ env.TEST_QEMU_FULL_SUMMARY_FILE }}
334+ - name : Upload SMACK/ROOTFS json results
352335 uses : actions/upload-artifact@v6
353336 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
337+ name : qemu -gnu-full-result
338+ path : ${{ env.TEST_QEMU_FULL_SUMMARY_FILE }}
339+ - name : Compress SMACK/ROOTFS test logs
340+ run : gzip gnu/tests-qemu /*/*.log 2>/dev/null || true
341+ - name : Upload SMACK/ROOTFS test logs
359342 uses : actions/upload-artifact@v6
360343 with :
361- name : smack -test-logs
344+ name : qemu -test-logs
362345 path : |
363- gnu/tests-smack /*.log
364- gnu/tests-smack /*/*.log.gz
346+ gnu/tests-qemu /*.log
347+ gnu/tests-qemu /*/*.log.gz
365348
366349 aggregate :
367- needs : [native, selinux, smack ]
350+ needs : [native, selinux, qemu ]
368351 permissions :
369352 actions : read # for dawidd6/action-download-artifact to query and download artifacts
370353 contents : read # for actions/checkout to fetch code
@@ -389,7 +372,7 @@ jobs:
389372 path : ' uutils'
390373 persist-credentials : false
391374 - name : Retrieve reference artifacts
392- uses : dawidd6/action-download-artifact@v12
375+ uses : dawidd6/action-download-artifact@v14
393376 # ref: <https://github.com/dawidd6/action-download-artifact>
394377 continue-on-error : true # # don't break the build for missing reference artifacts (may be expired or just not generated yet)
395378 with :
@@ -429,10 +412,10 @@ jobs:
429412 name : selinux-root-gnu-full-result
430413 path : results
431414 merge-multiple : true
432- - name : Download smack json results
415+ - name : Download SMACK/ROOTFS json results
433416 uses : actions/download-artifact@v7
434417 with :
435- name : smack -gnu-full-result
418+ name : qemu -gnu-full-result
436419 path : results
437420 merge-multiple : true
438421 - name : Extract/summarize testing info
0 commit comments