[lkml]   [2017]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC PATCH for 4.15 v3 15/22] rseq: selftests: Provide self-tests
----- On Nov 22, 2017, at 2:38 PM, Peter Zijlstra wrote:

> On Tue, Nov 21, 2017 at 09:18:53AM -0500, Mathieu Desnoyers wrote:
>> Implements two basic tests of RSEQ functionality, and one more
>> exhaustive parameterizable test.
>> The first, "basic_test" only asserts that RSEQ works moderately
>> correctly. E.g. that the CPUID pointer works.
>> "basic_percpu_ops_test" is a slightly more "realistic" variant,
>> implementing a few simple per-cpu operations and testing their
>> correctness.
>> "param_test" is a parametrizable restartable sequences test. See
>> the "--help" output for usage.
>> A script runs many variants of the parametrizable
>> tests.
>> As part of those tests, a helper library "rseq" implements a user-space
>> API around restartable sequences. It uses the cpu_opv system call as
>> fallback when single-stepped by a debugger. It exposes the instruction
>> pointer addresses where the rseq assembly blocks begin and end, as well
>> as the associated abort instruction pointer, in the __rseq_table
>> section. This section allows debuggers may know where to place
>> breakpoints when single-stepping through assembly blocks which may be
>> aborted at any point by the kernel.
> Could I ask you to split this in smaller bits?
> I'd start with just the rseq library, using only the rseq interface.
> Then add the whole cpu_opv fallback stuff.
> Then add the selftests using librseq.
> As is this is a tad much to read in a single go.

Sure, will do! And I plan to change the selftests to use the new
"percpu_*()" API that removes the need to duplicate code in the
caller code.



Mathieu Desnoyers
EfficiOS Inc.

 \ /
  Last update: 2017-11-23 22:16    [W:0.151 / U:21.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site