From: chrubis@suse.cz
To: "Wang, Xiaoguang" <wangxg.fnst@cn.fujitsu.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] access(2): add ELOOP, ENOTDIR, EROFS error values test
Date: Mon, 4 Nov 2013 16:16:01 +0100 [thread overview]
Message-ID: <20131104151600.GA10512@rei> (raw)
In-Reply-To: <526A4001.5050909@cn.fujitsu.com>
Hi!
> +/*
> + * EROFS need superuser privilege (mount and umount a readonly file system),
> + * but the other error values tests need a normal user.
> + * So we first call setup1() with superuser privilege to test EROFS, and then
> + * use setup() to call setuid()to change the real user id to perform
> + * other tests.
> + */
Ah, this adds unexpected complexity and does not work test looping :(.
I've looked closely on the test code and the problem is that acces uses
real user id so we have to drop the rights to check the access call but
we need to be able to unmount the fs at the end of the test, which is
privileged operation.
Only solution that I have currenlty in mind is to run the test from
within the child process that drops the rights so that the parent
can perform the cleanup at the end, but again this adds unnecessary
complexity.
Was this problem the original reason why you added the new testcase for
the EROFS part? If so, you should have spoken as I did not foresee that
we will hit this problem.
So we should either proceed with the previous version (EROFS in separate
test) or move the code to child processes. The first solution seems
better to me, what do you think?
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
prev parent reply other threads:[~2013-11-04 15:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-25 9:55 [LTP] [PATCH] access(2): add ELOOP, ENOTDIR, EROFS error values test Wang, Xiaoguang
2013-11-04 15:16 ` chrubis [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=20131104151600.GA10512@rei \
--to=chrubis@suse.cz \
--cc=ltp-list@lists.sourceforge.net \
--cc=wangxg.fnst@cn.fujitsu.com \
/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