Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp128280rdb; Thu, 1 Feb 2024 04:20:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IEJ7Kl/ZYL43l45GfNBoLPMIg++slrrHFAO5N4QEK0HArtyovt2dJt3KGc5Am7BRgiDK39d X-Received: by 2002:a05:6a20:7526:b0:19a:fad2:518b with SMTP id r38-20020a056a20752600b0019afad2518bmr4252269pzd.5.1706790025802; Thu, 01 Feb 2024 04:20:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706790025; cv=pass; d=google.com; s=arc-20160816; b=ygajjbndHjt+S8e//roEwf4fQjfheekMVHl3vTHwVXBe2A7ZjZiPJyFznoW108eoaN TUmdtgJZ9vs5tOgejaNVVrCqCyLCq0aWycoHS8tEsysdAofAzUquAt58Dtq5ic5PMm16 zmo1Uac8VGQJQ4LX8D7oK3AyG3bF90/23AsIy46jGPF6RA2+KeHEz1SH/DPab0mmh/T9 Dyp02jnZfzhbmuYvLKUyjmocdH7YGrSAVeM8hWI2C4vcZD6ofUsO86zRvsAfUmw+3Cbv aa7coKs0QRN9BMq45ub8NaGuWg6J07k/+RPWvxa6XqZEUvRPpwo6Rxuo3fD8WP4z9H9Z Kzgw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=PoF+3hQyBjW0Wqz3kA3/JFt8Gn0BHpxTGgftvJLp8pw=; fh=j2OXx+wWHUl4GQ4pE6RsEPJ2hnz3LVWSXGXaNcyEKuM=; b=ygD+TDnni88+wY491jIql80dInqarmfGzsRoBNMe5f7YU6ly3v5lmfWE785rWzw3U5 rkltVC5hl5VM+VBEH9jlhQgEog20iQ2qwVtT+gzMLUL55/P7LaE4Xp1ri2NVj1kw/M3e 7db563y9Q4+DCqTekDrFz7gbLQ3SGNFJEJI5J0He5O8u4CGEYnW65WmnRqlB69JQPp6G M52cxdR0pixw6MeRbl34rLftO13+uA8LQZlkCV7jv6VMJl6vURah+D8TbB/MJH0uf+0t jjAdkljqHBd5MPaHeG19ujakOQi7+yy21zU3hFeZ8l/HjNICnhhDvX5A47KnlwvydAav TG9w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-48086-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48086-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com X-Forwarded-Encrypted: i=1; AJvYcCU0SDMIoFEC2SBrMxuNHB3llBTe3JPXOEX/pbs+uehJMUX+g1CdbYVPhNLA2vbE1eaxt4Aem3R+A6Uyil6WMlmkt6PJcxzA6u//vBl+RA== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id mm24-20020a17090b359800b00290ec53e9basi3480597pjb.44.2024.02.01.04.20.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 04:20:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48086-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-48086-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48086-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id B1266B20D62 for ; Thu, 1 Feb 2024 12:11:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F0ED615DBA0; Thu, 1 Feb 2024 12:11:42 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4694C15DBC9; Thu, 1 Feb 2024 12:11:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706789502; cv=none; b=hM6ULOAx8BSnNIAj0g4gZ2js6xa8GCEzXxrmPAdSxrXOvvmGcHhvE1pK26qcLIriK5l30kNSRREWdK66ZTrSU+5GHuNq6pmdUeeL1b2zgSV0tXLRN3obZ7DQmn9s4I9mH6HiMvqbma6x/yDqRVzgbBkupkvvLSfNoks3j2pZ1Uk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706789502; c=relaxed/simple; bh=mZSf9y0CQF9TxVXy4FE06iWwVm1ShXHTG/eLd5Jidf8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=lfuvOZfIuQ2V3fMLoW028+WasibBsFvbzcMHyaXP0UxSH8m2d6x2O9KYC5v09nMxz9ZoxDlIj3T73jxLYEF41Eg0LG7GGd7ZqVthbq8fCq7oslCyBSo70iMqiuy8wjLcM7lpn0ypL6K3qoxcpLbUq7pkkhkbeL8TaIZ9zkpbBAY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 26519DA7; Thu, 1 Feb 2024 04:12:17 -0800 (PST) Received: from [10.57.79.60] (unknown [10.57.79.60]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 681EB3F762; Thu, 1 Feb 2024 04:11:33 -0800 (PST) Message-ID: Date: Thu, 1 Feb 2024 12:11:32 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 5/5] selftests/mm: run_vmtests.sh: add missing tests Content-Language: en-GB To: Muhammad Usama Anjum , Andrew Morton , Shuah Khan Cc: kernel@collabora.com, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240125154608.720072-1-usama.anjum@collabora.com> <20240125154608.720072-6-usama.anjum@collabora.com> From: Ryan Roberts In-Reply-To: <20240125154608.720072-6-usama.anjum@collabora.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 25/01/2024 15:46, Muhammad Usama Anjum wrote: > Add missing tests to run_vmtests.sh. The mm kselftests are run through > run_vmtests.sh. If a test isn't present in this script, it'll not run > with run_tests or `make -C tools/testing/selftests/mm run_tests`. > > Cc: Ryan Roberts > Signed-off-by: Muhammad Usama Anjum > --- > Changes since v1: > - Copy the original scripts and their dependence script to install directory as well > > Changes since v2: > - Add a comment > - Move tests down in the file > - Add "-d" option which poisons the pages and aren't being useable after > the test > --- > tools/testing/selftests/mm/Makefile | 5 +++++ > tools/testing/selftests/mm/run_vmtests.sh | 8 ++++++++ > 2 files changed, 13 insertions(+) > > diff --git a/tools/testing/selftests/mm/Makefile b/tools/testing/selftests/mm/Makefile > index 2453add65d12f..f3aec7be80730 100644 > --- a/tools/testing/selftests/mm/Makefile > +++ b/tools/testing/selftests/mm/Makefile > @@ -114,6 +114,11 @@ TEST_PROGS := run_vmtests.sh > TEST_FILES := test_vmalloc.sh > TEST_FILES += test_hmm.sh > TEST_FILES += va_high_addr_switch.sh > +TEST_FILES += charge_reserved_hugetlb.sh > +TEST_FILES += hugetlb_reparenting_test.sh > + > +# required by charge_reserved_hugetlb.sh > +TEST_FILES += write_hugetlb_memory.sh > > include ../lib.mk > > diff --git a/tools/testing/selftests/mm/run_vmtests.sh b/tools/testing/selftests/mm/run_vmtests.sh > index e373d592dbf5c..a0f37e4438937 100755 > --- a/tools/testing/selftests/mm/run_vmtests.sh > +++ b/tools/testing/selftests/mm/run_vmtests.sh > @@ -19,6 +19,7 @@ usage: ${BASH_SOURCE[0]:-$0} [ options ] > -t: specify specific categories to tests to run > -h: display this message > -n: disable TAP output > + -d: run destructive tests You probably want to clarify the behaviour for -a (all). I guess providing -a should NOT run destructive tests unless -d is also explicitly provided. > > The default behavior is to run required tests only. If -a is specified, > will run all tests. > @@ -79,6 +80,7 @@ EOF > } > > RUN_ALL=false > +RUN_DESTRUCTIVE_TEST=false Either call this RUN_DESTRUCTIVE (my preference) or at least make it plural (RUN_DESTRUCTIVE_TESTS). > TAP_PREFIX="# " > > while getopts "aht:n" OPT; do > @@ -87,6 +89,7 @@ while getopts "aht:n" OPT; do > "h") usage ;; > "t") VM_SELFTEST_ITEMS=${OPTARG} ;; > "n") TAP_PREFIX= ;; > + "a") RUN_DESTRUCTIVE_TEST=true ;; The help you added says the option is -d, but this is looking for -a, and conflicting with the existing -a=all option. > esac > done > shift $((OPTIND -1)) > @@ -304,6 +307,11 @@ CATEGORY="process_mrelease" run_test ./mrelease_test > CATEGORY="mremap" run_test ./mremap_test > > CATEGORY="hugetlb" run_test ./thuge-gen > +CATEGORY="hugetlb" run_test ./charge_reserved_hugetlb.sh -cgroup-v2 > +CATEGORY="hugetlb" run_test ./hugetlb_reparenting_test.sh -cgroup-v2 > +if $RUN_DESTRUCTIVE_TEST; then > +CATEGORY="hugetlb" run_test ./hugetlb-read-hwpoison > +fi > > if [ $VADDR64 -ne 0 ]; then >