[libvirt PATCH 6/6] virnetsockettest: refactor checkProtocols