From patchwork Wed Feb 15 13:05:56 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: 5453 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp179718wrn; Wed, 15 Feb 2023 05:08:05 -0800 (PST) X-Google-Smtp-Source: AK7set8fnkevfwNW0+cERfPDOPLeTnfB6F/E2LkzgJZ6pfxH90vxMo52TfGObmuZsoXA1aEBbGKQ X-Received: by 2002:a05:6402:31e1:b0:4ac:cb71:42c with SMTP id dy1-20020a05640231e100b004accb71042cmr1895003edb.37.1676466485716; Wed, 15 Feb 2023 05:08:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676466485; cv=none; d=google.com; s=arc-20160816; b=l311FoewOtEp4YBPQrQJhFcxuWqgMAPa1tTTusrVsDLxOVRIeofDNx9aROYxx8i7h8 GpLDUJs2B9AXaJNc8zIb/Q2IImVPePNL2zFrKLJbd7P6TEpRhRvEGRF5CkJALKM5l8dh xqTv0ONqW409YYbDtH7ya0D2fZNUAafnNhhyMFhV8xImzQnbbMz5yRuHU0Z36gmIiMEL g03XPbwfELK2Y8l8q9nDRZV/MrB7jzIt1oX7YVPKjQkY8VmdhRW4kB2pxz/iyc/SBSIp tLwj7s2OWCv0DCdHtB23So+b+Mb8alIawxLezG7XWEXEybUq/jp4a0l+BtntjDaqi4KJ 7+zA== 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=3pIBOS2noSfHdeicWPFmm2xHSexivFDG6lpQ1vsKKWA=; b=hL79aheMFtYaXxP3qrETEcPaClVa79UCZZIJqarUkEfAWAPyMU+m/RkT1H1A5opb7f X3FnLN62GRS3h1dqZZLq4WsX1joiCHO/5sE1xqq+aYAzWBKgMuTDVzPTZBQ3/vnMRmzp GgTdsKq7hhEt6soFjhQgmAjP53KoIfUSinXAcFby3Wa7U94Meww3Lz/2xVyincpzm2pt cr+5hS7VuC0+/4NwZMhSCtIzJgMreMVOZvTM99glFSswHfZRXYGPwU3UYty5tg97Vz/y MoM8gIezd7+J1TpdMRcZ+iF4Cj9a39A554sWgmi/Gi4n77DjNZflB1/renCOCQyD+HYA BUmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Tdcr0luU; 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 v4-20020aa7d9c4000000b004acc68ae309si11581392eds.218.2023.02.15.05.07.41; Wed, 15 Feb 2023 05:08:05 -0800 (PST) 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=Tdcr0luU; 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 S233807AbjBONGW (ORCPT + 99 others); Wed, 15 Feb 2023 08:06:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229677AbjBONGV (ORCPT ); Wed, 15 Feb 2023 08:06:21 -0500 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5542036FFE; Wed, 15 Feb 2023 05:06:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676466380; x=1708002380; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=baMT0q8X0zAbOQmjS3gfzG3jChQUZ/evY8aN7yuTgbM=; b=Tdcr0luUdv3zl+JqUPqKxG9/epuqxBd1huQ4FO5J2K2nNH/grpkq6N8P Tpse8OEfpqxlBgR1+sh1UOjiXGxAcDK6+HoBU8+S3HRb+VPrIl0Juv9Ii 7CiKgcEl9Ga89HS9XAO90kjfSKG4OVgznmVC+RKKq+Y/CiRc7K9doLHWZ YNAbf5kuWIOYvFcaD9aC35BRtz9jOuJW5TAO9dPhMoytC96/Vmm8A65Cm iVevtBAM1piPJOf3eCToENGONRrbgFZ2EF5sbVjBHW3FfA5Q4D+605k9L RRp3PSPSwob+KQB4RwCaoS+3sOkJYylmvonO6o0QBOsEsL1ZS3rxCJ121 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10621"; a="319456221" X-IronPort-AV: E=Sophos;i="5.97,299,1669104000"; d="scan'208";a="319456221" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2023 05:06:19 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10621"; a="812436007" X-IronPort-AV: E=Sophos;i="5.97,299,1669104000"; d="scan'208";a="812436007" Received: from hshannan-mobl1.ger.corp.intel.com (HELO ijarvine-MOBL2.ger.corp.intel.com) ([10.252.49.120]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2023 05:06:17 -0800 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Reinette Chatre , Fenghua Yu , Shuah Khan Cc: =?utf-8?q?Ilpo_J=C3=A4rvinen?= Subject: [PATCH v2 0/9] selftests/resctrl: Fixes to error handling logic and cleanups Date: Wed, 15 Feb 2023 15:05:56 +0200 Message-Id: <20230215130605.31583-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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757902521385070686?= X-GMAIL-MSGID: =?utf-8?q?1757902521385070686?= This series fixes a few cleanup/error handling problems and cleans up code. v2: - Improved changelogs - Return NULL directly from malloc_and_init_memory() - Added patch to convert memalign() to posix_memalign() - Added patch to correct function comment parameter - Dropped literal -> define patch for now (likely superceded soon) Fenghua Yu (1): selftests/resctrl: Change name from CBM_MASK_PATH to INFO_PATH Ilpo Järvinen (8): selftests/resctrl: Return NULL if malloc_and_init_memory() did not alloc mem selftests/resctrl: Move ->setup() call outside of test specific branches selftests/resctrl: Allow ->setup() to return errors selftests/resctrl: Check for return value after write_schemata() selftests/resctrl: Replace obsolete memalign() with posix_memalign() selftests/resctrl: Change initialize_llc_perf() return type to void selftests/resctrl: Use remount_resctrlfs() consistently with boolean selftests/resctrl: Correct get_llc_perf() param in function comment tools/testing/selftests/resctrl/cache.c | 17 +++++++-------- tools/testing/selftests/resctrl/cat_test.c | 4 ++-- tools/testing/selftests/resctrl/cmt_test.c | 9 ++++---- tools/testing/selftests/resctrl/fill_buf.c | 7 +++++-- tools/testing/selftests/resctrl/mba_test.c | 11 +++++++--- tools/testing/selftests/resctrl/mbm_test.c | 4 ++-- tools/testing/selftests/resctrl/resctrl.h | 6 ++++-- tools/testing/selftests/resctrl/resctrl_val.c | 21 +++++++------------ tools/testing/selftests/resctrl/resctrlfs.c | 2 +- 9 files changed, 41 insertions(+), 40 deletions(-)