Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run test cases of tests-1.3 in OFTest #181

Open
AshaSinghP opened this issue May 20, 2015 · 2 comments
Open

How to run test cases of tests-1.3 in OFTest #181

AshaSinghP opened this issue May 20, 2015 · 2 comments

Comments

@AshaSinghP
Copy link

Hi,

I want to run openflow 1.3 test cases given in tests-1.3 folder of oftest.
I am using ofsoftswitch13 for this purpose.
I run the test case basic.Echo in file tests-1.3 using this ./oft basic.Echo --test-dir=tests-1.3 --port=6633 command and it works fine.
root@infmy10527:/home/user/a/oftest# ./oft basic.Echo --test-dir=tests-1.3 --port=6633
WARNING: No route found for IPv6 destination :: (no default route?)
basic.Echo ...ok


Ran 1 test in 1.425s

OK

but when I run some other test case it gives error,
root@infmy10527:/home/user/a/oftest#./oft basic.PacketInMiss --test-dir=tests-1.3 --port=6633
WARNING: No route found for IPv6 destination :: (no default route?)
basic.PacketInMiss ... ERROR

ERROR: basic.PacketInMiss

Traceback (most recent call last):
File "tests-1.3/basic.py", line 248, in runTest
ofp.instruction.apply_actions(
AttributeError: 'module' object has no attribute 'instruction'


Ran 1 test in 4.391s

I run the test case using following command
root@infmy10527:/home/user/a/oftest# ./oft basic.Echo --of-version=1.3 --test-dir=tests-1.3 --port=6633
WARNING: No route found for IPv6 destination :: (no default route?)
basic.Echo ... ERROR

ERROR: basic.Echo

Traceback (most recent call last):
File "/home/user/a/oftest/src/python/oftest/base_tests.py", line 59, in setUp
"Did not complete features_request for handshake")
File "/home/user/a/oftest/src/python/oftest/base_tests.py", line 97, in assertTrue
unittest.TestCase.assertTrue(self, cond, msg)
AssertionError: Did not complete features_request for handshake


Ran 1 test in 5.440s

FAILED (errors=1)

when I do the same with --of-version=1.0 instead of --of-version=1.3 it works fine.
root@infmy10527:/home/user/a/oftest# ./oft basic.Echo --of-version=1.0 --test-dir=tests-1.3 --port=6633
WARNING: No route found for IPv6 destination :: (no default route?)
basic.Echo ... tests-1.3
ok


Ran 1 test in 1.425s

OK

I want all openflow 1.3 test cases to run without any error, can anyone help me out with this.

Thanks,
Asha

@jonstout
Copy link
Contributor

Be sure to use the --of-version param to specify if you're running a v1.3 or v1.0. By specifying the version you run you tell oftest which openflow packet lib to load; By default it loads v1.0.

Based on the output you've included it looks like your switch may be configured to run v1.0.

@AshaSinghP
Copy link
Author

I am using a virtual switch(cpqd ofsoftswitch) which is configured to work with openflow 1.3.
OFtest works fine when port number is changed from --port=6633 to --port= 6653.
Thanks for the reply .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants