[dpdk-dev] Unit testing DPDK with a container

Jeremy Plsek jplsek at iol.unh.edu
Tue Oct 8 19:34:24 CEST 2019


Hello!

I manage the DPDK Community Lab that runs the performance testing and
compile testing that you may notice from results on Patchwork.

We've been wanting to start putting up unit test results, but would
like to run them in a (mostly unprivileged, rootless) container.

We have it mostly working, but there are a few tests still having issues.

My main question is, does my our setup below have some simple issues
that I've overlooked or are there actual unit test issues that should
be patched in dpdk? (Suggestions are also welcome.)

I've attached the logs and the dockerfiles/scripts to reproduce the
issue. And unfortunately, the results are not the same per machine.
(For example, my results have no fails, just skips and timeouts, but
on our CI[1], it also has fails.)
[1] https://lab.dpdk.org/results/dashboard/results/results-uploads/test_runs/e17d211dc0ea4d10a312e5c466710af8/log_upload_file/2019/10/dpdk_5b5bb56532fd_2019-10-03_21-58-01_NA.zip

Setup:

The current directory (see setup_files.zip):
dpdk # a clean dpdk master git folder
dpdk_unit_test.Dockerfile
dpdk_compile_meson.Dockerfile
compile_meson.sh
unit_test.sh

Setup commands:
sudo groupadd hugetlbfs
sudo usermod -a -G hugetlbfs $USER
sudo chown -R :hugetlbfs /dev/hugepages
sudo chmod g+w /dev/hugepages -R
sudo sh -c "echo 1024 > /proc/sys/vm/nr_hugepages"

Building the images:
docker build -t dpdk_compile_meson -f dpdk_compile_meson.Dockerfile .
docker build -t dpdk_unit_test -f dpdk_unit_test.Dockerfile .

Running the testing:
docker run --rm -it --user $(id -u):$(id -g) -v $(pwd)/dpdk:/dpdk
dpdk_compile_meson
docker run --rm -it --cap-add IPC_LOCK --cap-add NET_RAW --cap-add
NET_ADMIN --cap-add SYS_NICE --user $(id -u):$(getent group hugetlbfs
| cut -d : -f 3) -v $(pwd)/dpdk:/dpdk -v /dev/hugepages:/dev/hugepages
dpdk_unit_test

(This uses Docker, but as you may notice from patchwork, podman is
used for current compile testing. I am unable to get unit testing
working with podman. I will try to get it working at a later date.
Suggestions to get it working are welcome though!)

Thanks!
-- 
Jeremy Plsek
UNH InterOperability Laboratory
-------------- next part --------------
A non-text attachment was scrubbed...
Name: out.zip
Type: application/zip
Size: 121752 bytes
Desc: not available
URL: <http://mails.dpdk.org/archives/dev/attachments/20191008/157aceb5/attachment-0002.zip>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: setup_files.zip
Type: application/zip
Size: 1900 bytes
Desc: not available
URL: <http://mails.dpdk.org/archives/dev/attachments/20191008/157aceb5/attachment-0003.zip>


More information about the dev mailing list