From patchwork Mon Feb 6 21:42:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 9558827 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D77486021C for ; Mon, 6 Feb 2017 21:44:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C777327F88 for ; Mon, 6 Feb 2017 21:44:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B85B728138; Mon, 6 Feb 2017 21:44:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB77327F88 for ; Mon, 6 Feb 2017 21:44:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751418AbdBFVoG (ORCPT ); Mon, 6 Feb 2017 16:44:06 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:36486 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751172AbdBFVoF (ORCPT ); Mon, 6 Feb 2017 16:44:05 -0500 Received: by mail-pg0-f68.google.com with SMTP id 75so10089353pgf.3 for ; Mon, 06 Feb 2017 13:44:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=+ObEJQeQYYr7Y0Erx+h/tMIB0DST8JU/2w9DxJiQc6A=; b=pwxs5yDrMP7V3jHsLqdbDHJLoJU2K/AixoDl7tQG62OVVUmuYp5Nq/yFhkkq6kaFSR N6b1RoIExMvu2jHfZ0X/CGDlkOv/5lK25B9yyFTQCpGfYSpLx/jx+YHzfdUxu7yRZkSU G5VoC3zZiA+vFq4/348helcV3o34EKuHlAgz46GYk1egY2MAGAU3cv4YfY7Ag0HMBjau mTycJHx2yyJSduxjnK07jqmmdfX2Kz4lAu/gBbYlnL/uz5s8rzPIYva8lUla6WCgSyjt caz0Ue5ST07I63XmCiM4wooe2/d6CQp9FNQG45RDR5anpWPx+1lWyG++Jq2SNR9QO1Kj QS7w== 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=+ObEJQeQYYr7Y0Erx+h/tMIB0DST8JU/2w9DxJiQc6A=; b=GNaEoMGbm+jrhYHQgTNeBKQiCY9kR55qthrRl1bwKkiKZDg8HHFwd1z7YAo5fBYvfF RqWsKoE9Qze0+QL+BDzQQwIUneFf71s0rBrMSbDHhXFZnWrHEdxC/EsCHAsE55zUAHcu GYg9v/4XDiadE+HcL5jnmaim2rLAACtF5OS0Yst8e70G9BCOZVEqL0yVZ8LGZ4kM55hl F3m4Uivl9wqTveCytls634V8Lqhv7G2ulEHHWddYenVFwE3CIEe/BobKALmYuEXlyKvo MR3dncB+PV6Fn9GUA7I+pSPNC1GSbAADhDBpzLE2vJ3a9JEczRdkYJivVykIx0NOIUDD nOXA== X-Gm-Message-State: AIkVDXI8fBuHJGDpaktpfvVQ5KYDOrXARrwzwvn8Hv63SoPcEARt1T+kFmqXB5iZNYOQ4w== X-Received: by 10.99.154.9 with SMTP id o9mr15797028pge.69.1486417444624; Mon, 06 Feb 2017 13:44:04 -0800 (PST) Received: from ebiggers-linuxstation.kir.corp.google.com ([100.119.30.131]) by smtp.gmail.com with ESMTPSA id a25sm4997743pgd.26.2017.02.06.13.44.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 06 Feb 2017 13:44:04 -0800 (PST) From: Eric Biggers To: Theodore Ts'o Cc: fstests@vger.kernel.org, Eric Biggers Subject: [PATCH] xfstests-bld: be tolerant of /proc/slabinfo being missing Date: Mon, 6 Feb 2017 13:42:33 -0800 Message-Id: <20170206214237.8838-1-ebiggers3@gmail.com> X-Mailer: git-send-email 2.11.0.483.g087da7b7c-goog Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Eric Biggers In kernels compiled without /proc/slabinfo (CONFIG_SLABINFO), runtests.sh would report errors when trying to save the contents of /proc/slabinfo. Update runtests.sh to consider /proc/slabinfo to be optional, saving its contents only if present. Signed-off-by: Eric Biggers --- kvm-xfstests/test-appliance/files/root/runtests.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kvm-xfstests/test-appliance/files/root/runtests.sh b/kvm-xfstests/test-appliance/files/root/runtests.sh index 377001b..6fd6999 100755 --- a/kvm-xfstests/test-appliance/files/root/runtests.sh +++ b/kvm-xfstests/test-appliance/files/root/runtests.sh @@ -190,7 +190,7 @@ do find $i -type f ! -name check.time -print | xargs rm -f 2> /dev/null done -cp /proc/slabinfo /results/slabinfo.before +[ -e /proc/slabinfo ] && cp /proc/slabinfo /results/slabinfo.before cp /proc/meminfo /results/meminfo.before free -m @@ -321,7 +321,7 @@ do if test ! -f /.dockerenv ; then echo 3 > /proc/sys/vm/drop_caches fi - cp /proc/slabinfo "$RESULT_BASE/slabinfo.before" + [ -e /proc/slabinfo ] && cp /proc/slabinfo "$RESULT_BASE/slabinfo.before" cp /proc/meminfo "$RESULT_BASE/meminfo.before" echo -n "BEGIN TEST $i: $TESTNAME " ; date logger "BEGIN TEST $i: $TESTNAME " @@ -424,7 +424,7 @@ END { if (NR > 0) { if test ! -f /.dockerenv ; then echo 3 > /proc/sys/vm/drop_caches fi - cp /proc/slabinfo "$RESULT_BASE/slabinfo.after" + [ -e /proc/slabinfo ] && cp /proc/slabinfo "$RESULT_BASE/slabinfo.after" cp /proc/meminfo "$RESULT_BASE/meminfo.after" free -m gce_run_hooks fs-config-end $i @@ -434,5 +434,5 @@ END { if (NR > 0) { logger "END TEST $i: $TESTNAME " done -cp /proc/slabinfo /results/slabinfo.after +[ -e /proc/slabinfo ] && cp /proc/slabinfo /results/slabinfo.after cp /proc/meminfo /results/meminfo.after