Skip to content

Commit

Permalink
Small fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
fruffy committed Jun 16, 2023
1 parent b36a3fe commit 137f7d1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
6 changes: 4 additions & 2 deletions backends/bmv2/run-bmv2-ptf-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,11 @@ def run_ptf(self, grpc_port: int, json_name: Path, info_name: Path) -> int:
if returncode != testutils.SUCCESS:
return returncode
test_params = f"grpcaddr='0.0.0.0:{grpc_port}';p4info='{info_name}';config='{json_name}';"
tmp = "{0-8}"
# TODO: There is currently a bug where we can not support more than 344 ports at once.
# The nanomsg test back end simply hangs, the reason is unclear.
port_range = "0-50"
run_ptf_cmd = (
f"ptf --platform nn --device-socket 0-{tmp}@ipc://{self.options.testdir}/"
f"ptf --platform nn --device-socket 0-{{{port_range}}}@ipc://{self.options.testdir}/"
f"bmv2_packets_1.ipc --pypath {pypath} "
f"--log-file {self.options.testdir.joinpath('ptf.log')}"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,10 @@ p4tools_add_xfail_reason(
# These are failures in P4Testgen that need to be fixed.
####################################################################################################

p4tools_add_xfail_reason(
"testgen-p4c-bmv2"
"Computations are not supported in update_checksum"
)

p4tools_add_xfail_reason(
"testgen-p4c-bmv2"
"Cast failed"
# push front can not handled tainted header validity.
# push front can not handle tainted header validity.
header-stack-ops-bmv2.p4
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ TestBackEnd::TestInfo Bmv2TestBackend::produceTestInfo(
}

const TestSpec *Bmv2TestBackend::createTestSpec(const ExecutionState *executionState,
const Model *completedModel, const TestInfo &testInfo) {
const Model *completedModel,
const TestInfo &testInfo) {
// Create a testSpec.
TestSpec *testSpec = nullptr;

Expand Down

0 comments on commit 137f7d1

Please sign in to comment.