From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [RFC] [PATCH] lib: Fix result propagation after exec() + tst_reinit()
Date: Fri, 3 Aug 2018 11:13:12 +0200 [thread overview]
Message-ID: <20180803091312.GA32272@rei> (raw)
In-Reply-To: <1077521162.37312079.1533126920056.JavaMail.zimbra@redhat.com>
Hi!
> > and also adds a needs_ipc_path flag to
> > tst_test structure, which causes the library not to unlink the IPC file
> > after it has been mapped and also inserts LTP_IPC_PATH to the
> > environment.
>
> What is the negative of skipping unlink() for all tests?
> Test itself runs in separate process, so cleanup_ipc() should run
> anyway and clean it.
Well we use test ID as well as pid for the filename so it should be
unique enough, we also do O_EXCL on the file so I guess that it should
be safe enough not to unlink() it after it has been mapped.
There is one downside though, in a case that there is no tmpfs mounted
we fall back to mapping a file, in which case we will trigger writeback
to the storage by updating the piece of memory.
And given that there are actually very few testcases that needs to
access the test library from the children started by exec I would like
to keep unlinking the file unless needed.
> .needs_ipc_path - I'm worried users won't know what this is for.
> Maybe if it was called ".child_needs_reinit"? reinit appears
> to be the only reason we need to keep shm_path around.
That sounds definitely better.
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2018-08-03 9:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-31 13:08 [LTP] [RFC] [PATCH] lib: Fix result propagation after exec() + tst_reinit() Cyril Hrubis
2018-08-01 11:09 ` Li Wang
2018-08-01 12:35 ` Jan Stancek
2018-08-03 9:13 ` Cyril Hrubis [this message]
2018-08-03 14:16 ` Jan Stancek
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=20180803091312.GA32272@rei \
--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