From patchwork Mon Nov 6 08:57:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ram Pai X-Patchwork-Id: 834604 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yVq4v1XDNz9s82 for ; Mon, 6 Nov 2017 21:47:11 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="FwSWI1Mz"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3yVq4t6vxNzDrJs for ; Mon, 6 Nov 2017 21:47:10 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="FwSWI1Mz"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:400d:c0d::244; helo=mail-qt0-x244.google.com; envelope-from=ram.n.pai@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="FwSWI1Mz"; dkim-atps=neutral Received: from mail-qt0-x244.google.com (mail-qt0-x244.google.com [IPv6:2607:f8b0:400d:c0d::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3yVmjH6q8HzDr5Q for ; Mon, 6 Nov 2017 20:00:03 +1100 (AEDT) Received: by mail-qt0-x244.google.com with SMTP id h4so9980066qtk.8 for ; Mon, 06 Nov 2017 01:00:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=2c5+qJu4aKHALbG6MVUrVsP406S3tu8XQ/pXwzUnD8Y=; b=FwSWI1MzVoMJJQfxXjd0mcNLKM0UAJneaYiNLKwHsX8lajOqCJkGR1Z9PGtYWOMhjO 4qADgpVYLcXm0eKAlwvzWGM4tJOppPlxj3pFikySAI0mLKHP/nx/wc66Llyp/jdG6ch7 jD/FyASvHjZwzix1aRJVicTeF4wGyRkizQ06Eite9+ECFm3qLxoXSGCzQlPiaVqs7s8g Qrs/37M/UyorADoCKyRiGDDEOIgpU5HOnbbuIGT06L0vLsSpjmGwEXHsfG3x6ptU0tUZ ZLR+s/aZ70CgCm8yUYAkJsIwGy3GLqJhSO3tLkX42PKn+Wte09tcM3KTw2vUhCLxw3Wf 3OmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=2c5+qJu4aKHALbG6MVUrVsP406S3tu8XQ/pXwzUnD8Y=; b=kAQ3eFVeE7xK63QaRAJaSnIIB+YI0mci1xBE2OHcQD//nWuuGZrXVk6jBKyShz8p8I /gaBLS/jEBfaVjCy4gYZen9gnchPbDIJrLBx93uKcblvdwuZjGgs7ont89lJW0eYLHwY n9lvKy82qVaELCAsIVolngJY9bQuYL8bbk+0xunFIP/mDHEkvLUQsIhCSlxYrL6gM/T9 eJbTwBETZKXHWxrX59nQ8Atzz7cj9FjMfARkRd/Dj21xhHRzuZ6sLPsY12Vivn5O6GsY BUiXmXLcSDsoYz7Gtn1fRL5xobkWS0GCOAUHJorzhp9VLjVHpwqPZCAMZ4B/xDqLkrUJ 2/wQ== X-Gm-Message-State: AMCzsaXxZZirZkjorg4Hx/e0B7BwBsR5Opo6mdohOPgcHOhbS1tnxnmQ VotA9liQaaGj2I2r0ScSRHM= X-Google-Smtp-Source: ABhQp+Q1UiaylCka5yKhNXMa6XGC0ekv8ui5oxdhOFvOGSs1Ga8WmICEaDZT212darJCQhe8OIYebQ== X-Received: by 10.237.33.186 with SMTP id l55mr22105159qtc.71.1509958802105; Mon, 06 Nov 2017 01:00:02 -0800 (PST) Received: from localhost.localdomain (50-39-103-96.bvtn.or.frontiernet.net. [50.39.103.96]) by smtp.gmail.com with ESMTPSA id r26sm8001094qki.42.2017.11.06.00.59.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Nov 2017 01:00:01 -0800 (PST) From: Ram Pai To: mpe@ellerman.id.au, mingo@redhat.com, akpm@linux-foundation.org, corbet@lwn.net, arnd@arndb.de Subject: [PATCH v9 37/51] selftest/vm: fix the wrong assert in pkey_disable_set() Date: Mon, 6 Nov 2017 00:57:29 -0800 Message-Id: <1509958663-18737-38-git-send-email-linuxram@us.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1509958663-18737-1-git-send-email-linuxram@us.ibm.com> References: <1509958663-18737-1-git-send-email-linuxram@us.ibm.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, ebiederm@xmission.com, linux-doc@vger.kernel.org, x86@kernel.org, dave.hansen@intel.com, linux-kernel@vger.kernel.org, linuxram@us.ibm.com, mhocko@kernel.org, linux-mm@kvack.org, paulus@samba.org, aneesh.kumar@linux.vnet.ibm.com, linux-kselftest@vger.kernel.org, bauerman@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org, khandual@linux.vnet.ibm.com Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" If the flag is 0, no bits will be set. Hence we cant expect the resulting bitmap to have a higher value than what it was earlier. Signed-off-by: Ram Pai --- tools/testing/selftests/vm/protection_keys.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/testing/selftests/vm/protection_keys.c b/tools/testing/selftests/vm/protection_keys.c index 8e2e277..5aba137 100644 --- a/tools/testing/selftests/vm/protection_keys.c +++ b/tools/testing/selftests/vm/protection_keys.c @@ -443,7 +443,7 @@ void pkey_disable_set(int pkey, int flags) dprintf1("%s(%d) pkey_reg: 0x%lx\n", __func__, pkey, rdpkey_reg()); if (flags) - pkey_assert(rdpkey_reg() > orig_pkey_reg); + pkey_assert(rdpkey_reg() >= orig_pkey_reg); dprintf1("END<---%s(%d, 0x%x)\n", __func__, pkey, flags); }