From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755267AbbLKMz3 (ORCPT ); Fri, 11 Dec 2015 07:55:29 -0500 Received: from mail.kernel.org ([198.145.29.136]:48941 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752660AbbLKMz2 (ORCPT ); Fri, 11 Dec 2015 07:55:28 -0500 Date: Fri, 11 Dec 2015 09:55:24 -0300 From: Arnaldo Carvalho de Melo To: Wang Nan Cc: Namhyung Kim , Jiri Olsa , Alexei Starovoitov , David Ahern , Linux Kernel Mailing List Subject: perf test bpf on older kernels Message-ID: <20151211125524.GC6843@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Wang, While testing on a machine with an older kernel I noticed this: [root@felicio ~]# perf test bpf 37: Test BPF filter : 37.1: Test basic BPF filtering : FAILED! 37.2: Test BPF prologue generation : Skip [root@felicio ~]# symsrc__init: cannot get elf header. Using /proc/kcore for kernel object code Using /proc/kallsyms for symbols Opening /sys/kernel/debug/tracing//kprobe_events write=1 Writing event: p:perf_bpf_probe/func _text+2266976 libbpf: failed to create map: Function not implemented libbpf: failed to load object '[basic_bpf_test]' bpf: load objects failed Failed to add events selected by BPF Opening /sys/kernel/debug/tracing//kprobe_events write=1 Opening /sys/kernel/debug/tracing//uprobe_events write=1 Parsing probe_events: p:perf_bpf_probe/func _text+2266976 Group:perf_bpf_probe Event:func probe:p Writing event: -:perf_bpf_probe/func test child finished with -1 ---- end ---- Test BPF filter subtest 0: FAILED! 37.2: Test BPF prologue generation : --- force skipped --- Test BPF filter subtest 1: Skip [root@felicio ~]# So what happens is that the kernel doesn't have the feature you're trying to test, I think in this case the test should just pass with "Skip", not FAILED, that should be reserved for kernel tests for when the kernel supports a feature that then fails to work as advertised, ok? - Arnaldo