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 C306AC433FE for ; Tue, 1 Nov 2022 11:57:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3F6C06B0072; Tue, 1 Nov 2022 07:57:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3A5C26B0073; Tue, 1 Nov 2022 07:57:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 26DBE6B0074; Tue, 1 Nov 2022 07:57:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 148E46B0072 for ; Tue, 1 Nov 2022 07:57:00 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id DCFEFA0B29 for ; Tue, 1 Nov 2022 11:56:59 +0000 (UTC) X-FDA: 80084722158.18.D2F2FFF Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf20.hostedemail.com (Postfix) with ESMTP id 099771C001E for ; Tue, 1 Nov 2022 11:56:56 +0000 (UTC) Received: from canpemm100008.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4N1pQM5HP5zHtf8; Tue, 1 Nov 2022 19:56:27 +0800 (CST) Received: from canpemm500005.china.huawei.com (7.192.104.229) by canpemm100008.china.huawei.com (7.192.104.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 1 Nov 2022 19:56:40 +0800 Received: from canpemm500005.china.huawei.com ([7.192.104.229]) by canpemm500005.china.huawei.com ([7.192.104.229]) with mapi id 15.01.2375.031; Tue, 1 Nov 2022 19:56:40 +0800 From: zhaogongyi To: kernel test robot CC: "oe-lkp@lists.linux.dev" , "lkp@intel.com" , Shuah Khan , David Hildenbrand , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" Subject: Re: [linus:master] [selftests/memory] 13023c33c9: kernel-selftests.memory-hotplug.mem-on-off-test.sh.fail Thread-Topic: [linus:master] [selftests/memory] 13023c33c9: kernel-selftests.memory-hotplug.mem-on-off-test.sh.fail Thread-Index: Adjt4wESSc/+YfD2QFSTt9INW1YibAABRaug Date: Tue, 1 Nov 2022 11:56:40 +0000 Message-ID: <983aef2332ee47e3abb3efae1290a4b5@huawei.com> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.67.110.209] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-CFilter-Loop: Reflected ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1667303819; a=rsa-sha256; cv=none; b=W99K50xqOvF5EvZ+ub1mITCsnZYLs4vWcuVKE3txtx9Sj5HBJP56clm0Ns0AtQPeUUYct/ wls5yGlAn2aLloWSmYdYy3tCu3IPmyad67HG63Z2zB+Kv9G2HnN42qgi6PhAvcKgGSo5YA F9vvfLg1x1kMJB4VTqCXcmJkwL8O+jE= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf20.hostedemail.com: domain of zhaogongyi@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=zhaogongyi@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1667303819; 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: references; bh=cZXC4wHvwZmgip8M+CRE/2utrHWrpjf5YzK8vn0zI7k=; b=4DTKzuds0PZE8U3d8fcUvL5+7EY2q6T9uJZIrps8Q7oo6G8DGVshK6q2NzclDjJKVZMH9T VMdxYr7vfapf72O/pFmPhr3vv74ULdlKDwA1DO66yX70cd0yTtnqcXRlimFGZdKUAZD85V EHe3GlgxbnQNZUYiEh1PcwPfmeqCWKo= X-Rspamd-Server: rspam02 X-Rspam-User: Authentication-Results: imf20.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf20.hostedemail.com: domain of zhaogongyi@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=zhaogongyi@huawei.com X-Stat-Signature: 9n4yywiwgmzhyjgcfyp7iuf54nca447o X-Rspamd-Queue-Id: 099771C001E X-HE-Tag: 1667303816-729992 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: Hi! >=20 > Hi! >=20 > > > > Hi Gongyi, > > > > We noticed that below commit may change the exit status of > > memory-hotplug selftest, please check if the test result is expected. > > > > We got same test log before this commit but with a good exit, though > > there were also some "Invalid argument" and "unexpected success" log. > > Please help give some guidance if there are any problems in our test > flow. > > Thanks. > > > > > > Greeting, > > > > FYI, we noticed > > kernel-selftests.memory-hotplug.mem-on-off-test.sh.fail > > due to commit (built with gcc-11): > > > > commit: 13023c33c962730a38d6b43995910c8805637a9a > > ("selftests/memory-hotplug: Add checking after online or offline") > > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master > > > > in testcase: kernel-selftests > > version: kernel-selftests-x86_64-9313ba54-1_20221017 > > with following parameters: > > > > group: memory-hotplug > > > > test-description: The kernel contains a set of "self tests" under the > > tools/testing/selftests/ directory. These are intended to be small > > unit tests to exercise individual code paths in the kernel. > > test-url: https://www.kernel.org/doc/Documentation/kselftest.txt > > > > > > on test machine: 8 threads Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz > > (Skylake) with 28G memory > > > > caused below changes (please refer to attached dmesg/kmsg for entire > > log/backtrace): > > > > > > 2022-10-28 01:04:44 make quicktest=3D1 run_tests -C memory-hotplug > > make: Entering directory > > > '/usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-13023c33c962730a38 > > d6b43995910c8805637a9a/tools/testing/selftests/memory-hotplug' > > TAP version 13 > > 1..1 > > # selftests: memory-hotplug: mem-on-off-test.sh # Test scope: 2% > > hotplug memory > > # online all hot-pluggable memory in offline state: > > # SKIPPED - no hot-pluggable memory in offline state > > # offline 2% hot-pluggable memory in online state > > # trying to offline 5 out of 224 memory block(s): > > # online->offline memory0 > > # ./mem-on-off-test.sh: line 78: echo: write error: Invalid argument # > > offline_memory_expect_success 0: unexpected fail # online->offline > > memory1 # online->offline memory10 # online->offline memory100 # > > online->offline memory101 # online->offline memory102 > > # online all hot-pluggable memory in offline state: > > # offline->online memory1 > > # offline->online memory10 > > # offline->online memory100 > > # offline->online memory101 > > # offline->online memory102 > > # Test with memory notifier error injection > > # ./mem-on-off-test.sh: line 267: echo: write error: Invalid argument > > # >=20 > I can not reproduce the error according to the file 'reproduce'. >=20 > Line 267 is not runnable on my system. Is there something wrong here? >=20 > The code on my system like: >=20 > 266 # > 267 # Offline $ratio percent of hot-pluggable memory > 268 # > 269 echo 0 > > $NOTIFIER_ERR_INJECT_DIR/actions/MEM_GOING_OFFLINE/error > 270 for memory in `hotpluggable_online_memory`; do > 271 if [ $((RANDOM % 100)) -lt $ratio ]; then > 272 offline_memory_expect_success $memory > &>/dev/null > 273 fi > 274 done >=20 >=20 > > online_memory_expect_fail 142: unexpected success # > > online_memory_expect_fail 190: unexpected success # > > ./mem-on-off-test.sh: line 287: echo: write error: Invalid argument # >=20 > The problem is similar with line 267. >=20 > > offline_memory_expect_fail 107: unexpected success # >=20 > It seems the error-inject not work. Oh, I see that the version you run the test is based on commit 13023c33c962= 730a38d6b43995910c8805637a9a, and there is a bug on lib/notifier-error-inje= ct.c. The commit of the fix patch is c597d9054b13.=20 Your test version has no the fix patch, So the test failed as expected Regards, Gongyi