From patchwork Fri Aug 19 20:51:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Rasmussen X-Patchwork-Id: 12949202 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96C53C3F6B0 for ; Fri, 19 Aug 2022 20:52:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352000AbiHSUwp (ORCPT ); Fri, 19 Aug 2022 16:52:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352119AbiHSUw3 (ORCPT ); Fri, 19 Aug 2022 16:52:29 -0400 Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 791CD10EEE2 for ; Fri, 19 Aug 2022 13:52:13 -0700 (PDT) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-3359a55dcb6so95108257b3.21 for ; Fri, 19 Aug 2022 13:52:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:from:to:cc; bh=cU7/6qINBgFAfTXfLa178LOY1yjmrSCVESmZNe7FU4M=; b=bC4lMI8huw1uRRzwGbHtFYE2tB88na003CekKY0ACebDw98OX4FLPryvf3oIjLvbpT 2Z94mnqJPrWYcjP3lmF0GohedIfZnStwZI38zjxUUxQx48j9wG65sUDiEbDITVLYRKcL mVtlRswKM70g0APD+T61jU6cKtU63dY0BC21ebFhGj0hneMmEysLC4lYHb5oDAVNIzpp mb1WTwMI3YxYE/fxX+RjWDwy8EJG82QrF3wHtWjI0Yh4kNcN3PEFdFExtn3hpGXpQYOj rmZcPvO+scdHRyaPD9DDquqWTzT/hefOPdLuGFDA0SzUJxmBxqB86WHfSQvwRiAOGOM6 arxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:x-gm-message-state:from:to:cc; bh=cU7/6qINBgFAfTXfLa178LOY1yjmrSCVESmZNe7FU4M=; b=fEw1vH5pCPmXrq1226DF8Oz2AhtNOEdGOws/VB4aUUGN8xB7d+jeEi5JAQeOI0pEYr hWh+nnWFffEFct7TZ0DGBqJzurxxzG8ewKeVApj+GcFNbiiUOdbxI36/RhsF6jq+bMcr v7d4c5r51z/qyomajloBEea4uRA6UFO5Z6QzCShNRblDNp3m2zK2kSkqVV5trOf3YV5k Ve5Qvbmeti5gBkvWn1AyBe9J3TtrwD5uoBymqjKXSJM96ZY9qRoBQ2YsHI5jsxBEMbMB kMLB2jkZjUVVlTgdHsw6PNr+nJJqgx5gZumpQfz3E3XSBt8G82TZ1hqh+uHT1HNBd3F3 6Y1w== X-Gm-Message-State: ACgBeo3UpErjyQIrH/hkOAEGJKSrz1iR77VC0lQuJqh4riZnUElurnnC WvzofmwADkTeOmPo+BFLkSXfC3tLuY+1koUen13j X-Google-Smtp-Source: AA6agR597bmial/03bil7OFmDdc43FwP1zL4eJRRyQeIFMDrkuV6ElwIhtWPrgaR/KqOaLYWWlpmihWtAUKx254JQc// X-Received: from ajr0.svl.corp.google.com ([2620:15c:2d4:203:baf:4c5:18b:2c4b]) (user=axelrasmussen job=sendgmr) by 2002:a25:dcd4:0:b0:690:6ce9:7bb5 with SMTP id y203-20020a25dcd4000000b006906ce97bb5mr9476909ybe.516.1660942332708; Fri, 19 Aug 2022 13:52:12 -0700 (PDT) Date: Fri, 19 Aug 2022 13:51:57 -0700 In-Reply-To: <20220819205201.658693-1-axelrasmussen@google.com> Message-Id: <20220819205201.658693-2-axelrasmussen@google.com> Mime-Version: 1.0 References: <20220819205201.658693-1-axelrasmussen@google.com> X-Mailer: git-send-email 2.37.1.595.g718a3a8f04-goog Subject: [PATCH v7 1/5] selftests: vm: add hugetlb_shared userfaultfd test to run_vmtests.sh From: Axel Rasmussen To: Alexander Viro , Andrew Morton , Dave Hansen , "Dmitry V . Levin" , Gleb Fotengauer-Malinovskiy , Hugh Dickins , Jan Kara , Jonathan Corbet , Mel Gorman , Mike Kravetz , Mike Rapoport , Nadav Amit , Peter Xu , Shuah Khan , Suren Baghdasaryan , Vlastimil Babka , zhangyi Cc: Axel Rasmussen , linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-mm@kvack.org, linux-security-module@vger.kernel.org, Shuah Khan Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org This not being included was just a simple oversight. There are certain features (like minor fault support) which are only enabled on shared mappings, so without including hugetlb_shared we actually lose a significant amount of test coverage. Reviewed-by: Shuah Khan Reviewed-by: Peter Xu Signed-off-by: Axel Rasmussen --- tools/testing/selftests/vm/run_vmtests.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/vm/run_vmtests.sh b/tools/testing/selftests/vm/run_vmtests.sh index de86983b8a0f..b8e7f6f38d64 100755 --- a/tools/testing/selftests/vm/run_vmtests.sh +++ b/tools/testing/selftests/vm/run_vmtests.sh @@ -121,9 +121,11 @@ run_test ./gup_test -a run_test ./gup_test -ct -F 0x1 0 19 0x1000 run_test ./userfaultfd anon 20 16 -# Test requires source and destination huge pages. Size of source -# (half_ufd_size_MB) is passed as argument to test. +# Hugetlb tests require source and destination huge pages. Pass in half the +# size ($half_ufd_size_MB), which is used for *each*. run_test ./userfaultfd hugetlb "$half_ufd_size_MB" 32 +run_test ./userfaultfd hugetlb_shared "$half_ufd_size_MB" 32 "$mnt"/uffd-test +rm -f "$mnt"/uffd-test run_test ./userfaultfd shmem 20 16 #cleanup