TPF_TC_ECB_DONE: Notify automated test framework test case created ECB has finished processing
This C/C++ macro indicates that a test case created ECB has finished processing.
Last updated
Added for PUT15.
Format
maketpf_env += idevops
#include <tpf/c_devops.h>
void TPF_TC_ECB_DONE();
Normal return
None.
Error return
If a test case handle is not set, the DE1045 system error is issued and the ECB exits.
Programming considerations
- Do not use this macro in production applications.
- At runtime, each TPF_TC_NEW_ECB macro call must be paired with a TPF_TC_ECB_DONE macro. That is, there must be exactly one invocation of the TPF_TC_ECB_DONE macro for each invocation of the TPF_TC_NEW_ECB macro. Otherwise, a timeout issue occurs.
- To indicate that a test case is failed, call the TPF_TC_ERROR macro before calling the TPF_TC_ECB_DONE macro.
- When you call the TPF_TC_ECB_DONE macro, the test case handle is cleared. Therefore, this macro must be the last test case macro that is called for the current ECB.
Examples
The following example indicates that the current ECB has completed processing to the z/TPF automated test framework before the ECB exits.
TPF_TESTCASE(hand1,"test case handle") { // TEST CASE STARTS HERE
unsigned int handle = TPF_TC_GET_HANDLE();
TPF_TC_NEW_ECB(); // this assumes the cretc will work, otherwise
// the test case will time out
cretc(CRETC_SECONDS, QZZ1, 2, &handle);
return; // return from test case
}
extern "C" void QZZ1() { // TEST CASE CONTINUES HERE
unsigned int handle = *(unsigned int *)&ecbptr()->ebw000;
TPF_TC_SET_HANDLE(handle);
TPF_TC_INFO("entered ecb 2");
TPF_TC_ECB_DONE(); // mark ECB 2 as finished
// no more TPF_TC macros can be used at this point
}