statmount09.c: Enable mnt_ns_id for STATMOUNT_MNT_NS_ID
PATCH v3 1/1 statmount09.c: Enable mnt_ns_id for STATMOUNT_MNT_NS_ID
statmount09.c: Enable mnt_ns_id for STATMOUNT_MNT_NS_ID
When HAVE_STATMOUNT_MNT_NS_ID is defined, use mnt_ns_id for statmount09 test case. Otherswise, use mnt_id.
--- testcases/kernel/syscalls/statmount/statmount09.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
testcases/kernel/syscalls/statmount/statmount09.c +5 -1
@@ -39,7 +39,11 @@ static void run(void)return ;TST_EXP_EQ_LI (st_mount->mask,STATMOUNT_MNT_NS_ID ); -TST_EXP_EQ_LI (st_mount->mnt_ns_id, mnt_ns_id); +#if !defined(HAVE_STRUCT_STATMOUNT ) || defined(HAVE_STRUCT_STATMOUNT_MNT_NS_ID ) +TST_EXP_EQ_LI (st_mount->mnt_ns_id, mnt_ns_id); +#else +tst_res (TCONF ,"statmount.mnt_ns_id not available in current headers, skipping check" ); +#endif }static void setup (void )
--
2.51.0
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi!
Since we are nearing next release I pushed the patch with minor adjustenments, thanks!
Quoted 1 line
statmount09.c: Enablemnt_ns_idforSTATMOUNT_MNT_NS_ID
I've removed this duplicate line.
Quoted 4 lines
When
HAVE_STATMOUNT_MNT_NS_IDis defined, usemnt_ns_idfor statmount09 test case. Otherswise, usemnt_id.Fixes #1260
Replaced this with a full link to the issue (it's easier to dig things up that way).
Quoted 10 lines
Signed-off-by Jack Morgan <[email protected]>--- testcases/kernel/syscalls/statmount/statmount09.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)testcases/kernel/syscalls/statmount/statmount09.c +0
-0
testcases/kernel/syscalls/statmount/statmount09.c static void run(void) · line 45
Quoted 8 lines
testcases/kernel/syscalls/statmount/statmount09.c +4
-1@@ -39,7 +39,11 @@ static void run(void)return ;TST_EXP_EQ_LI (st_mount->mask,STATMOUNT_MNT_NS_ID ); -TST_EXP_EQ_LI (st_mount->mnt_ns_id, mnt_ns_id); +#if !defined(HAVE_STRUCT_STATMOUNT ) || defined(HAVE_STRUCT_STATMOUNT_MNT_NS_ID ) +TST_EXP_EQ_LI (st_mount->mnt_ns_id, mnt_ns_id); +#else +tst_res (TCONF ,"statmount.mnt_ns_id not available in current headers, skipping check" );
Replaced the spaces with tabs, we use tabs in LTP (hint: 'make check' will print errors and warnings to catch such issues).
And also shortened the line a bit, the ", skipping check" part is redundand since the message type is TCONF already.
Signature · 5 lines
Cyril Hrubis [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp