ftruncate04: require CONFIG_MANDATORY_FILE_LOCKING=y
PATCH 1/1 ftruncate04: require CONFIG_MANDATORY_FILE_LOCKING=y
commit f7e33bdbd6d1 ("fs: remove mandatory file locking support") removed mandatory file locking support, but mount option is still allowed and produces no error. There's a warning in dmesg but it's pr_warn_once() so we can't rely to always find it there.
Make the test check also for CONFIG_MANDATORY_FILE_LOCKING=y.
--- testcases/kernel/syscalls/ftruncate/ftruncate04.c | 4 ++++ 1 file changed, 4 insertions(+)
testcases/kernel/syscalls/ftruncate/ftruncate04.c +4 -0
@@ -168,6 +168,10 @@ static void setup(void) }static struct tst_test test = { + .needs_kconfigs = (const char *[]) { +"CONFIG_MANDATORY_FILE_LOCKING=y" , +NULL + }, .test_all = verify_ftruncate, .setup = setup, .needs_checkpoints =1 ,
Signature · 1 line
2.27.0
PATCH 1/1 ftruncate04: require CONFIG_MANDATORY_FILE_LOCKING=y
Hi!
Sounds good.
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH 1/1 ftruncate04: require CONFIG_MANDATORY_FILE_LOCKING=y
In reply to Jan StancekQuoted 8 lines · Jan Stancek
commit
f7e33bdbd6d1("fs: remove mandatory file locking support") removed mandatory file locking support, but mount option is still allowed and produces no error. There's a warning in dmesg but it'spr_warn_once()so we can't rely to always find it there.Make the test check also for
CONFIG_MANDATORY_FILE_LOCKING=y.
I'm wondering, if the SUT without CONFIG_MANDATORY_FILE_LOCKING enabling, why the mount-check in setup() didn't report EPERM?
And, should we drop the mount-check for EPERM from setup after adding this .needs_kconfigs?
Signature · 5 lines
Regards, Li Wang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.linux.it/pipermail/ltp/attachments/20210907/53acf06b/attachment.htm>
PATCH 1/1 ftruncate04: require CONFIG_MANDATORY_FILE_LOCKING=y
Quoted 10 lines · Li Wang
Quoted 6 lines · Jan Stancek
commit
f7e33bdbd6d1("fs: remove mandatory file locking support") removed mandatory file locking support, but mount option is still allowed and produces no error. There's a warning in dmesg but it'spr_warn_once()so we can't rely to always find it there.
Quoted 6 lines
Quoted 2 lines
Make the test check also for
CONFIG_MANDATORY_FILE_LOCKING=y.I'm wondering, if the SUT without
CONFIG_MANDATORY_FILE_LOCKINGenabling, why the mount-check insetup()didn't report EPERM?
Because kernel commit f7e33bdbd6d1 removed that code, it generates warning message instead.
Quoted 4 lines
And, should we drop the mount-check for EPERM from setup after adding this .needs_kconfigs?
I'd keep it, it doesn't hurt anything and older kernels could get EPERM for other reason (like running test in namespace where you don't have CAP_SYS_ADMIN)
Quoted 5 lines
--
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20210907/b1de7d4a/attachment.htm>
PATCH 1/1 ftruncate04: require CONFIG_MANDATORY_FILE_LOCKING=y
Quoted 17 lines · Jan Stancek
Quoted 13 lines · Li Wang
Quoted 8 lines · Jan Stancek
commit
f7e33bdbd6d1("fs: remove mandatory file locking support") removed mandatory file locking support, but mount option is still allowed and produces no error. There's a warning in dmesg but it'spr_warn_once()so we can't rely to always find it there.Make the test check also for
CONFIG_MANDATORY_FILE_LOCKING=y.
Quoted 7 lines
Quoted 3 lines
I'm wondering, if the SUT without
CONFIG_MANDATORY_FILE_LOCKINGenabling, why the mount-check insetup()didn't report EPERM?Because kernel commit
f7e33bdbd6d1removed that code, it generates warning message instead.
Ok, I see.
Quoted 4 lines
Quoted 4 lines
Quoted 8 lines
Quoted 3 lines
And, should we drop the mount-check for EPERM from setup after adding this .needs_kconfigs?
I'd keep it, it doesn't hurt anything and older kernels could get EPERM for other reason (like running test in namespace where you don't have
CAP_SYS_ADMIN)
Sure, that sounds acceptable too.
Signature · 5 lines
Regards, Li Wang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.linux.it/pipermail/ltp/attachments/20210907/32f1db53/attachment.htm>
PATCH 1/1 ftruncate04: require CONFIG_MANDATORY_FILE_LOCKING=y
Quoted 40 lines · Li Wang
Quoted 17 lines · Jan Stancek
Quoted 13 lines · Li Wang
Quoted 8 lines · Jan Stancek
commit
f7e33bdbd6d1("fs: remove mandatory file locking support") removed mandatory file locking support, but mount option is still allowed and produces no error. There's a warning in dmesg but it'spr_warn_once()so we can't rely to always find it there.Make the test check also for
CONFIG_MANDATORY_FILE_LOCKING=y.Quoted 7 lines
Quoted 3 lines
I'm wondering, if the SUT without
CONFIG_MANDATORY_FILE_LOCKINGenabling, why the mount-check insetup()didn't report EPERM?Because kernel commit
f7e33bdbd6d1removed that code, it generates warning message instead.Ok, I see.
Quoted 8 lines
Quoted 7 lines
And, should we drop the mount-check for EPERM from setup after adding this .needs_kconfigs?
Quoted 9 lines
Quoted 4 lines
I'd keep it, it doesn't hurt anything and older kernels could get EPERM for other reason (like running test in namespace where you don't have
CAP_SYS_ADMIN)Sure, that sounds acceptable too.
Reviewed-by Li Wang <[email protected]>
Pushed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20210907/b84ea5ad/attachment-0001.htm>