summaryrefslogtreecommitdiff
path: root/tools/objtool/tests/generic/test-missing-modinfo.sh
blob: 6f242f7eb756e36dcd888e185296c0cc592cc6cb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
#
# The module name in .modinfo ends up in the livepatch's klp_object, so an
# object without one cannot be diffed.

. "$(dirname "$0")/../lib.sh"

setup
build_pair no_modinfo.c
run_diff 255

diff_log | grep -q 'modinfo' ||
	fail "expected a complaint about .modinfo, got: $(diff_log | tail -1)"

pass "object without .modinfo rejected"