Skip to content

Commit 6335f8a

Browse files
authored
Merge branch 'main' into mv-msg
2 parents 6f40cef + 1a64417 commit 6335f8a

258 files changed

Lines changed: 9244 additions & 3747 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.config/nextest.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@ final-status-level = "skip"
55
failure-output = "immediate-final"
66
fail-fast = false
77

8+
[profile.ci.junit]
9+
path = "junit.xml"
10+
811
[profile.coverage]
912
retries = 0
1013
status-level = "all"
1114
final-status-level = "skip"
1215
failure-output = "immediate-final"
1316
fail-fast = false
17+
18+
[profile.coverage.junit]
19+
path = "junit.xml"

.github/workflows/CICD.yml

Lines changed: 124 additions & 57 deletions
Large diffs are not rendered by default.

.github/workflows/FixPR.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
# Ensure updated '*/Cargo.lock'
4747
# * '*/Cargo.lock' is required to be in a format that `cargo` of MinSRV can interpret (eg, v1-format for MinSRV < v1.38)
4848
for dir in "." "fuzz"; do
49-
( cd "$dir" && (cargo fetch --locked --quiet || cargo +${{ steps.vars.outputs.RUST_MIN_SRV }} update) )
49+
( cd "$dir" && (cargo fetch --locked --quiet --target $(rustc --print host-tuple) || cargo +${{ steps.vars.outputs.RUST_MIN_SRV }} update) )
5050
done
5151
- name: Info
5252
shell: bash
@@ -65,7 +65,7 @@ jobs:
6565
cargo tree -V
6666
## dependencies
6767
echo "## dependency list"
68-
cargo fetch --locked --quiet
68+
cargo fetch --locked --quiet --target $(rustc --print host-tuple)
6969
## * using the 'stable' toolchain is necessary to avoid "unexpected '--filter-platform'" errors
7070
RUSTUP_TOOLCHAIN=stable cargo tree --locked --no-dedupe -e=no-dev --prefix=none --features ${{ matrix.job.features }} | grep -vE "$PWD" | sort --unique
7171
- name: Commit any changes (to '${{ env.BRANCH_TARGET }}')

.github/workflows/GnuTests.yml

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ env:
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

3636
jobs:
3737
native:
@@ -233,15 +233,6 @@ jobs:
233233
lima ls -laZ /etc/selinux
234234
lima sudo sestatus
235235
236-
# Ensure we're running in enforcing mode
237-
lima sudo setenforce 1
238-
lima getenforce
239-
240-
# Create test files with SELinux contexts for testing
241-
lima sudo mkdir -p /var/test_selinux
242-
lima sudo touch /var/test_selinux/test_file
243-
lima sudo chcon -t etc_t /var/test_selinux/test_file
244-
lima ls -Z /var/test_selinux/test_file # Verify context
245236
- name: Install dependencies in VM
246237
run: |
247238
lima sudo dnf -y update
@@ -267,8 +258,16 @@ jobs:
267258
lima bash -c "cd ~/work/uutils/ && echo 'Found SELinux tests:'; wc -l selinux-tests.txt"
268259
- name: Run GNU SELinux tests
269260
run: |
261+
# Ensure we're running in enforcing mode
270262
lima sudo setenforce 1
271263
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+
272271
lima cat /proc/filesystems
273272
lima bash -c "cd ~/work/uutils/ && bash util/run-gnu-test.sh \$(cat selinux-tests.txt)"
274273
- name: Extract testing info from individual logs into JSON
@@ -317,8 +316,8 @@ jobs:
317316
gnu/tests-selinux/*.log
318317
gnu/tests-selinux/*/*.log.gz
319318
320-
smack:
321-
name: Run GNU tests (SMACK)
319+
qemu:
320+
name: Run GNU tests (SMACK/ROOTFS)
322321
runs-on: ubuntu-24.04
323322
steps:
324323
- name: Checkout code (uutils)
@@ -338,30 +337,30 @@ jobs:
338337
run: |
339338
sudo apt-get update
340339
sudo apt-get install -y qemu-system-x86 zstd cpio
341-
- name: Run GNU SMACK tests
340+
- name: Run GNU SMACK/ROOTFS tests
342341
run: |
343342
cd uutils
344-
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"
345344
- name: Extract testing info into JSON
346345
run: |
347-
python3 uutils/util/gnu-json-result.py gnu/tests-smack > ${{ env.TEST_SMACK_FULL_SUMMARY_FILE }}
348-
- 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
349348
uses: actions/upload-artifact@v6
350349
with:
351-
name: smack-gnu-full-result
352-
path: ${{ env.TEST_SMACK_FULL_SUMMARY_FILE }}
353-
- name: Compress SMACK test logs
354-
run: gzip gnu/tests-smack/*/*.log 2>/dev/null || true
355-
- 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
356355
uses: actions/upload-artifact@v6
357356
with:
358-
name: smack-test-logs
357+
name: qemu-test-logs
359358
path: |
360-
gnu/tests-smack/*.log
361-
gnu/tests-smack/*/*.log.gz
359+
gnu/tests-qemu/*.log
360+
gnu/tests-qemu/*/*.log.gz
362361
363362
aggregate:
364-
needs: [native, selinux, smack]
363+
needs: [native, selinux, qemu]
365364
permissions:
366365
actions: read # for dawidd6/action-download-artifact to query and download artifacts
367366
contents: read # for actions/checkout to fetch code
@@ -426,10 +425,10 @@ jobs:
426425
name: selinux-root-gnu-full-result
427426
path: results
428427
merge-multiple: true
429-
- name: Download smack json results
428+
- name: Download SMACK/ROOTFS json results
430429
uses: actions/download-artifact@v7
431430
with:
432-
name: smack-gnu-full-result
431+
name: qemu-gnu-full-result
433432
path: results
434433
merge-multiple: true
435434
- name: Extract/summarize testing info

.github/workflows/android.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ concurrency:
2222
env:
2323
TERMUX: v0.118.0
2424
KEY_POSTFIX: nextest+rustc-hash+adb+sshd+upgrade+XGB+inc18
25-
COMMON_EMULATOR_OPTIONS: -no-window -noaudio -no-boot-anim -camera-back none -gpu off
25+
COMMON_EMULATOR_OPTIONS: -no-metrics -no-window -noaudio -no-boot-anim -camera-back none -gpu off
2626
EMULATOR_DISK_SIZE: 12GB
2727
EMULATOR_HEAP_SIZE: 2048M
2828
EMULATOR_BOOT_TIMEOUT: 1200 # 20min
@@ -39,7 +39,7 @@ jobs:
3939
ram: [4096]
4040
api-level: [28]
4141
target: [google_apis_playstore]
42-
arch: [x86, x86_64] # , arm64-v8a
42+
arch: [x86_64] # ,x86 ,arm64-v8a
4343
runs-on: ${{ matrix.os }}
4444
env:
4545
EMULATOR_RAM_SIZE: ${{ matrix.ram }}
@@ -166,7 +166,7 @@ jobs:
166166
disk-size: ${{ env.EMULATOR_DISK_SIZE }}
167167
cores: ${{ env.EMULATOR_CORES }}
168168
force-avd-creation: false
169-
emulator-options: ${{ env.COMMON_EMULATOR_OPTIONS }} -no-metrics -no-snapshot-save -snapshot ${{ env.AVD_CACHE_KEY }}
169+
emulator-options: ${{ env.COMMON_EMULATOR_OPTIONS }} -no-snapshot-save -snapshot ${{ env.AVD_CACHE_KEY }}
170170
emulator-boot-timeout: ${{ env.EMULATOR_BOOT_TIMEOUT }}
171171
# This is not a usual script. Every line is executed in a separate shell with `sh -c`. If
172172
# one of the lines returns with error the whole script is failed (like running a script with

.github/workflows/benchmarks.yml

Lines changed: 48 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -18,35 +18,38 @@ concurrency:
1818

1919
jobs:
2020
benchmarks:
21-
name: Run benchmarks (CodSpeed)
21+
name: Run ${{ matrix.type }} benchmarks for ${{ matrix.package }} (CodSpeed)
2222
runs-on: ubuntu-latest
2323
strategy:
2424
matrix:
25-
benchmark-target:
26-
- { package: uu_base64 }
27-
- { package: uu_cksum }
28-
- { package: uu_cp }
29-
- { package: uu_cut }
30-
- { package: uu_dd }
31-
- { package: uu_du }
32-
- { package: uu_expand }
33-
- { package: uu_fold }
34-
- { package: uu_join }
35-
- { package: uu_ls }
36-
- { package: uu_mv }
37-
- { package: uu_nl }
38-
- { package: uu_numfmt }
39-
- { package: uu_rm }
40-
- { package: uu_seq }
41-
- { package: uu_shuf }
42-
- { package: uu_sort }
43-
- { package: uu_split }
44-
- { package: uu_tsort }
45-
- { package: uu_unexpand }
46-
- { package: uu_uniq }
47-
- { package: uu_wc }
48-
- { package: uu_factor }
49-
- { package: uu_date }
25+
type: [performance] # , memory] # memory profile disabled due to variance
26+
package: [
27+
uu_base64,
28+
uu_cksum,
29+
uu_cp,
30+
uu_cut,
31+
uu_dd,
32+
uu_df,
33+
uu_du,
34+
uu_expand,
35+
uu_fold,
36+
uu_join,
37+
uu_ls,
38+
uu_mv,
39+
uu_nl,
40+
uu_numfmt,
41+
uu_rm,
42+
uu_seq,
43+
uu_shuf,
44+
uu_sort,
45+
uu_split,
46+
uu_tsort,
47+
uu_unexpand,
48+
uu_uniq,
49+
uu_wc,
50+
uu_factor,
51+
uu_date
52+
]
5053
steps:
5154
- uses: actions/checkout@v6
5255
with:
@@ -59,23 +62,35 @@ jobs:
5962
- name: Run sccache-cache
6063
uses: mozilla-actions/sccache-action@v0.0.9
6164

65+
- name: Install locales
66+
shell: bash
67+
run: |
68+
sudo apt-get update
69+
sudo apt-get install -y locales
70+
sudo locale-gen fr_FR.UTF-8
71+
sudo update-locale
72+
6273
- name: Install cargo-codspeed
6374
shell: bash
6475
run: cargo install cargo-codspeed --locked
6576

66-
- name: Build benchmarks for ${{ matrix.benchmark-target.package }}
77+
- name: Build benchmarks for ${{ matrix.package }} (${{ matrix.type }})
6778
shell: bash
6879
run: |
69-
echo "Building benchmarks for ${{ matrix.benchmark-target.package }}"
70-
cargo codspeed build -p ${{ matrix.benchmark-target.package }}
80+
echo "Building ${{ matrix.type }} benchmarks for ${{ matrix.package }}"
81+
if [ "${{ matrix.type }}" = "memory" ]; then
82+
cargo codspeed build -m analysis -p ${{ matrix.package }}
83+
else
84+
cargo codspeed build -p ${{ matrix.package }}
85+
fi
7186
72-
- name: Run benchmarks for ${{ matrix.benchmark-target.package }}
87+
- name: Run ${{ matrix.type }} benchmarks for ${{ matrix.package }}
7388
uses: CodSpeedHQ/action@v4
7489
env:
7590
CODSPEED_LOG: debug
7691
with:
77-
mode: simulation
92+
mode: ${{ matrix.type == 'memory' && 'memory' || 'simulation' }}
7893
run: |
79-
echo "Running benchmarks for ${{ matrix.benchmark-target.package }}"
80-
cargo codspeed run -p ${{ matrix.benchmark-target.package }} > /dev/null
94+
echo "Running ${{ matrix.type }} benchmarks for ${{ matrix.package }}"
95+
cargo codspeed run -p ${{ matrix.package }} > /dev/null
8196
token: ${{ secrets.CODSPEED_TOKEN }}

.github/workflows/freebsd.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ jobs:
133133
- uses: actions/checkout@v6
134134
with:
135135
persist-credentials: false
136+
- name: Avoid no space left on device (Ubuntu runner)
137+
run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android &
136138
- uses: Swatinem/rust-cache@v2
137139
- name: Run sccache-cache
138140
uses: mozilla-actions/sccache-action@v0.0.9
@@ -192,6 +194,7 @@ jobs:
192194
set +e
193195
cd "${WORKSPACE}"
194196
unset FAULT
197+
export RUSTFLAGS="-C strip=symbols" # for disk space
195198
cargo build || FAULT=1
196199
export PATH=~/.cargo/bin:${PATH}
197200
export RUST_BACKTRACE=1

.github/workflows/fuzzing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
- { name: fuzz_parse_glob, should_pass: true }
9595
- { name: fuzz_parse_size, should_pass: true }
9696
- { name: fuzz_parse_time, should_pass: true }
97-
- { name: fuzz_seq_parse_number, should_pass: true }
97+
- { name: fuzz_seq_parse_number, should_pass: false }
9898
- { name: fuzz_non_utf8_paths, should_pass: true }
9999

100100
steps:

.github/workflows/ignore-intermittent.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ tests/tail/inotify-dir-recreate
22
tests/tail/overlay-headers
33
tests/timeout/timeout
44
tests/rm/rm1
5+
tests/shuf/shuf-reservoir
6+
tests/sort/sort-stale-thread-mem
7+
tests/tty/tty-eof
58
tests/misc/stdbuf
69
tests/misc/usage_vs_getopt
710
tests/misc/tee
11+
tests/tail/follow-name

.github/workflows/l10n.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ jobs:
735735
run: |
736736
## Download additional locale files from coreutils-l10n repository
737737
echo "Downloading additional locale files from coreutils-l10n..."
738-
git clone https://github.com/uutils/coreutils-l10n.git coreutils-l10n-repo
738+
git clone --depth=1 https://github.com/uutils/coreutils-l10n.git coreutils-l10n-repo
739739
740740
# Create installation directory
741741
CARGO_INSTALL_DIR="$PWD/cargo-install-dir"

0 commit comments

Comments
 (0)