Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3622486ybi; Tue, 2 Jul 2019 10:38:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqw3yXB5W6zUMF2aJrjIGFNhbEnqnPgo4PEDdQ4TUoGdW2KgIMGvt467rFBgzWZa8tvY3yLO X-Received: by 2002:a63:dc11:: with SMTP id s17mr32585379pgg.47.1562089089719; Tue, 02 Jul 2019 10:38:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562089089; cv=none; d=google.com; s=arc-20160816; b=j3kT1h8w2jT6sz8QZe+UkLjdYY1gDqAx8/y13HFPjOcnpJ7EDenxDL+qj+dxoq32dh wDr2HVyweI1fUBI0hTLdEnh5ukMSsee9wyLAsdihaF0+o6bzHNgPt4EyW55qwkCMzf5Y q5P1BrxfcqUf7LuvnTxemRiWw1Kvz7dR1dB+eCnvBKCOX3YKsWfJYiHiAZsDL9OwiR3P PDn0n7hcRwAY+tUv225ZgvikUvGMEHbzCJ+4ZPbakFkUuJMAzWKc/OzE10P/lLTOOJcu k1sOAGPpwyBaPOdsxLIYlpmk0EaxiwC5sQw5YFJuAioxtP7oRblNUra1y2S2DvIOJAb+ 8SIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=1FAnKetMS6oVEFfaAMdIzJKX0drL1rc4E0VM9rZq68w=; b=ZDZRXBBkMPqYkGh4UEkUA/m8H4aw0YHCup8eqpdTXjAXm8+CxlHaGIjcyrA3fCKqAp 98ROL7f72DzzCY+5XSpmjrkR1kI4j7bDG7+3hYZayUFOPW0/zk+f+1Sb0RBl32zZ+v6S 1V5DqexcE7moxvsWSQGbsGhE8JLIqKgyT196lFYw8djIZd1G9qHbbcbehmOdsOrvgTFG 8H7nmzwtdWIZKOYNYnDru96q4bqPxJb63Ad0LkJ5McRNiMo4AKpG/rIJ6E2znDpOlw9s dSjm4YKgpKNDawbLyh4poGuSMP7PPCi/LcZidrB+oGydw9d9L8gWPwHpXmD2P9OkGuYb 1bKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=M1wpP4Lv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v7si15704937pfb.132.2019.07.02.10.37.55; Tue, 02 Jul 2019 10:38:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=M1wpP4Lv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726957AbfGBRhZ (ORCPT + 99 others); Tue, 2 Jul 2019 13:37:25 -0400 Received: from mail-pf1-f201.google.com ([209.85.210.201]:40484 "EHLO mail-pf1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726252AbfGBRhY (ORCPT ); Tue, 2 Jul 2019 13:37:24 -0400 Received: by mail-pf1-f201.google.com with SMTP id z1so11259191pfb.7 for ; Tue, 02 Jul 2019 10:37:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=1FAnKetMS6oVEFfaAMdIzJKX0drL1rc4E0VM9rZq68w=; b=M1wpP4LvC86w13Y9yZtd4RaRSscqUQfIQ8ghzT1N29DkC5SgPgrc0DSl5bjo+MPrin byi1CQr7BDUdowtx1lML/VgMRRcpwlOQud8aA5ktnWgIfgOeYvUnKe1azQT9+IJIaIr8 KFVNGaByHdpkQdvgTwUnvAhRPwqA3J9aPM+8bHzDuPhXdxNcExvDtvHGaaPdzrNGZWJz 46e4rDEYUlToNykFMkfGS3l52lokzGy6gA3UuoOW2ETZfUxhEZt1qZFA8/jJL1s+tdY5 QCGZie3X9KnYsZsm+P66r+xI4+TpSNECS45b9s6PioF4NsGskU79uexDIKHL5Eak05l3 1oww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=1FAnKetMS6oVEFfaAMdIzJKX0drL1rc4E0VM9rZq68w=; b=Cl6P8rUcLPKA5epx+W+kSEf1vn9vARO3x0JB8SjMklXHG43HxteEyjNKAHkBo6Ywqq SPwsYzF+sTe6YUv6rdAu8iwEQEor9JVayq0XnDrGly+ZQIKgOESABuiDS4xNsURo9Aqs jv/OH5KzPvB1Lk8A+nKDkTB7nG1nqIztYhoGNly6Atgl9pGMAp00zcMLp8EyYbXkAhYU /liZoRqlJ0mh3cecWDiz57tYTIP3mD/Nvukw81KgwZxDrI9wpQWsQvt8eCjAYndb+ul9 yzMXbEG4tbyg8AtgAb9yV2TlkyKO77Bbosg6t9HFttKut8dUUWHuIYUEb+Cg664DNynB m2mQ== X-Gm-Message-State: APjAAAW0c1Ol8vIHMICIMcIdC95XGhT7THluwTBKJf/imIR/wfbiYMVT o39w+StjCJc8bs3iLZtyetMIQHyY X-Received: by 2002:a65:4b8b:: with SMTP id t11mr23416538pgq.130.1562089043245; Tue, 02 Jul 2019 10:37:23 -0700 (PDT) Date: Tue, 2 Jul 2019 10:37:16 -0700 In-Reply-To: <20190702173716.181223-1-nums@google.com> Message-Id: <20190702173716.181223-2-nums@google.com> Mime-Version: 1.0 References: <20190702173716.181223-1-nums@google.com> X-Mailer: git-send-email 2.22.0.410.gd8fdbe21b5-goog Subject: [PATCH 2/2] Fix perf-hooks test From: Numfor Mbiziwo-Tiapo To: peterz@infradead.org, mingo@redhat.com, acme@kernel.org, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, songliubraving@fb.com, mbd@fb.com Cc: linux-kernel@vger.kernel.org, irogers@google.com, eranian@google.com, Numfor Mbiziwo-Tiapo Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The perf-hooks test fails with Address Sanitizer and Memory Sanitizer builds because it purposefully generates a segfault. Checking if these sanitizers are active when running this test will allow the perf-hooks test to pass. Signed-off-by: Numfor Mbiziwo-Tiapo --- tools/perf/tests/perf-hooks.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/perf/tests/perf-hooks.c b/tools/perf/tests/perf-hooks.c index a693bcf017ea..524ecba63615 100644 --- a/tools/perf/tests/perf-hooks.c +++ b/tools/perf/tests/perf-hooks.c @@ -25,7 +25,12 @@ static void the_hook(void *_hook_flags) *hook_flags = 1234; /* Generate a segfault, test perf_hooks__recover */ +#if defined(ADDRESS_SANITIZER) || defined(MEMORY_SANITIZER) || \ +defined(THREAD_SANITIZER) || defined(SAFESTACK_SANITIZER) + raise(SIGSEGV); +#else *p = 0; +#endif } int test__perf_hooks(struct test *test __maybe_unused, int subtest __maybe_unused) -- 2.22.0.410.gd8fdbe21b5-goog