Issue 170744
Summary Test `tools/llvm-cas/validation.test` fails on Ubuntu 25.10
Labels new issue
Assignees
Reporter atrosinenko
    `LLVM :: tools/llvm-cas/validation.test` test from `check-llvm` fails on Ubuntu 25.10 if coreutils are provided by uutils instead of GNU coreutils. Please note that this issue does not affect any LTS Ubuntu releases.

## How to reproduce

Start Ubuntu 25.10 container:

```bash
docker run --rm -ti ubuntu:25.10 /bin/bash
```

Inside the container, build LLVM and run tests (tested at commit `2a10e91d8f2edf20bb0e6680e668b327334dc6e8`):

```bash
sed --in-place -e '/^Types:/ s/deb/deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources
apt-get update
apt-get build-dep -y llvm-toolchain-21
apt-get install -y git

git clone --depth 1 https://github.com/llvm/llvm-project.git
cd llvm-project
CFLAGS=-O1 cmake -S llvm -B build -G Ninja -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_BUILD_TYPE=Release
ninja -C build
ninja -C build check-llvm-tools-llvm-cas
```

This produces the following error:
```
truncate -s -40 /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/ac/v1.1/actions.v1
# executed command: truncate -s -40 /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/ac/v1.1/actions.v1
# .---command stderr------------
# | error: unexpected argument '-4' found
# |
# |   tip: to pass '-4' as a value, use '-- -4'
# |
# | Usage: truncate [OPTION]... [FILE]...
# |
# | For more information, try '--help'.
# `-----------------------------
# error: command failed with exit status: 1
```

<details>
<summary>Full output</summary>

```
ninja: Entering directory `build'
[13/14] Running lit suite /llvm-project/llvm/test/tools/llvm-cas
FAIL: LLVM :: tools/llvm-cas/validation.test (5 of 7)
******************** TEST 'LLVM :: tools/llvm-cas/validation.test' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
rm -rf /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp
# executed command: rm -rf /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp
# RUN: at line 2
mkdir /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp
# executed command: mkdir /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp
# RUN: at line 5
truncate -s 7 /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/file
# executed command: truncate -s 7 /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/file
# RUN: at line 6
cat /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/file | /llvm-project/build/bin/llvm-cas --cas /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/cas --make-blob    --data -
# executed command: cat /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/file
# executed command: /llvm-project/build/bin/llvm-cas --cas /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/cas --make-blob --data -
# .---command stdout------------
# | llvmcas://9e5d14a735ea0b94cf9393acd00cbf616ae5a074d2ada6ef38f5c615821e0a08
# `-----------------------------
# RUN: at line 9
/llvm-project/build/bin/llvm-cas --cas /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/cas --validate --check-hash
# executed command: /llvm-project/build/bin/llvm-cas --cas /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/cas --validate --check-hash
# .---command stdout------------
# | validated successfully
# `-----------------------------
# RUN: at line 11
/llvm-project/build/bin/llvm-cas --cas /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/cas --validate
# executed command: /llvm-project/build/bin/llvm-cas --cas /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/cas --validate
# .---command stdout------------
# | validated successfully
# `-----------------------------
# RUN: at line 12
/llvm-project/build/bin/llvm-cas --cas /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/cas --validate --check-hash
# executed command: /llvm-project/build/bin/llvm-cas --cas /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/cas --validate --check-hash
# .---command stdout------------
# | validated successfully
# `-----------------------------
# RUN: at line 14
rm /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/cas/v1.1/data.v1
# executed command: rm /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/cas/v1.1/data.v1
# RUN: at line 15
not /llvm-project/build/bin/llvm-cas --cas /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/cas --validate
# executed command: not /llvm-project/build/bin/llvm-cas --cas /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/cas --validate
# .---command stderr------------
# | llvm-cas: validate: bad record at 0x2070: datapool record out of bound
# `-----------------------------
# RUN: at line 16
not /llvm-project/build/bin/llvm-cas --cas /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/cas --validate --check-hash
# executed command: not /llvm-project/build/bin/llvm-cas --cas /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/cas --validate --check-hash
# .---command stderr------------
# | llvm-cas: validate: bad record at 0x2070: datapool record out of bound
# `-----------------------------
# RUN: at line 18
mkdir /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/ac
# executed command: mkdir /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/ac
# RUN: at line 20
/llvm-project/build/bin/llvm-cas --cas /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/ac --make-blob    --data /dev/null > /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/empty.casid
# executed command: /llvm-project/build/bin/llvm-cas --cas /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/ac --make-blob --data /dev/null
# RUN: at line 22
echo "abc" | /llvm-project/build/bin/llvm-cas --cas /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/ac --make-blob    --data - >/llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/abc.casid
# executed command: echo abc
# executed command: /llvm-project/build/bin/llvm-cas --cas /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/ac --make-blob --data -
# RUN: at line 26
/llvm-project/build/bin/llvm-cas --cas /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/ac --put-cache-key @/llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/abc.casid @/llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/empty.casid
# executed command: /llvm-project/build/bin/llvm-cas --cas /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/ac --put-cache-key @/llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/abc.casid @/llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/empty.casid
# RUN: at line 27
/llvm-project/build/bin/llvm-cas --cas /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/ac --validate
# executed command: /llvm-project/build/bin/llvm-cas --cas /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/ac --validate
# .---command stdout------------
# | validated successfully
# `-----------------------------
# RUN: at line 30
truncate -s -40 /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/ac/v1.1/actions.v1
# executed command: truncate -s -40 /llvm-project/build/test/tools/llvm-cas/Output/validation.test.tmp/ac/v1.1/actions.v1
# .---command stderr------------
# | error: unexpected argument '-4' found
# |
# |   tip: to pass '-4' as a value, use '-- -4'
# |
# | Usage: truncate [OPTION]... [FILE]...
# |
# | For more information, try '--help'.
# `-----------------------------
# error: command failed with exit status: 1

--

********************
********************
Failed Tests (1):
 LLVM :: tools/llvm-cas/validation.test


Testing Time: 0.13s

Total Discovered Tests: 7
  Passed: 6 (85.71%)
  Failed: 1 (14.29%)
FAILED: test/CMakeFiles/check-llvm-tools-llvm-cas /llvm-project/build/test/CMakeFiles/check-llvm-tools-llvm-cas
cd /llvm-project/build/test && /usr/bin/python3 /llvm-project/build/./bin/llvm-lit -sv /llvm-project/llvm/test/tools/llvm-cas
ninja: build stopped: subcommand failed.
```

</details>

Re-run tests with GNU coreutils:

```bash
apt-get install coreutils-from-gnu coreutils-from-uutils- --allow-remove-essential
ninja -C build check-llvm-tools-llvm-cas
```

Now there are no errors:
```
ninja: Entering directory `build'
[13/14] Running lit suite /llvm-project/llvm/test/tools/llvm-cas

Testing Time: 0.13s

Total Discovered Tests: 7
  Passed: 7 (100.00%)
```

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to