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 27B61C4332F for ; Thu, 13 Oct 2022 17:45:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4A8B66B0071; Thu, 13 Oct 2022 13:45:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4577F6B0073; Thu, 13 Oct 2022 13:45:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2F8326B0074; Thu, 13 Oct 2022 13:45:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 1C09F6B0071 for ; Thu, 13 Oct 2022 13:45:12 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id D99F71C61FC for ; Thu, 13 Oct 2022 17:45:11 +0000 (UTC) X-FDA: 80016652422.24.335C629 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf24.hostedemail.com (Postfix) with ESMTP id 15DE718002D for ; Thu, 13 Oct 2022 17:45:10 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 168491FEA1; Thu, 13 Oct 2022 17:45:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1665683109; h=from:from:reply-to: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=C0ZcrqWq02INMyuvT9d4Qy6sMxojvAn5U3ibtbgaCXk=; b=LZIJzjWrVjS8AxO6xpXn4tp3ROO/OkLAV9NdB13J0qbOhcMT0TxZvJekrOGU7Zhm6dIrhL ThFGzypQz/Bf+R9cy95pevWsFC0BFG3qJc3QAYhtQdzoDiKADjPr0aqLxYcSyHsXizDu9s mqU+fsRthMNLHCt7c44CILLVEH5qiWk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1665683109; h=from:from:reply-to: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=C0ZcrqWq02INMyuvT9d4Qy6sMxojvAn5U3ibtbgaCXk=; b=6YWqm7zQTNYMkwSMw8jf2lSqtAQdQQ+i3u9Kl72Apb10Dbb+Ws4fTv/Tt2IE6weDC0fDMk 38ws2s9auCu2/qCA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 858C6139F3; Thu, 13 Oct 2022 17:45:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id FqB3H6ROSGMWVgAAMHmgww (envelope-from ); Thu, 13 Oct 2022 17:45:08 +0000 Message-ID: <0e02ace6-2fad-47d2-03b9-d8a46f256097@suse.cz> Date: Thu, 13 Oct 2022 19:45:08 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: hmm_test issues with latest mainline From: Vlastimil Babka To: Shuah Khan , David Hildenbrand , 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 References: <26017fe3-5ad7-6946-57db-e5ec48063ceb@suse.cz> <7e2e6679-3205-3540-f522-9eaed2940559@redhat.com> <44fcecda-31a4-7288-1848-63003dfe0a7d@linuxfoundation.org> <04114304-7b35-d42f-0155-087e3b6237c6@suse.cz> Content-Language: en-US In-Reply-To: <04114304-7b35-d42f-0155-087e3b6237c6@suse.cz> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=LZIJzjWr; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=6YWqm7zQ; spf=pass (imf24.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1665683111; a=rsa-sha256; cv=none; b=MF958E8qAF5/K50aPy0vmvYEyrU3XU01c9n0X22NDLT9++7dcZI9z3fvPRlj/+5Li8yNgK Pktxuq8l1iMJhrdgpOHtHpmf6Xb8r/UCEjCyNQns/S2pyKPLwY1FQcesF4ofkkfnnjRvDc DI8dIIvF1oIY40e5rgDfcXAm+zjCp/4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1665683111; 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=C0ZcrqWq02INMyuvT9d4Qy6sMxojvAn5U3ibtbgaCXk=; b=FIY0rdIba6vPlWWkJf0BwjzN3nFc73WfuUxKfwZQBxAuWpTMmZ1neKv5HZtMSW7gU8Ao/F Q1Eg1MvQTXaT8vna/a+V6qIqZ9e45M+fh1wzdzHxfv9Et6oYDcwVEfHf/Rif1Kbs/CF3YQ nWewEjUKihyE1ODbiD/Rf8uI19bJhs0= X-Rspamd-Queue-Id: 15DE718002D X-Rspam-User: Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=LZIJzjWr; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=6YWqm7zQ; spf=pass (imf24.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none X-Rspamd-Server: rspam04 X-Stat-Signature: ewhi1curruihu5ybpdwko73u1f4z3zsf X-HE-Tag: 1665683110-519854 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 19:12, Vlastimil Babka wrote: > On 10/13/22 19:10, Shuah Khan wrote: >> On 10/13/22 11:01, David Hildenbrand wrote: >>> On 13.10.22 18: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: >>>> >>>> --- 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 >>>> >>>> >>> >>> When did that test start failing? Was it still ok for 6.0? > > Didn't test yet, will try, in case it's my system/config specific thing. So it's actually all the same with v6.0 for me. The infinite loops, the test failures, the misreported SKIPs. # RUN hmm.hmm_device_private.exclusive ... # hmm-tests.c:1673:exclusive:Expected ret (-16) == 0 (0) hmm 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:1727:exclusive_mprotect:Expected ret (-16) == 0 (0) hmm 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:1780:exclusive_cow:Expected ret (-16) == 0 (0) hmm 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