diff mbox

iotests: Resolve test failures caused by hostname

Message ID 1334919024-21978-1-git-send-email-afaerber@suse.de
State New
Headers show

Commit Message

Andreas Färber April 20, 2012, 10:50 a.m. UTC
`hostname -s` may output an errror:
hostname: Name or service not known
This causes all tests to fail for `make check-block`.

Suppress such error messages, letting the tests succeed.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 tests/qemu-iotests/common.config |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Kevin Wolf April 20, 2012, 10:59 a.m. UTC | #1
Am 20.04.2012 12:50, schrieb Andreas Färber:
> `hostname -s` may output an errror:
> hostname: Name or service not known
> This causes all tests to fail for `make check-block`.
> 
> Suppress such error messages, letting the tests succeed.
> 
> Signed-off-by: Andreas Färber <afaerber@suse.de>

Thanks, applied to the block branch.

Kevin
Stefan Weil April 20, 2012, 11:36 a.m. UTC | #2
Am 20.04.2012 12:59, schrieb Kevin Wolf:
> Am 20.04.2012 12:50, schrieb Andreas Färber:
>> `hostname -s` may output an errror:
>> hostname: Name or service not known
>> This causes all tests to fail for `make check-block`.
>>
>> Suppress such error messages, letting the tests succeed.
>>
>> Signed-off-by: Andreas Färber <afaerber@suse.de>
>
> Thanks, applied to the block branch.
>
> Kevin

Do we really need the '-s'? There are versions of hostname
which don't support the '-s' option (for example on MinGW).

Stefan
diff mbox

Patch

diff --git a/tests/qemu-iotests/common.config b/tests/qemu-iotests/common.config
index a220684..df082e7 100644
--- a/tests/qemu-iotests/common.config
+++ b/tests/qemu-iotests/common.config
@@ -36,7 +36,7 @@  export LANG=C
 
 PATH=".:$PATH"
 
-HOST=`hostname -s`
+HOST=`hostname -s 2> /dev/null`
 HOSTOS=`uname -s`
 
 EMAIL=root@localhost    # where auto-qa will send its status messages