Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754729AbbFQL7v (ORCPT ); Wed, 17 Jun 2015 07:59:51 -0400 Received: from mail.efficios.com ([78.47.125.74]:37727 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751957AbbFQL7n (ORCPT ); Wed, 17 Jun 2015 07:59:43 -0400 Date: Wed, 17 Jun 2015 11:59:33 +0000 (UTC) From: Mathieu Desnoyers To: Pranith Kumar Cc: Michael Ellerman , Linux Kernel Message-ID: <1686736749.5232.1434542373920.JavaMail.zimbra@efficios.com> In-Reply-To: References: <744233553.3211.1434382307322.JavaMail.zimbra@efficios.com> Subject: Re: membarrier selftest issue MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [78.47.125.74] X-Mailer: Zimbra 8.6.0_GA_1153 (ZimbraWebClient - FF38 (Linux)/8.6.0_GA_1153) Thread-Topic: membarrier selftest issue Thread-Index: rfXQ+gmEPWZtrPLd4FygC3KoFI9YCg== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5932 Lines: 137 ----- 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 > 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 > ^ > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/