http://bugs.winehq.org/show_bug.cgi?id=12083
Summary: ok() test doesn't support nested calls Product: Wine Version: CVS/GIT Platform: All OS/Version: other Status: UNCONFIRMED Severity: minor Priority: P4 Component: testcases AssignedTo: wine-bugs@winehq.org ReportedBy: mmoss@google.com
When ok() (wine/test.h) is used recursively, the reported filename and line numbers don't reflect the location in the code where the test actually failed. For example, in dlls/kernel32/tests/change.c, the ok(FinishNotificationThread(thread), ...) calls will report a line number inside FinishNotificationThread(), where ok() is also used. This is because the tls_data structure stores only a single filename and line number value, and every call to ok() updates them to the "current" values.
Is it erroneous for test code to recursively call ok() (a quick test indicates that this happens hundreds of times throughout Wine's tests), or should ok() chain these values to handle recursive calls?