From: Dave Chinner <david@fromorbit.com>
To: xfs@oss.sgi.com
Subject: [PATCH 5/5] xfstests: fix broken redirects in generic/131
Date: Wed, 1 May 2013 18:32:03 +1000 [thread overview]
Message-ID: <1367397123-2530-6-git-send-email-david@fromorbit.com> (raw)
In-Reply-To: <1367397123-2530-1-git-send-email-david@fromorbit.com>
From: Dave Chinner <dchinner@redhat.com>
generic/131 attempts to kill processes that may no longer exist when
the test finishes and has a broken redirect for the error messages
and they end up in a file nemaed "1" in the xfstests root instead of
/dev/null.
Not only that, the attempts to redirect stderr to stdout in the
middle of the test use incorrect redirect syntax, so they create an
empty file named "1" in the xfstests root...
IOWs, all the redirects in the test are broken. Fix them and clean
up the failure case to use the exit trap to trigger the cleanup
function....
Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
tests/generic/131 | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/tests/generic/131 b/tests/generic/131
index 95eb612..6c3131c 100755
--- a/tests/generic/131
+++ b/tests/generic/131
@@ -33,8 +33,8 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup()
{
- kill $locktest_pid2 2&>1 /dev/null
- kill $locktest_pid1 2&>1 /dev/null
+ kill $locktest_pid2 > /dev/null 2>&1
+ kill $locktest_pid1 > /dev/null 2>&1
_cleanup_testdir
}
@@ -60,23 +60,21 @@ elif [ $$ -gt 32000 ]; then
fi
# Start the server
-src/locktest -p $PORT $TESTFILE > $testdir/server.out 2>&1 &
+src/locktest -p $PORT $TESTFILE 2>&1 > $testdir/server.out &
locktest_pid1=$!
sleep 1
# Start the client
-src/locktest -p $PORT -h localhost $TESTFILE > $testdir/client.out 2>&1
+src/locktest -p $PORT -h localhost $TESTFILE 2>&1 > $testdir/client.out
locktest_pid2=$!
result=$?
if [ $result -eq 0 ]; then
- echo success!
+ echo success!
+ status=0
else
- echo "Client reported failure ($result)"
- cat $testdir/*.out
- _cleanup
- exit $status
+ echo "Client reported failure ($result)"
+ cat $testdir/*.out
fi
-status=0
exit
--
1.7.10.4
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2013-05-01 8:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-01 8:31 [PATCH 0/5] xfstests: various fixes Dave Chinner
2013-05-01 8:31 ` [PATCH 1/5] xfstests: fix last test runtime output Dave Chinner
2013-05-03 14:24 ` Rich Johnston
2013-05-01 8:32 ` [PATCH 2/5] xfstests: 310 fails with existing directory error Dave Chinner
2013-05-03 14:25 ` Rich Johnston
2013-05-01 8:32 ` [PATCH 3/5] xfstests: filter EA paths used by dump Dave Chinner
2013-05-03 14:25 ` Rich Johnston
2013-05-01 8:32 ` [PATCH 4/5] xfstests: fix incorrect redirect in generic/232 Dave Chinner
2013-05-03 14:26 ` Rich Johnston
2013-05-01 8:32 ` Dave Chinner [this message]
2013-05-03 14:26 ` [PATCH 5/5] xfstests: fix broken redirects in generic/131 Rich Johnston
2013-05-01 9:31 ` [PATCH 0/5] xfstests: various fixes Dave Chinner
2013-05-03 14:32 ` Rich Johnston
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=1367397123-2530-6-git-send-email-david@fromorbit.com \
--to=david@fromorbit.com \
--cc=xfs@oss.sgi.com \
/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