[PATCH v7 4/4] tests: check status qualifier
Dmitry V. Levin
ldv at altlinux.org
Sun Jul 7 10:25:14 UTC 2019
On Sat, Jul 06, 2019 at 09:20:15AM +0200, Paul Chaignon wrote:
[...]
> diff --git a/tests/status-successful.c b/tests/status-successful.c
> new file mode 100644
> index 00000000..4c550290
> --- /dev/null
> +++ b/tests/status-successful.c
> @@ -0,0 +1,25 @@
> +/*
> + * Check status filtering for failed and successful syscalls.
> + *
> + * Copyright (c) 2019 Intel Corporation
> + * Copyright (c) 2019 Paul Chaignon <paul.chaignon at gmail.com>
> + * All rights reserved.
> + *
> + * SPDX-License-Identifier: GPL-2.0-or-later
> + */
> +
> +#include "tests.h"
> +
> +#include <stdio.h>
> +
> +int
> +main(void)
> +{
> + static const char sample_valid[] = ".";
> + static const char sample_invalid[] = "";
> +
> + test_status_chdir(sample_valid, 1, 0);
> + test_status_chdir(sample_invalid, 1, 0);
> + puts("+++ exited with 0 +++");
> + return 0;
> +}
I have a test system where this test often fails because
the following behaviour is very likely on that system:
$ ../strace -qf -enanosleep ./status-unfinished >/dev/null
[pid 24680] nanosleep({tv_sec=123, tv_nsec=0}, <unfinished ...>
[pid 24681] nanosleep({tv_sec=0, tv_nsec=12345}, NULL) = 0
[pid 24680] <... nanosleep resumed>NULL) = ? ERESTART_RESTARTBLOCK (Interrupted by signal)
../strace: Stray PTRACE_EVENT_EXEC from pid 24680, trying to recover...
+++ superseded by execve in pid 24681 +++
+++ exited with 0 +++
The test system is
$ uname -a
Linux lgentoo4 4.16.11 #1 SMP Fri May 25 06:41:48 EDT 2018 s390x 2964 IBM GNU/Linux
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20190707/eb516ff5/attachment.bin>
More information about the Strace-devel
mailing list