Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4324166imm; Mon, 15 Oct 2018 12:49:05 -0700 (PDT) X-Google-Smtp-Source: ACcGV61MHj/wUPDjjfR9TLwGNcX7k1rns7M7iSwqLrBbuQlDO0jU/bCUbsZmQ/8tdBwTuMLLb4Tn X-Received: by 2002:a17:902:b40d:: with SMTP id x13-v6mr18639482plr.13.1539632945010; Mon, 15 Oct 2018 12:49:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539632944; cv=none; d=google.com; s=arc-20160816; b=T7aN/+DeTAP0eBFW63t032xpsCOM8t1Xeof8LwL7gnJIebhnr4PRw0vqelww8c4LIh 5lEkIai5gdphHYPt9kbZHNtHdLqPLLb4JIO7tK0iCqMf5j2TflwMxWUBUPZzdlm52gTQ u1JZn8iJiOStqf3zHvDu3iAMZMbEKj72Y7EZ79gykt/nml+zA7Xdbf84RPc9zUAJHo4c hFX6vanVcPEbR2KsV5aB7cMi4dJ/44OPFRC7hdXGtF/5CErnYU1FKKhwwpiyuH76HLT6 W9PDsUPizlbZRPRShd/QFthFHgBzWYphwHxaIOF49WdYFrWBsHk1Jakk7IuVSli86yM3 1wkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject; bh=6f5bS4+f7uMvEV3NBESfGOLjKMSbH5rpO76OAILd+8c=; b=FYliJha6MyUTu9QMsP/g6gzeeI02NdjqIxAe8i+Hgw7ucPPJNRF9OZXE42YR5cJQnE TpM+hIIVrfOVYrsiCZtzR9p93uWBgMrlPc0HXlc4gtCqs4p+S9yCBzWNm4l2mBSFOFDL D9NzjFF2B0Eo7bFsg2p69ycBRM4r0Y6pc3K5zY5TQ+G3ipPp6G2DOmXzY9Uq9MRXxe8I 29HbODOyuvQchv0x3Ysg95eYaQudlIRR2cJX0xAp/EJBROKXZk+phoXIszGllOrcitxa 5z9vFBxUR070eeaTMJajP7Ctr/VSbwiBSS21h4IticWQkSBQA+RLI23NE9/zkzFq/YkM B2qA== 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 e21-v6si11570599pgl.305.2018.10.15.12.48.48; Mon, 15 Oct 2018 12:49:04 -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 S1727007AbeJPDdm (ORCPT + 99 others); Mon, 15 Oct 2018 23:33:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37474 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726903AbeJPDdl (ORCPT ); Mon, 15 Oct 2018 23:33:41 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F3E283084026; Mon, 15 Oct 2018 19:47:00 +0000 (UTC) Received: from jlaw-desktop.bos.csb (dhcp-17-208.bos.redhat.com [10.18.17.208]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2D0AB5D78D; Mon, 15 Oct 2018 19:47:00 +0000 (UTC) Subject: Re: [PATCH v13 12/12] selftests/livepatch: introduce tests To: Petr Mladek , Jiri Kosina , Josh Poimboeuf , Miroslav Benes Cc: Jason Baron , Evgenii Shatokhin , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org References: <20181015123713.25868-1-pmladek@suse.com> <20181015123713.25868-13-pmladek@suse.com> From: Joe Lawrence Organization: Red Hat Message-ID: <635c8f9d-8378-519a-6003-a04c2f999d2d@redhat.com> Date: Mon, 15 Oct 2018 15:46:59 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20181015123713.25868-13-pmladek@suse.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Mon, 15 Oct 2018 19:47:01 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/15/2018 08:37 AM, Petr Mladek wrote: > From: Joe Lawrence > > Add a few livepatch modules and simple target modules that the included > regression suite can run tests against: > > - basic livepatching (multiple patches, atomic replace) > - pre/post (un)patch callbacks > - shadow variable API > > Signed-off-by: Joe Lawrence > --- > > [ ... snip ... ] > > diff --git a/tools/testing/selftests/livepatch/functions.sh b/tools/testing/selftests/livepatch/functions.sh > new file mode 100644 > index 000000000000..d448b115f06c > --- /dev/null > +++ b/tools/testing/selftests/livepatch/functions.sh > > [ ... snip ... ] > > +# disable_lp(modname) - disable a livepatch > +# modname - module name to unload > +function disable_lp() { > + local mod="$1" > + > + log "% echo 0 > /sys/kernel/livepatch/$mod/enabled" > + echo 0 > /sys/kernel/livepatch/"$mod"/enabled > + > + # Wait until the transition finishes and the livepatch gets > + # removed from sysfs... > + loop_until '[[ ! -e "/sys/kernel/livepatch/$mod" ]]' || > + die "failed to disable livepatch $mod" small nit in case there is a v14: Applying: selftests/livepatch: introduce tests /root/linux/.git/rebase-apply/patch:1513: space before tab in indent. # Wait until the transition finishes and the livepatch gets And FWIW v13's selftests ran just fine on ppc64le over here. -- Joe