[PATCH RESEND] selftests: gpio: correctly check the type of /dev/gpiochipX