TTCN

From eLinux.org
Revision as of 08:46, 7 January 2017 by Mjosenhans (talk | contribs) (Installation instructions for Eclipse Titan with SocketCAN)
Jump to: navigation, search

TTCN support for CAN, CAN_FD, SAE J1939 and ISOTP:

TTCN is well suited for testing complex CAN and ISOTP/ car diagnostics applications.

Resources:

Forum (Background informtion is found here): https://www.eclipse.org/forums/index.php/t/1074584/


Installation:

  • Ubuntu / Debian (installation of the dependencies, currently not the software itself):
  apt install eclipse-titan 
   git clone git://git.eclipse.org/gitroot/titan/titan.TestPorts.SocketCANasp.git 
   cd titan.TestPorts.SocketCANasp
   Documentation is found in: doc/README.md
   cd demo
   make
    • Testing the Installation
      • execute: "demo/initscript.sh"
      • run a test case:
   ttcn3_start SocketCAN SocketCAN.cfg <testcasefilename.testcasename> 

where <testcasefilename.testcasename> is any of the following:

   SocketCAN_RAW_test.tc_can_raw_send_and_receive_frame
   SocketCAN_RAW_test.tc_can_raw_setsockopt_CAN_RAW_FILTER
   SocketCAN_RAW_test.tc_can_raw_setsockopt_CAN_RAW_ERR_FILTER
   SocketCAN_RAW_test.tc_can_raw_setsockopt_CAN_RAW_LOOPBACK
   SocketCAN_RAW_test.tc_can_raw_setsockopt_CAN_RAW_RECV_OWN_MSGS
   SocketCAN_RAW_test.tc_can_raw_setsockopt_CAN_RAW_FD_FRAMES
   SocketCAN_RAW_test.tc_can_raw_setsockopt_CAN_RAW_JOIN_FILTERS

Note: On some kernels e.g. Ubuntu 16.10 the following testcase seems to crash the whole kernel. This is a regression in later kernels or in later titan versions and needs to be investigated:

   SocketCAN_BCM_test.tc_can_bcm_TX_SETUP_TX_DELETE
      • alternatively run a sequence of test cases:

Remove the line "SocketCAN_BCM_test.tc_can_bcm_TX_SETUP_TX_DELETE" from the execution section of the file "SocketCAN.cfg" to make sure the crashing test case is not started. Then:

    ttcn3_start SocketCAN SocketCAN.cfg
  • Eclipse GUI Installation (optional, mid January new version is expected):
    • Installation instructions are found on the Titan Download Page in the "Titan documentation package" in the document "Eclipse_installationguide.pdf".