Skip to content

Commit 89d3f6d

Browse files
authored
Merge branch 'uutils:main' into lsns-basic-functionality
2 parents d06e753 + c58e091 commit 89d3f6d

10 files changed

Lines changed: 414 additions & 103 deletions

File tree

.github/workflows/run-gnu-test.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
2+
name: Run GNU Test
3+
4+
on:
5+
pull_request:
6+
push:
7+
branches:
8+
- 'main'
9+
10+
jobs:
11+
native:
12+
name: Run GNU tests (native)
13+
runs-on: ubuntu-24.04
14+
steps:
15+
- name: Checkout code (uutils/util-linux)
16+
uses: actions/checkout@v6
17+
with:
18+
path: uutils-util-linux
19+
- name: Checkout code (util-linux/util-linux)
20+
uses: actions/checkout@v6
21+
with:
22+
repository: util-linux/util-linux
23+
path: gnu-util-linux
24+
ref: v2.41.4
25+
- uses: Swatinem/rust-cache@v2
26+
with:
27+
workspaces: "./uutils-util-linux -> target"
28+
- name: Install dependencies
29+
run: |
30+
sudo apt-get update --quiet
31+
# omit preinstalled tools <https://github.com/actions/runner-images/tree/main/images/ubuntu>
32+
sudo apt-get install -y \
33+
autopoint gettext bc socat ntp squashfs-tools \
34+
libcap-ng-dev libpam-dev libudev-dev python3-dev libmount-dev libclang-dev libsmartcols-dev
35+
- name: Build GNU tests
36+
run: |
37+
cd gnu-util-linux
38+
./autogen.sh
39+
./configure
40+
make libsmartcols/src/filter-parser.c libsmartcols/src/filter-scanner.c
41+
make -j$(nproc) check-programs
42+
- name: Download test baseline if exists
43+
id: download-test-baseline
44+
continue-on-error: true
45+
uses: actions/download-artifact@v8
46+
with:
47+
name: gnu-test-failures
48+
path: uutils-util-linux/.reference/
49+
50+
- name: Run GNU tests
51+
env:
52+
GNU_PROJECT_DIR: ${{ github.workspace }}/gnu-util-linux
53+
run: |
54+
cd uutils-util-linux
55+
./scripts/run-tests.sh
56+
57+
- name: Update test baseline
58+
if: github.ref == 'refs/heads/main'
59+
run: |
60+
cd uutils-util-linux
61+
./scripts/check-new-gnu-failures.sh --update-baseline
62+
63+
- name: Upload test baseline artifact
64+
if: github.ref == 'refs/heads/main' || steps.download-test-baseline.outcome == 'failure'
65+
uses: actions/upload-artifact@v7
66+
with:
67+
name: gnu-test-failures
68+
path: uutils-util-linux/.reference/gnu-test-failures.txt

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
syntax: glob
22

33
/target/
4+
5+
.test-helpers
6+
.reference

CONTRIBUTING.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Contributing to util-linux
2+
3+
Hi! Welcome to uutils/util-linux, and thanks for wanting to contribute!
4+
5+
This project follows the shared conventions of the [uutils](https://github.com/uutils)
6+
organization. Before opening a pull request, please read:
7+
8+
- Our **[Review Guidelines](https://uutils.github.io/reviews/)** — what we expect
9+
from a pull request and how reviews are carried out.
10+
- Our community's [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md), if present.
11+
12+
Finally, feel free to join our [Discord](https://discord.gg/wQVJbvJ)!
13+
14+
> [!WARNING]
15+
> uutils is original code and cannot contain any code from GNU or other
16+
> strongly-licensed (GPL/LGPL) implementations. We **cannot** accept changes
17+
> based on the GNU source code, and you **must not link** to it either. You may
18+
> look at permissively-licensed implementations (MIT/BSD) and read the GNU
19+
> *manuals* — never the GNU *source*.
20+
21+
## In short
22+
23+
- Discuss non-trivial changes in an issue **before** writing the code.
24+
- Keep pull requests **small, self-contained, and descriptively titled**
25+
(e.g. `util-linux: fix ...`).
26+
- Make sure CI passes: tests are green, `rustfmt` is satisfied, and there are
27+
no `clippy` warnings.
28+
- Add tests for new behavior; don't let coverage regress.
29+
- Write small, atomic commits annotated with the component you touched.
30+
31+
See the [Review Guidelines](https://uutils.github.io/reviews/) for the full
32+
details.

0 commit comments

Comments
 (0)