From mboxrd@z Thu Jan 1 00:00:00 1970 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 58ABFC433EF for ; Thu, 9 Jun 2022 20:13:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231861AbiFIUNM (ORCPT ); Thu, 9 Jun 2022 16:13:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231657AbiFIUNL (ORCPT ); Thu, 9 Jun 2022 16:13:11 -0400 Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 731DCCE01 for ; Thu, 9 Jun 2022 13:13:10 -0700 (PDT) Received: by mail-io1-xd2c.google.com with SMTP id p69so4515170iod.0 for ; Thu, 09 Jun 2022 13:13:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=YKc+U1SRT3lIUEwplxJ1g7gu3MxAOTky+TR86tMYBDY=; b=JUZ3+B9aaY9z4kkrxWoMF+Ef3bN9sgdScG3ToyXPQntscMm0g+3aLwmaNvgsOxVxsP csiHs3ET49gYmriaSf8MokB+6LNYE0GyCx6MBCy8wYVYZ4HhsNMfrGSPmkUfFXV+XQln 8JO0a9KMd5gTEfMQL/D0J59R4tkKg5GJ84Rho= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=YKc+U1SRT3lIUEwplxJ1g7gu3MxAOTky+TR86tMYBDY=; b=75EvGIxYxeI4GbLEYO/4NJ1Lk1xeuAJyVyRbZpJdo7ije7IUinCEbQaHAN1lFPCez2 LcKRM+TFBa9RhJdOAVd/tI2zDuBkoi9A0IwpLLGOfkWdQ9mIoIAl9tLtcHtSvAsCAM+6 HG1EFRZabBa3bbbqfrOJ7reVFeYyfHR0qTHfcEQjHM8/c3GwXCN3zZbvXKE/UepRqMY7 5+HuQ3a94oItjZztX1tShSI2mT/xOKkN7rK42beccWQfm0HG2BcChIWaUEYbP+SqCDJu YZrXYqNWfbIz1zJAjp4k5hxVs+btFCzNQKrbfSN9/L2P/WivujBUlTaqCQw+Y6jDVIhz G39w== X-Gm-Message-State: AOAM531HSuZoC017sb+xGbgYt//GgkcKg03i1ByJYYhgi7gE/Z4Lyqqj 1JKAc+5QuYO/3dh0ndhxg8pp1A== X-Google-Smtp-Source: ABdhPJxxtfqEc71Aqh2HSl6lJqmPNwTuyoAEY7QyE66WmYPUI1/OmqLRYr/4Z60geXCIwS6fE1fn+g== X-Received: by 2002:a5d:9ec5:0:b0:669:29dd:252f with SMTP id a5-20020a5d9ec5000000b0066929dd252fmr15343617ioe.217.1654805589835; Thu, 09 Jun 2022 13:13:09 -0700 (PDT) Received: from [192.168.1.128] ([38.15.45.1]) by smtp.gmail.com with ESMTPSA id c3-20020a92cf43000000b002cc20b48163sm10768655ilr.3.2022.06.09.13.13.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Jun 2022 13:13:09 -0700 (PDT) Subject: Re: [PATCH 1/2] livepatch: Move tests from lib/livepatch to selftests/livepatch To: Marcos Paulo de Souza , live-patching@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: shuah@kernel.org, jpoimboe@redhat.com, mbenes@suse.cz, pmladek@suse.com, Shuah Khan References: <20220603143242.870-1-mpdesouza@suse.com> <20220603143242.870-2-mpdesouza@suse.com> <1e1afcc8-8df0-f35b-b39b-165ad0a6b4b9@linuxfoundation.org> From: Shuah Khan Message-ID: Date: Thu, 9 Jun 2022 14:13:08 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <1e1afcc8-8df0-f35b-b39b-165ad0a6b4b9@linuxfoundation.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: live-patching@vger.kernel.org On 6/9/22 2:00 PM, Shuah Khan wrote: > On 6/3/22 8:32 AM, Marcos Paulo de Souza wrote: >> It allows writing more complex tests, for example, an userspace C code >> that would use the livepatched kernel code. As a bonus it allows to use >> "gen_tar" to export the livepatch selftests, rebuild the modules by >> running make in selftests/livepatch directory and simplifies the process >> of creating and debugging new selftests. >> >> It keeps the ability to execute the tests by running the shell scripts, >> like "test-livepatch.sh", but beware that the kernel modules >> might not be up-to-date. >> >> Remove 'modprobe --dry-run' call as the modules will be built before >> running the tests. Also remove the TEST_LIVEPATCH Kconfig since the >> modules won't be build based on a Kconfig. >> >> Adjust functions.sh to call insmod and fix the check_result strings to >> reflect the change. >> >> Signed-off-by: Marcos Paulo de Souza >> --- >>   arch/s390/configs/debug_defconfig             |  1 - >>   arch/s390/configs/defconfig                   |  1 - >>   lib/Kconfig.debug                             | 22 -------- >>   lib/Makefile                                  |  2 - >>   lib/livepatch/Makefile                        | 14 ------ >>   tools/testing/selftests/livepatch/Makefile    | 27 +++++++++- >>   tools/testing/selftests/livepatch/README      |  5 +- >>   tools/testing/selftests/livepatch/config      |  1 - >>   .../testing/selftests/livepatch/functions.sh  | 34 +++++-------- >>   .../selftests/livepatch/test-callbacks.sh     | 50 +++++++++---------- >>   .../selftests/livepatch/test-ftrace.sh        |  6 +-- >>   .../selftests/livepatch/test-livepatch.sh     | 10 ++-- >>   .../selftests/livepatch/test-shadow-vars.sh   |  2 +- >>   .../testing/selftests/livepatch/test-state.sh | 18 +++---- >>   .../selftests/livepatch/test_modules/Makefile | 24 +++++++++ >>   .../test_modules}/test_klp_atomic_replace.c   |  0 >>   .../test_modules}/test_klp_callbacks_busy.c   |  0 >>   .../test_modules}/test_klp_callbacks_demo.c   |  0 >>   .../test_modules}/test_klp_callbacks_demo2.c  |  0 >>   .../test_modules}/test_klp_callbacks_mod.c    |  0 >>   .../test_modules}/test_klp_livepatch.c        |  0 >>   .../test_modules}/test_klp_shadow_vars.c      |  0 >>   .../livepatch/test_modules}/test_klp_state.c  |  0 >>   .../livepatch/test_modules}/test_klp_state2.c |  0 >>   .../livepatch/test_modules}/test_klp_state3.c |  0 >>   25 files changed, 107 insertions(+), 110 deletions(-) >>   delete mode 100644 lib/livepatch/Makefile >>   create mode 100644 tools/testing/selftests/livepatch/test_modules/Makefile >>   rename {lib/livepatch => tools/testing/selftests/livepatch/test_modules}/test_klp_atomic_replace.c (100%) >>   rename {lib/livepatch => tools/testing/selftests/livepatch/test_modules}/test_klp_callbacks_busy.c (100%) >>   rename {lib/livepatch => tools/testing/selftests/livepatch/test_modules}/test_klp_callbacks_demo.c (100%) >>   rename {lib/livepatch => tools/testing/selftests/livepatch/test_modules}/test_klp_callbacks_demo2.c (100%) >>   rename {lib/livepatch => tools/testing/selftests/livepatch/test_modules}/test_klp_callbacks_mod.c (100%) >>   rename {lib/livepatch => tools/testing/selftests/livepatch/test_modules}/test_klp_livepatch.c (100%) >>   rename {lib/livepatch => tools/testing/selftests/livepatch/test_modules}/test_klp_shadow_vars.c (100%) >>   rename {lib/livepatch => tools/testing/selftests/livepatch/test_modules}/test_klp_state.c (100%) >>   rename {lib/livepatch => tools/testing/selftests/livepatch/test_modules}/test_klp_state2.c (100%) >>   rename {lib/livepatch => tools/testing/selftests/livepatch/test_modules}/test_klp_state3.c (100%) >> > > Looks good to me. > > Reviewed-by: Shuah Khan > Looks like this patch is moving modules under selftests. We keep modules under lib. I have to look at this more closely - so for now I am not okay with this change. thanks, -- Shuah