diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-05-31 12:38:49 +0100 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2024-06-24 06:46:52 -0700 |
commit | bc322a184da1352e2a977850cf6c44e8bcfdac0d (patch) | |
tree | 38bda4805b88c65783507db3bad4bfbf63dbfdc9 | |
parent | d2d129fabcf3028902bf0a171b12878e3a795e5b (diff) | |
download | poky-bc322a184da1352e2a977850cf6c44e8bcfdac0d.tar.gz |
bitbake: tests/fetch: Tweak to work on Fedora40
On Fedora40, "localhost" sometimes resolves to ::1 and sometimes to 127.0.0.1
and python only binds to one of the addresses, leading to test failures.
Use 127.0.0.1 explicitly to avoid problems of the name resolution, we're trying
to test things other than the host networking.
(Bitbake rev: 5fa596b3f2e49fbd144347b9800c76de72a29e28)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 9adc6da42618f41bf0d6b558d62b2f3c13bedd61)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r-- | bitbake/lib/bb/tests/fetch.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py index 8a91f51d36..33cc9bcac6 100644 --- a/bitbake/lib/bb/tests/fetch.py +++ b/bitbake/lib/bb/tests/fetch.py | |||
@@ -1511,7 +1511,7 @@ class FetchLatestVersionTest(FetcherTest): | |||
1511 | 1511 | ||
1512 | def test_wget_latest_versionstring(self): | 1512 | def test_wget_latest_versionstring(self): |
1513 | testdata = os.path.dirname(os.path.abspath(__file__)) + "/fetch-testdata" | 1513 | testdata = os.path.dirname(os.path.abspath(__file__)) + "/fetch-testdata" |
1514 | server = HTTPService(testdata) | 1514 | server = HTTPService(testdata, host="127.0.0.1") |
1515 | server.start() | 1515 | server.start() |
1516 | port = server.port | 1516 | port = server.port |
1517 | try: | 1517 | try: |
@@ -1519,10 +1519,10 @@ class FetchLatestVersionTest(FetcherTest): | |||
1519 | self.d.setVar("PN", k[0]) | 1519 | self.d.setVar("PN", k[0]) |
1520 | checkuri = "" | 1520 | checkuri = "" |
1521 | if k[2]: | 1521 | if k[2]: |
1522 | checkuri = "http://localhost:%s/" % port + k[2] | 1522 | checkuri = "http://127.0.0.1:%s/" % port + k[2] |
1523 | self.d.setVar("UPSTREAM_CHECK_URI", checkuri) | 1523 | self.d.setVar("UPSTREAM_CHECK_URI", checkuri) |
1524 | self.d.setVar("UPSTREAM_CHECK_REGEX", k[3]) | 1524 | self.d.setVar("UPSTREAM_CHECK_REGEX", k[3]) |
1525 | url = "http://localhost:%s/" % port + k[1] | 1525 | url = "http://127.0.0.1:%s/" % port + k[1] |
1526 | ud = bb.fetch2.FetchData(url, self.d) | 1526 | ud = bb.fetch2.FetchData(url, self.d) |
1527 | pupver = ud.method.latest_versionstring(ud, self.d) | 1527 | pupver = ud.method.latest_versionstring(ud, self.d) |
1528 | verstring = pupver[0] | 1528 | verstring = pupver[0] |