Skip to contentSkip to conversation

setns: add ns_name in TINFO

PATCH Applied Monson Shao 3 participants 3 messages Oct 17, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 setns: add ns_name in TINFO

Make it clear which namespace is enabled and being tested.

before:

setns01     0  TINFO  :  ns_fds[0]=5, ns_types[0]=0x8000000
setns01     0  TINFO  :  ns_fds[1]=6, ns_types[1]=0x20000
setns01     0  TINFO  :  ns_fds[2]=7, ns_types[2]=0x40000000
setns01     0  TINFO  :  ns_fds[3]=8, ns_types[3]=0x20000000
setns01     0  TINFO  :  ns_fds[4]=9, ns_types[4]=0x4000000

after:

setns01     0  TINFO  :  ns_name=ipc, ns_fds[0]=5, ns_types[0]=0x8000000
setns01     0  TINFO  :  ns_name=mnt, ns_fds[1]=6, ns_types[1]=0x20000
setns01     0  TINFO  :  ns_name=net, ns_fds[2]=7, ns_types[2]=0x40000000
setns01     0  TINFO  :  ns_name=pid, ns_fds[3]=8, ns_types[3]=0x20000000
setns01     0  TINFO  :  ns_name=uts, ns_fds[4]=9, ns_types[4]=0x4000000
---
 testcases/kernel/syscalls/setns/setns.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
testcases/kernel/syscalls/setns/setns.h +2 -2
index 23bdb2e..a05e673 100644
@@ -53,8 +53,8 @@ static void init_ns_type(int clone_type, const char *proc_name)
 	if (fd != -1) {
 		ns_types[ns_total] = clone_type;
 		ns_fds[ns_total] = fd;
-		tst_resm(TINFO, "ns_fds[%d]=%d, ns_types[%d]=0x%x", ns_total,
-			fd, ns_total, clone_type);
+		tst_resm(TINFO, "ns_name=%s, ns_fds[%d]=%d, ns_types[%d]=0x%x",
+			 proc_name, ns_total, fd, ns_total, clone_type);
 		ns_total++;
 	}
 }
Signature · 13 lines
1.8.3.1


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Reviewed-by on v1 1/1
#1 lore raw

----- Original Message -----

Quoted 6 lines

From: "Monson Shao" <[email protected]>
To: [email protected]
Sent: Thursday, 17 October, 2013 11:26:45 AM
Subject: [LTP] [PATCH] setns: add ns_name in TINFO

Make it clear which namespace is enabled and being tested.

Fine by me, it's easier to read than those flags.

Regards,
Jan

Quoted 41 lines

before:

setns01     0  TINFO  :  ns_fds[0]=5, ns_types[0]=0x8000000
setns01     0  TINFO  :  ns_fds[1]=6, ns_types[1]=0x20000
setns01     0  TINFO  :  ns_fds[2]=7, ns_types[2]=0x40000000
setns01     0  TINFO  :  ns_fds[3]=8, ns_types[3]=0x20000000
setns01     0  TINFO  :  ns_fds[4]=9, ns_types[4]=0x4000000

after:

setns01     0  TINFO  :  ns_name=ipc, ns_fds[0]=5, ns_types[0]=0x8000000
setns01     0  TINFO  :  ns_name=mnt, ns_fds[1]=6, ns_types[1]=0x20000
setns01     0  TINFO  :  ns_name=net, ns_fds[2]=7, ns_types[2]=0x40000000
setns01     0  TINFO  :  ns_name=pid, ns_fds[3]=8, ns_types[3]=0x20000000
setns01     0  TINFO  :  ns_name=uts, ns_fds[4]=9, ns_types[4]=0x4000000
---
 testcases/kernel/syscalls/setns/setns.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
testcases/kernel/syscalls/setns/setns.h +2 -2
index 23bdb2e..a05e673 100644
@@ -53,8 +53,8 @@ static void init_ns_type(int clone_type, const char
 *proc_name)
 	if (fd != -1) {
 		ns_types[ns_total] = clone_type;
 		ns_fds[ns_total] = fd;
-		tst_resm(TINFO, "ns_fds[%d]=%d, ns_types[%d]=0x%x", ns_total,
-			fd, ns_total, clone_type);
+		tst_resm(TINFO, "ns_name=%s, ns_fds[%d]=%d, ns_types[%d]=0x%x",
+			 proc_name, ns_total, fd, ns_total, clone_type);
 		ns_total++;
 	}

}
--
1.8.3.1

Quoted 11 lines

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Applied
#2 lore raw
In reply to Monson Shao
Quoted 9 lines · Monson Shao

Make it clear which namespace is enabled and being tested.

before:

setns01     0  TINFO  :  ns_fds[0]=5, ns_types[0]=0x8000000
setns01     0  TINFO  :  ns_fds[1]=6, ns_types[1]=0x20000
setns01     0  TINFO  :  ns_fds[2]=7, ns_types[2]=0x40000000
setns01     0  TINFO  :  ns_fds[3]=8, ns_types[3]=0x20000000
setns01     0  TINFO  :  ns_fds[4]=9, ns_types[4]=0x4000000
Quoted 8 lines

after:

setns01     0  TINFO  :  ns_name=ipc, ns_fds[0]=5, ns_types[0]=0x8000000
setns01     0  TINFO  :  ns_name=mnt, ns_fds[1]=6, ns_types[1]=0x20000
setns01     0  TINFO  :  ns_name=net, ns_fds[2]=7, ns_types[2]=0x40000000
setns01     0  TINFO  :  ns_name=pid, ns_fds[3]=8, ns_types[3]=0x20000000
setns01     0  TINFO  :  ns_name=uts, ns_fds[4]=9, ns_types[4]=0x4000000

Applied, thank you.

Wanlong Gao

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list