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 X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18885C433DF for ; Thu, 11 Jun 2020 13:02:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E905020801 for ; Thu, 11 Jun 2020 13:02:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="dOM3XoN1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727068AbgFKNCJ (ORCPT ); Thu, 11 Jun 2020 09:02:09 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:52206 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726435AbgFKNCJ (ORCPT ); Thu, 11 Jun 2020 09:02:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591880527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/cRAprkT7S89tlGY48hka4FQEbiwNER+FmCFXXMuntE=; b=dOM3XoN11ERm+yhWJRJtVIU67yKWZ/s/UYXC/5e2sVBQeN9dNEzWl5bEsoyvQUyG0iYjxm VCH8dYHneDyeUmINF3WIf0R0AZUrV5jQYxBnGskmrIodnuCX7vb1LGAhmKVB/l7KsCdLzI C+hVou/HChZXodst8+N7jOSDR2fOPu0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-182-EEow7cx4PVapwtrteqGONw-1; Thu, 11 Jun 2020 09:01:50 -0400 X-MC-Unique: EEow7cx4PVapwtrteqGONw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0A8D7EC1AF; Thu, 11 Jun 2020 13:01:49 +0000 (UTC) Received: from [10.10.117.142] (ovpn-117-142.rdu2.redhat.com [10.10.117.142]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 77F2C5C3F8; Thu, 11 Jun 2020 13:01:48 +0000 (UTC) Subject: Re: [PATCH 1/3] selftests/livepatch: Don't clear dmesg when running tests To: Miroslav Benes Cc: live-patching@vger.kernel.org, linux-kselftest@vger.kernel.org References: <20200610172101.21910-1-joe.lawrence@redhat.com> <20200610172101.21910-2-joe.lawrence@redhat.com> From: Joe Lawrence Message-ID: Date: Thu, 11 Jun 2020 09:01:47 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Sender: live-patching-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: live-patching@vger.kernel.org On 6/11/20 3:38 AM, Miroslav Benes wrote: > Hi, > > On Wed, 10 Jun 2020, Joe Lawrence wrote: > >> diff --git a/tools/testing/selftests/livepatch/test-callbacks.sh b/tools/testing/selftests/livepatch/test-callbacks.sh >> index 32b57ba07f4f..c3d949da5bb7 100755 >> --- a/tools/testing/selftests/livepatch/test-callbacks.sh >> +++ b/tools/testing/selftests/livepatch/test-callbacks.sh >> @@ -12,7 +12,7 @@ MOD_TARGET_BUSY=test_klp_callbacks_busy >> setup_config >> >> >> -# TEST: target module before livepatch >> +start_test "target module before livepatch" >> # >> # Test a combination of loading a kernel module and a livepatch that >> # patches a function in the first module. Load the target module >> @@ -28,9 +28,6 @@ setup_config >> # unpatching transition starts. klp_objects are reverted, post-patch >> # callbacks execute and the transition completes. >> >> -echo -n "TEST: target module before livepatch ... " >> -dmesg -C >> - > > A nit, but I think it would be better to place start_test here below the > comment. The same for other occurrences in test-callbacks.sh. > The idea was to remove the duplicate # TEST: comment and then the same echo -n "TEST: ..." entries. Would it still look okay if we move start_test to below the comment and omit that # TEST ... part? (This might be what you're suggesting, but I wanted to make sure.) > [...] > >> diff --git a/tools/testing/selftests/livepatch/test-state.sh b/tools/testing/selftests/livepatch/test-state.sh >> index a08212708115..bf8db1613961 100755 >> --- a/tools/testing/selftests/livepatch/test-state.sh >> +++ b/tools/testing/selftests/livepatch/test-state.sh >> @@ -10,10 +10,7 @@ MOD_LIVEPATCH3=test_klp_state3 >> >> setup_config >> >> -# TEST: Loading and removing a module that modifies the system state >> - >> -echo -n "TEST: system state modification ... " >> -dmesg -C >> +start_test "Loading and removing a module that modifies the system state" > > start_test should get the message from the original echo command and not > the comment above, I think... > Yup, good eye. >> load_lp $MOD_LIVEPATCH >> disable_lp $MOD_LIVEPATCH >> @@ -41,10 +38,7 @@ livepatch: '$MOD_LIVEPATCH': unpatching complete >> % rmmod $MOD_LIVEPATCH" >> >> >> -# TEST: Take over system state change by a cumulative patch >> - >> -echo -n "TEST: taking over system state modification ... " >> -dmesg -C >> +start_test "Take over system state change by a cumulative patch" >> >> load_lp $MOD_LIVEPATCH >> load_lp $MOD_LIVEPATCH2 >> @@ -85,10 +79,7 @@ livepatch: '$MOD_LIVEPATCH2': unpatching complete >> % rmmod $MOD_LIVEPATCH2" >> >> >> -# TEST: Take over system state change by a cumulative patch >> - >> -echo -n "TEST: compatible cumulative livepatches ... " >> -dmesg -C >> +start_test "Take over system state change by a cumulative patch" > > ...because now we have two "Take over system state change by a cumulative > patch" tests in the log. > Right, the start_test messages should be unique. I'll fix those up for v2. -- Joe