From patchwork Wed Jun 27 09:57:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artem Blagodarenko X-Patchwork-Id: 935372 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-ext4-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="UP2e/ZYJ"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41Fyyj4CTYz9s0w for ; Wed, 27 Jun 2018 19:58:05 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964830AbeF0J6F (ORCPT ); Wed, 27 Jun 2018 05:58:05 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:32951 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964810AbeF0J6E (ORCPT ); Wed, 27 Jun 2018 05:58:04 -0400 Received: by mail-lf0-f67.google.com with SMTP id f194-v6so932625lff.0 for ; Wed, 27 Jun 2018 02:58:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=FQwn0IfFXD8QXyPMybG5R7rFc8uBoAZoi/9RJGHQkF0=; b=UP2e/ZYJv3en1dEkT2Ph4vyyKAskM4iaOhu1ZOvVLvIe3eZ+vOASK+IxehOfBvBnuv 9RxQ0HLkNv18UP7+P5oQ+iWJQ3GMTMBkpAQzm7XTcBqo1DUMyJG6QOXr+qAngegqu9hK uyFt2Fx7cxkQDTEZra/7c8Cx11dtUPkUxcstvLziyQibROKNs2fT7leXL9uZfAtQrsLZ CU4tRtZEp0vAxJJ8DZ3N+0LPYFHpRdlHzu32HG3Zgw7OAo0Pt1O1AWAVMNU7DEnPLqjo NVClvFd9kkE3jaPN8dCOWXnfMjO51lp4YPEId9e1wc8mhmGTmW9HUDbYNzgX9o8JXDqv Cf9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=FQwn0IfFXD8QXyPMybG5R7rFc8uBoAZoi/9RJGHQkF0=; b=QxPWCyHk3OvAsdiPaNeWsjGEbgHI7tsk4tg2hIKq93IsctPmC1Af+tPJ4uaTOlSDC0 foaiT4vPQB8fr3Upid7la0f8ZHoSOyb/thFgrdKO8TFMeQasJyxT9m043EK4mMBNBzaa P+g6WFnqcamkkQh0zq7liDbI9CrWKo2ranlzEF5lOF6UjhxSLHC3/aKJkuyRRMFM8NJl 89a7i2gu+28f4Roejz0tyXLVvL/f47IP1a1t95onk6SnPxfybznndHfRv1wPIe43L07u njBPaLlFzdRW1xXw0SPlmYs79Ea7iFmM7nlcaIqsn9doMaeiEO1srwKg26ws+qUQyn70 L42w== X-Gm-Message-State: APt69E0vyjv8TnCBhYl4xjo7D+LPsm/WyCiar4/f4xVArb7PFlU6YHMe Nz/uAJZsPrr5EnEKgCbSQLTBfQ== X-Google-Smtp-Source: AAOMgpdblgXy5RRhPU4gR74KtknZPBF2QvvGowLMvUaeQoNticzh0UAxakbKMhQsZVJQXdTCPhNXaQ== X-Received: by 2002:a19:4895:: with SMTP id v143-v6mr2586585lfa.82.1530093482420; Wed, 27 Jun 2018 02:58:02 -0700 (PDT) Received: from localhost.localdomain ([217.78.238.76]) by smtp.gmail.com with ESMTPSA id z184-v6sm763453lfd.82.2018.06.27.02.58.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Jun 2018 02:58:01 -0700 (PDT) From: c17828 X-Google-Original-From: c17828 To: linux-ext4@vger.kernel.org Cc: adilger.kernel@dilger.ca, alexey.lyashkov@gmail.com, Andreas Dilger Subject: [PATCH] tests: make generated test scripts read-only Date: Wed, 27 Jun 2018 12:57:44 +0300 Message-Id: <20180627095744.32425-1-c17828@cray.com> X-Mailer: git-send-email 2.14.3 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Andreas Dilger Make generated test scripts read-only, to avoid errors by developers editing the generated test scripts and then having them accidentally clobbered when "make" is run again. Change-Id: I60d417b816b7c559b5e05baf4167fc2cf2a871cf Signed-off-by: Andreas Dilger --- tests/Makefile.in | 6 ++++-- tests/test_one.in | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/Makefile.in b/tests/Makefile.in index 7b9df62a..f97ebc66 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -15,6 +15,7 @@ all:: @DO_TEST_SUITE@ test_one test_script test_one: $(srcdir)/test_one.in Makefile mke2fs.conf @echo "Creating test_one script..." + @[ -f test_one ] && chmod u+w test_one || true @echo "#!/bin/sh" > test_one @echo "HTREE=y" >> test_one @echo "QUOTA=y" >> test_one @@ -23,14 +24,15 @@ test_one: $(srcdir)/test_one.in Makefile mke2fs.conf @echo "SIZEOF_TIME_T=@SIZEOF_TIME_T@" >> test_one @echo "DD=@DD@" >>test_one @cat $(srcdir)/test_one.in >> test_one - @chmod +x test_one + @chmod +x-w test_one test_script: test_one test_script.in Makefile mke2fs.conf @echo "Creating test_script..." + @[ -f test_script ] && chmod u+w test_script || true @echo "#!/bin/sh" > test_script @echo "SRCDIR=@srcdir@" >> test_script @cat $(srcdir)/test_script.in >> test_script - @chmod +x test_script + @chmod +x-w test_script mke2fs.conf: $(srcdir)/mke2fs.conf.in $(CP) $(srcdir)/mke2fs.conf.in mke2fs.conf diff --git a/tests/test_one.in b/tests/test_one.in index c1f18dc8..27e0ca64 100644 --- a/tests/test_one.in +++ b/tests/test_one.in @@ -81,6 +81,7 @@ if [ $elapsed -gt 60 -a ! -f $test_dir/is_slow_test ]; then tee $test_name.slow echo "$test_name: consider adding $test_dir/is_slow_test" fi +[ -f $test_name.failed ] && grep . $test_name.failed if [ "$SKIP_UNLINK" != "true" ] ; then rm -f $TMPFILE