From 3a6be8a6eccc91fcc12c3c97d2b585bcafc79836 Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Sun, 1 Dec 2013 14:42:04 +0100 Subject: [PATCH] parallel: test of $TMPDIR running full. --- src/parallel | 4 +++- testsuite/tests-to-run/parallel-local11.sh | 5 +++++ testsuite/wanted-results/parallel-local11 | 4 ++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/parallel b/src/parallel index 67283f8e..54d9245e 100755 --- a/src/parallel +++ b/src/parallel @@ -4927,7 +4927,9 @@ sub print { my $pos = tell $in_fd; print $in_fd "x"x8193; if(tell $in_fd == $pos) { - ::error("Cannot append to buffer file in \$TMPDIR. Disk full?\n"); + ::error("Output is incomplete. Cannot append to buffer file in \$TMPDIR. Is the disk full?\n"); + ::error("Change \$TMPDIR with --tmpdir.\n"); + ::wait_and_exit(255); } truncate $in_fd, $pos; # Seek to start diff --git a/testsuite/tests-to-run/parallel-local11.sh b/testsuite/tests-to-run/parallel-local11.sh index 3fa40414..59aa9627 100755 --- a/testsuite/tests-to-run/parallel-local11.sh +++ b/testsuite/tests-to-run/parallel-local11.sh @@ -10,6 +10,11 @@ echo '### Test if we can deal with output > 4 GB' echo '**' +echo "### Test --tmpdir running full. bug #40733 was caused by this" + stdout parallel -j1 --tmpdir /run/shm cat /dev/zero ::: dummy + +echo '**' + echo "### Test Force outside the file handle limit, 2009-02-17 Gave fork error" (echo echo Start; seq 1 20000 | perl -pe 's/^/true /'; echo echo end) | stdout parallel -uj 0 | egrep -v 'processes took|adjusting' diff --git a/testsuite/wanted-results/parallel-local11 b/testsuite/wanted-results/parallel-local11 index 09f68c2f..35524491 100644 --- a/testsuite/wanted-results/parallel-local11 +++ b/testsuite/wanted-results/parallel-local11 @@ -1,6 +1,10 @@ ### Test if we can deal with output > 4 GB 46a318993dfc8e2afd71ff2bc6f605f1 - ** +### Test --tmpdir running full. bug #40733 was caused by this +parallel: Error: Output is incomplete. Cannot append to buffer file in $TMPDIR. Is the disk full? +parallel: Error: Change $TMPDIR with --tmpdir. +** ### Test Force outside the file handle limit, 2009-02-17 Gave fork error parallel: Warning: Only enough file handles to run 506 jobs in parallel. Raising ulimit -n or /etc/security/limits.conf may help.