Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx> writes: > On Wed, 28 May 2025 at 19:04, Eduard Zingerman <eddyz87@xxxxxxxxx> wrote: >> >> Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx> writes: >> >> [...] >> >> > +struct { >> > + int prog_off; >> > + const char *errstr; >> > +} stream_error_arr[] = { >> > + { >> > + offsetof(struct stream, progs.stream_cond_break), >> > + "ERROR: Timeout detected for may_goto instruction", >> > + }, >> > + { >> > + offsetof(struct stream, progs.stream_deadlock), >> > + "ERROR: AA or ABBA deadlock detected", >> > + }, >> > +}; >> >> Wild idea: instead of hand-coding this for each test, maybe add >> __bpf_stderr, __bpf_stdout annotations to test_loader.c? >> With intent for them to operate like __msg. > > Good idea. But we'll have to run the program, which is slightly > different for each type. > I guess I can just support tc, syscall etc. for now with some default > setup to support this. We currently have a __retval annotation which does BPF_PROG_TEST_RUN. BPF_PROG_TEST_RUN is supported for "syscall" program type that you use in the tests, so that should be covered.