Message ID | 20230808091625.12760-1-ilpo.jarvinen@linux.intel.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2290133vqr; Tue, 8 Aug 2023 10:47:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF8QxQaA06i9b2cn/RJqtSfZPwiPxfJDVaXdIBiWqy82qoE18cRK28S9SEU2Wbtoau3sYBk X-Received: by 2002:a17:902:ec87:b0:1b8:28f6:20e6 with SMTP id x7-20020a170902ec8700b001b828f620e6mr443310plg.34.1691516861987; Tue, 08 Aug 2023 10:47:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691516861; cv=none; d=google.com; s=arc-20160816; b=QxkQUGqNrlG4Q4Z5l3ajvi/30/7a5OPVfIcaDVHB6K+TbVymxtYuprLWJ/Lq4SaIRc CVgBJuuuH8sVnu06UKslSB6Vcq1FerOzGR54OXZIUNVm7JbLnYToOqzg0jaVeddGo9M8 clYrR4qDgBYOTiLEmM/Ie5BrM90DyTYQodNhqdDol0Se1a1+DvtwQE5SYo4RaPNHn/XB s559hiAyQwt20Wory8pTDIgW/Ou2qyaYBOTR5/4EGj5K6BcaztaD1i/vChv3Mvk9hOAB nuACouALdcRl79pNpp0pPNeBH9kLGez45nixITuslyRKCeUMpx/ynPdKXy+Acg7CSzhS H1zA== 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=Qyy88em75zYn3M6EYWYRTXknqYjiNbVf6lmmhGC5HUM=; fh=m8aZriePzJNHTUXqM+CrpPoPvp0fUlv54nquH9apEb8=; b=BmiXMl6aB4I6bLiDMAnGJr4pMAgY7SqqxKHIDLe2TEfUzdB/JNKl3nT7Kp+tOSaqbC CauDtHyuqZgOFOm5O5JrjQRWhcHjlFUGbXNPXFHfwaxFsbjV1aGu4yzg0z5MvCzYAsmE 1cwWvSBv/clxTf2vpU5iK0G2Fpzc4qRXOfnQFkDK2wtvvXhI9kYrYEHHPokogjS+aYqk /iTp3at5DiO8apnCqKf52xfnT6Exca/YdWEjX9e0fL1gi9FQMDNNnRBmiHy4bm3S1Fm/ TRvw+I/RNTarlnZVqMFsiilnfvElBAM2VYGeywF/mAkIVH0dGQdz3w81/GLrJfV1z0cv UwPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=F89qZTFW; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e6-20020a170902cf4600b001bba9e34736si7375765plg.366.2023.08.08.10.47.27; Tue, 08 Aug 2023 10:47:41 -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=F89qZTFW; 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 S233374AbjHHQog (ORCPT <rfc822;aaronkmseo@gmail.com> + 99 others); Tue, 8 Aug 2023 12:44:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233001AbjHHQnm (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 8 Aug 2023 12:43:42 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FDE891A8; Tue, 8 Aug 2023 08:55:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691510154; x=1723046154; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=e71Q+6dkdo7GKNkQOotvTjy2V6wO+hHkaKK74hljBDQ=; b=F89qZTFWqrse8lWvaZYNaA5Pj3PQv5jEq2TlITz9BCp7hUlKHMCQZUiD OgRB50SUNq5FXyKyXwD8Qa5wWqp3lsi08VI4lEExvaR5jQYPn69l83TxX MoZgE/aNjgkfWx/nCPyL9uDMyWgt+GQNV4jXco9Jjz+EolYYYZfdF14+n gsoRCIwPdPsgRKRmOOpIqbL1kP1jXXnQe3UD55lqog6MXcTsCGITnD+BE s1J5Bwc1UhLamLRdkNsCiSbq+I2o3La/DLZvKGJN2t1hcKKzLsYgxDKaV MqiaDQBYqo9xhnTfy3nJNbRgwDy2J0pB8cic/3SUrRMQZ1RS507rscotb Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10795"; a="437097728" X-IronPort-AV: E=Sophos;i="6.01,263,1684825200"; d="scan'208";a="437097728" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Aug 2023 02:16:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10795"; a="977776785" X-IronPort-AV: E=Sophos;i="6.01,263,1684825200"; d="scan'208";a="977776785" Received: from mtofeni-mobl.ger.corp.intel.com (HELO ijarvine-mobl2.ger.corp.intel.com) ([10.252.48.21]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Aug 2023 02:16:36 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com> To: Shuah Khan <skhan@linuxfoundation.org>, linux-kselftest@vger.kernel.org, Shuah Khan <shuah@kernel.org>, Reinette Chatre <reinette.chatre@intel.com>, Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com> Cc: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>, Fenghua Yu <fenghua.yu@intel.com>, linux-kernel@vger.kernel.org, =?utf-8?q?Ilpo_J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com> Subject: [PATCH 0/7] selftests/resctrl: Rework benchmark command handling Date: Tue, 8 Aug 2023 12:16:18 +0300 Message-Id: <20230808091625.12760-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=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED 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-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773683985104052325 X-GMAIL-MSGID: 1773683985104052325 |
Series |
selftests/resctrl: Rework benchmark command handling
|
|
Message
Ilpo Järvinen
Aug. 8, 2023, 9:16 a.m. UTC
The benchmark command handling (-b) in resctrl selftests is overly complicated code. This series turns the benchmark command immutable to preserve it for all selftests and improves benchmark command related error handling. This series also ends up removing the strcpy() calls which were pointed out earlier. Ilpo Järvinen (7): selftests/resctrl: Ensure the benchmark commands fits to its array selftests/resctrl: Correct benchmark command help selftests/resctrl: Remove bw_report and bm_type from main() selftests/resctrl: Simplify span lifetime selftests/resctrl: Use pointers to build benchmark cmd and make it const selftests/resctrl: remove ben_count variable selftests/resctrl: Cleanup benchmark argument parsing tools/testing/selftests/resctrl/cache.c | 5 +- tools/testing/selftests/resctrl/cat_test.c | 13 +-- tools/testing/selftests/resctrl/cmt_test.c | 32 +++++-- tools/testing/selftests/resctrl/mba_test.c | 4 +- tools/testing/selftests/resctrl/mbm_test.c | 7 +- tools/testing/selftests/resctrl/resctrl.h | 22 +++-- .../testing/selftests/resctrl/resctrl_tests.c | 88 ++++++++----------- tools/testing/selftests/resctrl/resctrl_val.c | 10 ++- 8 files changed, 98 insertions(+), 83 deletions(-)