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: 10463043 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 52E10603EE for ; Thu, 14 Jun 2018 00:47:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 42ECF28B9D for ; Thu, 14 Jun 2018 00:47:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 37E2F28BBE; Thu, 14 Jun 2018 00:47:06 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, 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 D6BD928B9D for ; Thu, 14 Jun 2018 00:47:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936018AbeFNArE (ORCPT ); Wed, 13 Jun 2018 20:47:04 -0400 Received: from mail-qk0-f195.google.com ([209.85.220.195]:41427 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935869AbeFNArB (ORCPT ); Wed, 13 Jun 2018 20:47:01 -0400 Received: by mail-qk0-f195.google.com with SMTP id w23-v6so2695069qkb.8; Wed, 13 Jun 2018 17:47:01 -0700 (PDT) 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-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=wA0yLiW8ZzyGForFWSpjVpsJn8QZUIqxgzyWYWLHSiQ=; b=Nb7cz9B4cV8g2COkIIcBUIKxXVmleozOxMUn1qf2pGa4/MtiaSJZU9g0qvPS95qJdh Y4bUD03DAKQkKAZCgkxNSd70zkt7u2PjsSe3RNnDgoqOttj2ilAIlpm8a4JLkreKrncZ BJFHiCv3V/eghP5J+e7upRhmh0nsXMrVYeQQ2wqKexiN3A2ahM+zMjnaRRelJEa+ERIl BhzUENEAYEHs7BJfDJa0n5E1yu2G3Ok4cCAqyqRmVJazH14Qjj4F5dXz2+eRKXUiP8uY 1Fh2kLmO4K2+E/5MAnfC8PjUZ7HYAaW8wwizbfbmwIR3GFUm95uMhVdog8ALXthPhcUK gQUg== X-Gm-Message-State: APt69E3nLCw5Y/GwAFmR5Mt8EP0mbuYvgn/JkGHnTy5hkz0Q+Y3XMuq2 kXrSADSXfnTKKeC/vBu0RuA= 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> Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org 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); }