Received: by 10.213.65.68 with SMTP id h4csp1705525imn; Sun, 8 Apr 2018 09:32:37 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+ZfSM5MuHwbqpZwk7Gcc58M7k0l7cs2VBdqmCKmMg7LzCCyCpNA3nUDrbnfZfjkWBvP/eC X-Received: by 10.98.106.193 with SMTP id f184mr26874383pfc.201.1523205156987; Sun, 08 Apr 2018 09:32:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523205156; cv=none; d=google.com; s=arc-20160816; b=dVVpkZobCsJOMg9XgFPcLe9BmrCAkA2AsfiFfglFCxUgbO6w+u9uOSPuWRZqPnpqJQ WH+wAcsfOSARg3IyL1ZQRsFXPSqNe4/2AWG3SS6833odcSf9LOyhtHN1c7ikYn63I985 S+Uq4ESSV4BDXWTR8T0Yi5DDgu0+Yj/FUwK5z7jklgClAWjg9aJAO/ryHNIu69N9yPbw OcLr3akeXFikf+vGaeGFd79/9RZZm7gzKTqGE0qLjZ7BRBgaS9b2pO/HAwcUnxKz5Jir eTGXRKMhcepIgc0rXF9xcgRchhio0NzIv0aqcJ4PRPIkOCBU6jBnUKpkJR4nWYhqDScn lbSQ== 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=T5X5toYmbq73IefFEh5G0dmRF6nz1WvELLrG7zSkRO8=; b=Inj9oH7TWLgvUzDd6PGTo1OuRGqoBU0R9SF6U+QD1gcS+9PJHNVQP2Tl5AaL0LozE6 vdND9AnI6+8dkU22aRpsmSOkx+RtyX539yA9qTaRKLWlGVrhMprYy0zcWo5aCz14dVNW e4I5/pBpOv/uPZWne/NzGDPwiNmZDT4g9clbIcxQcKdpgCj8rKWB6JxsDJdRfIL8KkAk BRK2HqdhqIlZnf2JbSXTk5puIjEF8RqG0/eTpMOUKTeFllHuyR+QS4N2hRvdxKVyvQv/ C8Sh46hMzVRMqVo8QAPvWF55NCcAKbpM5c6cTksO4OCBTzb9mJa7MDcqQlq0WolghSp4 Erlw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k8-v6si3562521pli.134.2018.04.08.09.32.00; Sun, 08 Apr 2018 09:32:36 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752604AbeDHPme (ORCPT + 99 others); Sun, 8 Apr 2018 11:42:34 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:58994 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752239AbeDHPmc (ORCPT ); Sun, 8 Apr 2018 11:42:32 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CE3F877067; Sun, 8 Apr 2018 15:42:31 +0000 (UTC) Received: from redhat.com (dhcp-17-208.bos.redhat.com [10.18.17.208]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A1194215CDC6; Sun, 8 Apr 2018 15:42:31 +0000 (UTC) Date: Sun, 8 Apr 2018 11:42:31 -0400 From: Joe Lawrence To: Josh Poimboeuf Cc: live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] selftests/livepatch: introduce tests Message-ID: <20180408154231.ihnglqyya5nric4q@redhat.com> References: <1522266588-11806-1-git-send-email-joe.lawrence@redhat.com> <1522266588-11806-2-git-send-email-joe.lawrence@redhat.com> <20180407023646.k3gjrgjwzhwgu6fq@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180407023646.k3gjrgjwzhwgu6fq@treble> User-Agent: Mutt/1.6.2-neo (2016-08-08) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Sun, 08 Apr 2018 15:42:31 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Sun, 08 Apr 2018 15:42:31 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'joe.lawrence@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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. 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? -- Joe