linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Ext4 Developers List <linux-ext4@vger.kernel.org>
Cc: bensberg@justemail.net, Theodore Ts'o <tytso@mit.edu>
Subject: [PATCH 2/2] tests: clean up the temp file if test_one is interrupted
Date: Mon,  9 Jun 2014 10:50:51 -0400	[thread overview]
Message-ID: <1402325451-5275-2-git-send-email-tytso@mit.edu> (raw)
In-Reply-To: <1402325451-5275-1-git-send-email-tytso@mit.edu>

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 tests/test_one.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/test_one.in b/tests/test_one.in
index 01a9260..eb28313 100644
--- a/tests/test_one.in
+++ b/tests/test_one.in
@@ -31,6 +31,7 @@ fi
 test_name=`echo $test_dir | sed -e 's;.*/;;'`
 
 TMPFILE=$(mktemp -t e2fsprogs-tmp-$test_name.XXXXXX)
+trap 'rm -f $TMPFILE ; exit' 1 2 15
 
 if [ -f $test_dir ] ; then
 	exit 0;
-- 
2.0.0


  reply	other threads:[~2014-06-09 14:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-04 12:28 [PATCH] tests: for mktemp the exes must be the final characters of the name Benno Schulenberg
2014-06-04 22:31 ` Andreas Dilger
2014-06-05  3:28   ` Theodore Ts'o
2014-06-09 14:49   ` Theodore Ts'o
2014-06-09 14:50     ` [PATCH 1/2] tests: fix left-over e2fsprogs-tmp files not getting clean up Theodore Ts'o
2014-06-09 14:50       ` Theodore Ts'o [this message]
2014-06-09 20:34       ` Andreas Dilger
2014-06-09 23:45         ` Theodore Ts'o
2014-06-10  0:47           ` Andreas Dilger
2014-06-10  1:41             ` Theodore Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1402325451-5275-2-git-send-email-tytso@mit.edu \
    --to=tytso@mit.edu \
    --cc=bensberg@justemail.net \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).