A fix is available
APAR status
Closed as program error.
Error description
When creating a test architecture for a class which uses ports, it doesn't compile. The problem is that in TC_at_x_of_class_0 a setter setX() is generated: TC_at_x_of_class_0_setX(TC_at_x_of_class_0* const me, const mystruc* _x) where the data-argument 'const mystruc* _x' conforms to C_CG.Type.In of mystruc, but should be 'mystruc _x' to conform to the way it is called by class_0 (class_0 declares a function pointer to the setter on receiver flowport. Here 'void TC_at_x_of_class_0_setX(TC_at_x_of_class_0* const me, mystruc _x)' would be appropriate): struct class_0_t { RiCReactive ric_reactive; /*#[ ignore */ void (* const x_cb)(void* const,mystruc); void* const x_trg; /*#]*/ int a; /*## attribute a */ int b; /*## attribute b */ mystruc x; /*## attribute x */ /*#[ ignore */ RhpInteger rootState_subState; RhpInteger rootState_active; /*#]*/ }; Besides the compile error at the end of the generated setter, for 'me->x = _x;', which should read 'me->x = *_x;' instead if the signature of the setter was correct, invocation of TC_at_x_of_class_0_setX() with a mystruc Argument instead of an mystruc* argument leads to interpretation of a structure value as pointed (->crash). BTC-ES could fix the setter according to the actual cg for setters, but this would mean to rely on an inconsistency in cg: attribute setter cg does not take C_CG.Type.In into account (set to 'const $type*') but generates a setter with plain value as argument (as if C_CG.Type.In was set to '$type'). A real fix would require a common solution of cg and TestConductor treatment of setters. This occurs for basically every class which uses ports (almost 100% of our classes).
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: * * Rhapsody * **************************************************************** * PROBLEM DESCRIPTION: * * TestConductor: Wrong Rhapsodyâ ™s code generation for test * * components with flowports * **************************************************************** * RECOMMENDATION: * ****************************************************************
Problem conclusion
The generation of test code has been corrected, it now corresponds to Rhapsody CG behavior. Note: It might be necessary to apply "Clean TestPackage" on the test architecture to make sure test code is generated correctly.
Temporary fix
Comments
APAR Information
APAR number
PH03966
Reported component name
TLOGIC RHAPSODY
Reported component ID
5724V74RP
Reported release
830
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2018-10-11
Closed date
2019-04-30
Last modified date
2019-04-30
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
TLOGIC RHAPSODY
Fixed component ID
5724V74RP
Applicable component levels
R830 PSY
UP
[{"Line of Business":{"code":"LOB02","label":"AI Applications"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SS7P9W","label":"Rational Rhapsody"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"830"}]
Document Information
Modified date:
16 September 2021