Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1347868

Re: [PATCH V10 17/28] selftests, powerpc: Add ptrace tests for EBB

From Anshuman Khandual <khandual@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: [PATCH V10 17/28] selftests, powerpc: Add ptrace tests for EBB
Date 2016-03-02 10:10 +0100
Message-ID <r8aX8-5yy-15@gated-at.bofh.it> (permalink)
References <r2JNT-5Qd-3@gated-at.bofh.it> <r2JNU-5Qd-23@gated-at.bofh.it> <r82ZA-8hp-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 03/02/2016 06:02 AM, Cyril Bur wrote:
> On Tue, 16 Feb 2016 14:29:47 +0530
> Anshuman Khandual <khandual@linux.vnet.ibm.com> wrote:
> 
>> This patch adds ptrace interface test for EBB specific
>> registers. This also adds some generic ptrace interface
>> based helper functions to be used by other patches later
>> on in the series.
>>
>> Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
>> ---
>>  tools/testing/selftests/powerpc/Makefile           |   3 +-
>>  tools/testing/selftests/powerpc/ptrace/Makefile    |   7 +
>>  .../testing/selftests/powerpc/ptrace/ptrace-ebb.c  | 150 ++++++++++++++
>>  .../testing/selftests/powerpc/ptrace/ptrace-ebb.h  | 103 ++++++++++
>>  tools/testing/selftests/powerpc/ptrace/ptrace.h    | 225 +++++++++++++++++++++
>>  5 files changed, 487 insertions(+), 1 deletion(-)
>>  create mode 100644 tools/testing/selftests/powerpc/ptrace/Makefile
>>  create mode 100644 tools/testing/selftests/powerpc/ptrace/ptrace-ebb.c
>>  create mode 100644 tools/testing/selftests/powerpc/ptrace/ptrace-ebb.h
>>  create mode 100644 tools/testing/selftests/powerpc/ptrace/ptrace.h
>>
>> diff --git a/tools/testing/selftests/powerpc/Makefile b/tools/testing/selftests/powerpc/Makefile
>> index 0c2706b..5b3c62c 100644
>> --- a/tools/testing/selftests/powerpc/Makefile
>> +++ b/tools/testing/selftests/powerpc/Makefile
>> @@ -22,7 +22,8 @@ SUB_DIRS = benchmarks 		\
>>  	   switch_endian	\
>>  	   syscalls		\
>>  	   tm			\
>> -	   vphn
>> +	   vphn			\
>> +	   ptrace
>>  
>>  endif
>>  
>> diff --git a/tools/testing/selftests/powerpc/ptrace/Makefile b/tools/testing/selftests/powerpc/ptrace/Makefile
>> new file mode 100644
>> index 0000000..8666ac0
>> --- /dev/null
>> +++ b/tools/testing/selftests/powerpc/ptrace/Makefile
>> @@ -0,0 +1,7 @@
>> +TEST_PROGS := ptrace-ebb
>> +all: $(TEST_PROGS)
>> +
>> +$(TEST_PROGS): ../harness.c ptrace.S ../utils.c
>> +ptrace-ebb: ../pmu/event.c ../pmu/lib.c ../pmu/ebb/ebb_handler.S ../pmu/ebb/busy_loop.S
>> +clean:
>> +	rm -f $(TEST_PROGS) *.o
> 
> If you:
> include ../../lib.mk
> 
> Then this Makefile just works with run_tests and install targets from the
> base Makefile

Sure, will do that.

> 
>> diff --git a/tools/testing/selftests/powerpc/ptrace/ptrace-ebb.c b/tools/testing/selftests/powerpc/ptrace/ptrace-ebb.c
>> new file mode 100644
>> index 0000000..e1ca608
>> --- /dev/null
>> +++ b/tools/testing/selftests/powerpc/ptrace/ptrace-ebb.c
>> @@ -0,0 +1,150 @@
>> +/*
>> + * Ptrace interface test for EBB
>> + *
>> + * Copyright (C) 2015 Anshuman Khandual, IBM Corporation.
>> + *
>> + * This program is free software; you can redistribute it and/or
>> + * modify it under the terms of the GNU General Public License
>> + * as published by the Free Software Foundation; either version
>> + * 2 of the License, or (at your option) any later version.
>> + */
>> +#include "../pmu/ebb/ebb.h"
>> +#include "ptrace.h"
>> +#include "ptrace-ebb.h"
>> +
> 
> Check out tools/testing/selftests/powerpc/utils.h which provides a nice (and
> super hacky) FAIL_IF() macro.

Sure, will check it out and see where all it can be used.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH V10 17/28] selftests, powerpc: Add ptrace tests for EBB Cyril Bur <cyrilbur@gmail.com> - 2016-03-02 01:40 +0100
  Re: [PATCH V10 17/28] selftests, powerpc: Add ptrace tests for EBB Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2016-03-02 10:10 +0100

csiph-web