app/testpmd: add function to check port stopped