From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 6/7] syscalls/clone06: Convert to new API
Date: Wed, 25 Aug 2021 16:43:03 +0200 [thread overview]
Message-ID: <YSZW978RDyWd2UcY@yuki> (raw)
In-Reply-To: <20210813072720.22318-1-zhanglianjie@uniontech.com>
Hi!
> + if (!TST_PASS)
> + return;
> +
> + SAFE_CLOSE(pfd[1]);
> + SAFE_READ(1, pfd[0], buff, sizeof(buff));
> + SAFE_CLOSE(pfd[0]);
>
> - cleanup();
> - tst_exit();
> + parent_env = getenv("TERM") ? : "";
> + TST_EXP_PASS(strcmp(buff, parent_env),
> + "verify environment variables by child");
This is misuse as well. I guess TST_EXP_VAL() could be useable in this
case as well.
> }
>
> static void setup(void)
> {
> - tst_sig(FORK, DEF_HANDLER, cleanup);
> - TEST_PAUSE;
> + child_stack = SAFE_MALLOC(CHILD_STACK_SIZE);
> + SAFE_PIPE(pfd);
Here as well it would be easier to use a shared memory as IPC.
--
Cyril Hrubis
chrubis@suse.cz
prev parent reply other threads:[~2021-08-25 14:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-13 7:27 [LTP] [PATCH 6/7] syscalls/clone06: Convert to new API zhanglianjie
2021-08-25 14:43 ` Cyril Hrubis [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YSZW978RDyWd2UcY@yuki \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox