Message ID | 20230930122523.118173-1-swarupkotikalapudi@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp483132vqb; Sat, 30 Sep 2023 09:42:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEpSE4RalWli45HpIBQPFKYtg4S/4sNSx8ffSd7lRCGSgWUtBczAFcKrXf3wPj4FGi+9LvZ X-Received: by 2002:a05:6a00:189e:b0:68f:b72f:9aca with SMTP id x30-20020a056a00189e00b0068fb72f9acamr7733779pfh.27.1696092170257; Sat, 30 Sep 2023 09:42:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696092170; cv=none; d=google.com; s=arc-20160816; b=SBatXKJTnrN48ju5theHvxAemzLs9ifyZofbGcnN/XNh+Ta6A6upxKTLBlIIJc367a DbPdiowNoS4Y6OHxArfAzNR3ru72kmn43f9JJnbF9JwgNZW7j7NkuzR+KLE9idBOwEIv MBhpWdY7yeqI8kNU0Gmdd++PM2N9Shwjn3YBRWocVFnwOYfQMV3GKf/1OKStqLBadRlB VwaKVkU4gq7wyB4EtoK73MeQJkY2dzOnya+zSbYiedawo9DCr/LhfucmLgp+PBMS4SmW INoA4QT1KTM2BwfOdHQVPGYV4XynbGzXpnddp7spjq4vOL2IpuW/U6GdNCCG49KvxiDx 1Png== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=NxFdnF+d4GELCyBnxXMqf2wy+/Apt8AHrNw5TDGtQhE=; fh=lo3GJOTWkuP/07vZ1LLFNF815cQNr2hBHyMADJpCrEE=; b=PjVVQliwOgn7IYjRyXSn/yAi+U9Bs03pzm+XGUe7HJbKr9+cyx6V2PyNImof8db0Hx f34neOyblOkH5N68eVZx0yt+OgG3FBZyiFyTXSWVmJztN8WAXhDENvIdhDF7FVRFkMux doQP7JpLByZy+rUdOXYCnYOochFYuVLz8X3gs1jfKSJbxt/7ucADKmtqmg9UzV7ML8DR BQNqfe1Zwn6nSK1LzPDntMbQBsoZzwYdRuXlXHPZwqHMaQiWkBhccvKQczT5rLUFnQPK V1Fdav+WOmOOrYUbMxYjsGpB5K16lP7nbexIfAgg2hoC9CpfFBSrUnY+4UZsZGw9SoP7 LFmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="d96W7SC/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id v17-20020a62c311000000b0068fb9c0bb07si22180416pfg.13.2023.09.30.09.42.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Sep 2023 09:42:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="d96W7SC/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 886C9807759B; Sat, 30 Sep 2023 05:25:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231519AbjI3MZl (ORCPT <rfc822;chrisfriedt@gmail.com> + 20 others); Sat, 30 Sep 2023 08:25:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229559AbjI3MZj (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 30 Sep 2023 08:25:39 -0400 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEF27BD; Sat, 30 Sep 2023 05:25:33 -0700 (PDT) Received: by mail-pj1-x1033.google.com with SMTP id 98e67ed59e1d1-27761d85b31so7905502a91.3; Sat, 30 Sep 2023 05:25:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696076733; x=1696681533; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=NxFdnF+d4GELCyBnxXMqf2wy+/Apt8AHrNw5TDGtQhE=; b=d96W7SC/Db06Z1PHimRnUIqL+POqHf9wkiU/0C0PNmovXeNkcHN/gOdzn4O7/DaYSz voDivJJ5Ek+xU7OZmHNAx3L9qGG87LYBPNFxvVXi0WztBU/+9eNczaqNoEg0LTVc3zcF N6oL2XKHwNPTnq+00//Uuw3YtDJp2mYSQOJq6g8rWeX3jiDwVdkaqJW+nGOJt09Q4ebJ mWC7CuzGh9ia6cq6XSddZUcOMH1gGQnNeuchOlMangsm/IgqltIU/MsCXpopRgrZXh1r tLQzaMkfd3Ye2tmV8qF7NG1uIxsStw8z6dpEWBhfz4rdNDwj6hC0sV9ObRUMv5smrQqH EMNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696076733; x=1696681533; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NxFdnF+d4GELCyBnxXMqf2wy+/Apt8AHrNw5TDGtQhE=; b=qXP7SVKl0v1TQBX15z7Aa+BswS44BzpL+DTfbWfOGKmZ0e2Uqv3dLp1H5ztaRs0ar/ xCHFlFmRiq1GwCjbDZms+uqCvqdVE+ijvQQ2hoEUvhOWGVmWgzjs+tdp1RKxRogncehI dm/fv8g/gvTOhbrBWV22EJWrcHNho9kTkVgO0UOB8gwtlvqdqaoLUK4BD4M4SPvFN0Hs 61LHVYRxof0C7h4/s9a+wT/uBqtQiW89lrj3bPe6ixaiWALoAfejAU4s9/os6QGBf/OM jvqmCotrZHu5Vlw8D5uacGT7+cAHLo0vMkNBZZLVX40BrvBZ+KeA3gypqD5KNGNWUaku RsEw== X-Gm-Message-State: AOJu0YzG0gONugrCXBYI2AIn3jIjFlgupzd9tHDCzT1sYxeK2OOMt2Jt cYHasdMM5vflW0YR/ZaIhTIU3m7EzCVViIHh X-Received: by 2002:a17:90a:5217:b0:274:9409:bbca with SMTP id v23-20020a17090a521700b002749409bbcamr5793346pjh.3.1696076733186; Sat, 30 Sep 2023 05:25:33 -0700 (PDT) Received: from swarup-virtual-machine.localdomain ([171.76.87.78]) by smtp.gmail.com with ESMTPSA id q9-20020a17090a178900b0027463889e72sm3301661pja.55.2023.09.30.05.25.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Sep 2023 05:25:32 -0700 (PDT) From: Swarup Laxman Kotiaklapudi <swarupkotikalapudi@gmail.com> To: shuah@kernel.org, akpm@linux-foundation.org, hughd@google.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: linux-kernel-mentees@lists.linuxfoundation.org, swarupkotikalapudi@gmail.com Subject: [PATCH] selftests:proc add missing field KSM in smaps_rollup[] array Date: Sat, 30 Sep 2023 17:55:23 +0530 Message-Id: <20230930122523.118173-1-swarupkotikalapudi@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sat, 30 Sep 2023 05:25:49 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778481542970097432 X-GMAIL-MSGID: 1778481542970097432 |
Series |
selftests:proc add missing field KSM in smaps_rollup[] array
|
|
Commit Message
Swarup Laxman Kotiaklapudi
Sept. 30, 2023, 12:25 p.m. UTC
Missing field KSM is added in g_smaps_rollup[] array as it
fixes assert in function test_proc_pid_smaps_rollup()
Without this patchset test fails for "proc-empty-vm" as can be seen below:
$make TARGETS="proc" kselftest
...
selftests: proc: proc-empty-vm
proc-empty-vm: proc-empty-vm.c:299: test_proc_pid_smaps_rollup:
Assertion `rv == sizeof(g_smaps_rollup) - 1' failed.
/usr/bin/timeout: the monitored command dumped core
Aborted
not ok 5 selftests: proc: proc-empty-vm # exit=134
...
With this patchset test passes for "proc-empty-vm" as can be seen below:
$make TARGETS="proc" kselftest
....
timeout set to 45
selftests: proc: proc-empty-vm
ok 5 selftests: proc: proc-empty-vm
....
Signed-off-by: Swarup Laxman Kotiaklapudi <swarupkotikalapudi@gmail.com>
---
tools/testing/selftests/proc/proc-empty-vm.c | 1 +
1 file changed, 1 insertion(+)
Comments
On Sat, 30 Sep 2023 17:55:23 +0530 Swarup Laxman Kotiaklapudi <swarupkotikalapudi@gmail.com> wrote: > Missing field KSM is added in g_smaps_rollup[] array as it > fixes assert in function test_proc_pid_smaps_rollup() > > Without this patchset test fails for "proc-empty-vm" as can be seen below: > $make TARGETS="proc" kselftest > ... > selftests: proc: proc-empty-vm > proc-empty-vm: proc-empty-vm.c:299: test_proc_pid_smaps_rollup: > Assertion `rv == sizeof(g_smaps_rollup) - 1' failed. > /usr/bin/timeout: the monitored command dumped core > Aborted > not ok 5 selftests: proc: proc-empty-vm # exit=134 > ... > > With this patchset test passes for "proc-empty-vm" as can be seen below: > $make TARGETS="proc" kselftest > .... > timeout set to 45 > selftests: proc: proc-empty-vm > ok 5 selftests: proc: proc-empty-vm > .... > Thanks. We fixed this in commit 9d1be94df5acd486b157e85ffa53d344e5b17e22 Author: Alexey Dobriyan <adobriyan@gmail.com> Date: Thu Sep 7 14:10:12 2023 +0300 selftests/proc: fixup proc-empty-vm test after KSM changes
diff --git a/tools/testing/selftests/proc/proc-empty-vm.c b/tools/testing/selftests/proc/proc-empty-vm.c index b16c13688b88..ee71ce52cb6a 100644 --- a/tools/testing/selftests/proc/proc-empty-vm.c +++ b/tools/testing/selftests/proc/proc-empty-vm.c @@ -267,6 +267,7 @@ static const char g_smaps_rollup[] = "Private_Dirty: 0 kB\n" "Referenced: 0 kB\n" "Anonymous: 0 kB\n" +"KSM: 0 kB\n" "LazyFree: 0 kB\n" "AnonHugePages: 0 kB\n" "ShmemPmdMapped: 0 kB\n"