103b80ff8SFrancis Laniel#!/bin/sh 203b80ff8SFrancis Laniel# SPDX-License-Identifier: GPL-2.0 303b80ff8SFrancis Laniel# description: Test failure of registering kprobe on non unique symbol 403b80ff8SFrancis Laniel# requires: kprobe_events 503b80ff8SFrancis Laniel 603b80ff8SFrancis LanielSYMBOL='name_show' 703b80ff8SFrancis Laniel 803b80ff8SFrancis Laniel# We skip this test on kernel where SYMBOL is unique or does not exist. 903b80ff8SFrancis Lanielif [ "$(grep -c -E "[[:alnum:]]+ t ${SYMBOL}" /proc/kallsyms)" -le '1' ]; then 1003b80ff8SFrancis Laniel exit_unsupported 1103b80ff8SFrancis Lanielfi 1203b80ff8SFrancis Laniel 1303b80ff8SFrancis Laniel! echo "p:test_non_unique ${SYMBOL}" > kprobe_events 14