On Sun, Aug 3, 2025 at 2:01 PM Sergei Trofimovich <[email protected]> wrote:
> $ while :; do make check || break; done
> [...]
> *** The script /home/slyfox/dev/tarballs/ed-1.22/testsuite/filter.ed exited abnormally ***

I'm not able to reproduce this. After applying the patch below, allowing `make check' to run in parallel, I see:

$ parallel -j50 make < <(yes check | dd bs=6 count=500) |
  grep 'completed successfully' |
  wc -l
500+0 records in
500+0 records out
3000 bytes (3.0 kB, 2.9 KiB) copied, 0.00191118 s, 1.6 MB/s
500
$

--- a/testsuite/check.sh
+++ b/testsuite/check.sh
@@ -9,7 +9,7 @@ LC_ALL=C
 export LC_ALL
 objdir=`pwd`
 testdir=`cd "$1" ; pwd`
-ED="${objdir}"/ed
+ED=${objdir}/ed
 framework_failure() { echo "failure in testing framework" ; exit 1 ; }

 if [ ! -f "${ED}" ] || [ ! -x "${ED}" ] ; then
@@ -17,9 +17,9 @@ if [ ! -f "${ED}" ] || [ ! -x "${ED}" ] ; then
        exit 1
 fi

-if [ -d tmp ] ; then rm -rf tmp ; fi
-mkdir tmp
-cd "${objdir}"/tmp || framework_failure
+tmpdir=${objdir}/tmp.$$
+if [ -d "$tmpdir" ] ; then rm -rf "$tmpdir" ; fi
+mkdir "$tmpdir" && cd "$tmpdir" || framework_failure

 cp "${testdir}"/test.txt test.txt || framework_failure
 cp "${testdir}"/test.bin test.bin || framework_failure
@@ -120,7 +120,7 @@ rm -f test.txt test.bin empty

 if [ ${fail} = 0 ] ; then
        echo "tests completed successfully."
-       cd "${objdir}" && rm -r tmp
+       cd "$objdir" && rm -r "$tmpdir" || framework_failure
 else
        echo "tests failed."
        echo "Please, send a bug report to [email protected]"

Reply via email to