From patchwork Mon Jan 13 12:49:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miroslav Benes X-Patchwork-Id: 11330111 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CC2B81398 for ; Mon, 13 Jan 2020 12:49:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AB8DE21734 for ; Mon, 13 Jan 2020 12:49:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728895AbgAMMtL (ORCPT ); Mon, 13 Jan 2020 07:49:11 -0500 Received: from mx2.suse.de ([195.135.220.15]:44084 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726934AbgAMMtL (ORCPT ); Mon, 13 Jan 2020 07:49:11 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id DCBFEAF84; Mon, 13 Jan 2020 12:49:09 +0000 (UTC) From: Miroslav Benes To: jpoimboe@redhat.com, jikos@kernel.org, pmladek@suse.com, joe.lawrence@redhat.com, shuah@kernel.org Cc: live-patching@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Miroslav Benes Subject: [PATCH 1/2] selftests/livepatch: Replace set_dynamic_debug() with setup_config() in README Date: Mon, 13 Jan 2020 13:49:06 +0100 Message-Id: <20200113124907.11086-2-mbenes@suse.cz> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200113124907.11086-1-mbenes@suse.cz> References: <20200113124907.11086-1-mbenes@suse.cz> MIME-Version: 1.0 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Commit 35c9e74cff4c ("selftests/livepatch: Make dynamic debug setup and restore generic") introduced setup_config() to set up the environment for each test. It superseded set_dynamic_debug(). README still mentions set_dynamic_debug(), so update it to setup_config() which should be used now in every test. Signed-off-by: Miroslav Benes Reviewed-by: Kamalesh Babulal --- tools/testing/selftests/livepatch/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/livepatch/README b/tools/testing/selftests/livepatch/README index b73cd0e2dd51..621d325425c2 100644 --- a/tools/testing/selftests/livepatch/README +++ b/tools/testing/selftests/livepatch/README @@ -35,7 +35,7 @@ Adding tests ------------ See the common functions.sh file for the existing collection of utility -functions, most importantly set_dynamic_debug() and check_result(). The +functions, most importantly setup_config() and check_result(). The latter function greps the kernel's ring buffer for "livepatch:" and "test_klp" strings, so tests be sure to include one of those strings for result comparison. Other utility functions include general module From patchwork Mon Jan 13 12:49:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miroslav Benes X-Patchwork-Id: 11330109 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AB0B01398 for ; Mon, 13 Jan 2020 12:49:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 92EC5207FF for ; Mon, 13 Jan 2020 12:49:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728883AbgAMMtN (ORCPT ); Mon, 13 Jan 2020 07:49:13 -0500 Received: from mx2.suse.de ([195.135.220.15]:44106 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728863AbgAMMtM (ORCPT ); Mon, 13 Jan 2020 07:49:12 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 7B175AF87; Mon, 13 Jan 2020 12:49:10 +0000 (UTC) From: Miroslav Benes To: jpoimboe@redhat.com, jikos@kernel.org, pmladek@suse.com, joe.lawrence@redhat.com, shuah@kernel.org Cc: live-patching@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Miroslav Benes Subject: [PATCH 2/2] selftests/livepatch: Remove unused local variable in set_ftrace_enabled() Date: Mon, 13 Jan 2020 13:49:07 +0100 Message-Id: <20200113124907.11086-3-mbenes@suse.cz> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200113124907.11086-1-mbenes@suse.cz> References: <20200113124907.11086-1-mbenes@suse.cz> MIME-Version: 1.0 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org set_ftrace_enabled() contains unused local variable "sysctl". Remove it. Signed-off-by: Miroslav Benes Reviewed-by: Kamalesh Babulal --- tools/testing/selftests/livepatch/functions.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/livepatch/functions.sh b/tools/testing/selftests/livepatch/functions.sh index a6e3d5517a6f..2aab9791791d 100644 --- a/tools/testing/selftests/livepatch/functions.sh +++ b/tools/testing/selftests/livepatch/functions.sh @@ -64,7 +64,6 @@ function set_dynamic_debug() { } function set_ftrace_enabled() { - local sysctl="$1" result=$(sysctl kernel.ftrace_enabled="$1" 2>&1 | paste --serial --delimiters=' ') echo "livepatch: $result" > /dev/kmsg }