svn commit: r314943 - in head: bin/pwait/tests usr.bin/timeout/tests

Bryan Drewery bdrewery at FreeBSD.org
Thu Mar 9 04:19:54 UTC 2017


Author: bdrewery
Date: Thu Mar  9 04:19:52 2017
New Revision: 314943
URL: https://svnweb.freebsd.org/changeset/base/314943

Log:
  Remove unneeded -x from tests.
  
  Reported by:	ngie
  MFC after:	2 weeks
  X-MFC-With:	r314886

Modified:
  head/bin/pwait/tests/pwait.sh
  head/usr.bin/timeout/tests/timeout.sh

Modified: head/bin/pwait/tests/pwait.sh
==============================================================================
--- head/bin/pwait/tests/pwait.sh	Thu Mar  9 03:27:53 2017	(r314942)
+++ head/bin/pwait/tests/pwait.sh	Thu Mar  9 04:19:52 2017	(r314943)
@@ -21,25 +21,25 @@ basic_body()
 		-o empty \
 		-e empty \
 		-s exit:0 \
-		-x timeout --preserve-status 15 pwait $p1 $p5 $p10
+		timeout --preserve-status 15 pwait $p1 $p5 $p10
 
 	atf_check \
 		-o empty \
 		-e inline:"kill: $p1: No such process\n" \
 		-s exit:1 \
-		-x kill -0 $p1
+		kill -0 $p1
 
 	atf_check \
 		-o empty \
 		-e inline:"kill: $p5: No such process\n" \
 		-s exit:1 \
-		-x kill -0 $p5
+		kill -0 $p5
 
 	atf_check \
 		-o empty \
 		-e inline:"kill: $p10: No such process\n" \
 		-s exit:1 \
-		-x kill -0 $p10
+		kill -0 $p10
 
 }
 
@@ -63,25 +63,25 @@ time_unit_body()
 		-o empty \
 		-e inline:"pwait: timeout unit\n" \
 		-s exit:65 \
-		-x timeout --preserve-status 2 pwait -t 1d $init
+		timeout --preserve-status 2 pwait -t 1d $init
 
 	atf_check \
 		-o empty \
 		-e inline:"pwait: timeout unit\n" \
 		-s exit:65 \
-		-x timeout --preserve-status 2 pwait -t 1d $init
+		timeout --preserve-status 2 pwait -t 1d $init
 
 	atf_check \
 		-o empty \
 		-e inline:"pwait: timeout value\n" \
 		-s exit:65 \
-		-x timeout --preserve-status 2 pwait -t -1 $init
+		timeout --preserve-status 2 pwait -t -1 $init
 
 	atf_check \
 		-o empty \
 		-e inline:"pwait: timeout value\n" \
 		-s exit:65 \
-		-x timeout --preserve-status 2 pwait -t 100000001 $init
+		timeout --preserve-status 2 pwait -t 100000001 $init
 
 	# These long duration cases are expected to timeout from the
 	# timeout utility rather than pwait -t.
@@ -89,37 +89,37 @@ time_unit_body()
 		-o empty \
 		-e empty \
 		-s exit:143 \
-		-x timeout --preserve-status 2 pwait -t 100000000 $init
+		timeout --preserve-status 2 pwait -t 100000000 $init
 
 	atf_check \
 		-o empty \
 		-e empty \
 		-s exit:143 \
-		-x timeout --preserve-status 2 pwait -t 1h $init
+		timeout --preserve-status 2 pwait -t 1h $init
 
 	atf_check \
 		-o empty \
 		-e empty \
 		-s exit:143 \
-		-x timeout --preserve-status 2 pwait -t 1.5h $init
+		timeout --preserve-status 2 pwait -t 1.5h $init
 
 	atf_check \
 		-o empty \
 		-e empty \
 		-s exit:143 \
-		-x timeout --preserve-status 2 pwait -t 1m $init
+		timeout --preserve-status 2 pwait -t 1m $init
 
 	atf_check \
 		-o empty \
 		-e empty \
 		-s exit:143 \
-		-x timeout --preserve-status 2 pwait -t 1.5m $init
+		timeout --preserve-status 2 pwait -t 1.5m $init
 
 	atf_check \
 		-o empty \
 		-e empty \
 		-s exit:143 \
-		-x timeout --preserve-status 2 pwait -t 0 $init
+		timeout --preserve-status 2 pwait -t 0 $init
 
 	# The rest are fast enough that pwait -t is expected to trigger
 	# the timeout.
@@ -127,31 +127,31 @@ time_unit_body()
 		-o empty \
 		-e empty \
 		-s exit:124 \
-		-x timeout --preserve-status 2 pwait -t 1s $init
+		timeout --preserve-status 2 pwait -t 1s $init
 
 	atf_check \
 		-o empty \
 		-e empty \
 		-s exit:124 \
-		-x timeout --preserve-status 2 pwait -t 1.5s $init
+		timeout --preserve-status 2 pwait -t 1.5s $init
 
 	atf_check \
 		-o empty \
 		-e empty \
 		-s exit:124 \
-		-x timeout --preserve-status 2 pwait -t 1 $init
+		timeout --preserve-status 2 pwait -t 1 $init
 
 	atf_check \
 		-o empty \
 		-e empty \
 		-s exit:124 \
-		-x timeout --preserve-status 2 pwait -t 1.5 $init
+		timeout --preserve-status 2 pwait -t 1.5 $init
 
 	atf_check \
 		-o empty \
 		-e empty \
 		-s exit:124 \
-		-x timeout --preserve-status 2 pwait -t 0.5 $init
+		timeout --preserve-status 2 pwait -t 0.5 $init
 }
 
 atf_test_case timeout_trigger_timeout
@@ -169,7 +169,7 @@ timeout_trigger_timeout_body()
 		-o empty \
 		-e empty \
 		-s exit:124 \
-		-x timeout --preserve-status 6.5 pwait -t 5 $p10
+		timeout --preserve-status 6.5 pwait -t 5 $p10
 }
 
 timeout_trigger_timeout_cleanup()
@@ -193,7 +193,7 @@ timeout_no_timeout_body()
 		-o empty \
 		-e empty \
 		-s exit:0 \
-		-x timeout --preserve-status 11.5 pwait -t 12 $p10
+		timeout --preserve-status 11.5 pwait -t 12 $p10
 }
 
 timeout_no_timeout_cleanup()
@@ -223,7 +223,7 @@ timeout_many_body()
 		-o empty \
 		-e empty \
 		-s exit:124 \
-		-x timeout --preserve-status 7.5 pwait -t 6 $p1 $p5 $p10
+		timeout --preserve-status 7.5 pwait -t 6 $p1 $p5 $p10
 }
 
 timeout_many_cleanup()

Modified: head/usr.bin/timeout/tests/timeout.sh
==============================================================================
--- head/usr.bin/timeout/tests/timeout.sh	Thu Mar  9 03:27:53 2017	(r314942)
+++ head/usr.bin/timeout/tests/timeout.sh	Thu Mar  9 04:19:52 2017	(r314943)
@@ -12,7 +12,7 @@ nominal_body()
 		-o empty \
 		-e empty \
 		-s exit:0 \
-		-x timeout 5 true
+		timeout 5 true
 }
 
 atf_test_case time_unit
@@ -27,25 +27,25 @@ time_unit_body()
 		-o empty \
 		-e empty \
 		-s exit:0 \
-		-x timeout 1d true
+		timeout 1d true
 
 	atf_check \
 		-o empty \
 		-e empty \
 		-s exit:0 \
-		-x timeout 1h true
+		timeout 1h true
 
 	atf_check \
 		-o empty \
 		-e empty \
 		-s exit:0 \
-		-x timeout 1m true
+		timeout 1m true
 
 	atf_check \
 		-o empty \
 		-e empty \
 		-s exit:0 \
-		-x timeout 1s true
+		timeout 1s true
 }
 
 atf_test_case no_timeout
@@ -60,7 +60,7 @@ no_timeout_body()
 		-o empty \
 		-e empty \
 		-s exit:0 \
-		-x timeout 0 true
+		timeout 0 true
 }
 
 atf_test_case exit_numbers
@@ -81,20 +81,20 @@ exit_numbers_body()
 		-o empty \
 		-e empty \
 		-s exit:124 \
-		-x timeout .1 sleep 1
+		timeout .1 sleep 1
 
 	# With preserv status exit should be 128 + TERM aka 143
 	atf_check \
 		-o empty \
 		-e empty \
 		-s exit:143 \
-		-x timeout --preserve-status .1 sleep 10
+		timeout --preserve-status .1 sleep 10
 
 	atf_check \
 		-o empty \
 		-e empty \
 		-s exit:124 \
-		-x timeout -s1 -k1 .1 sleep 10
+		timeout -s1 -k1 .1 sleep 10
 
 	atf_check \
 		-o empty \
@@ -129,31 +129,31 @@ invalid_timeout_body()
 		-o empty \
 		-e inline:"timeout: invalid duration\n" \
 		-s exit:125 \
-		-x timeout invalid sleep 0
+		timeout invalid sleep 0
 
 	atf_check \
 		-o empty \
 		-e inline:"timeout: invalid duration\n" \
 		-s exit:125 \
-		-x timeout --kill-after=invalid 1 sleep 0
+		timeout --kill-after=invalid 1 sleep 0
 
 	atf_check \
 		-o empty \
 		-e inline:"timeout: invalid duration\n" \
 		-s exit:125 \
-		-x timeout 42D sleep 0
+		timeout 42D sleep 0
 
 	atf_check \
 		-o empty \
 		-e inline:"timeout: invalid duration\n" \
 		-s exit:125 \
-		-x timeout 999999999999999999999999999999999999999999999999999999999999d sleep 0
+		timeout 999999999999999999999999999999999999999999999999999999999999d sleep 0
 
 	atf_check \
 		-o empty \
 		-e inline:"timeout: invalid duration\n" \
 		-s exit:125 \
-		-x timeout 2.34e+5d sleep 0
+		timeout 2.34e+5d sleep 0
 }
 
 atf_test_case invalid_signal
@@ -168,7 +168,7 @@ invalid_signal_body()
 		-o empty \
 		-e inline:"timeout: invalid signal\n" \
 		-s exit:125 \
-		-x timeout --signal=invalid 1 sleep 0
+		timeout --signal=invalid 1 sleep 0
 }
 
 atf_test_case invalid_command
@@ -183,7 +183,7 @@ invalid_command_body()
 		-o empty \
 		-e inline:"timeout: exec(.): Permission denied\n" \
 		-s exit:126 \
-		-x timeout 10 .
+		timeout 10 .
 }
 
 atf_test_case no_such_command
@@ -198,7 +198,7 @@ no_such_command_body()
 		-o empty \
 		-e inline:"timeout: exec(enoexists): No such file or directory\n" \
 		-s exit:127 \
-		-x timeout 10 enoexists
+		timeout 10 enoexists
 }
 
 atf_init_test_cases()


More information about the svn-src-all mailing list