Help Needed on Sample Test Project using TITAN [message #1758020] |
Wed, 22 March 2017 18:55 |
Ramakrishna Kommineni Messages: 12 Registered: March 2017 |
Junior Member |
|
|
Hi,
I am planning to have the below Test systems with TITAN installed:
Windows-System1: TItan Installed on Cygwin Acting like DNS Client
Ubuntu-System2: Titan Installed Acting like DNS Server
Test Scenario is attached.
For this I am planning to use the following:
Protocol Module: DNS
Test Port(Transport Layer): TCP
I have created the attached Abstract Test suite DNSClient.ttcn & DNSClient.cfg.
In the same folder I have copied the below files:
TCPasp_PT.hh
TCPasp_PT.cc
DNS_EncDec.cc
Executed the below command to generate Make file:
$ ttcn3_makefilegen -gs DNSClient.ttcn TCPasp_PT.cc DNSClient.cfg
Generating Makefile skeleton...
Makefile skeleton was generated.
When I run command "make dep", I am getting below error:
$ make dep
/home/eirmnp/software/titan/bin/compiler -L DNSClient.ttcn - DNSClient.ttcn
Notify: Parsing TTCN-3 module `DNSClient.ttcn'...
DNSClient.ttcn:17.9-12: error: at or before token `type': syntax error, unexpected TypeDefKeyword, expecting Identifier
DNSClient.ttcn:30.26-29: error: at or before token `runs': syntax error, unexpected RunsKeyword, expecting '('
Notify: Errors found in the input module. Code will not be generated.
Creating dependency file for TCPasp_PT.cc
In file included from TCPasp_PT.cc:34:0:
TCPasp_PT.hh:33:27: fatal error: TCPasp_Types.hh: No such file or directory
compilation terminated.
make: *** No rule to make target 'compile', needed by 'DNSClient.cc'. Stop.
But when I check the link: https://github.com/eclipse/titan.TestPorts.TCPasp/tree/master/src
I am not able to find the TCPasp_Types.hh.
Could you please help me how to get this file? & Is the procedure followed by me to create a test case is correct?
I have attached all files used for this activity.
Thanks in advance.
Regards,
Ramakrishna
[Updated on: Wed, 22 March 2017 18:57] Report message to a moderator
|
|
|
Re: Help Needed on Sample Test Project using TITAN [message #1758021 is a reply to message #1758020] |
Wed, 22 March 2017 19:05 |
|
Hi Ramakrishna,
first of all, are you certain you want to use TCP? DNS communicates over TCP rarely, only in case of long messages if I remember correctly; for ordinary queries, UDP should be used.
secondly, I don't see your Makefile in the package you have attached;
please do a 'make archive' ; this should create a package with all files plus Makefile, and attach it to your response.
BR
Elemer
|
|
|
|
|
|
|
|
|
|
|
Re: Help Needed on Sample Test Project using TITAN [message #1758032 is a reply to message #1758030] |
Wed, 22 March 2017 20:14 |
|
Hi Ramakrishna,
I suggest you proceed step by step:
-first compile the TCP ( or UDP ) test port separately
-do the same with the DNS protocol module
-if both compilations are successful, then put them together and compile them together
-lastly , add your own file and try to compile; all errors should refer now to your file; try to find the reason of error
The package you have sent me is still missing files.
BR
Elemer
|
|
|
Re: Help Needed on Sample Test Project using TITAN [message #1758035 is a reply to message #1758032] |
Wed, 22 March 2017 20:38 |
Ramakrishna Kommineni Messages: 12 Registered: March 2017 |
Junior Member |
|
|
Hi Elemer,
Now to start with a demo I have done the following:
https://github.com/eclipse/titan.ProtocolModules.DNS/tree/master/demo
From this demo, I have copied all the necessary src files from:
1. DNS Protocol
2. UDP Testport
Now when I run make dep, it is successfull:
$ make dep
/home/eirmnp/software/titan/bin/compiler -L DNS_Demo.ttcn DNS_Mapping.ttcn DNS_Types.ttcn UDPasp_PortType.ttcn UDPasp_Types.ttcn - DNS_Demo.ttcn DNS_Mapping.ttcn DNS_Types.ttcn UDPasp_PortType.ttcn UDPasp_Types.ttcn
Notify: Parsing TTCN-3 module `DNS_Demo.ttcn'...
Notify: Parsing TTCN-3 module `DNS_Mapping.ttcn'...
Notify: Parsing TTCN-3 module `DNS_Types.ttcn'...
Notify: Parsing TTCN-3 module `UDPasp_PortType.ttcn'...
Notify: Parsing TTCN-3 module `UDPasp_Types.ttcn'...
Notify: Checking modules...
Notify: Generating code...
Notify: File `DNS_Demo.hh' was generated.
Notify: File `DNS_Demo.cc' was generated.
Notify: File `DNS_Mapping.hh' was generated.
Notify: File `DNS_Mapping.cc' was generated.
Notify: File `DNS_Types.hh' was generated.
Notify: File `DNS_Types.cc' was generated.
Notify: File `UDPasp_PortType.hh' was generated.
Notify: File `UDPasp_PortType.cc' was generated.
Notify: File `UDPasp_Types.hh' was generated.
Notify: File `UDPasp_Types.cc' was generated.
Notify: 10 files were updated.
touch compile
Creating dependency file for UDPasp_Types.cc
Creating dependency file for UDPasp_PortType.cc
Creating dependency file for DNS_Types.cc
Creating dependency file for DNS_Mapping.cc
Creating dependency file for DNS_Demo.cc
Creating dependency file for UDPasp_PT.cc
Creating dependency file for DNS_EncDec.cc
make: Nothing to be done for 'dep'.
Now I modified the Make file TTCN3_LIB = ttcn3-parallel & ran make:
$ make
/home/eirmnp/software/titan/bin/compiler -L DNS_Demo.ttcn DNS_Mapping.ttcn DNS_Types.ttcn UDPasp_PortType.ttcn UDPasp_Types.ttcn - DNS_Demo.ttcn DNS_Mapping.ttcn DNS_Types.ttcn UDPasp_PortType.ttcn UDPasp_Types.ttcn
Notify: Parsing TTCN-3 module `DNS_Demo.ttcn'...
Notify: Parsing TTCN-3 module `DNS_Mapping.ttcn'...
Notify: Parsing TTCN-3 module `DNS_Types.ttcn'...
Notify: Parsing TTCN-3 module `UDPasp_PortType.ttcn'...
Notify: Parsing TTCN-3 module `UDPasp_Types.ttcn'...
Notify: Checking modules...
Notify: Generating code...
Notify: File `DNS_Demo.hh' was generated.
Notify: File `DNS_Demo.cc' was generated.
Notify: File `DNS_Mapping.hh' was generated.
Notify: File `DNS_Mapping.cc' was generated.
Notify: File `DNS_Types.hh' was generated.
Notify: File `DNS_Types.cc' was generated.
Notify: File `UDPasp_PortType.hh' was generated.
Notify: File `UDPasp_PortType.cc' was generated.
Notify: File `UDPasp_Types.hh' was generated.
Notify: File `UDPasp_Types.cc' was generated.
Notify: 10 files were updated.
touch compile
Creating dependency file for UDPasp_Types.cc
Creating dependency file for UDPasp_PortType.cc
Creating dependency file for DNS_Types.cc
Creating dependency file for DNS_Mapping.cc
Creating dependency file for DNS_Demo.cc
Creating dependency file for UDPasp_PT.cc
Creating dependency file for DNS_EncDec.cc
g++ -c -DLINUX -I/home/eirmnp/software/titan/include -Wall -o DNS_Demo.o DNS_Demo.cc
g++ -c -DLINUX -I/home/eirmnp/software/titan/include -Wall -o DNS_Mapping.o DNS_Mapping.cc
g++ -c -DLINUX -I/home/eirmnp/software/titan/include -Wall -o DNS_Types.o DNS_Types.cc
g++ -c -DLINUX -I/home/eirmnp/software/titan/include -Wall -o UDPasp_PortType.o UDPasp_PortType.cc
g++ -c -DLINUX -I/home/eirmnp/software/titan/include -Wall -o UDPasp_Types.o UDPasp_Types.cc
g++ -c -DLINUX -I/home/eirmnp/software/titan/include -Wall -o DNS_EncDec.o DNS_EncDec.cc
g++ -c -DLINUX -I/home/eirmnp/software/titan/include -Wall -o UDPasp_PT.o UDPasp_PT.cc
if g++ -o DNS_Demo DNS_Demo.o DNS_Mapping.o DNS_Types.o UDPasp_PortType.o UDPasp_Types.o DNS_EncDec.o UDPasp_PT.o \
-L/home/eirmnp/software/titan/lib -lttcn3-parallel \
-L/lib -lcrypto \
-L/home/eirmnp/software/titan/lib -lxml2; \
then : ; else /home/eirmnp/software/titan/bin/titanver DNS_Demo.o DNS_Mapping.o DNS_Types.o UDPasp_PortType.o UDPasp_Types.o DNS_EncDec.o UDPasp_PT.o; exit 1; fi
Now a Executable was created.
But I am not able to understand how to run this:
$ ./DNS_Demo 10.111.47.253 9999
TTCN-3 Host Controller (parallel mode), version CRL 113 200/6 R1A
Connecting to MC failed. MC address: 10.111.47.253:9999 Connection refused
Could you please help. So that once it is run, I will run nslookup from another host. If it is successfull I will start looking into this example along with core language standard to improve my TTCN-3 knowledge.
Thanks in advance.
Regards,
Ramakrishna
[Updated on: Wed, 22 March 2017 20:50] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04800 seconds