Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp5860188rwp; Mon, 17 Jul 2023 10:30:28 -0700 (PDT) X-Google-Smtp-Source: APBJJlH6NL9rPS73JZHeucxKskCRX13d9+Dm6Crp1PwuHJnG0vTrbrXxRsoJfL894Q/Tgf6Abv6H X-Received: by 2002:a05:6a00:c89:b0:666:81ae:fec0 with SMTP id a9-20020a056a000c8900b0066681aefec0mr15335629pfv.25.1689615027900; Mon, 17 Jul 2023 10:30:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689615027; cv=none; d=google.com; s=arc-20160816; b=JbjcbC/xtFk6PpkTAbt1sL8w/BeiPw8jhFZDwkNL6lzUErVLsZk9ENZlEZg10L6Xm/ UgMPm4WyTdj2HHKvcKjoMtL4L2hj9zrN/4UC8PhOsRYqyk+CbJdPWXWGXwEkHjR1vqYt XYDqM5pJrlTSW010+5lBht4MWM4DAmWEaDs3cwCeK6wLcVUChZT8dERV8C3v6wVmBGag /qU+el9vrrxIN6758i0H1aAqVOjpuT1jQcHerV0Os+TAdcd+EpmQET1Nf5nynktsyqob QMahazeiEmXILkbp47Oc1Z1wrQoI3e45lXtAy+U77rPLv5YAQNH5mzSqoY/MJVV1vO6J YpuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=w5WtHncCWF3+ygwdoPe907VvBow+yKOAvExoyl7spoY=; fh=P9AbSbZnl2hMasUBuQnUpwYJYnbBz4pIdK1+zQLp7ZE=; b=amQv4wEaTV9L3RTCWrbXsHNDYdQI7J90AuE+EQG+Zj5M6poLksvIGEYoJY/y1CX/29 LIkpNCkyuTMH4sxnMUo3c94VpoZaooWtr6KWtbVMxIVHA7/KKXTIWnamKcLKvM3UX3Ze rzCxv+aMHpz7RZ5JUFjU4v0Lry3E4GRoDWUdpXpxNntqQeDXw0bQsIxnVMZTVnbUvNhi ctbTxQ3U8sVcO4gmK6XKca0Z9zR0fmuc3YN41lxvLVTUoVaHXHqyGxa2HIbZZLh2pe2W bsbef0lsmf6Z9rAXjS8zN+gKyD1+3+CFg3BwesTg6xbmIO5OO0LqgVUPcLUc2ETT5H+5 eTuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=D++w7+50; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bv125-20020a632e83000000b0055c8d01ad16si86999pgb.265.2023.07.17.10.30.13; Mon, 17 Jul 2023 10:30:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=D++w7+50; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229918AbjGQR22 (ORCPT + 99 others); Mon, 17 Jul 2023 13:28:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230322AbjGQR2Y (ORCPT ); Mon, 17 Jul 2023 13:28:24 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1BE91710 for ; Mon, 17 Jul 2023 10:27:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689614838; 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=w5WtHncCWF3+ygwdoPe907VvBow+yKOAvExoyl7spoY=; b=D++w7+50s3+TzPcD8DRF3B8mgAg8tdzEHy3L8b4eSy0f4ewAA2p35iBPFLoS1OpGiavWYK SPeMoUstpY7wTc7mYoF+ncHJCSUjTKKmR79su4kxx4TRXxEuaus4vjtXiFlNTjOoIKC9jt yrrOGruE4UzaZfIINLtBGM9aqWe+q3o= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-644-B6Pty0smM3yoZVLEZ9iQHw-1; Mon, 17 Jul 2023 13:27:17 -0400 X-MC-Unique: B6Pty0smM3yoZVLEZ9iQHw-1 Received: by mail-lf1-f72.google.com with SMTP id 2adb3069b0e04-4f76712f950so3767224e87.0 for ; Mon, 17 Jul 2023 10:27:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689614835; x=1692206835; 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=w5WtHncCWF3+ygwdoPe907VvBow+yKOAvExoyl7spoY=; b=hTEeh4Gsj+PH26kgrruB+r1cyoo6mruYTkmqitCUzfKSAHmyZLhek/Y0a900AK+vO2 VdJ8FWJeeDhmJ5dlqhJdHT7XdOZRD4iKBRC8qifc7QmS6kAQnKqr8gUA6bXIPvhbTXSN 3shKkkYglxDOon8JXEHPKVl3YZp/LveFy3VF0OdK1gfhN0N0QhrRlIrg4BttqPipAFGo wiWQHCcs29X3R3mFp6bXI5tN5O7I9jrWgt/FR4IWIyvnEkE533crPNkroLjlWeJxJKJ+ C5sAZqWfm4wHOouI40jTWTb4sKW2L0H0ibT542r4Zf8qLs0WFSNcM045EkOJffa40UCq wNUg== X-Gm-Message-State: ABy/qLZB5c4ME3SLU1CE6a4d70bTq3dkPuAIoIqdRnyk4IUPcQtZv5tn 7Fp6jKwrIyZmeOzwvwV4qFXR4NMY+bdJActEgrmWOdCVF6Xilb0zYQgpGklq8uz608uMZxiPjAh sYbSFTvZ2BaPZG+q3Bi5RP6Do X-Received: by 2002:a05:6512:acc:b0:4fb:8492:83fb with SMTP id n12-20020a0565120acc00b004fb849283fbmr9203914lfu.68.1689614835693; Mon, 17 Jul 2023 10:27:15 -0700 (PDT) X-Received: by 2002:a05:6512:acc:b0:4fb:8492:83fb with SMTP id n12-20020a0565120acc00b004fb849283fbmr9203886lfu.68.1689614835294; Mon, 17 Jul 2023 10:27:15 -0700 (PDT) Received: from [192.168.3.108] (p5b0c62d6.dip0.t-ipconnect.de. [91.12.98.214]) by smtp.gmail.com with ESMTPSA id r1-20020adfdc81000000b0031412b685d2sm36662wrj.32.2023.07.17.10.27.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Jul 2023 10:27:14 -0700 (PDT) Message-ID: <5a12536a-2e33-7a68-6cfd-fd991ddf875a@redhat.com> Date: Mon, 17 Jul 2023 19:27:13 +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 v2 8/8] selftests/mm: Run all tests from run_vmtests.sh Content-Language: en-US To: Ryan Roberts , Andrew Morton , Shuah Khan , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Mark Brown , John Hubbard , Florent Revest , Peter Xu Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org References: <20230717103152.202078-1-ryan.roberts@arm.com> <20230717103152.202078-9-ryan.roberts@arm.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20230717103152.202078-9-ryan.roberts@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17.07.23 12:31, Ryan Roberts wrote: > It is very unclear to me how one is supposed to run all the mm selftests > consistently and get clear results. > > Most of the test programs are launched by both run_vmtests.sh and > run_kselftest.sh: > > hugepage-mmap > hugepage-shm > map_hugetlb > hugepage-mremap > hugepage-vmemmap > hugetlb-madvise > map_fixed_noreplace > gup_test > gup_longterm > uffd-unit-tests > uffd-stress > compaction_test > on-fault-limit > map_populate > mlock-random-test > mlock2-tests > mrelease_test > mremap_test > thuge-gen > virtual_address_range > va_high_addr_switch > mremap_dontunmap > hmm-tests > madv_populate > memfd_secret > ksm_tests > ksm_functional_tests > soft-dirty > cow > > However, of this set, when launched by run_vmtests.sh, some of the > programs are invoked multiple times with different arguments. When > invoked by run_kselftest.sh, they are invoked without arguments (and as > a consequence, some fail immediately). > > Some test programs are only launched by run_vmtests.sh: > > test_vmalloc.sh > > And some test programs and only launched by run_kselftest.sh: > > khugepaged > migration > mkdirty > transhuge-stress > split_huge_page_test > mdwe_test > write_to_hugetlbfs > > Furthermore, run_vmtests.sh is invoked by run_kselftest.sh, so in this > case all the test programs invoked by both scripts are run twice! > > Needless to say, this is a bit of a mess. In the absence of fully > understanding the history here, it looks to me like the best solution is > to launch ALL test programs from run_vmtests.sh, and ONLY invoke > run_vmtests.sh from run_kselftest.sh. This way, we get full control over > the parameters, each program is only invoked the intended number of > times, and regardless of which script is used, the same tests get run in > the same way. > > The only drawback is that if using run_kselftest.sh, it's top-level tap > result reporting reports only a single test and it fails if any of the > contained tests fail. I don't see this as a big deal though since we > still see all the nested reporting from multiple layers. The other issue > with this is that all of run_vmtests.sh must execute within a single > kselftest timeout period, so let's increase that to something more > suitable. > > In the Makefile, 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. So let's move all the programs from TEST_GEN_PROGS to > TEST_GEN_FILES so that they are built but not executed by > run_kselftest.sh. 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). > > Signed-off-by: Ryan Roberts > --- Acked-by: David Hildenbrand -- Cheers, David / dhildenb