Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp1112198rwp; Thu, 13 Jul 2023 06:23:17 -0700 (PDT) X-Google-Smtp-Source: APBJJlE7azFYzIfSkpS8asQAOeQ8XyNJdI10DqEJAk0TUMP09R7bK0vzv1eGdAqsWKIXMR716SGD X-Received: by 2002:a17:906:d28d:b0:993:fa99:d7e2 with SMTP id ay13-20020a170906d28d00b00993fa99d7e2mr1308468ejb.21.1689254597625; Thu, 13 Jul 2023 06:23:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689254597; cv=none; d=google.com; s=arc-20160816; b=tYB95Y3ZOjs2dRWAwm7Klsoa9h334NH8xGAEFuBn0WNiCHSw+gdKfrtgjuGlRsLufE ZyGro8fPPcBkwes4sYw5CXoh3wTtlRIIhReA/Dr3NmEfDD9VZrTp2dKmkGCE1KP0TBlz MKl7KBju07cb+QxK1BBho44kTz2ZtbPp+p9H+ndkZEGBwPF0Uyn+G951KYhOPGYubA6M 2wDs8ZWJ3Tpmjpu3nI3s0dmoIkH/YXlDM6KVv+CKFnWr5rJDK7qtYwrQBrIceaioW8Ju Ovx2+N3sW9KoC7M6BhbH9BdjbJcqmK/VfE3eq51HSILwNyBpLW+NuImNRhQZUSiFn4yh /fRQ== 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=ts+sT5vopenARxphR+PGILGggVqB3HflBXRHPjG0Nag=; fh=y5enO6VTEcULJfZHsIKug8ETOGLtOYa6cIqhqH2IlkU=; b=IeGzU51cSQmXvURqX8/WQG4jgptCsFqwE+Pd3MZCj7c7oJHAxfWgj0qrXg4DRv5kP0 GSQFWQ7JTMF+dZWlPcPPeEo+4lsVk5t7+tBvT7WpH7mW8W9qxhHT9Y2nuzZx9UCUR2qu l+YaSKdVDo9tU6xF94disTr8YiIlA2hDv1zphlz32NCoxggygBvb1LDfzpImoRndIOng v4uZtjC1xETwN05/5D4YYwZ0eg5RvMPIudcY5jip7RGCx4uO1Gq07MltfZrqBKCWnfa/ fYMyIozQuXKdQrDVeLBhm66XmYhbNIaojr1HFOK3pQSq8ifczUjmOjikspFj9DAmhMyl 3n1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jun12iVD; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l7-20020a1709066b8700b00993a7ae9f37si6711061ejr.882.2023.07.13.06.22.53; Thu, 13 Jul 2023 06:23:17 -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=@intel.com header.s=Intel header.b=jun12iVD; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235070AbjGMNUb (ORCPT + 99 others); Thu, 13 Jul 2023 09:20:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235151AbjGMNUF (ORCPT ); Thu, 13 Jul 2023 09:20:05 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 721451FD6; Thu, 13 Jul 2023 06:19:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689254385; x=1720790385; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=oLhxPyIN7mgwR8XP8nOZx/+mWVZFK14soxI+lDZTabs=; b=jun12iVD0Q8cuORNs0PO9flnSRBwVm7vsRdKg6uSw9Cpe3vEAe171P+4 TJrUOZCK1AgUYTTJRiUX8hdZdcbGgx92KOSBAUaw8F/YP2Rpl1FdtFKy0 emaM6hLrmfqhwIhm6JDChji005h6gDnUgoH1fHv2x6M1+/KDMhPRU5YQx 5TZbpU3pXTWQK6JN6nbKN515bQOoUdbrzakHwhDSEgyit5WatSgPZHQhW OwSLb5Rh6qnvrQZfMF2pt5KKTV7nw8aPzp0/wmyKUuE0iJAfFnDhdqc/J Y5XVzwuu+knED6BTTDn36F4TT3DmXag0tgZAI42ii6GkRqLcBaR2H8iOC g==; X-IronPort-AV: E=McAfee;i="6600,9927,10770"; a="345496274" X-IronPort-AV: E=Sophos;i="6.01,202,1684825200"; d="scan'208";a="345496274" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jul 2023 06:19:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10770"; a="968615563" X-IronPort-AV: E=Sophos;i="6.01,202,1684825200"; d="scan'208";a="968615563" Received: from ijarvine-mobl2.ger.corp.intel.com ([10.251.222.39]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jul 2023 06:19:40 -0700 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= To: linux-kselftest@vger.kernel.org, Reinette Chatre , Shuah Khan , Shaopeng Tan , Fenghua Yu Cc: linux-kernel@vger.kernel.org, =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Subject: [PATCH v4 00/19] selftests/resctrl: Fixes and cleanups Date: Thu, 13 Jul 2023 16:19:13 +0300 Message-Id: <20230713131932.133258-1-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE 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 Here is a series with some fixes and cleanups to resctrl selftests. Only has a minor change in code ordering in main() compared with v3. v4: - Move resctrlfs (unconditional) umount after resctrl fs support check v3: - Don't include rewritten CAT test into this series! - Tweak wildcard style in Makefile - Fix many changelog typos, remove some wrong claims, and generally improve them. - Add fix to PARENT_EXIT() to unmount resctrl FS - Add unmounting resctrl FS before starting any tests - Add fix for buf leak - Add fix for perf fd closing - Split mount/remount/umount patches differently - Use size_t and %zu for span - Keep MBM print as MB, only internally use span in bytes - Drop start_buf global from fill_buf v2 (was sent with CAT test rewrite which is no longer included in v3): - Rebased on top of next to solve the conflicts - Added 2 patches related to resctrl FS mount/umount (fix + cleanup) - Consistently use "alloc" in cache_alloc_size() - CAT test error handling tweaked - Remove a spurious newline change from the CAT patch - Small improvements to changelogs Ilpo Järvinen (19): selftests/resctrl: Add resctrl.h into build deps selftests/resctrl: Don't leak buffer in fill_cache() selftests/resctrl: Unmount resctrl FS if child fails to run benchmark selftests/resctrl: Close perf value read fd on errors selftests/resctrl: Unmount resctrl FS before starting the first test selftests/resctrl: Move resctrl FS mount/umount to higher level selftests/resctrl: Refactor remount_resctrl(bool mum_resctrlfs) to mount_resctrl() selftests/resctrl: Remove mum_resctrlfs from struct resctrl_val_param selftests/resctrl: Convert span to size_t selftests/resctrl: Express span internally in bytes selftests/resctrl: Remove duplicated preparation for span arg selftests/resctrl: Remove "malloc_and_init_memory" param from run_fill_buf() selftests/resctrl: Remove unnecessary startptr global from fill_buf selftests/resctrl: Improve parameter consistency in fill_buf selftests/resctrl: Don't pass test name to fill_buf selftests/resctrl: Don't use variable argument list for ->setup() selftests/resctrl: Move CAT/CMT test global vars to function they are used in selftests/resctrl: Pass the real number of tests to show_cache_info() selftests/resctrl: Remove test type checks from cat_val() tools/testing/selftests/resctrl/Makefile | 2 +- tools/testing/selftests/resctrl/cache.c | 64 +++++++------- tools/testing/selftests/resctrl/cat_test.c | 28 ++---- tools/testing/selftests/resctrl/cmt_test.c | 29 ++----- tools/testing/selftests/resctrl/fill_buf.c | 87 +++++++------------ tools/testing/selftests/resctrl/mba_test.c | 9 +- tools/testing/selftests/resctrl/mbm_test.c | 17 ++-- tools/testing/selftests/resctrl/resctrl.h | 17 ++-- .../testing/selftests/resctrl/resctrl_tests.c | 82 +++++++++++------ tools/testing/selftests/resctrl/resctrl_val.c | 7 +- tools/testing/selftests/resctrl/resctrlfs.c | 57 ++++++------ 11 files changed, 169 insertions(+), 230 deletions(-) -- 2.30.2