On Sun, 14 Jan 2024 23:17:11 +0900 Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx> wrote: > > > > Looks good to me and tested. > > > > Reviewed-by: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx> > > Tested-by: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx> > > Sorry, I should cancel these. I found this test did not pass if I set > the function tracer on. > > / # cd /sys/kernel/tracing/ > /sys/kernel/tracing # echo function > current_tracer > /sys/kernel/tracing # /mnt/map_test > TAP version 13 > 1..2 > # Starting 2 tests from 2 test cases. > # RUN map.subbuf_size_4k.meta_page_check ... > # map_test.c:174:meta_page_check:Expected self->meta->entries (15293) == 16 (16) > # meta_page_check: Test terminated by assertion > # FAIL map.subbuf_size_4k.meta_page_check > not ok 1 map.subbuf_size_4k.meta_page_check > # RUN map.subbuf_size_8k.meta_page_check ... > # map_test.c:174:meta_page_check:Expected self->meta->entries (15270) == 16 (16) > # meta_page_check: Test terminated by assertion > # FAIL map.subbuf_size_8k.meta_page_check > not ok 2 map.subbuf_size_8k.meta_page_check > # FAILED: 0 / 2 tests passed. > # Totals: pass:0 fail:2 xfail:0 xpass:0 skip:0 error:0 > > Does this depend on "nop" tracer? Yes. > > > + > > > +static int tracefs_reset(void) > > > +{ > > > + if (__tracefs_write_int(TRACEFS_ROOT"/tracing_on", 0)) > > > + return -1; > > > + if (__tracefs_write_int(TRACEFS_ROOT"/trace", 0)) > > > + return -1; > > > + if (__tracefs_write(TRACEFS_ROOT"/set_event", "")) > > > + return -1; Looks like the below is needed: if (__traces_write(TRACEFS_ROOT"/current_tracer", "nop")) return -1; > > > + > > > + return 0; > > > +} > > > + -- Steve