HomeFreeBSD

Upgrade (scapy) py2 tests to work on py3.

Description

Upgrade (scapy) py2 tests to work on py3.

In order to move python2 out of the test framework to avoid py2 vs. py3
confusions upgrade the remaining test cases using scapy to work with py3.
That means only one version of scapy needs to be installed in the CI system.
It also gives a path forward for testing i386 issues observed in the CI
system with some of these tests.

Fixes are:

  • Use default python from environment (which is 3.x these days).
  • properly ident some lines as common for the rest of the file to avoid errors.
  • cast the calculated offset to an int as the division result is considered a float which is not accepted input.
  • when comparing payload to a magic number make sure we always add the payload properly to the packet and do not try to compare string in the result but convert the data payload back into an integer.
  • fix print formating.

Discussed with: lwhsu, kp (taking it off his todo :)
MFC after: 2 weeks

Details

Committed
bzOct 26 2019, 9:19 PM
Parents
rS354120: Commit missing file from r354116
Branches
Unknown
Tags
Unknown