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 51984C433FE for ; Thu, 13 Oct 2022 17:03:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DEF266B0071; Thu, 13 Oct 2022 13:03:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D51756B0073; Thu, 13 Oct 2022 13:03:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BA6558E0001; Thu, 13 Oct 2022 13:03:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 9E7726B0071 for ; Thu, 13 Oct 2022 13:03:04 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 5B92841435 for ; Thu, 13 Oct 2022 17:03:04 +0000 (UTC) X-FDA: 80016546288.06.1E357C9 Received: from mail-il1-f182.google.com (mail-il1-f182.google.com [209.85.166.182]) by imf18.hostedemail.com (Postfix) with ESMTP id B94E31C0032 for ; Thu, 13 Oct 2022 17:03:02 +0000 (UTC) Received: by mail-il1-f182.google.com with SMTP id g13so1301791ile.0 for ; Thu, 13 Oct 2022 10:03:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=0SJ/jFf340QWCBLHmbjb0V8xwWmYUnucYYZEwPbeojI=; b=JAsHpc/tw836UCyqbjAH1dU6C9lkYn55St0/OxdLFPTxPLDdb5fl51uDjwbSafvKtP IaJtHNseYvorRGClfDscnzfiB0suLhbTRwiRXzcNXVtNJ/JhjTExQWCiPxgHJ+SakK7r nJYGhMWEV0iBo/eeYXMO9jejDynFg/RvtGC4c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to: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=0SJ/jFf340QWCBLHmbjb0V8xwWmYUnucYYZEwPbeojI=; b=uX7CyRVh0sDiIyVFhIzMvSdpJmYrxg9DTzYwmO2/oLjga4YAPhSoMS8PC+ScvRIVHQ vp+6HeYmUfvW/ETA1BffdZCc/XaH0qBJ9ClTbsy6wLj4aqOtpSQpwv1Fnbqnv7n0EZXT 40JDc4pTtvOG6fmcOtdpN4CrpfJxKXFO/kCS9lOj1sPxjiw3t10H48F6MbFpEyaTEwxh 1Q3F1s0hnbmQEdWpc5R0iBXucfUBo3NbUXTV3dH8FuM6rBONUWe57HGxkZCRmxZ3v1Xo kyx4Ht3cEJUKfJbeOXU9P2zr3/ZDg9gG19W5wL2WhM6YarDtM+TJB7bLxImVkPOJ6V/l HWlQ== X-Gm-Message-State: ACrzQf2mGGEX8VOhS8itWp495Wb08jUddXnDLKihFXhmIktt5u0tLKhd PPA89LY2W3WoPtkvXLW2eCZXwQ== X-Google-Smtp-Source: AMsMyM5LGWLrVKdG3LpHcSxQ94B0YP3ErKxJ4GJiGn6VrIOxy0J1xLeF8+MJRyl/gfTQtbXlqZproA== X-Received: by 2002:a92:c24e:0:b0:2fc:3482:a438 with SMTP id k14-20020a92c24e000000b002fc3482a438mr493042ilo.145.1665680581855; Thu, 13 Oct 2022 10:03:01 -0700 (PDT) Received: from [192.168.1.128] ([38.15.45.1]) by smtp.gmail.com with ESMTPSA id m10-20020a6bea0a000000b0068994e773e7sm92355ioc.26.2022.10.13.10.03.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 13 Oct 2022 10:03:01 -0700 (PDT) Message-ID: Date: Thu, 13 Oct 2022 11:03:00 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: hmm_test issues with latest mainline Content-Language: en-US To: Vlastimil Babka , Alex Sierra , Alistair Popple Cc: Jason Gunthorpe , Ralph Campbell , Felix Kuehling , Christoph Hellwig , Jerome Glisse , "linux-mm@kvack.org" , "open list:KERNEL SELFTEST FRAMEWORK" , Shuah Khan , David Hildenbrand , Shuah Khan References: <26017fe3-5ad7-6946-57db-e5ec48063ceb@suse.cz> From: Shuah Khan In-Reply-To: <26017fe3-5ad7-6946-57db-e5ec48063ceb@suse.cz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1665680582; a=rsa-sha256; cv=none; b=DCp959t1gskD+IkqAj94dhemp4qMiIxEbf0goNJGrTug539V2yyop6vKRIHh9e8HTLEatF 8KiyLLmBQphan+xJBqdzFUSy6nvp0H2CtlNQZmk3HEn0q1/xeMX7MIgpOu/A265E23mYVP VULZ3tJkNHRa8jiUJGjj4IY8eXUXjn0= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=linuxfoundation.org header.s=google header.b="JAsHpc/t"; spf=pass (imf18.hostedemail.com: domain of skhan@linuxfoundation.org designates 209.85.166.182 as permitted sender) smtp.mailfrom=skhan@linuxfoundation.org; dmarc=pass (policy=none) header.from=linuxfoundation.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1665680582; 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=0SJ/jFf340QWCBLHmbjb0V8xwWmYUnucYYZEwPbeojI=; b=dlQamLU3wskjhOqb0mBRIHxJyJ1TQNI3DTMJdFdeNUGl3oCiHEj+h0oMnwwFnZ/CN8r6c5 LveobQxWr0Bpp1Mxlk9SB9o1/Iz0dRkspIIIrAFRRshxKtbW9aJM06UR+Uuql/oFlG/WTV SK8GwtDPpdeCR8p5NKKb2MvQnDdhl8I= X-Rspam-User: X-Stat-Signature: smioo5sedny9f176cg1ywhbgba73ksce X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: B94E31C0032 Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=linuxfoundation.org header.s=google header.b="JAsHpc/t"; spf=pass (imf18.hostedemail.com: domain of skhan@linuxfoundation.org designates 209.85.166.182 as permitted sender) smtp.mailfrom=skhan@linuxfoundation.org; dmarc=pass (policy=none) header.from=linuxfoundation.org X-HE-Tag: 1665680582-225874 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: On 10/13/22 10:54, Vlastimil Babka wrote: > Hi, > > I've been trying the hmm_tests as of today's commit: > > a185a0995518 ("Merge tag 'linux-kselftest-kunit-6.1-rc1-2' ...) > > and run into several issues that seemed worth reporting. > > First, it seems the FIXTURE_TEARDOWN(hmm) in > tools/testing/selftests/vm/hmm-tests.c > using ASSERT_EQ(ret, 0); can run into an infinite loop of reporting the > assertion failure. Dunno if it's a kselftests issue or it's a bug to > use asserts in teardown. I hacked it up like this locally to proceed: > kselftest pull requests didn't include any framework changes. I doubt that it is framework related. > --- a/tools/testing/selftests/vm/hmm-tests.c > +++ b/tools/testing/selftests/vm/hmm-tests.c > @@ -154,6 +154,11 @@ FIXTURE_TEARDOWN(hmm) > { > int ret = close(self->fd); > > + if (ret != 0) { > + fprintf(stderr, "close returned (%d) fd is (%d)\n", ret,self->fd); > + exit(1); > + } > + > ASSERT_EQ(ret, 0); > self->fd = -1; > } > > Next, there are some tests that fail (and thus also trigger the issue above) > > # RUN hmm.hmm_device_private.exclusive ... > # hmm-tests.c:1702:exclusive:Expected ret (-16) == 0 (0) > close returned (-1) fd is (3) > # exclusive: Test failed at step #1 > # FAIL hmm.hmm_device_private.exclusive > not ok 20 hmm.hmm_device_private.exclusive > # RUN hmm.hmm_device_private.exclusive_mprotect ... > # hmm-tests.c:1756:exclusive_mprotect:Expected ret (-16) == 0 (0) > close returned (-1) fd is (3) > # exclusive_mprotect: Test failed at step #1 > # FAIL hmm.hmm_device_private.exclusive_mprotect > not ok 21 hmm.hmm_device_private.exclusive_mprotect > # RUN hmm.hmm_device_private.exclusive_cow ... > # hmm-tests.c:1809:exclusive_cow:Expected ret (-16) == 0 (0) > close returned (-1) fd is (3) > # exclusive_cow: Test failed at step #1 > # FAIL hmm.hmm_device_private.exclusive_cow > not ok 22 hmm.hmm_device_private.exclusive_cow > > I'll try to check more closely but maybe if you can reproduce it too, you'll > have more idea what's going on. > Sounds good. > The next thing is more of a question/documentation suggestion. Tons of tests > fail like this: > > ok 24 hmm.hmm_device_private.hmm_cow_in_device > # RUN hmm.hmm_device_coherent.open_close ... > could not open hmm dmirror driver (/dev/hmm_dmirror2) > # SKIP DEVICE_COHERENT not available > # OK hmm.hmm_device_coherent.open_close > > I assume this is because I run "test_hmm.sh smoke" without the SPM parameters. > The help message doesn't say much about what to specify there for > . Do these tests need a particular hardware? > (unlike the rest?) Maybe it could be clarified. > > Last thing, I noticed all these DEVICE_COHERENT tests ultimately count as OK, > not SKIPPED, which would probably be more appropriate? > Anytime a test can't be run due to missing config, the result should be a SKIP. If that is not the case let's fix these cases. > # FAILED: 51 / 54 tests passed. > # Totals: pass:50 fail:3 xfail:0 xpass:0 skip:1 error:0 > > (the skip:1 is due to test 9 "# SKIP Huge page could not be allocated" > which is probably a misconfiguration on my part so I don't report that as an issue) > Skip is the right result in this case if it is indeed the result of misconfig. thanks, -- Shuah