[P4-dev] make check timeouts today

hemant at mnkcg.com hemant at mnkcg.com
Mon Dec 3 09:50:57 EST 2018


Andy,

 

Thanks for replying.  

 

Mea culpa.  I had upgraded my machine to using Python3 because flexsai/p4 uses Python3  P4c test tools use Python2.7.  Once I downgraded the machine’s Python to 2.7, my problem went away.  Also, I don’t download bmv2.  I just download p4c and use ‘make check’ to test if any code changes to p4c pass testing.  

 

A question comes up.  

 

If flexsai/p4 uses Python 3, maybe someday p4c can also move to Python 3.   Or maybe flexsai/p4 can be downgraded to supporting only Python2.7.   The current state of flexsai/p4 is that if my machine only has python 2.7, the code fails to compile.  When I added python3, the code still had issues.  I changed the code and made it build and run.  I filed an Issue against flexsai/p4:  https://github.com/opencomputeproject/SAI/issues/896

 

I think, similar to how p4c and P4Runtime are in lock-step for common versions of protobuf etc., flexsai/p4 should also comply. 

 

Hemant

 

From: Andy Fingerhut <andy.fingerhut at gmail.com> 
Sent: Sunday, December 02, 2018 3:17 PM
To: hemant at mnkcg.com
Cc: p4-dev <p4-dev at lists.p4.org>
Subject: Re: [P4-dev] make check timeouts today

 

I updated to latest p4c and behavioral-model, and these are the only tests I saw which took 10+ seconds:

 

 12/1173 Test  #15: bmv2/testdata/p4_14_samples/parser_value_set2.p4 ..............................   Passed   13.47 sec

 16/1173 Test   #1: cpplint .......................................................................   Passed   29.61 sec

 26/1173 Test  #14: bmv2/testdata/p4_14_samples/switch_20160226/switch.p4 .........................   Passed   47.49 sec

 41/1173 Test  #13: bmv2/testdata/p4_14_samples/switch_20160512/switch.p4 .........................   Passed   62.92 sec

994/1173 Test #981: p14_to_16/testdata/p4_14_samples/port_vlan_mapping.p4 .........................   Passed   12.53 sec

1021/1173 Test #1007: p14_to_16/testdata/p4_14_samples/header-stack-ops-bmv2.p4 .....................   Passed   14.94 sec

1072/1173 Test #1061: p14_to_16/testdata/p4_14_samples/08-FullTPHV3.p4 ..............................   Passed   12.57 sec

1101/1173 Test #1093: p14_to_16/testdata/p4_14_samples/05-FullTPHV.p4 ...............................   Passed   10.02 sec

1172/1173 Test #1157: p14_to_16/testdata/p4_14_samples/switch_20160226/switch.p4 ....................   Passed   85.50 sec

1173/1173 Test #1156: p14_to_16/testdata/p4_14_samples/switch_20160512/switch.p4 ....................   Passed  109.28 sec

 

Anything test with '-bmv2.p4' in the source file name runs not only the p4c compiler, but then runs simple_switch on the resulting BMv2 JSON file, sometimes with packets sent in as directed by a test file ending with the name suffix '.stf'.  Most of those are very quick, as evidenced by only one of them showing up in my 'long duration list' above.

 

Maybe try deleting and rebuilding/reinstalling both behavioral-model and p4c on your machine, if you haven't already?

 

If you have, is this reproducible for you?

 

There are also ways to run only one of the tests in isolation, which might help you discover why one is misbehaving.  For the 'array-copy-bmv2.p4' test you mentioned, try running this command from your 'p4c/build' directory:

 

% find .|grep array-copy-bmv2

./bmv2/testdata/p4_16_samples/array-copy-bmv2.p4.obs

./bmv2/testdata/p4_16_samples/array-copy-bmv2.p4.test

./bmv2/testdata/p4_16_samples/array-copy-bmv2.json

./p4/testdata/p4_16_samples/array-copy-bmv2.p4.test

 

Any files whose names end with '.p4.test' are bash shell scripts, which you can look at and/or run.  For example, to run the bmv2 one above:

 

% ./bmv2/testdata/p4_16_samples/array-copy-bmv2.p4.test 

Check for  /home/jafinger/p4c/testdata/p4_16_samples/array-copy-bmv2.stf

Calling target program-options parser

Adding interface pcap0 as port 0 (files)

Obtaining JSON from switch...

Done

Control utility for runtime P4 table manipulation

RuntimeCmd: 

 

On my system, that last command took under 5 seconds.  On yours, it may be different, and running that command may make it clearer why (hopefully).

 

Andy

 

On Sun, Dec 2, 2018 at 9:35 AM <hemant at mnkcg.com <mailto:hemant at mnkcg.com> > wrote:

Anyone else noticed ‘make check’ with several test cases with “Timeout” today?  An example from my run is included below.

 

207/1186 Test #207: bmv2/testdata/p4_16_samples/array-copy-bmv2.p4 ................................***

Timeout 977.36 sec

 

Hemant

 

_______________________________________________
P4-dev mailing list
P4-dev at lists.p4.org <mailto:P4-dev at lists.p4.org> 
http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20181203/97ce8584/attachment-0001.html>


More information about the P4-dev mailing list