Skip to contentSkip to conversation

clock_settime03: improve message about fail

PATCH In review Andrew Vagin 2 participants 4 messages Nov 13, 2009 – Nov 18, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clock_settime03: improve message about fail

---
 .../kernel/timers/clock_settime/clock_settime03.c  |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
testcases/kernel/timers/clock_settime/clock_settime03.c +3 -2
index 7638abd..d60bcf6 100755
@@ -195,10 +195,11 @@ main(int ac, char **av)
 			} else {
 				tst_resm(TFAIL, "clock_settime(2) failed to"
 						" produce expected error; %d"
-						" , errno : %s and got %ld",
+						" , errno : %s and "
+						"got %ld errno %d",
 						testcase[i].exp_errno,
 						testcase[i].exp_errval,
-						TEST_RETURN);
+						TEST_RETURN, TEST_ERRNO);
 				if (TEST_RETURN == 0) {
 					if (clock_settime(CLOCK_REALTIME,
 								&saved) < 0) {
Signature · 12 lines
1.6.2.5


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#1 lore raw
Quoted 7 lines · On Friday 13 November 2009 02:52:20 Andrew Vagin wrote:
---
 .../kernel/timers/clock_settime/clock_settime03.c  |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

testcases/kernel/timers/clock_settime/clock_settime03.c main(int ac, char **av) · line 202

Quoted 10 lines
testcases/kernel/timers/clock_settime/clock_settime03.c +3 -2
@@ -195,10 +195,11 @@ main(int ac, char **av)
 			} else {
 				tst_resm(TFAIL, "clock_settime(2) failed to"
 						" produce expected error; %d"
-						" , errno : %s and got %ld",
+						" , errno : %s and "
+						"got %ld errno %d",
 						testcase[i].exp_errno,
 						testcase[i].exp_errval,
-						TEST_RETURN);
+						TEST_RETURN, TEST_ERRNO);

please convert it to TFAIL|TTERRNO instead
-mike

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july

_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#2 lore raw
Quoted 6 lines · Mike Frysinger
Quoted 4 lines · On Friday 13 November 2009 02:52:20 Andrew Vagin wrote:
---
  .../kernel/timers/clock_settime/clock_settime03.c  |    5 +++--
  1 files changed, 3 insertions(+), 2 deletions(-)
Quoted 16 lines
Quoted 4 lines
testcases/kernel/timers/clock_settime/clock_settime03.c +0 -0
@@ -195,10 +195,11 @@ main(int ac, char **av)
  			} else {

testcases/kernel/timers/clock_settime/clock_settime03.c main(int ac, char **av) · line 203

Quoted 10 lines
testcases/kernel/timers/clock_settime/clock_settime03.c +3 -2
  				tst_resm(TFAIL, "clock_settime(2) failed to"
  						" produce expected error; %d"
-						" , errno : %s and got %ld",
+						" , errno : %s and "
+						"got %ld errno %d",
  						testcase[i].exp_errno,
  						testcase[i].exp_errval,
-						TEST_RETURN);
+						TEST_RETURN, TEST_ERRNO);
 

please convert it to TFAIL|TTERRNO instead

I don't understand. pls describe in detail

Quoted 2 lines

-mike

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#3 lore raw
Quoted 22 lines · On Wednesday 18 November 2009 08:07:03 Andrew Vagin wrote:
Quoted 5 lines · Mike Frysinger
Quoted 4 lines · On Friday 13 November 2009 02:52:20 Andrew Vagin wrote:
---
  .../kernel/timers/clock_settime/clock_settime03.c  |    5 +++--
  1 files changed, 3 insertions(+), 2 deletions(-)
Quoted 15 lines

testcases/kernel/timers/clock_settime/clock_settime03.c main(int ac, char **av) · line 202

Quoted 13 lines
testcases/kernel/timers/clock_settime/clock_settime03.c +3 -2
@@ -195,10 +195,11 @@ main(int ac, char **av)
  			} else {
  				tst_resm(TFAIL, "clock_settime(2) failed to"
  						" produce expected error; %d"
-						" , errno : %s and got %ld",
+						" , errno : %s and "
+						"got %ld errno %d",
  						testcase[i].exp_errno,
  						testcase[i].exp_errval,
-						TEST_RETURN);
+						TEST_RETURN, TEST_ERRNO);

please convert it to TFAIL|TTERRNO instead

Quoted 1 line

I don't understand. pls describe in detail

dont show/parse TEST_ERRNO yourself. simply use what i showed as the first argument to the tst_resm func.
-mike

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july

_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list