Re: [PATCH v13 12/12] selftests/livepatch: introduce tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/15/2018 08:37 AM, Petr Mladek wrote:
> From: Joe Lawrence <joe.lawrence@xxxxxxxxxx>
> 
> 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 <joe.lawrence@xxxxxxxxxx>
> ---
>
> [ ... 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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux