xref: /linux/tools/testing/selftests/exec/binfmt_bind_interp.c (revision b9cba7ebfe539f3e4bbdd03a1e0efa3b30b3f592)
1*7404b147SChristian Brauner // SPDX-License-Identifier: GPL-2.0
2*7404b147SChristian Brauner /*
3*7404b147SChristian Brauner  * Test interpreter for the bound-interpreter case of the binfmt_misc_bpf
4*7404b147SChristian Brauner  * selftest. Two copies are installed at different paths and bound to one
5*7404b147SChristian Brauner  * entry under different names; printing argv[0] - the path the kernel ran
6*7404b147SChristian Brauner  * this copy under - tells the harness which of them the load program picked.
7*7404b147SChristian Brauner  */
8*7404b147SChristian Brauner #include <stdio.h>
9*7404b147SChristian Brauner 
10*7404b147SChristian Brauner int main(int argc, char **argv)
11*7404b147SChristian Brauner {
12*7404b147SChristian Brauner 	printf("BIND_RAN %s\n", argc > 0 ? argv[0] : "");
13*7404b147SChristian Brauner 	return 0;
14*7404b147SChristian Brauner }
15