Skip to content

Commit

Permalink
Merge pull request #884 from Luap99/perf-fix
Browse files Browse the repository at this point in the history
perf-netavark: fix missing --config + add fw driver arg
  • Loading branch information
Luap99 authored Apr 4, 2024
2 parents ad066d4 + 468f885 commit 8278f44
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion perf-netavark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,16 @@ trap cleanup EXIT

function cleanup() {
kill -9 $netnspid
rm -rf $TMP_CONFIG
}

TMP_CONFIG=$(mktemp -d)
unshare -n sleep 100 &
netnspid=$!

unshare -n perf stat $NETAVARK -f ./test/testfiles/simplebridge.json setup /proc/$netnspid/ns/net
# first arg is the fw driver
if [ -n "$1" ]; then
export NETAVARK_FW="$1"
fi

unshare -n perf stat $NETAVARK -f ./test/testfiles/simplebridge.json --config $TMP_CONFIG setup /proc/$netnspid/ns/net

0 comments on commit 8278f44

Please sign in to comment.