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 0787CC001DF for ; Mon, 24 Jul 2023 11:35:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 832468E0002; Mon, 24 Jul 2023 07:35:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7E2806B0074; Mon, 24 Jul 2023 07:35:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 683158E0002; Mon, 24 Jul 2023 07:35:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 55B316B0071 for ; Mon, 24 Jul 2023 07:35:19 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 1AD72A09AD for ; Mon, 24 Jul 2023 11:35:19 +0000 (UTC) X-FDA: 81046299558.05.2C75D67 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf03.hostedemail.com (Postfix) with ESMTP id D8F3F2001B for ; Mon, 24 Jul 2023 11:35:15 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=dy1Go6lh; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf03.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=1690198516; 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=eMJT6NzbKAHchuNQihrlyERlClqLTiPaYVCXQcFFroU=; b=SQoFLpEltu9GvljDKSxBN6z9kJ9gHdEJPrnsFy/HMjoC7dCsEqW9kj7mvgimzsMAJR5IvF 55/iz5qh8XuMN625NIMc3Tfr4rmEveYSwlWzqkPy5DRcqIOlHs6kH+XJ4PLxweXpzoJEXA VUuMRqwJJnp8a4RM50FkALa2+CYMn5M= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=dy1Go6lh; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf03.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=1690198516; a=rsa-sha256; cv=none; b=nu+8pwcFlm6uAHWR3rFz0I8wjGYcx9VHO1dpBKwbvZj+P0p0APk0/zYRx+GI5l2HS9/McB rIMAELydunwfCnireDf7srXWlH6tr/RcD9OyMnq9RiBELHPKqT5yPvmHgNw/Bg4zy/PuV/ 96c2hiY1eySJtXXzDlzfQKX4xArsGak= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690198515; 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=eMJT6NzbKAHchuNQihrlyERlClqLTiPaYVCXQcFFroU=; b=dy1Go6lh6kRRacCQpxcTqHzXeOLugT9XLBC6cAiA5J+mTodKCXsoLKTmiaaIulz+tYvgHZ otRNHrBGfcEFNZRp6Ayx49VSqDJUGXkHW2i8DylQTIikg+4gFdzL56uTh+V4Ro4ZwnVkZ8 /PitJ7Jn4NYWhToWVgYiREwwrLuHzUE= Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-664-8DA8h2N9OPaIUxy5K2v0JA-1; Mon, 24 Jul 2023 07:35:11 -0400 X-MC-Unique: 8DA8h2N9OPaIUxy5K2v0JA-1 Received: by mail-lj1-f199.google.com with SMTP id 38308e7fff4ca-2b6f51e170fso35076591fa.2 for ; Mon, 24 Jul 2023 04:35:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690198510; x=1690803310; 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=eMJT6NzbKAHchuNQihrlyERlClqLTiPaYVCXQcFFroU=; b=Wc4S0VdRQTRhhn5sS50CIAuD5iyVTHYQH3XXhvVwwrFUy0IoVrwcuU5PzBypOTgoQH ufeucB30qLt46A61j+MriZgqrhG5YrcUFRzydgAya0p37Cl+rbvu65PB+R/FojABNtzb r778fdAZrodcH7aauQKdGIsbagGG9AWXzjKEWL3qlW00wcK3dv9K2L5xq0Yt2rDNAoEd SmAFtquMvB49WTyiPu8gGw4JVBZQ5oeZ9FI9VLwQWxnJa5HqqqWzd8xPuovUo+I56ViN JV9T0lF6JCjQsKMscWG7JeyKBnu2FeMlM4NqFVlK0QYrM3B/fd/lx2gcbw3+ArU3X9VP Dz9Q== X-Gm-Message-State: ABy/qLbsvhMUxXdYk0eLWRlf/EHeYIOEVEr62X0TTWBC/GtqWzfLTsKD IacNmhGYt/TRMXN1qgklopkFMbT9smg145kITzu55BB0aqBq8w/NPGtjRz6q8mSKK5al5nfWPrL ZeZZk5NdDPKo= X-Received: by 2002:a2e:96d1:0:b0:2b5:81bc:43a8 with SMTP id d17-20020a2e96d1000000b002b581bc43a8mr5173095ljj.0.1690198510175; Mon, 24 Jul 2023 04:35:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlH6NuX+DPeSWpje6qdrDA76gRAGJ3wU7DiH93+PySyeupLPmy7RrJfQSrOoZuFGAXHyST8Hyw== X-Received: by 2002:a2e:96d1:0:b0:2b5:81bc:43a8 with SMTP id d17-20020a2e96d1000000b002b581bc43a8mr5173075ljj.0.1690198509742; Mon, 24 Jul 2023 04:35:09 -0700 (PDT) Received: from ?IPV6:2003:cb:c73d:bb00:91a5:d1c:3a7e:4c77? (p200300cbc73dbb0091a50d1c3a7e4c77.dip0.t-ipconnect.de. [2003:cb:c73d:bb00:91a5:d1c:3a7e:4c77]) by smtp.gmail.com with ESMTPSA id c22-20020a05600c0ad600b003fa98908014sm12663923wmr.8.2023.07.24.04.35.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 Jul 2023 04:35:09 -0700 (PDT) Message-ID: <83a3f3e5-d41b-07d5-0dfd-ed9a380baae4@redhat.com> Date: Mon, 24 Jul 2023 13:35:08 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v3 6/8] selftests/mm: Make migration test robust to failure 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: <20230724082522.1202616-1-ryan.roberts@arm.com> <20230724082522.1202616-7-ryan.roberts@arm.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20230724082522.1202616-7-ryan.roberts@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: 7bit X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: D8F3F2001B X-Stat-Signature: bnrjkfhpdnmqz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ZlikYQNgUoFXWhcuUlbBHntPhyS7dpqWtv00+U/06G0sAVhi3hTD2tl+UiMY3hwm6nUg9I3TcFiYKRAXzvPPEGuco57R+YAsQ71dJginezmIIIpX+Ea9RkXEntEfPlqfzFmI9s3/XMxQQGp3NXIP8PVlaoopdsVGnwYdiTgMWhFMSMI141/S4CEiMlBSSFOe8Pa3HR5UdAxcATkg/PwTyRc09PqDh16zUglbDNeH4plZDhdsJ33Ad9h0/SH4n4cdtaGbIvTJNwcnjp695gsTWMfIiHAoP3uWBT+r457HJpYaex4eHqcvIi589Prqltk8Ez0APh3RDX/qGqaToQaixbDwm1kwPzWPo3O5U9FN3X6udIVU+Opst6Hc7pFV5M3UTcstWVuVWajr6HFxw70zWKj4zSCq2MbVelnCIXbqe0KcPoYOkgoPODsOO7g== 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 24.07.23 10:25, Ryan Roberts wrote: > The `migration` test currently has a number of robustness problems that > cause it to hang and leak resources. > > Timeout: There are 3 tests, which each previously ran for 60 seconds. > However, the timeout in mm/settings for a single test binary was set to > 45 seconds. So when run using run_kselftest.sh, the top level timeout > would trigger before the test binary was finished. Solve this by meeting > in the middle; each of the 3 tests now runs for 20 seconds (for a total > of 60), and the top level timeout is set to 90 seconds. > > Leaking child processes: the `shared_anon` test fork()s some children > but then an ASSERT() fires before the test kills those children. The > assert causes immediate exit of the parent and leaking of the children. > Furthermore, if run using the run_kselftest.sh wrapper, the wrapper > would get stuck waiting for those children to exit, which never happens. > Solve this by setting the "parent death signal" to SIGHUP in the child, > so that the child is killed automatically if the parent dies. > > With these changes, the test binary now runs to completion on arm64, > with 2 tests passing and the `shared_anon` test failing. > > Signed-off-by: Ryan Roberts > --- Reviewed-by: David Hildenbrand -- Cheers, David / dhildenb