From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v4 2/2] lib/tst_test.c: Add .needs_devfs flag
Date: Fri, 31 Aug 2018 14:31:02 +0200 [thread overview]
Message-ID: <20180831123102.GC30263@rei.lan> (raw)
In-Reply-To: <1535774861-27429-1-git-send-email-yangx.jy@cn.fujitsu.com>
Hi!
> +static void prepare_and_mount_dev_fs(const char *mntpoint)
> +{
> + const char *flags[] = {"nodev", NULL};
> + int mounted_nodev;
> +
> + mounted_nodev = tst_path_has_mnt_flags(NULL, NULL, flags);
> + if (mounted_nodev) {
> + tst_res(TINFO, "tmpdir isn't suitable for creating devices, "
> + "so mount tmpfs without nodev on %s", mntpoint);
> + SAFE_MOUNT(NULL, mntpoint, "tmpfs", 0, NULL);
> + mntpoint_mounted = 1;
> + }
> +}
That is even better than my version, nice :-).
There is a last nit to solve, the problem is that
tst_path_has_mnt_flags() is defined in old/test.h, we have to move the
definition to a separate header file (in a separate patch) so that it
could be included in test.h, tst_path_has_mnt_flags.c, and tst_test.c.
I can do that or you can sent v5, your choice.
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2018-08-31 12:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-04 8:00 [LTP] [PATCH] syscalls/open11.c: Fix the failure of opening device special file Xiao Yang
2018-07-23 1:42 ` Xiao Yang
2018-08-15 11:42 ` Cyril Hrubis
2018-08-16 8:45 ` [LTP] [PATCH v2 1/4] lib/tst_path_has_mnt_flags.c: Factor out tst_path_has_mnt_flags() for new API Xiao Yang
2018-08-16 8:45 ` [LTP] [PATCH v2 2/4] lib/tst_test.c: add .needs_devfs flag Xiao Yang
2018-08-16 13:28 ` Cyril Hrubis
2018-08-17 4:26 ` Xiao Yang
2018-08-17 4:33 ` [LTP] [PATCH v3 2/2] lib/tst_test.c: Add " Xiao Yang
2018-08-30 14:49 ` Cyril Hrubis
2018-08-31 2:58 ` Xiao Yang
2018-09-01 4:07 ` [LTP] [PATCH v4 " Xiao Yang
2018-08-31 12:31 ` Cyril Hrubis [this message]
2018-09-03 2:14 ` Xiao Yang
2018-09-03 13:01 ` Cyril Hrubis
2018-08-16 8:45 ` [LTP] [PATCH v2 3/4] syscalls/open11.c: Fix the failure of opening device special files Xiao Yang
2018-08-16 8:45 ` [LTP] [PATCH v2 4/4] syscalls/fsetxattr02.c: Fix the failure of opening device files Xiao Yang
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=20180831123102.GC30263@rei.lan \
--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