Hi All,

After downloading the can-tests sources from:
http://svn.berlios.de/wsvn/socketcan/trunk/test/?rev=877&sc=1

I ran it on my machine running the following kernel and headers:
# uname -a
Linux 2.6.27.15-2-default #1 SMP 2009-02-09 15:38:31 +0100 x86_64 x86_64
x86_64 GNU/Linux
# rpm -qa | grep header
linux-kernel-headers-2.6.27-2.18

The following config options are set in the running kernel:
# grep -i can /boot/config-2.6.27.15-2-default 
CONFIG_CAN=m
CONFIG_CAN_RAW=m
CONFIG_CAN_BCM=m
# CAN Device Drivers
CONFIG_CAN_VCAN=m
# CONFIG_CAN_DEBUG_DEVICES is not set
# CONFIG_SCSI_SCAN_ASYNC is not set
CONFIG_SCSI_WAIT_SCAN=m
# ATSC (North American/Korean Terrestrial/Cable DTV) frontends

/sbin/ifconfig provides below:
# /sbin/ifconfig 
eth0      Link encap:Ethernet  HWaddr 00:11:25:C4:62:9C  
          inet addr:9.124.111.117  Bcast:9.124.111.255
Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:21966 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15866 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1691535 (1.6 Mb)  TX bytes:2881558 (2.7 Mb)
          Interrupt:26 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:400 (400.0 b)  TX bytes:400 (400.0 b)

vcan0     Link encap:UNSPEC  HWaddr
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          UP RUNNING NOARP  MTU:16  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

Now when i run:
./run_ltp-can_tests.sh

script (created inside the tarball), it gives me the following error:

socket: Protocol not supported
socket: Protocol not supported

Since the latest kernel is installed with the headers, the build works
fine. Is there any other dependent config option(s) needs to be set to
make this work ??

Regards--
Subrata

On Mon, 2009-02-09 at 09:41 +0100, Oliver Hartkopp wrote:
> Hi Robert,
> 
> is your offer from 29.11.08 to look at this still valid?
> 
> Regards,
> Oliver
> 
> Subrata Modak wrote:
> > Thanks Oliver for writing on this.
> >
> > On Wed, 2009-01-28 at 13:54 +0100, Oliver Hartkopp wrote:
> >   
> >> Subrata Modak wrote:
> >>     
> >>> On Tue, 2009-01-27 at 16:26 +0100, Salvatore Nappi wrote:
> >>>   
> >>>       
> >>>> Hi All,
> >>>> I read on the http://ltp.sourceforge.net/wiki/ link that will be added
> >>>> the Controller Area Network to LTP test within 2008. I don't find
> >>>> other information about this integration!!! Could you tell me if this
> >>>> test (CAN) has been introduced in the LTP Framework test, please? 
> >>>> If the answer is yes, could you indicate me, please, where I can find
> >>>> the ltp framework file contained CAN tests? Thank you very much!! 
> >>>>     
> >>>>         
> >>> You have seen the correct thing. However, we are lacking volunteers who
> >>> can integrate the same to LTP framework. The tests are existing.
> >>> Somebody needs to test them, analyze and find out the best way to
> >>> automate them to get into LTP. Can you do that for us ?
> >>>
> >>>   
> >>>       
> >> Hi all,
> >>
> >> while fixing an issue inside the CAN core filters for 2.6.28:
> >>
> >> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=d253eee20195b25e298bf162a6e72f14bf4803e5
> >> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=f706644d55f90e8306d87060168fef33804d6dd9
> >>
> >> i created this test tool to check the filters:
> >>
> >> http://svn.berlios.de/wsvn/socketcan/trunk/test/?rev=877&sc=1
> >>     
> >
> > Here are my visualizations how this integration can be achieved:
> >
> > 1) Mention about the kernel config options, needed to enable CAN here:
> > http://ltp.cvs.sourceforge.net/viewvc/ltp/ltp/README
> > This will make sure that users are aware of the dependencies.
> >
> > 2) We can create these directories:
> > http://ltp.cvs.sourceforge.net/viewvc/ltp/ltp/testcases/network/can/
> > http://ltp.cvs.sourceforge.net/viewvc/ltp/ltp/testcases/network/can/filter-tests/
> > http://ltp.cvs.sourceforge.net/viewvc/ltp/ltp/testcases/network/can/functional-tests/
> > etc,
> >
> > and put the Makefile(s), and test source code in them.
> >
> > If you feel that the tests source code can be built on any machine
> > without any dependency(s), then make a similar entry into:
> > http://ltp.cvs.sourceforge.net/viewvc/ltp/ltp/testcases/network/Makefile
> >
> > This will build them when other tests in LTP are built, and these has to
> > get installed under ltp/testcases/bin/ like any other test cases are
> > done (During execution, the binaries are picked up from these directory
> > alone). If you feel that CAN tests has dependencies to build, then
> > create a corresponding:
> > http://ltp.cvs.sourceforge.net/viewvc/ltp/ltp/m4/ltp-can.m4 file for it.
> > This will avoid build failures on other systems, while doing perfect
> > build/install on systems, where pre-requisites are available.
> >
> >   
> >> This test checks a complete CAN communication chain using
> >>
> >> - the PF_CAN core and it's filters
> >> - the CAN RAW socket and it's sockopts
> >> - the virtual CAN interfaces
> >>
> >> I works like this:
> >>
> >> 1. create a virtual CAN interface 'vcan0'
> >>  1a. modprobe -f vcan
> >>  1b. ip link add dev vcan0 type vcan
> >>  1c. ifconfig vcan0 up
> >>
> >> 2. run 'tst-filter-server > output' (on a separate terminal or in the 
> >> background)
> >>
> >> 3. run 'tst-filter-master'
> >>
> >> 4. compare the output (of tst-filter-server) with 
> >> 'tst-filter-server.result'
> >>
> >>     
> >
> > 3) All steps required for setup before the actual tests are executed
> > should be part of a script say:
> > http://ltp.cvs.sourceforge.net/viewvc/ltp/ltp/testcases/network/can/filter-tests/run_can_filter_tests.sh
> >
> > This should be able to probe:
> >     1) whether the module exists or not
> >     2) If yes, then proceed to other steps of creating a virtual interface,
> >     3) Exit with proper error handling instruction(s),
> >     4) Then call the remaining 'tst-filter-server' & 'tst-filter-master' to
> > execute the test.
> >     5) Compare and inform PASS/FAIL
> >     6) Exit the script.
> >
> > http://ltp.cvs.sourceforge.net/viewvc/ltp/ltp/testcases/network/can/filter-tests/Makefile
> > should also install the script 'run_can_filter_tests.sh' under
> > ltp/testcases/bin/
> >
> > 4) Create a command file under:
> > http://ltp.cvs.sourceforge.net/viewvc/ltp/ltp/runtest/control-area-network
> >
> > Which will probably have this entry:
> > CONTROL_AREA_NETWORK_FILTER_TESTS01 run_can_filter_tests.sh
> >
> > So, when users wants to execute this tests, after executing the
> > following from LTPROOT directory
> >
> > make autotools
> > ./configure
> > make
> > make install
> >
> > he/she executes the following:
> > ./runltp -f control-area-network
> >
> > This automatically picks up control-area-network file from ltp/tuntest/
> > directory:
> > 1) Loads and executes run_can_filter_tests.sh script(or binary)
> > which finally makes the test to execute.
> >
> > Id somebody can work on the basic patch above, i can then work more on
> > making it a little bit LTP specific. And then you can keep updating us
> > with your latest filter patches, whenever they are available.
> >
> > Regards--
> > Subrata
> >
> >   
> >> If it's ok then it's fine.
> >>
> >> If you are able to bring this filter test into LTP shape this would be 
> >> perfectly fine!
> >>
> >> If there's anything missing in this description or if i can help you in 
> >> CAN specific questions, please let me know.
> >> Btw. in linux/Documentation/networking/can.txt is a good and up-to-date 
> >> documentation.
> >>
> >> All the stuff on the BerliOS SocketCAN SVN is GPL so you can use it 
> >> under this license:
> >> http://developer.berlios.de/svn/?group_id=6475
> >>
> >> Thanks & best regards,
> >> Oliver
> >>
> >>     
> >
> >
> >   
> 

Attachment: can.tgz
Description: application/compressed-tar

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to