diff mbox series

[pseudo,06/20] test/test-statx: Add uutils test case

Message ID 1768520616-7289-7-git-send-email-mark.hatle@kernel.crashing.org
State New
Headers show
Series Consolidated pseudo patches | expand

Commit Message

Mark Hatle Jan. 15, 2026, 11:43 p.m. UTC
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
---
 test/test-statx.sh | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
diff mbox series

Patch

diff --git a/test/test-statx.sh b/test/test-statx.sh
index 045f6ff..feef8e6 100755
--- a/test/test-statx.sh
+++ b/test/test-statx.sh
@@ -3,6 +3,7 @@ 
 # SPDX-License-Identifier: LGPL-2.1-only
 #
 
+printf "statx null path: "
 tmplog="$(mktemp pseudo.log.XXXXXXXX)"
 ./test/test-statx >${tmplog} 2>&1
 rc=$?
@@ -10,9 +11,33 @@  rc=$?
 if grep -q "couldn't allocate absolute path for 'null'." ${tmplog} ; then
     echo "Unexpected message: \"couldn't allocate absolute path for 'null'.\" found."
     rc=1
+else
+    echo "passed"
 fi
 
 cat ${tmplog}
 
 rm $tmplog
+
+printf "uutils date: "
+# Try to figure out if we're using rust corutils
+if $(date --version 2>&1 | grep -q "uutils") ; then
+    tmplog="$(mktemp pseudo.log.XXXXXXXX)"
+    date >${tmplog} 2>&1
+    rc=$?
+
+    if grep -q "couldn't allocate absolute path for 'null'." ${tmplog} ; then
+        echo "Unexpected message: \"couldn't allocate absolute path for 'null'.\" found."
+        rc=1
+    else
+        echo passed
+    fi
+
+    cat ${tmplog}
+
+    rm $tmplog
+else
+    echo skipped
+fi
+
 exit $rc