From patchwork Fri Sep 15 15:44:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Patchwork-Id: 14081 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp1393300vqi; Fri, 15 Sep 2023 17:07:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFGEvOo7/hrUQWWkhQoXp+MuFa8rFy24cO/7ACJHREIblWua1LDooqZEdwTo3QH6gK7UByp X-Received: by 2002:a17:90a:e547:b0:268:1355:b03e with SMTP id ei7-20020a17090ae54700b002681355b03emr3063645pjb.38.1694822835191; Fri, 15 Sep 2023 17:07:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694822835; cv=none; d=google.com; s=arc-20160816; b=ngSvJnSrdx8lCTDtAdIyO6O42DFbGadmEZizAKcRus4E2h5lIh4BJ+K836ZJbZyHNf IAQS+V6Fz3ob9TiUf8om3FzbdsMRhC2hYLGZKkDgYoiGG92E/rTU6E82n22dOkl8lnKH 4ZyEnOWfsiLdt1KspJuZy7QLhZSboHvcGRXBqW+JlsQQk7XEvZ0sb+U+xRpWmVukvcTO RpAHiJ6kyVx2zwgDnYq0Rz/a0bLdSbGfaob/PbuCFb0D3gTCijJtgm5NtxTw/Hv9bbsP lt5nIusb4+ZKdDlt1m/YQDCY1OQ2R2sGUpwb4fudAqFgh115sQOYn90ZzzwUkS+a8NbE l+8w== 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=sSudYYCW68L3QHl2n+TBtKEy8D/2sA0GjV2j7JKQfyY=; fh=Oe5yk31AF04Qo65fz7tkP1GVCJnC7lCD9IuQIxFtXv8=; b=QhemVe8SEuv+Ylq6+bwQEwz3pUk+yUChqo16n4dIwgdJj0fkCRvy0fwjOCyO6u0KSB Whp1DyLofBk/O2y+Fve4ktDp6EtU5l5kWlx3n6sjIIDBey/l8+/tkQ8YsS5cdTxuTJsI B/38zAWA15lqx97OwCexpDBg2w8jOPG/HbXk7o4itPpv/2xuaVyYP1ENxQgaHUZg1XqA lu22o5CdbG071vCR/wxK7MpW7MTCq3yufSaS2+LLQ8fxITP4S659PItEnkGHR5NetmOx RJNFmVEjhb5Bpl9M6rddae9W3Un0hyq6OCHdK4KyiMEsN0fBEeIKil2fBHqd29GdjXf4 2aIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=X7NXvZL5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id oo17-20020a17090b1c9100b00263c23a5693si4439088pjb.13.2023.09.15.17.07.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 17:07:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=X7NXvZL5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 00D6882C517E; Fri, 15 Sep 2023 08:45:48 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236245AbjIOPpW (ORCPT + 31 others); Fri, 15 Sep 2023 11:45:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236280AbjIOPo6 (ORCPT ); Fri, 15 Sep 2023 11:44:58 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60B572111; Fri, 15 Sep 2023 08:44:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694792689; x=1726328689; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=0I3gOLEsvDq3zuYI7Z/tbZQWwODKHgfdCF3R0YJN0/I=; b=X7NXvZL5DC5sFAak6Zk402jXKJqXiZD6haG6UzdZmI68XaBJLvdEeSwj YAP0z2KreaeacPi4v10CsgULVahRyHwTAVm9EhcoGTIOu3gEp34z1uqSG WyKtWXXVviKBtBrep1aEZRk77AaSwPiyUl8HdVCJh7Ww8lFnI9utxdtZp Oe6YbGHFSg4nxmd6E67yyodmFObtPoS5Z1AUj+kBNcpvaMGclQn6FbUM9 OPo5fWv/+LWZwbyKSum3jjEt/kBrtOaitOF6OisOLou1NRfSl3uc7RZq/ aimneskU/ZJHEjwfoBZS/csM7SrVZmLS7NRelJZu/j5fwc0Zrcf13l0o2 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10834"; a="410217227" X-IronPort-AV: E=Sophos;i="6.02,149,1688454000"; d="scan'208";a="410217227" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2023 08:44:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10834"; a="991878516" X-IronPort-AV: E=Sophos;i="6.02,149,1688454000"; d="scan'208";a="991878516" Received: from srdoo-mobl1.ger.corp.intel.com (HELO ijarvine-mobl2.ger.corp.intel.com) ([10.252.38.99]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2023 08:44:44 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: Reinette Chatre , Shuah Khan , Shuah Khan , linux-kselftest@vger.kernel.org, =?utf-8?q?Maciej_Wiecz=C3=B3r-Retman?= Cc: LKML , Shaopeng Tan , stable@vger.kernel.org, =?utf-8?q?Ilpo_J=C3=A4rvinen?= Subject: [PATCH v2 0/6] selftests/resctrl: Fixes to failing tests Date: Fri, 15 Sep 2023 18:44:32 +0300 Message-Id: <20230915154438.82931-1-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 15 Sep 2023 08:45:49 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777150548867293750 X-GMAIL-MSGID: 1777150548867293750 Fix three issues with resctrl selftests. The signal handling fix became necessary after the mount/umount fixes. The other two came up when I ran resctrl selftests across the server fleet in our lab to validate the upcoming CAT test rewrite (the rewrite is not part of this series). These are developed and should apply cleanly at least on top the benchmark cleanup series (might apply cleanly also w/o the benchmark series, I didn't test). v2: - Include patch to move _GNU_SOURCE to Makefile to allow normal #include placement - Rework the signal register/unregister into patch to use helpers - Fixed incorrect function parameter description - Use return !!res to avoid confusing implicit boolean conversion - Improve MBA/MBM success bound patch's changelog - Tweak Cc: stable dependencies (make it a chain). Ilpo Järvinen (6): selftests/resctrl: Extend signal handler coverage to unmount on receiving signal selftests/resctrl: Remove duplicate feature check from CMT test selftests/resctrl: Move _GNU_SOURCE define into Makefile selftests/resctrl: Refactor feature check to use resource and feature name selftests/resctrl: Fix feature checks selftests/resctrl: Reduce failures due to outliers in MBA/MBM tests tools/testing/selftests/resctrl/Makefile | 2 +- tools/testing/selftests/resctrl/cat_test.c | 8 -- tools/testing/selftests/resctrl/cmt_test.c | 3 - tools/testing/selftests/resctrl/mba_test.c | 2 +- tools/testing/selftests/resctrl/mbm_test.c | 2 +- tools/testing/selftests/resctrl/resctrl.h | 7 +- .../testing/selftests/resctrl/resctrl_tests.c | 78 +++++++++++-------- tools/testing/selftests/resctrl/resctrl_val.c | 22 +++--- tools/testing/selftests/resctrl/resctrlfs.c | 69 +++++++--------- 9 files changed, 88 insertions(+), 105 deletions(-) Reviewed-by: Maciej Wieczor-Retman Tested-by: Maciej Wieczor-Retman