Next: , Previous: , Up: Core Internal Procedures   [Contents][Index]


warning procedure

warning Procedure

Declares detection of a minor error in the test case itself. warning writes in the log files a message beginning with WARNING, appending the argument string. Use warning rather than perror for cases (such as communication failure to be followed by a retry) where the test case can recover from the error. If the optional number is supplied, then this is used to set the internal count of warnings to that value.

As a side effect, warning_threshold or more calls to warning in a single test case also changes the effect of the next pass or fail command: the test outcome becomes UNRESOLVED since an automatic PASS or FAIL may not be trustworthy after many warnings. If the optional numeric value is 0, then there are no further side effects to calling this function, and the following test outcome doesn’t become UNRESOLVED. This can be used for errors with no known side effects.

warning messsage number

message

The warning message.

number

The optional number to set the error counter. This is only used to fake out the counter when using the xfail procedure to control when it flips the output over to UNRESOLVED state.