DevOps Automation

 View Only
  • 1.  How test stubs like 'memcpy' having parameters of type const

    Posted Mon April 26, 2021 01:41 PM

    i am testing memcpy '#void* memcpy(void * _in dest , const void * _in src , size_t _in p3);' .

    Which is having 'const void * sre' as parameter, when build in rtrt it is throwing error as unable to modify due to const.

    Please let me know how to test such stubs if you have any idea.

    Thanks in advance,

    Lokesh.


    #RationalTestRealTime
    #SupportMigration
    #Support


  • 2.  RE: How test stubs like 'memcpy' having parameters of type const
    Best Answer

    Posted Tue May 04, 2021 09:55 AM

    Hi,

    The const parameter ca

    https://help.blueproddoc.com/rationaltest/rationaltestrealtime/8.3.0/com.ibm.rational.testrt.studio.doc/topics/cctconstparams.html?hl=const


    #Support
    #RationalTestRealTime
    #SupportMigration


  • 3.  RE: How test stubs like 'memcpy' having parameters of type const
    Best Answer

    Posted Tue May 04, 2021 10:00 AM

    Hi,

    The const parameter can be workarounded using prefix

    See documentation

    https://help.blueproddoc.com/rationaltest/rationaltestrealtime/8.3.0/com.ibm.rational.testrt.studio.doc/topics/cctconstparams.html?hl=const


    However if you stub memcpy as the "memcpy" function is used by the TDP. Therefore the runtime compilation will fail.

    It is defined in "Library Settings > Environmental constraints > memcpy".

    If you want to stub this function you will need to pass this function into RTRT_USR and to code the function.


    #SupportMigration
    #Support
    #RationalTestRealTime