kwin: do not test canonical name if getaddrinfo() fails

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-05-23 02:46:55 +03:00
parent 96ecc857aa
commit dd4dfe1848

View file

@ -104,11 +104,13 @@ void TestClientMachine::hostName_data()
QTest::newRow("ostname") << cutted << cutted << false;
QByteArray domain("random.name.not.exist.tld");
QTest::newRow("domain") << domain << domain << false;
QTest::newRow("fqdn") << m_fqdn << m_fqdn << true;
QTest::newRow("FQDN") << m_fqdn.toUpper() << m_fqdn.toUpper() << true;
cutted = m_fqdn;
cutted.remove(0, 1);
QTest::newRow("qdn") << cutted << cutted << false;
if (!m_fqdn.isEmpty()) {
QTest::newRow("fqdn") << m_fqdn << m_fqdn << true;
QTest::newRow("FQDN") << m_fqdn.toUpper() << m_fqdn.toUpper() << true;
cutted = m_fqdn;
cutted.remove(0, 1);
QTest::newRow("qdn") << cutted << cutted << false;
}
}
void TestClientMachine::hostName()