Re: [PATCH 1/2] test: delay watchdog checks in emacs.

Subject: Re: [PATCH 1/2] test: delay watchdog checks in emacs.

Date: Wed, 01 Jan 2014 11:58:11 -0400

To: notmuch@notmuchmail.org

Cc:

From: David Bremner


david@tethera.net writes:

> From: David Bremner <bremner@debian.org>
>
> Instead of checking immediately for the watched process, delay a
> minute, or in the case that process-attributes returns nil, for two
> minutes.  This is intended to cope with the case that
> process-attributes is unimplimented, and returns always returns nil.
> In this case, the watchdog check is the same as the two minute limit
> imposed by timeout.
> ---

It seems there are still lingering problems with this.

On a Debian Hurd system, the following consistently dies after running
for two minutes. It seems like our test harness can't cope with the
emacs server dying as well as it ought to.  I'm not sure what the right
answer is. A crude workaround would be to increase the hardcoded
timeout. Alternatively, maybe test_emacs should make some effort to
restart the server if it is no longer running.

#!/usr/bin/env bash
test_description="emacs fcc"
. ./test-lib.sh

for ((count=1; count<=1000; count++)); do
    id=fub.$count
    subject=meh
    echo attempting $count
    emacs_fcc_message \
	"$subject" \
	'This is a test message with inline attachment with a filename' \
	"(mml-attach-file \"$TEST_DIRECTORY/README\" nil nil \"inline\")
         (message-goto-eoh)
         (insert \"Message-ID: <$id>\n\")"
    delivered=$(find $MAIL_DIR/sent -type f | wc -l)
    if [[ $delivered != $count ]]; then
	GIT_EXIT_OK=1
	echo FATAL: $count attempted $delivered delivered
	exit 1;
    fi
done

test_done



Thread: