skel->links.epilogue_tailcall =
bpf_map__attach_struct_ops(skel->maps.epilogue_tailcall); if (!ASSERT_OK_PTR(skel->links.epilogue_tailcall, "attach_struct_ops")) goto done;
/* Both test_epilogue_tailcall and test_epilogue_subprog are * patched with epilogue. When syscall_epilogue_tailcall() * is run, test_epilogue_tailcall() is triggered. * It executes a tail call and control is transferred to * test_epilogue_subprog(). Only test_epilogue_subprog() * does args->a += 1, thus final args.a value of 10001 * guarantees that only the epilogue of the * test_epilogue_subprog is executed.
*/
memset(&args, 0, sizeof(args));
prog_fd = bpf_program__fd(skel->progs.syscall_epilogue_tailcall);
err = bpf_prog_test_run_opts(prog_fd, &topts);
ASSERT_OK(err, "bpf_prog_test_run_opts");
ASSERT_EQ(args.a, 10001, "args.a");
ASSERT_EQ(topts.retval, 10001 * 2, "topts.retval");
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.