From patchwork Wed Mar 20 22:28:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 10862669 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 924131515 for ; Wed, 20 Mar 2019 22:29:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 789F329E50 for ; Wed, 20 Mar 2019 22:29:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6D0C529ED8; Wed, 20 Mar 2019 22:29:20 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 0DC7E29E50 for ; Wed, 20 Mar 2019 22:29:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727689AbfCTW2z (ORCPT ); Wed, 20 Mar 2019 18:28:55 -0400 Received: from mail-yw1-f67.google.com ([209.85.161.67]:33432 "EHLO mail-yw1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727540AbfCTW2y (ORCPT ); Wed, 20 Mar 2019 18:28:54 -0400 Received: by mail-yw1-f67.google.com with SMTP id a199so3375556ywa.0; Wed, 20 Mar 2019 15:28:53 -0700 (PDT) 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=Bx9EJikvDMDGUCNAwxp4SdiC4KEOqeo4PV+oxcc7bOY=; b=IasSFqtBfIra77EMpkfxc+vdxCG82hYuduGtDF/TNWQ0ZJXOQkWGcnipX9QvepY8RW MNFb/PVGRWtnZ7NASrbvA6jNXSazF3IYKhHeIjSnJgtD8ZVMWOfhHHjxanWO26vaRdis WmLjNGtooFwrcBIcosIuh0DAoL6H3XPoUvTw7yqccvFIioo1bk2AKvZLPrgjx97Dh6GU XMUAydm3dzL/CoIdTepa1lzwxZ2kkGFGokAFnzhxlQRhdOzALMclPvbiqx613g0/CNV9 8lxNd0WgkmT5h/m7bp9di3185ve0rRclBhJxgEwm5E8GRHxEyZtscesh2eYBJVoKvhgY m7Pw== X-Gm-Message-State: APjAAAV908AyDKKe+cFaATdxk6+QywxiTlDnduIOpftEZzJqOLaBRT+s FXN6BvLQ+JinvKbTQlvjffg= X-Google-Smtp-Source: APXvYqwB1B3dKfMqnsDAG+nmoEINKciwiZmKc32r/lIlls0no3VQOd2mh4fBVo4UDYofa2t3eVLq9g== X-Received: by 2002:a25:65d4:: with SMTP id z203mr345117ybb.370.1553120933151; Wed, 20 Mar 2019 15:28:53 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id p1sm1067327ywg.12.2019.03.20.15.28.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Mar 2019 15:28:52 -0700 (PDT) Received: by 42.do-not-panic.com (sSMTP sendmail emulation); Wed, 20 Mar 2019 22:28:49 +0000 From: Luis Chamberlain To: akpm@linux-foundation.org, keescook@chromium.org Cc: sandeen@redhat.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Luis Chamberlain Subject: [PATCH 3/6] test_sysctl: ignore diff output on verify_diff_w() Date: Wed, 20 Mar 2019 22:28:28 +0000 Message-Id: <20190320222831.8243-4-mcgrof@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190320222831.8243-1-mcgrof@kernel.org> References: <20190320222831.8243-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When verify_diff_w() is used we care about the result, not the verbose output, and although we use -q, that still gives us a chatty message about if the files differ or not. Since verify_diff_w() uses stdinput the chatty message says whether or not "-" matches the target file, and this just seems rather odd. Better to just ignore that messsage all together, what we really care about i sthe results, the return value and we check for that. Signed-off-by: Luis Chamberlain --- tools/testing/selftests/sysctl/sysctl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/sysctl/sysctl.sh b/tools/testing/selftests/sysctl/sysctl.sh index e0c8404da6b0..f51987d0d32d 100755 --- a/tools/testing/selftests/sysctl/sysctl.sh +++ b/tools/testing/selftests/sysctl/sysctl.sh @@ -179,7 +179,7 @@ verify() verify_diff_w() { - echo "$TEST_STR" | diff -q -w -u - $1 + echo "$TEST_STR" | diff -q -w -u - $1 > /dev/null return $? }