Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp311202rwi; Mon, 10 Oct 2022 00:05:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7CPR6kYBf3As+2FdJlQaKMDUPhDyHco6mA7X2fcJtKu2ONx8mVSrS6ASRmjtjKEmInRy+L X-Received: by 2002:a17:907:75dc:b0:78b:339:63c7 with SMTP id jl28-20020a17090775dc00b0078b033963c7mr13529987ejc.480.1665385511029; Mon, 10 Oct 2022 00:05:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665385511; cv=none; d=google.com; s=arc-20160816; b=LdEEPNqOECSyyKTRlRMvlXISs07xAhAExC5nYe7R+LJyEdoQOcDS0c8GLutdJi0G7z cUSYc3VxznSkUrxpvd/k5LH1gQtvLuXzdiCMfkdZ1ElTu6h0i0IjDqqtPrTV4t1Ydcue kRJJV1agjlpQED6WQQiNrdVmrG/b7Nnh+doV4KKWOyR45AgGBeCwx+GewtPR9Y1/fS8y uv5zrI/2GS8hqh1f56F0STr4MoltDoYjRNfFscI4m3TDh+Ns40BCRABp07BeX7glY5OK uxKP7DuD3X6hZJmKmGffXEh2qhvi9Ief5yZ8VVvud82D5ujmpRDlC22/IQnsSR+7oSEg g82Q== 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=Pg5G9VL5CpW466Qb5kzC3fS+GraPCe+CdwnleWArycc=; b=AJ7neQPivo4aZWnXzH5gBf65BPDuxEqJvxCjpfpJqDGKwNyVa1EAOzhKkl122aghkb UhspW0v6arp5DKDf53lZo9D1E4PK1aIlVfgqZs4yZISOa6mRGW1SjJ1icvMVLRV1PXZ/ tOAHpN+xQHEqAkvDNo8OcHBQ6yhF0MXyWN3a6iqgcLx5F4umJiQINaGv3jbvt5tzaV/l dAJ2zjnxZ0iZ1qZfSCg8JR5r2NRKYEO3oHrKKy7YnhqrioqbMYwtHC1SqJHvyOVXZ91X dx7Kcd/FnLrKuiLPIk1WO/MvetXUqwdMITww+INCff1jCgnQk9Sh+PqGzSr3Ln6BG2fs 6GvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PxqPPj6W; 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 vj23-20020a170907131700b0078aae728f28si7344431ejb.911.2022.10.10.00.04.33; Mon, 10 Oct 2022 00:05:11 -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=PxqPPj6W; 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 S230315AbiJJGy1 (ORCPT + 99 others); Mon, 10 Oct 2022 02:54:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230508AbiJJGyK (ORCPT ); Mon, 10 Oct 2022 02:54:10 -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 5542BE5D for ; Sun, 9 Oct 2022 23:54:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665384848; 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=Pg5G9VL5CpW466Qb5kzC3fS+GraPCe+CdwnleWArycc=; b=PxqPPj6WRP4DACQ8tvnw2PYYjSoCKyuLHpkaU4f7Vuddu1GfYlbPcodz3czGEZ08T7NxRJ mxLmzwj8Q4Z8Gkb56uwQdUKkOe6W/C0FDqApEq05bGEHJDQvEuMfek7ckKsryWzxPdsP0l CuKdUewKnvy2Snj6y4QM2pd1Ef7ODRk= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-436-1Bf1vX7QN6WnlYmLnK9pHQ-1; Mon, 10 Oct 2022 02:54:06 -0400 X-MC-Unique: 1Bf1vX7QN6WnlYmLnK9pHQ-1 Received: by mail-wm1-f71.google.com with SMTP id d5-20020a05600c34c500b003b4fb42ccdeso8536259wmq.8 for ; Sun, 09 Oct 2022 23:54:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=Pg5G9VL5CpW466Qb5kzC3fS+GraPCe+CdwnleWArycc=; b=gC9SrNz0cqO0FPOMKQJzOznFGRDZg3xNw20NdP9v1AFPnZA6MpWNuwsUgApalVLSbL qI/3YtiQe+VOYqGjclVW0yKwq1+SPb61leV3IHnvPRgFZVOj2ZsWC8zLrlslgcWRD5ot x7/dQBVoLl9Jd4DV/wFcVrD1Lx0XaOULrSpnKzibZOmtVxxSpXfsYec9NwA8ux+efCBT v/vSdApESJC3xb/9OeNLUL7L1FPCD85rCGm1fwLf+rxhTVVO2AFmn5F170IsR6rZdo+N bHDFIclr0FY11afy39L8faN6HGkcoDWLQMi4r9HYrBUVEGtIrcXAt+TCQ6PHSZaQVTXt 1PgA== X-Gm-Message-State: ACrzQf0U0SE00EPMmyyFotLkMipP/KZgnQDCSYbb+ZEHtlLrKA0B5hBY SL6VH281fdHENXfsBxsZTrEvfEp2F5MAQ18GSsjNymNYCGOOVso9EzBBvFXBxR6ky0oqRDQHxmr eQ4u4g95mIW7B+SGIWD9GfZ8V X-Received: by 2002:a05:600c:4186:b0:3b4:a660:1d29 with SMTP id p6-20020a05600c418600b003b4a6601d29mr18631481wmh.120.1665384845741; Sun, 09 Oct 2022 23:54:05 -0700 (PDT) X-Received: by 2002:a05:600c:4186:b0:3b4:a660:1d29 with SMTP id p6-20020a05600c418600b003b4a6601d29mr18631464wmh.120.1665384845488; Sun, 09 Oct 2022 23:54:05 -0700 (PDT) Received: from ?IPV6:2003:cb:c704:e600:3a4a:f000:b085:4839? (p200300cbc704e6003a4af000b0854839.dip0.t-ipconnect.de. [2003:cb:c704:e600:3a4a:f000:b085:4839]) by smtp.gmail.com with ESMTPSA id j5-20020a05600c1c0500b003b477532e66sm35460629wms.2.2022.10.09.23.54.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 09 Oct 2022 23:54:05 -0700 (PDT) Message-ID: Date: Mon, 10 Oct 2022 08:54:03 +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: [PATCH -next v5 2/4] selftests/memory-hotplug: Restore memory before exit Content-Language: en-US To: zhaogongyi , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "linux-kselftest@vger.kernel.org" Cc: "akinobu.mita@gmail.com" , "corbet@lwn.net" , "osalvador@suse.de" , "shuah@kernel.org" References: From: David Hildenbrand Organization: Red Hat In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.0 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,SPF_HELO_NONE,SPF_NONE 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 08.10.22 03:40, zhaogongyi wrote: > Hi! > >> >> On 30.09.22 10:52, zhaogongyi wrote: >>> Hi! >>> >>>> >>>> On 30.09.22 08:35, Zhao Gongyi wrote: >>>>> Some momory will be left in offline state when calling >>>>> offline_memory_expect_fail() failed. Restore it before exit. >>>>> >>>>> Signed-off-by: Zhao Gongyi >>>>> --- >>>>> .../memory-hotplug/mem-on-off-test.sh | 21 >>>> ++++++++++++++----- >>>>> 1 file changed, 16 insertions(+), 5 deletions(-) >>>>> >>>>> diff --git a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh >>>> b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh >>>>> index 1d87611a7d52..91a7457616bb 100755 >>>>> --- a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh >>>>> +++ b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh >>>>> @@ -134,6 +134,16 @@ offline_memory_expect_fail() >>>>> return 0 >>>>> } >>>>> >>>>> +online_all_offline_memory() >>>>> +{ >>>>> + for memory in `hotpluggable_offline_memory`; do >>>>> + if ! online_memory_expect_success $memory; then >>>>> + echo "$FUNCNAME $memory: unexpected fail" >&2 >>>> >>>> Do we need that output? >>> >>> In my opinion, if online a memory node failed ,it should be a kernel bug >> catched, so, I think the output here is needed. >> >> But online_memory_expect_success() already prints a warning, no? > > Yes, online_memory_expect_success() already prints a warning, remove the warning in online_all_offline_memory() seems ok, > > My previous consideration was that one more log information would make it easier to locate the wrong location. Let's keep it simple unless there is real reason to warn twice. -- Thanks, David / dhildenb