From 4c504ab325d659b412e05684a31961d52cd326bb Mon Sep 17 00:00:00 2001 From: Zelin2001 Date: Thu, 21 Aug 2025 00:27:33 +0800 Subject: [PATCH] Make the test phase dash compatible (#26) In Makefile.am test phase substitutes `[[`` with POSIX shell `test`` command. --- Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index b82af162..63304148 100644 --- a/Makefile.am +++ b/Makefile.am @@ -512,7 +512,7 @@ endif echo RUN > bench/disk1/RUN-CHMOD if HAVE_POSIX # Doesn't run this test as root because the root user override permissions - if [[ $$EUID -ne 0 ]]; then \ + if test "$$EUID" -ne 0; then \ $(FAILENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) --test-run "chmod a-r bench/disk1/RUN-CHMOD" --test-expect-failure sync; \ fi endif @@ -532,7 +532,7 @@ endif echo HASH > bench/disk1/HASH-CHMOD if HAVE_POSIX # Doesn't run this test as root because the root user override permissions - if [[ $$EUID -ne 0 ]]; then \ + if test "$$EUID" -ne 0; then \ $(FAILENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) --test-run "chmod a-r bench/disk1/HASH-CHMOD" --test-expect-failure -h sync; \ fi endif