Received: by 2002:a05:6520:4211:b029:f4:110d:56bc with SMTP id o17csp1616808lkv; Wed, 19 May 2021 14:09:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5ZrGqVSA6POuJps504ENR3Z16zdgQlzhSzgFdycnha5wuLOApJ7Tlnqfwnx+MrOMeEShj X-Received: by 2002:a02:ac05:: with SMTP id a5mr1361809jao.89.1621458560680; Wed, 19 May 2021 14:09:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621458560; cv=none; d=google.com; s=arc-20160816; b=jIF3ZvrTM1Ql1qozmJSwnYzG5hZvEcXZc3tPUJCpPQXpELnNCzliGLVE99TrnpMAXb vBqdce4gZWHeLKw9h+3FUYyUSqNDbyKKBhalTijJAqpSNt+sQ1kj8v8DSNqS51oMPfnI VexbP6sf2YuPfs902KHNfWezxS+ch3O57Cf+HF9QXECyHS+q4QsrT8e+nkHMlnJ2omhP E7pSFcjDv9RyRyJUkAkgVDQ6EhOKFjEUGJxYPeOAyA5iiCaj1jydsowexmNIIlsG5w3e EZSdg2PKRLd/bllXzMLIN/WDTifsRIZZVtTL0uWLEHvm7T+leafDrvHbnnYoTmSiDxPK T21Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=sJSTAKCZ+krTWG3lgInmgl4vdo4n0Oih7NdB8EZOroE=; b=l6n2GcWrBitv4BOyZNUUwYNkba/VGO4GLBTXMJZPPFMTamZsK/5wB93E0NgpH2g9IM 9XLuo0qPiKzhljii6n9dy/BTZyJnbGZuPSDztu4KiFhNgAIqZKERv4h7kMlcJ1bGGIXu y55QWPsmxAOa2TPGMxd9IwYQbhkTR3VZoUIabpub95av4gEcxWthcHXjCJOvjb76eYSr Ic41PKOrv+RZL+ZQkFRoGTGo9bUTPLt8BaNCOAjnkolisxVaxc/jp6OJHw6idb3E3RDQ 2br+mIhXVLICTMLveA3kc1JWsgRvC/ac1ZEqBrLYYsHFtjIMkANkL6CAeG5LF5nA/Bkc 3GfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=jbuHe9+Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t1si463835jap.32.2021.05.19.14.09.07; Wed, 19 May 2021 14:09:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=jbuHe9+Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352747AbhERWau (ORCPT + 99 others); Tue, 18 May 2021 18:30:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352741AbhERWat (ORCPT ); Tue, 18 May 2021 18:30:49 -0400 Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 170BDC06175F for ; Tue, 18 May 2021 15:29:31 -0700 (PDT) Received: by mail-io1-xd30.google.com with SMTP id z24so11059820ioj.7 for ; Tue, 18 May 2021 15:29:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sJSTAKCZ+krTWG3lgInmgl4vdo4n0Oih7NdB8EZOroE=; b=jbuHe9+Qf8UciW37lf7ZswZs7ReoWXczX04sFI1v7v+3FEj4I+EoN+d69cBUfvxZL2 pppqzzmCpxde7Hh+QW7SdZ1jnX4IX5TcXLfsMzhVJOrTYHglNNe+YSCOyZrx8IZeqH1D IXg0zl7mwhjrFeuEQYeofug0VDMviAXFvR3ZUcYWSeo/1nefLar6o+c5Cb94aEOmOEE9 MQy8UMokWYa8Fi1ImWSqAGd0WJbpPO0JSFgRT6Jmr+Nw5hnSuXw/G4l0obG05YIbnKtn XjsnCgoHUZulXA1LHNcZ3wLelpQCj9ucW4gS+3QoYK/5Ibly+MvFuRT9L+37QjSIjH/f tnGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sJSTAKCZ+krTWG3lgInmgl4vdo4n0Oih7NdB8EZOroE=; b=o6/cB3E4Z6yaH6GWZfYW3DTFD+sFuUIVS/qRBYUG8GEuiHC9NjoYFXDASFjHW66LlV LnYZgi/3aiV3GmxehnkEx73FyKZSxisRuXzMKew57/CXFgRLLViiFk133hzbiOnoMPYs gkNCOTeTz/4WfbuPwS07erP9ZQulSMpwWJyGd840kIPrA1wOigtNPF0bEfywd+4fzXV/ eojRRe0rUBgK/6vDJE4UF/yHuBkVpTy+y0RQSwb0kVHb1oxG7mVToqa+muUfBUfSxScZ z/tRhO+LjgGbsZBYoYAxdpWthBtnyYqXPKxe+TbW2yof1fpRjaTBb1VhIG/FzGRPeSNP sP7A== X-Gm-Message-State: AOAM531inD5hDfA56swQHkD5WUM1MRXN8JVX/sQAQW/hieX9RTn3O6As 2cfJQR61BCXXeAE1Y2NKi1V8wHAB/58ZH6HCacOQhA== X-Received: by 2002:a05:6602:446:: with SMTP id e6mr6560189iov.20.1621376969710; Tue, 18 May 2021 15:29:29 -0700 (PDT) MIME-Version: 1.0 References: <20210427225244.4326-1-axelrasmussen@google.com> <20210427225244.4326-10-axelrasmussen@google.com> In-Reply-To: From: Axel Rasmussen Date: Tue, 18 May 2021 15:28:52 -0700 Message-ID: Subject: Re: [PATCH v5 09/10] userfaultfd/selftests: reinitialize test context in each test To: Peter Xu Cc: Andrew Morton , Alexander Viro , Andrea Arcangeli , Hugh Dickins , Jerome Glisse , Joe Perches , Lokesh Gidra , Mike Kravetz , Mike Rapoport , Shaohua Li , Shuah Khan , Stephen Rothwell , Wang Qing , linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org, LKML , linux-kselftest@vger.kernel.org, Linux MM , Brian Geffon , "Dr . David Alan Gilbert" , Mina Almasry , Oliver Upton Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I suppose it will be squashed anyway, but in case it's useful feel free to add: Reviewed-by: Axel Rasmussen Thanks for catching this, Peter! On Tue, May 18, 2021 at 1:57 PM Peter Xu wrote: > > On Tue, Apr 27, 2021 at 03:52:43PM -0700, Axel Rasmussen wrote: > > Currently, the context (fds, mmap-ed areas, etc.) are global. Each test > > mutates this state in some way, in some cases really "clobbering it" > > (e.g., the events test mremap-ing area_dst over the top of area_src, or > > the minor faults tests overwriting the count_verify values in the test > > areas). We run the tests in a particular order, each test is careful to > > make the right assumptions about its starting state, etc. > > > > But, this is fragile. It's better for a test's success or failure to not > > depend on what some other prior test case did to the global state. > > > > To that end, clear and reinitialize the test context at the start of > > each test case, so whatever prior test cases did doesn't affect future > > tests. > > > > This is particularly relevant to this series because the events test's > > mremap of area_dst screws up assumptions the minor fault test was > > relying on. This wasn't a problem for hugetlb, as we don't mremap in > > that case. > > > > Signed-off-by: Axel Rasmussen > > Hi, Andrew, > > There's a conflict on the uffd test case with v5.13-rc1-mmots-2021-05-13-17-23 > between this patch and the uffd pagemap series, so I think we may need to queue > another fixup patch (to be squashed into this patch of Axel's) which is > attached. > > Thanks, > > -- > Peter Xu