]> git.proxmox.com Git - mirror_ovs.git/commitdiff
tests: Better document OVS_WAIT_UNTIL, OVS_WAIT_WHILE macros.
authorBen Pfaff <blp@ovn.org>
Wed, 4 Dec 2019 23:06:09 +0000 (15:06 -0800)
committerWilliam Tu <u9012063@gmail.com>
Thu, 12 Dec 2019 18:16:12 +0000 (10:16 -0800)
Signed-off-by: Ben Pfaff <blp@ovn.org>
Signed-off-by: William Tu <u9012063@gmail.com>
tests/ovs-macros.at

index d2239e38656f04115ee8be6d221a083b6c6c7f4d..fee50901543e4dcd6b836112fb526943556f460a 100644 (file)
@@ -252,21 +252,19 @@ ovs_wait_failed () {
 ovs_wait "AS_ESCAPE([$3])" "AS_ESCAPE([$4])"
 ])
 
-dnl OVS_WAIT_UNTIL(COMMAND)
+dnl OVS_WAIT_UNTIL(COMMAND, [IF-FAILED])
 dnl
-dnl Executes shell COMMAND in a loop until it returns
-dnl zero return code.  If COMMAND did not return
-dnl zero code within reasonable time limit, then
-dnl the test fails.
+dnl Executes shell COMMAND in a loop until it returns zero.  If COMMAND does
+dnl not return zero within a reasonable time limit, executes the commands
+dnl in IF-FAILED (if provided) and fails the test.
 m4_define([OVS_WAIT_UNTIL],
   [OVS_WAIT([$1], [$2], [AT_LINE], [until $1])])
 
-dnl OVS_WAIT_WHILE(COMMAND)
+dnl OVS_WAIT_WHILE(COMMAND, [IF-FAILED])
 dnl
-dnl Executes shell COMMAND in a loop until it returns
-dnl non-zero return code.  If COMMAND did not return
-dnl non-zero code within reasonable time limit, then
-dnl the test fails.
+dnl Executes shell COMMAND in a loop until it returns nonzero.  If COMMAND does
+dnl not return nonzero within a reasonable time limit, executes the commands
+dnl in IF-FAILED (if provided) and fails the test.
 m4_define([OVS_WAIT_WHILE],
   [OVS_WAIT([if $1; then return 1; else return 0; fi], [$2],
             [AT_LINE], [while $1])])