lkml.org 
[lkml]   [2015]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: membarrier selftest issue
----- On Jun 17, 2015, at 12:56 AM, Pranith Kumar bobby.prani@gmail.com wrote:

> Hi Mathieu,
>
> On Mon, Jun 15, 2015 at 11:31 AM, Mathieu Desnoyers
> <mathieu.desnoyers@efficios.com> wrote:
>> Hi,
>>
>> The updated membarrier tree:
>> https://github.com/compudj/linux-dev
>> branch: sys-membarrier-volatile
>>
>> has an issue building selftests (make -C tools/testing/selftests)
>>
>> It appears that including linux/membarrier.h from those userspace
>> tests now fails (as of 4.1-rc8). Of course, my system does not have
>> the updated userspace headers installed. What is the right course
>> of action there ?
>>
>
> This somehow is working for me. Did you install the kernel? I am on
> debian and I had to install kernel+headers+libc for this to work. pmu
> tests did not work due to missing headers but membarrier and memfd did
> work.

It's the make headers_install part I forgot. I mistakenly thought
that the kernel self-tests would build against the in-tree headers
rather than the system headers. This is how userspace projects I know
of are usually designed.

Thanks,

Mathieu

>
> pranith@macmini:~/linux$ make -C tools/testing/selftests
> make: Entering directory '/home/pranith/linux/tools/testing/selftests'
> for TARGET in breakpoints cpu-hotplug efivarfs exec firmware ftrace
> kcmp membarrier memfd memory-hotplug mount mqueue net powerpc ptrace
> size sysctl timers user vm x86; do \
> make -C $TARGET; \
> done;
> make[1]: Entering directory
> '/home/pranith/linux/tools/testing/selftests/breakpoints'
> echo "Not an x86 target, can't build breakpoints selftests"
> Not an x86 target, can't build breakpoints selftests
> make[1]: Leaving directory
> '/home/pranith/linux/tools/testing/selftests/breakpoints'
> make[1]: Entering directory
> '/home/pranith/linux/tools/testing/selftests/cpu-hotplug'
> make[1]: Nothing to be done for 'all'.
> make[1]: Leaving directory
> '/home/pranith/linux/tools/testing/selftests/cpu-hotplug'
> make[1]: Entering directory
> '/home/pranith/linux/tools/testing/selftests/efivarfs'
> gcc -Wall open-unlink.c -o open-unlink
> gcc -Wall create-read.c -o create-read
> make[1]: Leaving directory
> '/home/pranith/linux/tools/testing/selftests/efivarfs'
> make[1]: Entering directory '/home/pranith/linux/tools/testing/selftests/exec'
> gcc -Wall -o execveat execveat.c
> ln -s -f execveat execveat.symlink
> cp execveat execveat.denatured
> chmod -x execveat.denatured
> echo '#!/bin/sh' > script
> echo 'exit $*' >> script
> chmod +x script
> mkdir -p subdir
> make[1]: Leaving directory '/home/pranith/linux/tools/testing/selftests/exec'
> make[1]: Entering directory
> '/home/pranith/linux/tools/testing/selftests/firmware'
> make[1]: Nothing to be done for 'all'.
> make[1]: Leaving directory
> '/home/pranith/linux/tools/testing/selftests/firmware'
> make[1]: Entering directory '/home/pranith/linux/tools/testing/selftests/ftrace'
> make[1]: Nothing to be done for 'all'.
> make[1]: Leaving directory '/home/pranith/linux/tools/testing/selftests/ftrace'
> make[1]: Entering directory '/home/pranith/linux/tools/testing/selftests/kcmp'
> gcc -I../../../../usr/include/ kcmp_test.c -o kcmp_test
> make[1]: Leaving directory '/home/pranith/linux/tools/testing/selftests/kcmp'
> make[1]: Entering directory
> '/home/pranith/linux/tools/testing/selftests/membarrier'
> gcc -g -I../../../../usr/include/ membarrier_test.c -o membarrier_test
> make[1]: Leaving directory
> '/home/pranith/linux/tools/testing/selftests/membarrier'
> make[1]: Entering directory '/home/pranith/linux/tools/testing/selftests/memfd'
> gcc -D_FILE_OFFSET_BITS=64 -I../../../../include/uapi/
> -I../../../../include/ -I../../../../usr/include/ memfd_test.c -o
> memfd_test
> make[1]: Leaving directory '/home/pranith/linux/tools/testing/selftests/memfd'
> make[1]: Entering directory
> '/home/pranith/linux/tools/testing/selftests/memory-hotplug'
> make[1]: Nothing to be done for 'all'.
> make[1]: Leaving directory
> '/home/pranith/linux/tools/testing/selftests/memory-hotplug'
> make[1]: Entering directory '/home/pranith/linux/tools/testing/selftests/mount'
> gcc -Wall -O2 unprivileged-remount-test.c -o unprivileged-remount-test
> make[1]: Leaving directory '/home/pranith/linux/tools/testing/selftests/mount'
> make[1]: Entering directory '/home/pranith/linux/tools/testing/selftests/mqueue'
> gcc -O2 mq_open_tests.c -o mq_open_tests -lrt
> gcc -O2 -o mq_perf_tests mq_perf_tests.c -lrt -lpthread -lpopt
> mq_perf_tests.c:39:18: fatal error: popt.h: No such file or directory
> #include <popt.h>
> ^
> compilation terminated.
> Makefile:4: recipe for target 'all' failed
> make[1]: *** [all] Error 1
> make[1]: Leaving directory '/home/pranith/linux/tools/testing/selftests/mqueue'
> make[1]: Entering directory '/home/pranith/linux/tools/testing/selftests/net'
> gcc -Wall -O2 -g -I../../../../usr/include/ -o socket socket.c
> gcc -Wall -O2 -g -I../../../../usr/include/ -o psock_fanout psock_fanout.c
> gcc -Wall -O2 -g -I../../../../usr/include/ -o psock_tpacket psock_tpacket.c
> make[1]: Leaving directory '/home/pranith/linux/tools/testing/selftests/net'
> make[1]: Entering directory
> '/home/pranith/linux/tools/testing/selftests/powerpc'
> make -k -C pmu all
> make[2]: Entering directory
> '/home/pranith/linux/tools/testing/selftests/powerpc/pmu'
> gcc -Wall -O2 -flto -Wall -Werror
> -DGIT_VERSION='"v4.1-rc8-3-g9ab055c-dirty"'
> -I/home/pranith/linux/tools/testing/selftests/powerpc -m64 -o
> count_instructions loop.S count_instructions.c ../harness.c event.c
> lib.c
> In file included from /usr/include/stdio.h:27:0,
>
> --
> Pranith

--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com


\
 
 \ /
  Last update: 2015-06-17 14:21    [W:0.042 / U:0.764 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site