[PATCH v5 4/4] tests: check status qualifier

Paul Chaignon paul.chaignon at gmail.com
Tue Jul 2 12:27:38 UTC 2019


On Tue, Jul 02, 2019 at 02:40:54AM +0300, Dmitry V. Levin wrote:
> On Fri, Jun 28, 2019 at 11:34:40AM +0200, Paul Chaignon wrote:

[...]

> > --- /dev/null
> > +++ b/tests/status-detached.test
> > @@ -0,0 +1,17 @@
> > +#!/bin/sh
> > +#
> > +# Check -e status=detached option.
> > +#
> > +# Copyright (c) 2019 Paul Chaignon <paul.chaignon at gmail.com>
> > +# All rights reserved.
> > +#
> > +# SPDX-License-Identifier: GPL-2.0-or-later
> > +
> > +. "${srcdir=.}/init.sh"
> > +
> > +# -I2 avoids blocking all fatal signals, the default when using -o.
> > +../../strace -o "$LOG" -I2 -e trace=nanosleep -e status=detached ../sleep 2 &
>
> This has to be $STRACE instead of ../../strace,
> see tests/init.sh for the case when $STRACE differs from ../../strace.

Hm.  I meant to fix that and forgot.  Thanks!

>
> I don't think -e trace=nanosleep is needed in this test.
>
> Since the only detached syscall here is nanosleep, it would be better
> to remove -e trace=nanosleep so the test would be able to detect the
> situation when status=detached misses that nanosleep syscall.

Should I use an explicit -e trace=all as you suggested for status-none and
status-unfinished in a later mail?

Paul


More information about the Strace-devel mailing list