From patchwork Wed Nov 28 16:46:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amir Goldstein X-Patchwork-Id: 1004655 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="r0Rjr9R7"; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 434mll0rcLz9s2P for ; Thu, 29 Nov 2018 03:47:14 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 1A5EA3E79CC for ; Wed, 28 Nov 2018 17:47:12 +0100 (CET) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [217.194.8.2]) by picard.linux.it (Postfix) with ESMTP id F2C633E7985 for ; Wed, 28 Nov 2018 17:46:56 +0100 (CET) Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by in-2.smtp.seeweb.it (Postfix) with ESMTPS id 8A705601932 for ; Wed, 28 Nov 2018 17:46:56 +0100 (CET) Received: by mail-wm1-x344.google.com with SMTP id s14so3111467wmh.1 for ; Wed, 28 Nov 2018 08:46:56 -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:in-reply-to:references; bh=yojRlIZoej7InWD49JteBk5ja2J1dC1pYhevihIx5eo=; b=r0Rjr9R703byUfZxVsjY09yUSXPV8hxZuCfUU4Spu0jQ1ylkHBAhdxwfnrnjmJ5SGO P2Jwtkv8Z5sAVzCvpv+CQZvOUuRNw3r36fJuv6rDve2a/CfU7WJoTrDYAheEoAWiKfr/ qk2O7V6Xym1qrgUXMYtXMy7JidHzCc239EwjxNGBClpcO5giDQa5YaK8iPFjkVHmYpws R+FTSRD4kQVZ0bNahWq0xCdafiahg9Aya6BZHlMHx5LmslgLdyCjMI0WPOHzeRq2+aAq AxoA4Yv7TDsgHjAF9Gpr+pw6/d2ZHUsJq0xwGsnwHqTtrRoqVXFVujaruUDKQ/WuY4vd CK4Q== 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; bh=yojRlIZoej7InWD49JteBk5ja2J1dC1pYhevihIx5eo=; b=lZOP0fZDUllPHHGz163Jp+cldyCCnn/jtuc2vZqJnznjz0Sep6ELPbqhy4fNZC944O v80F3QMw/YfuUvXKhkM4ZKrei8L+K6JODAqSQYriiiuqNdQXDfcPS3c3oIkkCbNRLy5+ v510OgRAEHlFWeFPPwDM3sMZXyPny/k61L88BUQ7E6TClRMbEkYebEKa7xqojEDt/SGR rdvUtN0MMJfpWYCOkzfaxdmhCUZzr3SQNr6hiNLzImJwg+iQlQL5Nx5x8cyowAucCOhT 7MPB04v2Q7jbY8KI46wjoTXajEMbcryIVk3N7oyPmEc6yd6O4v97reQwS9j7gKqdaimY bScg== X-Gm-Message-State: AA+aEWYsI09Et51gPbz3xuh1RCjyGkH4Y58S3/rvkeqTz+rEGyw+HpMg NgS87kTzIbTj27TqMA0lOJ0= X-Google-Smtp-Source: AFSGD/V3bDMLae7Uii7A6EWNhmT/b7G+v2taV3/oEf6m+NXZOqaEHTd3JlHVExL2xnyXysMmQ28Lyg== X-Received: by 2002:a1c:1c88:: with SMTP id c130-v6mr3430052wmc.115.1543423616036; Wed, 28 Nov 2018 08:46:56 -0800 (PST) Received: from localhost.localdomain ([37.46.46.74]) by smtp.gmail.com with ESMTPSA id 126-v6sm2732945wme.48.2018.11.28.08.46.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Nov 2018 08:46:55 -0800 (PST) From: Amir Goldstein To: Cyril Hrubis Date: Wed, 28 Nov 2018 18:46:42 +0200 Message-Id: <20181128164645.783-4-amir73il@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181128164645.783-1-amir73il@gmail.com> References: <20181128164645.783-1-amir73il@gmail.com> X-Virus-Scanned: clamav-milter 0.99.2 at in-2.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-2.smtp.seeweb.it Cc: linux-unionfs@vger.kernel.org, ltp@lists.linux.it, Miklos Szeredi Subject: [LTP] [PATCH v4 3/6] syscalls/readahead02: fail test if readahead did not use any cache X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" The heuristic of failing the test only if not saving any io has false negatives with overlayfs readahead() bug, but readahead() with overlayfs always warns on "using less cache then expected", when actually, it is using no cache at all. Add another condition to fail the test if readahead did not use any cache at all, which always detected the overlayfs bug. Signed-off-by: Amir Goldstein Acked-by: Jan Stancek --- testcases/kernel/syscalls/readahead/readahead02.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testcases/kernel/syscalls/readahead/readahead02.c b/testcases/kernel/syscalls/readahead/readahead02.c index 88eb5fbff..0acdad482 100644 --- a/testcases/kernel/syscalls/readahead/readahead02.c +++ b/testcases/kernel/syscalls/readahead/readahead02.c @@ -280,6 +280,8 @@ static void test_readahead(void) */ if (cached_ra * 1024 > testfile_size / 2) tst_res(TPASS, "using cache as expected"); + else if (!cached_ra) + tst_res(TFAIL, "readahead failed to use any cache"); else tst_res(TWARN, "using less cache than expected"); } else {