etherdev: Fix sparse error, make test usable by other functions