Android CI keeps failing in file-related tests

Open
#7,542 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
android, rust
Domain
ci-cd, testing

Research direction

Start with .github/workflows/android.yml and the failures in tests/common/util.rs, tests/by-util/test_env.rs, test_cat::test_closes_file_descriptors, and test_split::test_round_robin_limited_file_descriptors. Reproduce the Android CI failures and compare the file-handling behavior and errors across the affected tests. Done means the Android workflow passes consistently for these file-related tests.

Written by the indexing model from the issue text.

Description

Android CI has been failing quite consistently over the last day or so:
https://github.com/uutils/coreutils/actions/workflows/android.yml

The errors are don't always hit the same tests, but all seem to have something to do with file handling. A random selection follows:

coreutils::tests test_cat::test_closes_file_descriptors
[2025-03-23 09:44:15] 
[2025-03-23 09:44:15] thread 'test_cat::test_closes_file_descriptors' panicked at tests/common/util.rs:1794:37:
[2025-03-23 09:44:15] called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
...
[2025-03-23 09:44:15] ──── TRY 3 STDERR:       coreutils::tests test_env::test_env_permissions
[2025-03-23 09:44:15] 
[2025-03-23 09:44:15] thread 'test_env::test_env_permissions' panicked at tests/by-util/test_env.rs:88:10:
[2025-03-23 09:44:16] assertion failed: `(left == right)`
[2025-03-23 09:44:16] 
[2025-03-23 09:44:16] Diff < left / right > :
[2025-03-23 09:44:16] <env: unknown error: Os { code: 21, kind: IsADirectory, message: "Is a directory" }
[2025-03-23 09:44:16] >env: '.': Permission denied
...
[2025-03-23 00:57:00] ──── TRY 3 STDERR:       coreutils::tests test_split::test_round_robin_limited_file_descriptors
[2025-03-23 00:57:00] 
[2025-03-23 00:57:00] thread 'test_split::test_round_robin_limited_file_descriptors' panicked at tests/common/util.rs:1794:37:
[2025-03-23 00:57:00] called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
...
[2025-03-23 00:57:00]   TRY 3 FAIL [   0.188s] coreutils::tests test_split::test_round_robin_limited_file_descriptors
[2025-03-23 00:57:00] ──── TRY 3 STDOUT:       coreutils::tests test_split::test_round_robin_limited_file_descriptors
[2025-03-23 00:57:00] 
[2025-03-23 00:57:00] running 1 test
[2025-03-23 00:57:00] run: /data/data/com.termux/files/home/coreutils/target/debug/coreutils split -n r/40 onehundredlines.txt
[2025-03-23 00:57:00] test test_split::test_round_robin_limited_file_descriptors ... FAILED
...
Dominant language
Rust
Stars
24.1k
Forks
2k
Avg merge
1d 5h
Merged PRs (30d)
365

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from uutils/coreutils

All issues in uutils/coreutils

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.