Received: by 10.213.65.68 with SMTP id h4csp2662702imn; Mon, 9 Apr 2018 07:09:14 -0700 (PDT) X-Google-Smtp-Source: AIpwx489Cnd85NX96eRsvOTSytLilDLGezhtWJZN+8Crjya+U6fF+5mx/+IgiSDJcfwQKSzAVzqT X-Received: by 2002:a17:902:2cc1:: with SMTP id n59-v6mr39680695plb.198.1523282954107; Mon, 09 Apr 2018 07:09:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523282954; cv=none; d=google.com; s=arc-20160816; b=WGIQ2c7GBct40Xxu6uUVjNh9wSA3z4jWLH0NMTrIHQLPGwCDHjWbeMjPHrcecnhC5k ckLlsnzm0hCNZ2z3BL9/hGHCtLhCVwAc/WL2LwdgdcXCS76g1tbpZBolLdZUEnGnrvn4 WfEWIAu5ITWTAkZ0tn8/TYZ1A1iBHxRxeBM28hOG8IA7MYNRt0FuOAGdA7u67ugTZwna iweS+tkl6HW6ASezkcZmoq5vXnBXwnYfyWJmp6smZx50ZwYwG2wb688kXAphMyDZoIxn vYYa7FjJ8IuwFe/UHXll82E5nLdS0oZlOU0Ajz1ri7V6HlXOC5Q3kU9v7ADgvYGrcK0/ 6eMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=uHobiC1Mf56//u/OX6yexXrfmZsDmdjZAUvdGMeU/QI=; b=tYVNeUk1XEDwcmQREzhj6fdEmjNLr/AywD64Iofp5bjYa3Q4IrPkw+Acex+bfYRgF2 4x09pTy7re3toj0941n6YKmh5JMuWL851KamMHwQ8bsN5Xl+TOsY6kZD6INIgnqdkOlH IK3pYPjShjSFqhQNmD52rEdqAmbJbAupWNSzj2lcGqiPvXQ3L0d1kAWHD6jlpChjHMUI Gvev7uEgGGquuYSkHRW/KfqTTmvZjxVs2o+4t63+VxpXFQDJUOvVgNdv08NPXbUFjbxJ Zb3Gz3TzQS6R7e/mKx6HZ9O2i1AkiVrgIYNRfLLBBLk0TVn491zXjs8gvvI7Az9IEEx8 M+xA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v10-v6si380873ply.74.2018.04.09.07.08.36; Mon, 09 Apr 2018 07:09:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752037AbeDIOFw (ORCPT + 99 others); Mon, 9 Apr 2018 10:05:52 -0400 Received: from mx2.suse.de ([195.135.220.15]:48067 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751291AbeDIOFv (ORCPT ); Mon, 9 Apr 2018 10:05:51 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 7DC98AE15; Mon, 9 Apr 2018 14:05:49 +0000 (UTC) Date: Mon, 9 Apr 2018 16:05:49 +0200 From: Petr Mladek To: Joe Lawrence Cc: Josh Poimboeuf , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] selftests/livepatch: introduce tests Message-ID: <20180409140549.q6jybx3zirnsl2pp@pathway.suse.cz> References: <1522266588-11806-1-git-send-email-joe.lawrence@redhat.com> <1522266588-11806-2-git-send-email-joe.lawrence@redhat.com> <20180407023646.k3gjrgjwzhwgu6fq@treble> <20180408154231.ihnglqyya5nric4q@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180408154231.ihnglqyya5nric4q@redhat.com> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun 2018-04-08 11:42:31, Joe Lawrence wrote: > On Fri, Apr 06, 2018 at 09:36:46PM -0500, Josh Poimboeuf wrote: > > On Wed, Mar 28, 2018 at 03:49:48PM -0400, Joe Lawrence wrote: > > > Add a few livepatch modules and simple target modules that the included > > > regression suite can run tests against. > > > > > > Signed-off-by: Joe Lawrence > > > --- > > > lib/Kconfig.debug | 12 + > > > lib/Makefile | 2 + > > > lib/livepatch/Makefile | 18 + > > > lib/livepatch/test_klp_atomic_replace.c | 69 +++ > > > lib/livepatch/test_klp_callbacks_busy.c | 43 ++ > > > lib/livepatch/test_klp_callbacks_demo.c | 132 ++++++ > > > lib/livepatch/test_klp_callbacks_demo2.c | 104 ++++ > > > lib/livepatch/test_klp_callbacks_mod.c | 24 + > > > lib/livepatch/test_klp_livepatch.c | 62 +++ > > > tools/testing/selftests/Makefile | 1 + > > > tools/testing/selftests/livepatch/Makefile | 8 + > > > tools/testing/selftests/livepatch/config | 1 + > > > tools/testing/selftests/livepatch/functions.sh | 202 ++++++++ > > > .../testing/selftests/livepatch/test-callbacks.sh | 526 +++++++++++++++++++++ > > > .../testing/selftests/livepatch/test-livepatch.sh | 177 +++++++ > > > .../selftests/livepatch/test-shadow-vars.sh | 13 + > > > 16 files changed, 1394 insertions(+) > > > create mode 100644 lib/livepatch/Makefile > > > create mode 100644 lib/livepatch/test_klp_atomic_replace.c > > > create mode 100644 lib/livepatch/test_klp_callbacks_busy.c > > > create mode 100644 lib/livepatch/test_klp_callbacks_demo.c > > > create mode 100644 lib/livepatch/test_klp_callbacks_demo2.c > > > create mode 100644 lib/livepatch/test_klp_callbacks_mod.c > > > create mode 100644 lib/livepatch/test_klp_livepatch.c > > > create mode 100644 tools/testing/selftests/livepatch/Makefile > > > create mode 100644 tools/testing/selftests/livepatch/config > > > create mode 100644 tools/testing/selftests/livepatch/functions.sh > > > create mode 100755 tools/testing/selftests/livepatch/test-callbacks.sh > > > create mode 100755 tools/testing/selftests/livepatch/test-livepatch.sh > > > create mode 100755 tools/testing/selftests/livepatch/test-shadow-vars.sh > > > > I love this. Nice work! > > > > As you and Petr discussed, it would be nice to get rid of some of the > > delays, and also the callback tests will be very important. > > I've got v2 WIP that minimizes the delays, cleans up build flags, and > adds a basic shadow variable test. Sounds great. > Since these tests are based on top of Petr's current patchsets for > atomic replace and shadow variables, it probably makes sense for those > to merge first. I can post test results to his patchsets if that helps. Sounds good to me. We could synchronize the merge. But I think that it will not be a big deal if we would merge the atomic replace slightly earlier if the tests needed some more love. > These tests are basically a mash up of some of the tedious callback > Documentation and shadow variable sample livepatches. Since there will > be a lot of duplication, should we just remove redundant doc/samples in > favor of these tests? Yup, it does not make sense to maintain two copies of basically the same modules. Best Regards, Petr