Bug #80077 [NEW]: getmxrr test bug

From: Date: Tue, 08 Sep 2020 07:54:30 +0000
Subject: Bug #80077 [NEW]: getmxrr test bug
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-228937@lists.php.net to get a copy of this message
From: rainer dot jung at kippdata dot de Operating system: Any PHP version: 7.4.10 Package: *Network Functions Bug Type: Bug Bug description:getmxrr test bug Description: ------------ Test file ext/standard/tests/network/getmxrr.phpt was improved recently to also contain negative tests. See https://github.com/php/php-src/commit/a06eed0c0ec03bdbb0f97aede393b5c687041d88 for the change in the main branch. The domain names passed to getmxrr() do not contain a trailing dot. DNS lookups which do not find records will (depending on the local resolver config) try again by adding the local domain to the end of the searched host/domain. In many environments there's an mx record for any subdomain of the local domain and the MX query will return a hit. But the test expects no hit. So the test fails when checking that "qa.php.net" does not have an MX record in DNS. In our local environment the resolver falls back to also check qa.php.net.kippdata.de which does have an MX record. Using "qa.php.net." instead of "qa.php.net" should fix this for everyone. Suggested trivial change for test improvement: --- ext/standard/tests/network/getmxrr.phpt 2020-09-01 11:45:05.000000000 +0000 +++ ext/standard/tests/network/getmxrr.phpt 2020-09-08 09:51:14.436750929 +0000 @@ -11,9 +11,9 @@ --FILE-- <?php $domains = array( - 'mx1.tests.php.net', - 'mx2.tests.php.net', - 'qa.php.net', + 'mx1.tests.php.net.', + 'mx2.tests.php.net.', + 'qa.php.net.', ); foreach ($domains as $domain) { $result = getmxrr($domain, $hosts, $weights); -- Edit bug report at https://bugs.php.net/bug.php?id=80077&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=80077&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=80077&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=80077&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=80077&r=needscript Try newer version: https://bugs.php.net/fix.php?id=80077&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=80077&r=support Expected behavior: https://bugs.php.net/fix.php?id=80077&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=80077&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=80077&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=80077&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=80077&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=80077&r=dst IIS Stability: https://bugs.php.net/fix.php?id=80077&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=80077&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=80077&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=80077&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=80077&r=mysqlcfg

« previous php.bugs (#228937) next »