Skip to contentSkip to conversation

tests/acceptance/ppc_prep_40p: Use cdn.netbsd.org hostname

PATCH In review Philippe Mathieu-Daudé 5 participants 8 messages Feb 11, 2020 – Mar 23, 2020 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/acceptance/ppc_prep_40p: Use cdn.netbsd.org hostname

Use NetBSD content delivery network to get faster downloads.

---
 tests/acceptance/ppc_prep_40p.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/acceptance/ppc_prep_40p.py +2 -2
index efe06037ba..6729d96f5e 100644
@@ -34,7 +34,7 @@ def test_factory_firmware_and_netbsd(self):
                     '7020-40p/P12H0456.IMG')
         bios_hash = '1775face4e6dc27f3a6ed955ef6eb331bf817f03'
         bios_path = self.fetch_asset(bios_url, asset_hash=bios_hash)
-        drive_url = ('https://ftp.netbsd.org/pub/NetBSD/NetBSD-archive/'
+        drive_url = ('https://cdn.netbsd.org/pub/NetBSD/NetBSD-archive/'
                      'NetBSD-4.0/prep/installation/floppy/generic_com0.fs')
         drive_hash = 'dbcfc09912e71bd5f0d82c7c1ee43082fb596ceb'
         drive_path = self.fetch_asset(drive_url, asset_hash=drive_hash)
@@ -67,7 +67,7 @@ def test_openbios_and_netbsd(self):
         :avocado: tags=arch:ppc
         :avocado: tags=machine:40p
         """
-        drive_url = ('https://ftp.netbsd.org/pub/NetBSD/iso/7.1.2/'
+        drive_url = ('https://cdn.netbsd.org/pub/NetBSD/iso/7.1.2/'
                      'NetBSD-7.1.2-prep.iso')
         drive_hash = 'ac6fa2707d888b36d6fa64de6e7fe48e'
         drive_path = self.fetch_asset(drive_url, asset_hash=drive_hash,
Signature · 1 line
2.21.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Philippe Mathieu-Daudé

Use NetBSD content delivery network to get faster downloads.

---
  tests/acceptance/ppc_prep_40p.py | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

LGTM.

Quoted 23 lines
tests/acceptance/ppc_prep_40p.py +2 -2
index efe06037ba..6729d96f5e 100644
@@ -34,7 +34,7 @@ def test_factory_firmware_and_netbsd(self):
                      '7020-40p/P12H0456.IMG')
          bios_hash = '1775face4e6dc27f3a6ed955ef6eb331bf817f03'
          bios_path = self.fetch_asset(bios_url, asset_hash=bios_hash)
-        drive_url = ('https://ftp.netbsd.org/pub/NetBSD/NetBSD-archive/'
+        drive_url = ('https://cdn.netbsd.org/pub/NetBSD/NetBSD-archive/'
                       'NetBSD-4.0/prep/installation/floppy/generic_com0.fs')
          drive_hash = 'dbcfc09912e71bd5f0d82c7c1ee43082fb596ceb'
          drive_path = self.fetch_asset(drive_url, asset_hash=drive_hash)
@@ -67,7 +67,7 @@ def test_openbios_and_netbsd(self):
          :avocado: tags=arch:ppc
          :avocado: tags=machine:40p
          """
-        drive_url = ('https://ftp.netbsd.org/pub/NetBSD/iso/7.1.2/'
+        drive_url = ('https://cdn.netbsd.org/pub/NetBSD/iso/7.1.2/'
                       'NetBSD-7.1.2-prep.iso')
          drive_hash = 'ac6fa2707d888b36d6fa64de6e7fe48e'
          drive_path = self.fetch_asset(drive_url, asset_hash=drive_hash,
#2 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 1 line · Philippe Mathieu-Daudé

Use NetBSD content delivery network to get faster downloads.

Even with this patch I get failures on my big dev box:

(48/67) tests/acceptance/ppc_prep_40p.py:IbmPrep40pMachine.test_openbios_and_netbsd: INTERRUPTED: Failed to fetch NetBSD-7.1.2-prep.iso.\nRunner error occurred: Timeout reached\nOriginal status: ERROR\n{'name': '48-tests/acceptance/ppc_prep_40p.py:IbmPrep40pMachine.test_openbios_and_netbsd', 'logdir': '/home/alex/lsrc/qemu.git/builds/all/tests/results/jo... (60.31 s)

I think ultimately a whole ISO download is just too much for an acceptance test.

Quoted 29 lines
---
 tests/acceptance/ppc_prep_40p.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/acceptance/ppc_prep_40p.py +2 -2
index efe06037ba..6729d96f5e 100644
@@ -34,7 +34,7 @@ def test_factory_firmware_and_netbsd(self):
                     '7020-40p/P12H0456.IMG')
         bios_hash = '1775face4e6dc27f3a6ed955ef6eb331bf817f03'
         bios_path = self.fetch_asset(bios_url, asset_hash=bios_hash)
-        drive_url = ('https://ftp.netbsd.org/pub/NetBSD/NetBSD-archive/'
+        drive_url = ('https://cdn.netbsd.org/pub/NetBSD/NetBSD-archive/'
                      'NetBSD-4.0/prep/installation/floppy/generic_com0.fs')
         drive_hash = 'dbcfc09912e71bd5f0d82c7c1ee43082fb596ceb'
         drive_path = self.fetch_asset(drive_url, asset_hash=drive_hash)
@@ -67,7 +67,7 @@ def test_openbios_and_netbsd(self):
         :avocado: tags=arch:ppc
         :avocado: tags=machine:40p
         """
-        drive_url = ('https://ftp.netbsd.org/pub/NetBSD/iso/7.1.2/'
+        drive_url = ('https://cdn.netbsd.org/pub/NetBSD/iso/7.1.2/'
                      'NetBSD-7.1.2-prep.iso')
         drive_hash = 'ac6fa2707d888b36d6fa64de6e7fe48e'
         drive_path = self.fetch_asset(drive_url, asset_hash=drive_hash,
Signature · 1 line
Alex Bennée
#3 lore raw
Quoted 11 lines · Alex Bennée
Quoted 1 line · Philippe Mathieu-Daudé

Use NetBSD content delivery network to get faster downloads.

Even with this patch I get failures on my big dev box:

(48/67) tests/acceptance/ppc_prep_40p.py:IbmPrep40pMachine.test_openbios_and_netbsd: INTERRUPTED: Failed to fetch NetBSD-7.1.2-prep.iso.\nRunner error occurred: Timeout reached\nOriginal status: ERROR\n{'name': '48-tests/acceptance/ppc_prep_40p.py:IbmPrep40pMachine.test_openbios_and_netbsd', 'logdir': '/home/alex/lsrc/qemu.git/builds/all/tests/results/jo... (60.31 s)

I think ultimately a whole ISO download is just too much for an acceptance test.

I tend to agree. Here in a network-remote part of the world, these always seem to cause timeouts and other problems, in a bunch of the testcases.

Those are testing useful things though, so I'd really like to see the downloads split out into some sort of preparation step that can be done just once, rather than part of the test proper.

Quoted 30 lines
Quoted 28 lines
---
 tests/acceptance/ppc_prep_40p.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/acceptance/ppc_prep_40p.py +2 -2
index efe06037ba..6729d96f5e 100644
@@ -34,7 +34,7 @@ def test_factory_firmware_and_netbsd(self):
                     '7020-40p/P12H0456.IMG')
         bios_hash = '1775face4e6dc27f3a6ed955ef6eb331bf817f03'
         bios_path = self.fetch_asset(bios_url, asset_hash=bios_hash)
-        drive_url = ('https://ftp.netbsd.org/pub/NetBSD/NetBSD-archive/'
+        drive_url = ('https://cdn.netbsd.org/pub/NetBSD/NetBSD-archive/'
                      'NetBSD-4.0/prep/installation/floppy/generic_com0.fs')
         drive_hash = 'dbcfc09912e71bd5f0d82c7c1ee43082fb596ceb'
         drive_path = self.fetch_asset(drive_url, asset_hash=drive_hash)
@@ -67,7 +67,7 @@ def test_openbios_and_netbsd(self):
         :avocado: tags=arch:ppc
         :avocado: tags=machine:40p
         """
-        drive_url = ('https://ftp.netbsd.org/pub/NetBSD/iso/7.1.2/'
+        drive_url = ('https://cdn.netbsd.org/pub/NetBSD/iso/7.1.2/'
                      'NetBSD-7.1.2-prep.iso')
         drive_hash = 'ac6fa2707d888b36d6fa64de6e7fe48e'
         drive_path = self.fetch_asset(drive_url, asset_hash=drive_hash,
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#4 lore raw

----- Original Message -----

Quoted 27 lines

From: "David Gibson" <[email protected]>
To: "Alex Bennée" <[email protected]>
Cc: [email protected], "Wainer dos Santos Moschetta" <[email protected]>, "Kamil Rytarowski" <[email protected]>, "Hervé Poussineau" <[email protected]>, "Cleber Rosa" <[email protected]>, [email protected], "Philippe Mathieu-Daudé" <[email protected]>
Sent: Monday, March 9, 2020 9:41:16 PM
Subject: Re: [PATCH] tests/acceptance/ppc_prep_40p: Use cdn.netbsd.org hostname

Quoted 15 lines · Alex Bennée
Quoted 1 line · Philippe Mathieu-Daudé

Use NetBSD content delivery network to get faster downloads.

Even with this patch I get failures on my big dev box:

(48/67) tests/acceptance/ppc_prep_40p.py:IbmPrep40pMachine.test_openbios_and_netbsd:
INTERRUPTED: Failed to fetch NetBSD-7.1.2-prep.iso.\nRunner error
occurred: Timeout reached\nOriginal status: ERROR\n{'name':
'48-tests/acceptance/ppc_prep_40p.py:IbmPrep40pMachine.test_openbios_and_netbsd', 'logdir': '/home/alex/lsrc/qemu.git/builds/all/tests/results/jo... (60.31
s)

Quoted 2 lines

I think ultimately a whole ISO download is just too much for an acceptance test.

Quoted 8 lines

I tend to agree. Here in a network-remote part of the world, these always seem to cause timeouts and other problems, in a bunch of the testcases.

Those are testing useful things though, so I'd really like to see the downloads split out into some sort of preparation step that can be done just once, rather than part of the test proper.

We have added functionality in the latest Avocado that will let us easily set a "cancel this test if the ISO has not being previously downloaded", or "cancel if it fails to be downloaded during the test".

+Willian can explain how it works, and if found to be suitable, and work on a patch.

-Cleber.

Quoted 38 lines
Quoted 21 lines
Quoted 21 lines
---
 tests/acceptance/ppc_prep_40p.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/acceptance/ppc_prep_40p.py +1 -1
index efe06037ba..6729d96f5e 100644
@@ -34,7 +34,7 @@ def test_factory_firmware_and_netbsd(self):
                     '7020-40p/P12H0456.IMG')
         bios_hash = '1775face4e6dc27f3a6ed955ef6eb331bf817f03'
         bios_path = self.fetch_asset(bios_url, asset_hash=bios_hash)
-        drive_url = ('https://ftp.netbsd.org/pub/NetBSD/NetBSD-archive/'
+        drive_url = ('https://cdn.netbsd.org/pub/NetBSD/NetBSD-archive/'
                      'NetBSD-4.0/prep/installation/floppy/generic_com0.fs')
         drive_hash = 'dbcfc09912e71bd5f0d82c7c1ee43082fb596ceb'
         drive_path = self.fetch_asset(drive_url, asset_hash=drive_hash)
@@ -67,7 +67,7 @@ def test_openbios_and_netbsd(self):
Quoted 10 lines

tests/acceptance/ppc_prep_40p.py def test_openbios_and_netbsd(self): · line 73

Quoted 8 lines
tests/acceptance/ppc_prep_40p.py +1 -1
         :avocado: tags=arch:ppc
         :avocado: tags=machine:40p
         """
-        drive_url = ('https://ftp.netbsd.org/pub/NetBSD/iso/7.1.2/'
+        drive_url = ('https://cdn.netbsd.org/pub/NetBSD/iso/7.1.2/'
                      'NetBSD-7.1.2-prep.iso')
         drive_hash = 'ac6fa2707d888b36d6fa64de6e7fe48e'
         drive_path = self.fetch_asset(drive_url, asset_hash=drive_hash,

--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_

				| _way_ _around_!

http://www.ozlabs.org/~dgibson

#5 lore raw
Quoted 37 lines · Cleber Rosa

----- Original Message -----

Quoted 27 lines

From: "David Gibson" <[email protected]>
To: "Alex Bennée" <[email protected]>
Cc: [email protected], "Wainer dos Santos Moschetta" <[email protected]>, "Kamil Rytarowski" <[email protected]>, "Hervé Poussineau" <[email protected]>, "Cleber Rosa" <[email protected]>, [email protected], "Philippe Mathieu-Daudé" <[email protected]>
Sent: Monday, March 9, 2020 9:41:16 PM
Subject: Re: [PATCH] tests/acceptance/ppc_prep_40p: Use cdn.netbsd.org hostname

Quoted 15 lines · Alex Bennée
Quoted 1 line · Philippe Mathieu-Daudé

Use NetBSD content delivery network to get faster downloads.

Even with this patch I get failures on my big dev box:

(48/67) tests/acceptance/ppc_prep_40p.py:IbmPrep40pMachine.test_openbios_and_netbsd:
INTERRUPTED: Failed to fetch NetBSD-7.1.2-prep.iso.\nRunner error
occurred: Timeout reached\nOriginal status: ERROR\n{'name':
'48-tests/acceptance/ppc_prep_40p.py:IbmPrep40pMachine.test_openbios_and_netbsd', 'logdir': '/home/alex/lsrc/qemu.git/builds/all/tests/results/jo... (60.31
s)

Quoted 2 lines

I think ultimately a whole ISO download is just too much for an acceptance test.

Quoted 8 lines

I tend to agree. Here in a network-remote part of the world, these always seem to cause timeouts and other problems, in a bunch of the testcases.

Those are testing useful things though, so I'd really like to see the downloads split out into some sort of preparation step that can be done just once, rather than part of the test proper.

Quoted 6 lines

We have added functionality in the latest Avocado that will let us easily set a "cancel this test if the ISO has not being previously downloaded", or "cancel if it fails to be downloaded during the test".

+Willian can explain how it works, and if found to be suitable, and work on a patch.

I suppose this is the relevant Avocado patch:

'Extends fetch_asset core method to find assets and cancel the test'
https://github.com/avocado-framework/avocado/commit/c345569fd

Quoted 42 lines

-Cleber.

Quoted 38 lines
Quoted 21 lines
Quoted 21 lines
---
  tests/acceptance/ppc_prep_40p.py | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
tests/acceptance/ppc_prep_40p.py +1 -1
index efe06037ba..6729d96f5e 100644
@@ -34,7 +34,7 @@ def test_factory_firmware_and_netbsd(self):
                      '7020-40p/P12H0456.IMG')
          bios_hash = '1775face4e6dc27f3a6ed955ef6eb331bf817f03'
          bios_path = self.fetch_asset(bios_url, asset_hash=bios_hash)
-        drive_url = ('https://ftp.netbsd.org/pub/NetBSD/NetBSD-archive/'
+        drive_url = ('https://cdn.netbsd.org/pub/NetBSD/NetBSD-archive/'
                       'NetBSD-4.0/prep/installation/floppy/generic_com0.fs')
          drive_hash = 'dbcfc09912e71bd5f0d82c7c1ee43082fb596ceb'
          drive_path = self.fetch_asset(drive_url, asset_hash=drive_hash)
@@ -67,7 +67,7 @@ def test_openbios_and_netbsd(self):
Quoted 10 lines

tests/acceptance/ppc_prep_40p.py def test_openbios_and_netbsd(self): · line 73

Quoted 8 lines
tests/acceptance/ppc_prep_40p.py +1 -1
          :avocado: tags=arch:ppc
          :avocado: tags=machine:40p
          """
-        drive_url = ('https://ftp.netbsd.org/pub/NetBSD/iso/7.1.2/'
+        drive_url = ('https://cdn.netbsd.org/pub/NetBSD/iso/7.1.2/'
                       'NetBSD-7.1.2-prep.iso')
          drive_hash = 'ac6fa2707d888b36d6fa64de6e7fe48e'
          drive_path = self.fetch_asset(drive_url, asset_hash=drive_hash,

--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_

				| _way_ _around_!

http://www.ozlabs.org/~dgibson

#6 lore raw
In reply to Cleber Rosa
Quoted 34 lines · Cleber Rosa

----- Original Message -----

Quoted 31 lines

From: "David Gibson" <[email protected]>
To: "Alex Bennée" <[email protected]>
Cc: [email protected], "Wainer dos Santos Moschetta" <[email protected]>, "Kamil Rytarowski" <[email protected]>, "Hervé Poussineau" <[email protected]>, "Cleber Rosa" <[email protected]>, [email protected], "Philippe Mathieu-Daudé" <[email protected]>
Sent: Monday, March 9, 2020 9:41:16 PM
Subject: Re: [PATCH] tests/acceptance/ppc_prep_40p: Use cdn.netbsd.org hostname

Quoted 15 lines · Alex Bennée
Quoted 1 line · Philippe Mathieu-Daudé

Use NetBSD content delivery network to get faster downloads.

Even with this patch I get failures on my big dev box:

(48/67) tests/acceptance/ppc_prep_40p.py:IbmPrep40pMachine.test_openbios_and_netbsd:
INTERRUPTED: Failed to fetch NetBSD-7.1.2-prep.iso.\nRunner error
occurred: Timeout reached\nOriginal status: ERROR\n{'name':
'48-tests/acceptance/ppc_prep_40p.py:IbmPrep40pMachine.test_openbios_and_netbsd', 'logdir': '/home/alex/lsrc/qemu.git/builds/all/tests/results/jo... (60.31
s)

Quoted 2 lines

I think ultimately a whole ISO download is just too much for an acceptance test.

I tend to agree. Here in a network-remote part of the world, these always seem to cause timeouts and other problems, in a bunch of the testcases.

Quoted 8 lines
Quoted 3 lines

Those are testing useful things though, so I'd really like to see the downloads split out into some sort of preparation step that can be done just once, rather than part of the test proper.

We have added functionality in the latest Avocado that will let us easily set a "cancel this test if the ISO has not being previously downloaded", or "cancel if it fails to be downloaded during the test".

That certainly sounds like an improvement. I still don't love the idea that the test results will vary based on something outside of the tested code, even if a cancel is definitely better than a fail.

Quoted 2 lines

+Willian can explain how it works, and if found to be suitable, and work on a patch.

Ok. That would be good to know - will there be some command to run in advance to attempt to download all the necessary images? Would that run without a timeout - or at least a much longer timeout than the testcase itself has.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

A message that is not in the archive (sent off-list or not yet received): CAKJDGDZpRrtSVkH0+h0ec8bfnAvfQGftTu7whOn9hXpYLLnDqA@mail.gmail.com

#8 lore raw
Quoted 40 lines · Willian Rampazzo
Quoted 3 lines

That certainly sounds like an improvement. I still don't love the idea that the test results will vary based on something outside of the tested code, even if a cancel is definitely better than a fail.

During the development of Avocado release 76.0, we have discussed how to implement a new resolver that gathers requirements listed for a test and fulfills them before the test starts. The discussion resulted in blueprint BP002 [1]. We are in the last development week of release 77.0, so the development of this new feature should start during the next release cycle.

Quoted 8 lines
Quoted 3 lines

+Willian can explain how it works, and if found to be suitable, and work on a patch.

Ok. That would be good to know - will there be some command to run in advance to attempt to download all the necessary images? Would that run without a timeout - or at least a much longer timeout than the testcase itself has.

In the current release development (77.0), we are adding a feature that makes it possible to cancel a test if an asset is not available in the cache. It should be as simple as setting two parameters during the fetch call, like:

bios_path = self.fetch_asset(bios_url, asset_hash=bios_hash, find_only=True, cancel_on_missing=True)

Release 77.0 of Avocado is scheduled for the beginning of next week. As soon as it is available, I can send a patch to bump the Avocado version for qemu tests and a patch to this test enabling this new feature.

Since avocado 73.0, it is possible to fetch the assets from a test without actually running the test. It is a feature that parses the test code looking for the fetch_asset call and its parameters defined as variables, at a limited depth. I have tested it on ppc_prep_40p.py, and it works as expected. This command does not have a timeout for fetching the assets and is as follows:

Quoted 6 lines

avocado assets fetch ppc_prep_40p.py

The upcoming feature to cancel the test when an asset is not available used in conjunction with the command line fetch should give some flexibility to people running this test while the resolver is under development.

I saw how this worked when I did my last batch of pre-pull tests. It was way better than how it used to work (when I had at least a half dozen that failed or skipped unpredictably depending on how long the download took).

Great work, thanks!

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson