[LTP] [PATCH 2/2] syscalls/unshare: convert unshare02 to the new API
xieziyao
xieziyao@huawei.com
Tue Apr 20 09:36:25 CEST 2021
Hi,
I just re-checked the latest code and made changes on your suggestions:
1. Add setup() and cleanup() to set uid to "nobody" for EPERM tests;
2. Modify the incorrect code style.
Please see: https://patchwork.ozlabs.org/project/ltp/patch/20210420072939.202584-1-xieziyao@huawei.com/
Thanks so much for your review!
Best Regards,
Ziyao
-----Original Message-----
From: Cyril Hrubis [mailto:chrubis@suse.cz]
Sent: Monday, April 19, 2021 10:08 PM
To: xieziyao <xieziyao@huawei.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 2/2] syscalls/unshare: convert unshare02 to the new API
Hi!
> 1. Convert unshare02 to the new API;
> 2. Check whether the returned value is correct in the child process
> instead of the parent process; 3. Add a test case: use the CLONE_NEWNS
> parameter as a non-root user and the expected return value is EPERM.
The EPERM check fails if the test is executed by a root. LTP tests usually setuid() to "nobody" for EPERM tests if executed as a root.
The TC should be lowercase but that is very minor.
Apart from these it's a really good cleanup.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list