From patchwork Thu Jun 14 00:44:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ram Pai X-Patchwork-Id: 10463069 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 822A4600D0 for ; Thu, 14 Jun 2018 00:47:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 73D1728988 for ; Thu, 14 Jun 2018 00:47:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 68A1728BA8; Thu, 14 Jun 2018 00:47:17 +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=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A5F628988 for ; Thu, 14 Jun 2018 00:47:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0366A6B026B; Wed, 13 Jun 2018 20:47:02 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id F00546B026C; Wed, 13 Jun 2018 20:47:01 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D9F7D6B026D; Wed, 13 Jun 2018 20:47:01 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qk0-f198.google.com (mail-qk0-f198.google.com [209.85.220.198]) by kanga.kvack.org (Postfix) with ESMTP id AD0446B026B for ; Wed, 13 Jun 2018 20:47:01 -0400 (EDT) Received: by mail-qk0-f198.google.com with SMTP id x186-v6so3607401qkb.0 for ; Wed, 13 Jun 2018 17:47:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:sender:from:to:cc:subject:date :message-id:in-reply-to:references; bh=wA0yLiW8ZzyGForFWSpjVpsJn8QZUIqxgzyWYWLHSiQ=; b=kz+qg1o2JGNlVLEHOgEjqMe2XXvMmKtDwfeb4bfmAvR1fDUAchZH1E6LH4LvMAqhpo VAHt279/1G8CVYcxY51TA847oYcpB6dgCK8gpsrpnnrxmqtqEdZLwqwq3IpbVdqLPvaJ Zw5HpWZYBbuJmg65KrFYF9CUhCYplv/iO4Fbw67B3K4HGhWyX7oI9MpJ7NUjC9c9gXxF gayC0na0ZcduTKqRDPYHy3+9k5wOdyoyJRVevRqF6D80sKPHlo+Lxcxw9MuvKISJC7V9 AYj88kzpoxK56ijjCKEhqgOED/qzNt+QewYADnKvkcPJxAOPCmX99htW/lJV8zEnMmuY 3LyA== X-Gm-Message-State: APt69E2gGnYmvsivznnIwiXq14Y5FWEMZ6GaEA/d3p4fkaqToOsCPYs6 Pn3eeQ9couDhGj+IekHv5pCRQ8PBYJx3klaCnND3uBXKSM2LQQJZ9gMWTzFsdFlNqBw/ID1dHO5 YReLkI69zVee0R1PYZglTRf1Gs3Xg0edeZ0Tf1hEO/2Z1BssIsNO7a3CK8MZs95lr7D4kCDX7uq bACTwxtIP/Bzx2GAiKtJB8vOCyjeVaLs4yIH+FBpjDCD4PsWqC+6bnbrjZX0s+I1nC2MnTD1fB1 t/e0tpQwatedFioqh/7kfE/VwswEUzPWaNGcu5oWx7gTXXS6JRzR/xJ1ulqjvJB3EVIpmiNWokj 2MKxI6KbKzkrfOm1zDFPgHYwtUjoQ06n1J88bNlfcXjGKi0hmuC7tH5WRpEQm1/fIYMHYNXsjA= = X-Received: by 2002:aed:3c78:: with SMTP id u53-v6mr374872qte.201.1528937221526; Wed, 13 Jun 2018 17:47:01 -0700 (PDT) X-Received: by 2002:aed:3c78:: with SMTP id u53-v6mr374848qte.201.1528937220921; Wed, 13 Jun 2018 17:47:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528937220; cv=none; d=google.com; s=arc-20160816; b=vOgz1zX6iIf4+nJieiOLzgG0a0dS0XPAeNKhizApeoI9Cu3ocTFJ4Kr+Gl0oaM0X4i JQDgmWs7/+dj9kE1vcTQzgNLHGB9QeqdSUfaxwtX5g+w/T3wRvF4B4ZYX1uoLnBtBfvf 74avtOMAvt4iLXds+ZE4MLaJX+0MZz0ZTpFS5kNCLZKnFTpBgV1Z6EewexoiE0aomrCv Kxo0mUwt1E4r7APlZhKYqXz8e7g6KGMLr/h3ONaFoAOSLCKyZ14SReQa9DpGQVJXQoz/ avGzoGiULolFf9XITMGp36qxTWPD85kwS+/cfR8JZdiMwe7ru6RcdToWKXbW5MixFf/7 g7qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature:arc-authentication-results; bh=wA0yLiW8ZzyGForFWSpjVpsJn8QZUIqxgzyWYWLHSiQ=; b=yS0ntxC8blQBuhTN33O17OcQsLFkYMyvSbBNI5xXTi/vUbDm9wFYDNeW0kHjujzZUb 7WwDWwjB/acp/HTh06bfwZm1Tph3KHk7QZ51/aH9PiCDaKa88JK8KDwEssGaCsQAImuK BXxCV7DBFrgoRa6uQ7F/L3YEB62VpN+GfVkBoZC02AiGUKgNdQEbJcT0VHYUFwUjM6t6 Cz5frU9Qs8hKtrwrKCDLM3UQzzE0WyrX1uL5zPi54Hsn5gok8nc1R8aHsdQPG/IUwJ+i 8tUBn6imLXx9SSizSKs/VUo7RtYZJSqCRP9DnIAckjSWE1T+IbUPgFRALnQQ8PK1nu5U kfCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=R5vFKbOi; spf=pass (google.com: domain of ram.n.pai@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=ram.n.pai@gmail.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id f186-v6sor2324558qkj.37.2018.06.13.17.47.00 for (Google Transport Security); Wed, 13 Jun 2018 17:47:00 -0700 (PDT) Received-SPF: pass (google.com: domain of ram.n.pai@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=R5vFKbOi; spf=pass (google.com: domain of ram.n.pai@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=ram.n.pai@gmail.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com 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=wA0yLiW8ZzyGForFWSpjVpsJn8QZUIqxgzyWYWLHSiQ=; b=R5vFKbOibUvrIRZBss8W/boet++GM/5gVqXSUf7vCsWFcNGoZ0o+sACHaIMRjVMiF9 u9fiCce+FjdlqJ0BxVRby0CHecNkZVHrR2Sj9aLZWju3YYrEbk+NQbvc0irb/V2cFJKv YnR9JgkbMU3HiVa3gbKeasXnzdUhaVbKWAI9hRyDT9PdJie6ekE0N2Mfr0+OgSLaSI5g 3K165krNKtqh/YWlsT5g4hVKwr1SxFKSS5tmPPL0KOatQU98ZGL4aEEmrfBln9w4gQk3 8Xvwld5foY1mWXCZtZa/aBk0QMnvGMdIUObrrLi1EYrB1dWxtHz2nF/X3nVwf/wCYgZ0 2/mA== X-Google-Smtp-Source: ADUXVKJ/5JIKd5yADaazkRvAEHH5Wco/tOBJiawqu/4xEZGcbQ18AvBxA5NgokiasjCvKiMLuDxczw== X-Received: by 2002:a37:65c5:: with SMTP id z188-v6mr366750qkb.410.1528937220757; Wed, 13 Jun 2018 17:47:00 -0700 (PDT) Received: from localhost.localdomain (50-39-100-161.bvtn.or.frontiernet.net. [50.39.100.161]) by smtp.gmail.com with ESMTPSA id u31-v6sm3225898qtc.28.2018.06.13.17.46.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Jun 2018 17:47:00 -0700 (PDT) From: Ram Pai To: shuahkh@osg.samsung.com, linux-kselftest@vger.kernel.org Cc: mpe@ellerman.id.au, linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org, x86@kernel.org, linux-arch@vger.kernel.org, mingo@redhat.com, dave.hansen@intel.com, mhocko@kernel.org, bauerman@linux.vnet.ibm.com, linuxram@us.ibm.com, fweimer@redhat.com, msuchanek@suse.de, aneesh.kumar@linux.vnet.ibm.com Subject: [PATCH v13 08/24] selftests/vm: fix the wrong assert in pkey_disable_set() Date: Wed, 13 Jun 2018 17:44:59 -0700 Message-Id: <1528937115-10132-9-git-send-email-linuxram@us.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1528937115-10132-1-git-send-email-linuxram@us.ibm.com> References: <1528937115-10132-1-git-send-email-linuxram@us.ibm.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP 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. cc: Dave Hansen cc: Florian Weimer 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 57340b3..5fcccdb 100644 --- a/tools/testing/selftests/vm/protection_keys.c +++ b/tools/testing/selftests/vm/protection_keys.c @@ -415,7 +415,7 @@ void pkey_disable_set(int pkey, int flags) dprintf1("%s(%d) pkey_reg: 0x"PKEY_REG_FMT"\n", __func__, pkey, read_pkey_reg()); if (flags) - pkey_assert(read_pkey_reg() > orig_pkey_reg); + pkey_assert(read_pkey_reg() >= orig_pkey_reg); dprintf1("END<---%s(%d, 0x%x)\n", __func__, pkey, flags); }