[llvm] [llvm-cas][test] Use portable truncate size spelling (PR #195828)
Denys Fedoryshchenko via llvm-commits
llvm-commits at lists.llvm.org
Tue May 5 03:47:26 PDT 2026
https://github.com/nuclearcat created https://github.com/llvm/llvm-project/pull/195828
Use `truncate -s-40` instead of `truncate -s -40` in the CAS validation test.
Some truncate implementations, such as uutils coreutils(Ubuntu 25.10), parse the split negative size argument as an option and reject it. Attaching the argument to `-s` keeps the behavior the same while avoiding that parsing issue.
This fixes the test on systems where `truncate -s -40` fails.
>From 7b55cda4529d4c1951acbd16527a21ff1d730558 Mon Sep 17 00:00:00 2001
From: Denys Fedoryshchenko <denys.f at collabora.com>
Date: Tue, 5 May 2026 13:45:56 +0300
Subject: [PATCH] [llvm-cas][test] Use portable truncate size spelling
Use `truncate -s-40` instead of `truncate -s -40` in the CAS validation
test.
Some truncate implementations, such as uutils coreutils(Ubuntu 25.10), parse the split
negative size argument as an option and reject it. Attaching the argument
to `-s` keeps the behavior the same while avoiding that parsing issue.
This fixes the test on systems where `truncate -s -40` fails.
Signed-off-by: Denys Fedoryshchenko <denys.f at collabora.com>
---
llvm/test/tools/llvm-cas/validation.test | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/test/tools/llvm-cas/validation.test b/llvm/test/tools/llvm-cas/validation.test
index a41cb8a3faad8..e9133609bc33a 100644
--- a/llvm/test/tools/llvm-cas/validation.test
+++ b/llvm/test/tools/llvm-cas/validation.test
@@ -42,5 +42,5 @@ RUN: llvm-cas --cas %t/ac --validate
# Note: records are 40 bytes (32 hash bytes + 8 byte value), so trim the last
# allocated record, leaving it invalid.
-RUN: truncate -s -40 %t/ac/v1.1/actions.v1
+RUN: truncate -s-40 %t/ac/v1.1/actions.v1
RUN: not llvm-cas --cas %t/ac --validate
More information about the llvm-commits
mailing list