[PATCH v3 3/3] Add tests for the -l/--syscall-limit option

Sahil Siddiq icegambit91 at gmail.com
Fri Mar 3 06:25:45 UTC 2023


Hi,

On Friday, 3 March 2023 01:20:23 IST Dmitry V. Levin wrote:
> [...]
> > In the tests that I have written for the -l option, when run_strace() is
> > called in init.sh, the "Process %u detached" line will not be printed to
> > $LOG.
> > 
> > Is it alright if these lines are omitted in $LOG when running the tests?
> 
> Wh at these messages describe is not something the tracee is doing but what
> strace is doing to the tracee, so I think it's correct these messages are
> not going to the tracee log.  Let's say strace -ff -o $LOG -l $limit
> is invoked, would it make sense to add the diagnostics about detaching
> to every log file?  I don't think so.
> 
> Checking for these messages is one of possible methods to check that the
> tracees were detached, but I suppose it's not the only way to check this.

The other idea I have for checking whether the tracees were detached is to save
what strace's output would have been had it not been used with the -l option in
a file (for eg, save that output in a file called "set_nolimit"). And then the actual
output with the -l option can be saved in another file (eg: "set_limit"). Then one
could compare "set_limit" with "set_nolimit | head -l $limit".

I would love to hear your thoughts on this.

Regards,
Sahil




More information about the Strace-devel mailing list