From patchwork Fri Jun 1 00:14:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Theodore Ts'o X-Patchwork-Id: 162249 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 09152B6FBE for ; Fri, 1 Jun 2012 10:15:10 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758723Ab2FAAPH (ORCPT ); Thu, 31 May 2012 20:15:07 -0400 Received: from li9-11.members.linode.com ([67.18.176.11]:46859 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758731Ab2FAAPF (ORCPT ); Thu, 31 May 2012 20:15:05 -0400 Received: from root (helo=tytso-glaptop.cam.corp.google.com) by imap.thunk.org with local-esmtp (Exim 4.72) (envelope-from ) id 1SaFW8-0007CA-6O; Fri, 01 Jun 2012 00:15:00 +0000 Received: from tytso by tytso-glaptop.cam.corp.google.com with local (Exim 4.71) (envelope-from ) id 1SaFW6-0006LU-K6; Thu, 31 May 2012 20:14:58 -0400 From: Theodore Ts'o To: Ext4 Developers List Cc: Theodore Ts'o Subject: [PATCH 4/4] tests: fix the e2fsck test script to handle a missing test name Date: Thu, 31 May 2012 20:14:58 -0400 Message-Id: <1338509698-24349-4-git-send-email-tytso@mit.edu> X-Mailer: git-send-email 1.7.10.2.552.gaa3bb87 In-Reply-To: <1338509698-24349-1-git-send-email-tytso@mit.edu> References: <1338509698-24349-1-git-send-email-tytso@mit.edu> X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Signed-off-by: "Theodore Ts'o" --- tests/run_e2fsck | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/tests/run_e2fsck b/tests/run_e2fsck index 937a171..ab623e8 100644 --- a/tests/run_e2fsck +++ b/tests/run_e2fsck @@ -82,12 +82,23 @@ if [ "$SKIP_VERIFY" != "true" ] ; then status3=0 fi + if [ -z "$test_description" ] ; then + description="$test_name" + else + description="$test_name: $test_description" + fi + if [ "$status1" -eq 0 -a "$status2" -eq 0 -a "$status3" -eq 0 ] ; then - echo "$test_name: $test_description: ok" + echo "$description: ok" touch $test_name.ok else - echo "$test_name: $test_description: failed" - diff $DIFF_OPTS $EXP1 $OUT1 > $test_name.failed + echo "$description: failed" + rm -f $test_name.failed + if [ "$PASS_ZERO" = "true" ]; then + diff $DIFF_OPTS $test_dir/expect.0 \ + $test_name.0.log >> $test_name.failed + fi + diff $DIFF_OPTS $EXP1 $OUT1 >> $test_name.failed if [ "$ONE_PASS_ONLY" != "true" ]; then diff $DIFF_OPTS $EXP2 $OUT2 >> $test_name.failed fi