From mboxrd@z Thu Jan 1 00:00:00 1970 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id AABF2C001DE for ; Thu, 13 Jul 2023 15:25:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 40EE090003C; Thu, 13 Jul 2023 11:25:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3BF01900037; Thu, 13 Jul 2023 11:25:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 25F5090003C; Thu, 13 Jul 2023 11:25:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 171D0900037 for ; Thu, 13 Jul 2023 11:25:46 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id C45D0140304 for ; Thu, 13 Jul 2023 15:25:45 +0000 (UTC) X-FDA: 81006963450.28.B7F8F02 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf10.hostedemail.com (Postfix) with ESMTP id 434B5C001B for ; Thu, 13 Jul 2023 15:25:43 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=OxM8R9q1; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf10.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689261943; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=YTyQOOC//U8Og4/WA4jzJJru1aS6+IZedvreavXkuvE=; b=vgkoaGi6gLPt+AX67mILSvRU+zSnZOGhB7vtEjts58mSMzrQayM2tP9ebntl3SR+3mw3P4 Ck5fNT4s67+4daM2IVFUG950UqK7cXUbd0J5i1WhSVMg7xFKYjqr3DMwAje2KteHpiBybf DRiT5CqXA0iArO2O4SFJKbxiRKyxXGQ= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=OxM8R9q1; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf10.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689261943; a=rsa-sha256; cv=none; b=qp7a5yOlryWYZS2mHofG7rWqouaCCnb3R5eQ198rKI/6TAfZhQP8HftrQ7R5UCpgZTxbAZ GPsjZprJGGJsYqRwz1f0fYtFtDewkvt+J1L/yHSs2iFLPnY9p+FzhOZmsiQQ8mjJDVaVdy ikCbobpPmXorBy/792YqgnPurdtFUvI= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689261942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YTyQOOC//U8Og4/WA4jzJJru1aS6+IZedvreavXkuvE=; b=OxM8R9q1aiPQCvauekuuLcT7NkLPHXD2caGeeoB9xSAKSp3lf/JXYlVm0kx3Oi4GI3E85+ rCoNsFqw5uD2lckrOoY+Lnp3tmcZ/0D6oQ5hW46JxrtXh7SPds0U6DAOdO2/DylvxM9Wmt MCY195aJKL/zC2+47MCQkSidBCsfda0= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-520-IOYm28O7NDuaTye5XB9pPA-1; Thu, 13 Jul 2023 11:25:40 -0400 X-MC-Unique: IOYm28O7NDuaTye5XB9pPA-1 Received: by mail-lj1-f200.google.com with SMTP id 38308e7fff4ca-2b7254099ffso8438271fa.2 for ; Thu, 13 Jul 2023 08:25:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689261938; x=1691853938; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YTyQOOC//U8Og4/WA4jzJJru1aS6+IZedvreavXkuvE=; b=cePpg++5HkfSZgU9MeCOMuj8XN6+mZ+/xjKc0xp9TiIDi9s/DvfDO1DGKgD+UQCmMs njGH0ZsqJF64bPppWUDpZEL/Gnyy9vUCZOn3qgtrQ58OA3MGPZHLwkz/zhganWVepsUx qeSfUu5m/+pIps+MuXPH9s8PF5e/2Po8xOWtUSajEzGCuNVNEffZ/cIDDxuK8/Z0V1kQ vJOL/dfgWDCqrvAX1bFwg+q79PGqahyWzJB0EgVpJp4BW81e40S9tZizmZNIZ0yMwc09 KYJF9bpsVcBXlm9LzScOIZWeL5KHg+My1ia840BAnzAf0gCaaUGYdb1Fqo0tmRMlXmSq TMFA== X-Gm-Message-State: ABy/qLZBbMHseUBiWKGQoaO48zz1KHlbX4LNaijrN0rWVtHoDHtk/Us0 hzUy5OH7QNmzaHGAjUPlDjMc2KVIa1nBnAm5S9HvDyH++EuIMMHXxeKc/iw63QYVRUTVWqU+gxB N+pCoPWopv8c= X-Received: by 2002:a2e:98d2:0:b0:2b6:cd12:24f7 with SMTP id s18-20020a2e98d2000000b002b6cd1224f7mr1871073ljj.44.1689261938037; Thu, 13 Jul 2023 08:25:38 -0700 (PDT) X-Google-Smtp-Source: APBJJlGYa8s8q1BOcKvw6NzmwI8a8tReA9pD5wtqHyEdYGSX1dP/THfRMRenFXA2BpekJVW87YhtUw== X-Received: by 2002:a2e:98d2:0:b0:2b6:cd12:24f7 with SMTP id s18-20020a2e98d2000000b002b6cd1224f7mr1871051ljj.44.1689261937629; Thu, 13 Jul 2023 08:25:37 -0700 (PDT) Received: from ?IPV6:2003:cb:c717:6100:2da7:427e:49a5:e07? (p200300cbc71761002da7427e49a50e07.dip0.t-ipconnect.de. [2003:cb:c717:6100:2da7:427e:49a5:e07]) by smtp.gmail.com with ESMTPSA id k6-20020a05600c0b4600b003fc00702f65sm17464841wmr.46.2023.07.13.08.25.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 13 Jul 2023 08:25:37 -0700 (PDT) Message-ID: <57f4cfe0-2f20-c50a-439f-ee914dde1693@redhat.com> Date: Thu, 13 Jul 2023 17:25:36 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v1 9/9] selftests/mm: Run all tests from run_vmtests.sh To: Ryan Roberts , Andrew Morton , Shuah Khan , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Mark Brown , John Hubbard , Florent Revest , "Liam R. Howlett" Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, Peter Xu References: <20230713135440.3651409-1-ryan.roberts@arm.com> <20230713135440.3651409-10-ryan.roberts@arm.com> <2b586ba2-7522-a823-afd6-7b4d978f18c2@arm.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: <2b586ba2-7522-a823-afd6-7b4d978f18c2@arm.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 434B5C001B X-Rspam-User: X-Rspam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fxnXF/KZm0fBwb3DP5z1wXVBZtcYXtvklGDHe0WwqQuJ9rLsAstHqMup7oUvmFenlBNPUwMPMioUcycWxnvXfhXR8WidXNJIMS4/ReqEFnz2GFnpY4gaPjC0LeYR6hRS96015cMfIoifOiNDRRX+BsYzt2UTcYsg7+e1m9KG9R2t+LY98mB3U0jyBn8I3VFRssml81T6M9FoGN3nFn5TmtJ6N7FOT9Kn17euiR1N91e5Qxpb83V3ShSOpjpe492FavRZdiLlmMw3DrxYrfyqXKIoBcm1Q030ySC7qhfFXPZJ3yg+ehwTwRxmSCDXrPchNT+DdS29ccum9+wDC4GPXWr0pJ6QEaMcQrkybRNKdtdhpFuYaedj4qSOCT+Tgdgw+v8Cy/1wqubTm/ 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: >> >> Which run_kselftest.sh are you referring to, the one in the parent directory? > > run_kselftest.sh is the uniform way of executing all the kselftests. mm seems to > be trying to be special as far as I can see. Certainly if you run the `install` > make target, kselftests will create a list of all the tests (including non-mm > tests if you have included them in the TARGETS variable) and copy that test list > and run_kselftest.sh to the install path along with all the test binaries. Then > the user can invoke any of the collections or specific tests in the collections > using that tool. It also wraps everything with tap output, runs tests with a > timeout, etc. > > See Documentation/dev-tools/kselftest.rst > Got it, thanks! >> >> How to invoke it to run these mm tests? >> >> (I never dared invoking something different than >> run_vmtests.sh ;) ) > > # single test: > $ sudo ./run_kselftest.sh -t mm: > > or > > # all tests in collection: > $ sudo ./run_kselftest.sh -c mm > Ah, that makes sense. So I guess mm is then one "collection". >> >> [...] >> >>> >>> Signed-off-by: Ryan Roberts >>> --- >>>   tools/testing/selftests/mm/Makefile       | 79 ++++++++++++----------- >>>   tools/testing/selftests/mm/run_vmtests.sh | 23 +++++++ >>>   tools/testing/selftests/mm/settings       |  2 +- >>>   3 files changed, 64 insertions(+), 40 deletions(-) >>> >>> diff --git a/tools/testing/selftests/mm/Makefile >>> b/tools/testing/selftests/mm/Makefile >>> index 66d7c07dc177..881ed96d96fd 100644 >>> --- a/tools/testing/selftests/mm/Makefile >>> +++ b/tools/testing/selftests/mm/Makefile >>> @@ -35,39 +35,39 @@ MAKEFLAGS += --no-builtin-rules >>>   CFLAGS = -Wall -I $(top_srcdir) $(EXTRA_CFLAGS) $(KHDR_INCLUDES) >>>   LDLIBS = -lrt -lpthread >>>   -TEST_GEN_PROGS = cow >>> -TEST_GEN_PROGS += compaction_test >>> -TEST_GEN_PROGS += gup_longterm >>> -TEST_GEN_PROGS += gup_test >>> -TEST_GEN_PROGS += hmm-tests >>> -TEST_GEN_PROGS += hugetlb-madvise >>> -TEST_GEN_PROGS += hugepage-mmap >>> -TEST_GEN_PROGS += hugepage-mremap >>> -TEST_GEN_PROGS += hugepage-shm >>> -TEST_GEN_PROGS += hugepage-vmemmap >>> -TEST_GEN_PROGS += khugepaged >>> -TEST_GEN_PROGS += madv_populate >>> -TEST_GEN_PROGS += map_fixed_noreplace >>> -TEST_GEN_PROGS += map_hugetlb >>> -TEST_GEN_PROGS += map_populate >>> -TEST_GEN_PROGS += memfd_secret >>> -TEST_GEN_PROGS += migration >>> -TEST_GEN_PROGS += mkdirty >>> -TEST_GEN_PROGS += mlock-random-test >>> -TEST_GEN_PROGS += mlock2-tests >>> -TEST_GEN_PROGS += mrelease_test >>> -TEST_GEN_PROGS += mremap_dontunmap >>> -TEST_GEN_PROGS += mremap_test >>> -TEST_GEN_PROGS += on-fault-limit >>> -TEST_GEN_PROGS += thuge-gen >>> -TEST_GEN_PROGS += transhuge-stress >>> -TEST_GEN_PROGS += uffd-stress >>> -TEST_GEN_PROGS += uffd-unit-tests >>> -TEST_GEN_PROGS += soft-dirty >>> -TEST_GEN_PROGS += split_huge_page_test >>> -TEST_GEN_PROGS += ksm_tests >>> -TEST_GEN_PROGS += ksm_functional_tests >>> -TEST_GEN_PROGS += mdwe_test >>> +TEST_GEN_FILES = cow >>> +TEST_GEN_FILES += compaction_test >>> +TEST_GEN_FILES += gup_longterm >>> +TEST_GEN_FILES += gup_test >>> +TEST_GEN_FILES += hmm-tests >>> +TEST_GEN_FILES += hugetlb-madvise >>> +TEST_GEN_FILES += hugepage-mmap >>> +TEST_GEN_FILES += hugepage-mremap >>> +TEST_GEN_FILES += hugepage-shm >>> +TEST_GEN_FILES += hugepage-vmemmap >>> +TEST_GEN_FILES += khugepaged >>> +TEST_GEN_FILES += madv_populate >>> +TEST_GEN_FILES += map_fixed_noreplace >>> +TEST_GEN_FILES += map_hugetlb >>> +TEST_GEN_FILES += map_populate >>> +TEST_GEN_FILES += memfd_secret >>> +TEST_GEN_FILES += migration >>> +TEST_GEN_FILES += mkdirty >>> +TEST_GEN_FILES += mlock-random-test >>> +TEST_GEN_FILES += mlock2-tests >>> +TEST_GEN_FILES += mrelease_test >>> +TEST_GEN_FILES += mremap_dontunmap >>> +TEST_GEN_FILES += mremap_test >>> +TEST_GEN_FILES += on-fault-limit >>> +TEST_GEN_FILES += thuge-gen >>> +TEST_GEN_FILES += transhuge-stress >>> +TEST_GEN_FILES += uffd-stress >>> +TEST_GEN_FILES += uffd-unit-tests >>> +TEST_GEN_FILES += soft-dirty >>> +TEST_GEN_FILES += split_huge_page_test >>> +TEST_GEN_FILES += ksm_tests >>> +TEST_GEN_FILES += ksm_functional_tests >>> +TEST_GEN_FILES += mdwe_test >> >> IIRC, we recently converted all to TEST_GEN_PROGS. See >> >> commit aef6fde75d8c6c1cad4a0e017a8d4cbee2143723 >> Author: Peter Xu >> Date:   Wed Apr 12 12:42:18 2023 -0400 >> >>     selftests/mm: use TEST_GEN_PROGS where proper >>         TEST_GEN_PROGS and TEST_GEN_FILES are used randomly in the mm/Makefile to >>     specify programs that need to build.  Logically all these binaries should >>     all fall into TEST_GEN_PROGS. >>         Replace those TEST_GEN_FILES with TEST_GEN_PROGS, so that we can reference >>     all the tests easily later. >> >> >> Why is that change required, and how does it interact with >> run_kselftest.sh? (Not clear from you patch description.) > > TEST_GEN_PROGS will compile and install the tests and will add them to the list > of tests that run_kselftest.sh will run. TEST_GEN_FILES will compile and install > the tests but will not add them to the test list. > > Note that run_vmtests.sh is added to TEST_PROGS, which means it ends up in the > test list. (the lack of "_GEN" means it won't be compiled, but simply copied). > > So with this change at the kselftest level, there is a single test in its list; > run_vmtests.sh. And all the other tests that were previously in that list are > moved into run_vmtests.sh (if they weren't there already). That sound good to me. (worth adding to the patch description) Let me CC Peter, so he's aware. -- Cheers, David / dhildenb