alibaba-cloud: Make the test more robust
authorRichard W.M. Jones <rjones@redhat.com>
Wed, 3 Aug 2022 17:37:23 +0000 (17:37 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Wed, 3 Aug 2022 17:43:02 +0000 (18:43 +0100)
commit26b2c9c5156e85a4d7b566c22cb8f13c741e3530
treebf7cf21faaf4ad534646366ce94e3fabb54aa9bf
parentb0a251fa6cfc5ab2a03dc43f5f006eebebc01513
alibaba-cloud: Make the test more robust

This test worked by trying to make an HTTP connection to a path under
100.100.100.200, which if successful would indicate that it's an
Alibaba cloud instance.  We only try the connection if SM-BIOS
information indicates the hardware OEM is Alibaba.

However 'make check' would hang if 100.100.100.200 doesn't immediately
reject the connection.  I found that GCE is such an environment where
connecting to this address would hang rather than reject.  GCE does
not have Alibaba hardware of course, but when doing 'make check' we
fake dmidecode data.

Make the test more robust by only trying to connect when we know we're
not in 'make check'.

Fixes: commit b7cc3d93a613ef6d0ac5ccd6e32cc3d66e057243
virt-what.in