test: fix -Wsign-compare warnings

Signed-off-by: Loic Dachary <loic@dachary.org>
Merge pull request #1988 from dachary/wip-warnings

test: fix -Wsign-compare warnings

Reviewed-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>