[P4-dev] make check timeouts today

Mihai Budiu mbudiu at vmware.com
Mon Dec 3 11:47:06 EST 2018


At the very least we should give an error if the wrong version of python is being used.

Mihai

From: P4-dev <p4-dev-bounces at lists.p4.org> On Behalf Of hemant at mnkcg.com
Sent: Monday, December 3, 2018 6:51 AM
To: 'Andy Fingerhut' <andy.fingerhut at gmail.com>
Cc: 'p4-dev' <p4-dev at lists.p4.org>
Subject: Re: [P4-dev] make check timeouts today

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<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopencomputeproject%2FSAI%2Fissues%2F896&data=02%7C01%7Cmbudiu%40vmware.com%7Ce9256d64b98b4844d0c808d6592ed09d%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C636794454940700895&sdata=5y6f%2Fu7NuVwM27R53aDDxVUgpjh081JZimzoBmivm64%3D&reserved=0>

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<mailto:andy.fingerhut at gmail.com>>
Sent: Sunday, December 02, 2018 3:17 PM
To: hemant at mnkcg.com<mailto:hemant at mnkcg.com>
Cc: p4-dev <p4-dev at lists.p4.org<mailto: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<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.p4.org%2Fmailman%2Flistinfo%2Fp4-dev_lists.p4.org&data=02%7C01%7Cmbudiu%40vmware.com%7Ce9256d64b98b4844d0c808d6592ed09d%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C636794454940710900&sdata=N9%2FsFdRyKwSNycb%2FPL7iDqz1%2FGpReLd%2FsI%2BTomycS8k%3D&reserved=0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20181203/63e533b7/attachment-0001.html>


More information about the P4-dev mailing list