Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp136589rdb; Thu, 1 Feb 2024 04:36:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IGoxMkBNH/2ze5Br0mc2nYXYDH5Ax5EuNG8GDQP7mq/940c1o3qXophAJ7FBjMUsd2qM33F X-Received: by 2002:a17:90a:d481:b0:295:8ea9:8744 with SMTP id s1-20020a17090ad48100b002958ea98744mr4783777pju.21.1706790990232; Thu, 01 Feb 2024 04:36:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706790990; cv=pass; d=google.com; s=arc-20160816; b=Jp8OZrenG2piRgJbvPgCPfSlDnYam/zRDyT1wEsplQZH/kHWA1JPpURv7gF1ck8Xim g74J5V5JwDtPtqhYGMcLTVtjhx5/DU1xxXxkb57zR8J4js+i+RGf6w7Bub/at/VzgV6h WWLw2G3BoBVu34wsKG4PLGfIpqU4GgLqX4+hMmWKn8cqLSMpuv26lBkdfuaFMtqnrQKV bCkPEuC80aGMSPdYHc1rh1drPp/TcAyULGNvrBDCQgu5KHQB049tth/XMAG9XFzbnAZs qTJlHJlTL+pttKFhltsRZkOHuJjTTGhtS37TJ8Y+TQBZ66lYBemeA6kQcw8WOg79l1LN TU2w== 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:to :content-language:subject:cc:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=hCE9VvGVwg1Z0mlUzv7txZQUlZjgeH/sFn0saqJAizI=; fh=YE7j8ArtoGtIw+vyX4avwgbMXzXOB6ms9/s2kTNJ74I=; b=OfBkHWNIQUkOpV5QV3d+GAXVwZvjuty3bq3wEJeNFbPpW+YF0giwTH0UHDw2dwj71v 5t6Cu3xDTiD8T3XvRCiVa6rTUb3MGpBuDGEcO1Z33Duit5KUqTLWFcZVDKb9Zh+NuYws 59UvdLXRajsZXTpdRifoogwY9YeMsFRo/VY8kblWGJ6yCXvLWG0NU9Aiiipo/Kre8Srp OpfcSLRTcPz+PON+u889u1FxVSYyYJxoJMON3RIhA+iCZu7z0TVCEJeROxK0rdUkL9Rz xiT907NXUCmYt08WzLbPK9KHNiSk+tp1uuvHVHbUbQcFlyVJkzUgpOYfGsV7VCOL2IIV qDcg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=YBchkCDA; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-48134-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48134-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com X-Forwarded-Encrypted: i=1; AJvYcCVgRcvUJKcv93JY+hkVbDHsWatqsg90u6XV2j4HKa1LVBIHWYjzvW1iJxiESb12RXLheP1g82bCxrnva40nVhi0wCm9AXNIMeWk5tdf6w== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id z16-20020a17090acb1000b0028c9c9605a7si290116pjt.38.2024.02.01.04.36.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 04:36:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48134-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=YBchkCDA; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-48134-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48134-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 84E5128D9C7 for ; Thu, 1 Feb 2024 12:32:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7F5FA161B7D; Thu, 1 Feb 2024 12:26:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="YBchkCDA" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D904D779F0; Thu, 1 Feb 2024 12:26:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706790380; cv=none; b=l0G8yWSqMYmxYAtP/ijVWu47y6cfudRKWfql3jJRRD1/yBUgqMMMOZrQyvJxF/SQLKvcG2D5urfu31qR3pW9ROU8UZz8d2+x49PIEqrVex4LsAh/fUBJfGQX7LW5gjLDU7U5Q8/8JKdCY1UkQ0qXjMbdozNWV9VYedKu5IlRtlM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706790380; c=relaxed/simple; bh=xg5m8felV7XMNg/ecDkG5YxQXJFG4fqtcpiToAp0aE4=; h=Message-ID:Date:MIME-Version:Cc:Subject:To:References:From: In-Reply-To:Content-Type; b=f72vUHO00Z9kfS3e3t/dtedosDRbPBdgCjTWvDJg+N2/6CoDEg3wHqcdbwZxujs2R1Jw4CFplA9Y6nmreiYcHMZ792ZdFafRMKkPjA0Gw/u+XHz6zaTktroyhf/xG8+mZAVg7XHITR/WUqAiJK4lSd5vLBf/p/NpHey8juCNIyg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=YBchkCDA; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1706790376; bh=xg5m8felV7XMNg/ecDkG5YxQXJFG4fqtcpiToAp0aE4=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=YBchkCDA2ADPFyOfIaAPy6VfbCxUA4woSvmMFqErTo/eGM/o30X1zghyQjFY0MyhC +N/s5HqRyxsxFa9WaUiFkMM0Cpq+4q/cJ42osL+jI3wYtAbDqZP3O4f8iaETpuvJcF 7FgHlcoLM9zjnDrHj9HvP5WGkstsqsaRiTSCltqLKdMNuKXcfFseCdNd4w++c+YoHD cKPj6DLJSkAajiW7Q91EGgq5GX2xNLgjTkQvn46sdcYgHnk6MbSX9RV/Wq9tyczwK8 o++yH6dXavwI/AGaM+llvlTbNveYyvTaCdvZIHaXY51EfrF3Scr1vzj0mJ55RSbUzz iiEPRBWeMU0jw== Received: from [100.66.47.90] (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: usama.anjum) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 159F5378047F; Thu, 1 Feb 2024 12:26:13 +0000 (UTC) Message-ID: Date: Thu, 1 Feb 2024 17:26:29 +0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: Muhammad Usama Anjum , kernel@collabora.com, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 5/5] selftests/mm: run_vmtests.sh: add missing tests Content-Language: en-US To: Ryan Roberts , Andrew Morton , Shuah Khan References: <20240125154608.720072-1-usama.anjum@collabora.com> <20240125154608.720072-6-usama.anjum@collabora.com> From: Muhammad Usama Anjum In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2/1/24 5:11 PM, Ryan Roberts wrote: > 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. Sorry, that's a typo. I'll resolve your above comments with fix patch as well. > >> 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 >> > > -- BR, Muhammad Usama Anjum