pdtest: Only return non-zero code upon errors.