From patchwork Fri Mar 11 07:21:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shaopeng Tan X-Patchwork-Id: 550686 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6D41C433F5 for ; Fri, 11 Mar 2022 07:23:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347069AbiCKHYh (ORCPT ); Fri, 11 Mar 2022 02:24:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235117AbiCKHYg (ORCPT ); Fri, 11 Mar 2022 02:24:36 -0500 Received: from esa1.hc1455-7.c3s2.iphmx.com (esa1.hc1455-7.c3s2.iphmx.com [207.54.90.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E23CD17ED95; Thu, 10 Mar 2022 23:23:32 -0800 (PST) X-IronPort-AV: E=McAfee;i="6200,9189,10282"; a="65931102" X-IronPort-AV: E=Sophos;i="5.90,173,1643641200"; d="scan'208";a="65931102" Received: from unknown (HELO oym-r1.gw.nic.fujitsu.com) ([210.162.30.89]) by esa1.hc1455-7.c3s2.iphmx.com with ESMTP; 11 Mar 2022 16:23:30 +0900 Received: from oym-m2.gw.nic.fujitsu.com (oym-nat-oym-m2.gw.nic.fujitsu.com [192.168.87.59]) by oym-r1.gw.nic.fujitsu.com (Postfix) with ESMTP id A0C36531F2; Fri, 11 Mar 2022 16:23:28 +0900 (JST) Received: from yto-om4.fujitsu.com (yto-om4.o.css.fujitsu.com [10.128.89.165]) by oym-m2.gw.nic.fujitsu.com (Postfix) with ESMTP id 071EB14153; Fri, 11 Mar 2022 16:23:27 +0900 (JST) Received: from cn-r05-10.example.com (n3235113.np.ts.nmh.cs.fujitsu.co.jp [10.123.235.113]) by yto-om4.fujitsu.com (Postfix) with ESMTP id BD70A401110B2; Fri, 11 Mar 2022 16:23:26 +0900 (JST) From: Shaopeng Tan To: Fenghua Yu , Reinette Chatre , Shuah Khan Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, tan.shaopeng@jp.fujitsu.com Subject: [PATCH v5 0/6] selftests/resctrl: Add resctrl_tests into kselftest set Date: Fri, 11 Mar 2022 16:21:41 +0900 Message-Id: <20220311072147.3301525-1-tan.shaopeng@jp.fujitsu.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Hello, The aim of this series is to make resctrl_tests run by using kselftest framework. - I modify resctrl_test Makefile and kselftest Makefile, to enable build/run resctrl_tests by using kselftest framework. Of course, users can also build/run resctrl_tests without using framework as before. - I change the default limited time for resctrl_tests to 120 seconds, to ensure the resctrl_tests finish in limited time on different environments. - When resctrl file system is not supported by environment or resctrl_tests is not run as root, return skip code of kselftest framework. - If resctrl_tests does not finish in limited time, terminate it as same as executing ctrl+c that kills parent process and child process. Difference from v4: - Add comment for settings file. [PATCH v5 2/6] - Improved README of resctrl_tests and rewirte changelog. [PATCH v5 5/6] https://lore.kernel.org/lkml/20220304103834.486892-1-tan.shaopeng@jp.fujitsu.com/ [PATCH V4] This patch series is based on v5.17-rc7. Shaopeng Tan (6): selftests/resctrl: Kill child process before parent process terminates if SIGTERM is received selftests/resctrl: Change the default limited time to 120 seconds selftests/resctrl: Fix resctrl_tests' return code to work with selftest framework selftests/resctrl: Make resctrl_tests run using kselftest framework selftests/resctrl: Update README about using kselftest framework to build/run resctrl_tests selftests/resctrl: Add missing SPDX license to Makefile tools/testing/selftests/Makefile | 1 + tools/testing/selftests/resctrl/Makefile | 18 ++------ tools/testing/selftests/resctrl/README | 43 +++++++++++++++---- .../testing/selftests/resctrl/resctrl_tests.c | 4 +- tools/testing/selftests/resctrl/resctrl_val.c | 1 + tools/testing/selftests/resctrl/settings | 3 ++ 6 files changed, 45 insertions(+), 25 deletions(-) create mode 100644 tools/testing/selftests/resctrl/settings Reviewed-by: Reinette Chatre Reviewed-by: Reinette Chatre