#include #include #include "tests.h" #include "debug.h" #include "util.h" #include "perf-hooks.h" static void sigsegv_handler(int sig __maybe_unused) { pr_debug("SIGSEGV is observed as expected, try to recover.\n"); perf_hooks__recover(); signal(SIGSEGV, SIG_DFL); raise(SIGSEGV); exit(-1); } static void the_hook(void *_hook_flags) { int *hook_flags = _hook_flags; int *p = NULL; *hook_flags = 1234; /* Generate a segfault, test perf_hooks__recover */ *p = 0; } int test__perf_hooks(int subtest __maybe_unused) { int hook_flags = 0; signal(SIGSEGV, sigsegv_handler); perf_hooks__set_hook("test", the_hook, &hook_flags); perf_hooks__invoke_test(); /* hook is triggered? */ if (hook_flags != 1234) { pr_debug("Setting failed: %d (%p)\n", hook_flags, &hook_flags); return TEST_FAIL; } /* the buggy hook is removed? */ if (perf_hooks__get_hook("test")) return TEST_FAIL; return TEST_OK; } 157f828fcaadd259613f59db3c6d1c'/> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKalle Valo <kvalo@codeaurora.org>2017-01-27 14:19:25 +0200
committerKalle Valo <kvalo@codeaurora.org>2017-01-28 09:15:50 +0200
commit2b1d530cb3157f828fcaadd259613f59db3c6d1c (patch)
treefb5dfe8f2e6956f54377c7275f330cd158ead259 /net/tipc/bearer.h
parentbd19b5ab1da654de456e102250822ec06311d6ad (diff)
MAINTAINERS: ath9k-devel is closed
ath9k-devel list is now closed, only linux-wireless should be used. Reported-by: Michael Renzmann <mrenzmann@madwifi-project.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'net/tipc/bearer.h')