qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/5] Allwinner H3 fixes for EMAC and acceptance tests
@ 2021-03-04 20:35 Niek Linnenbank
  2021-03-04 20:35 ` [PATCH v3 1/5] hw/net/allwinner-sun8i-emac: traverse transmit queue using TX_CUR_DESC register value Niek Linnenbank
                   ` (4 more replies)
  0 siblings, 5 replies; 25+ messages in thread
From: Niek Linnenbank @ 2021-03-04 20:35 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, thuth, berrange, f4bug, b.galvani,
	Niek Linnenbank, qemu-arm, Pavel.Dovgaluk, crosa, philmd

The following are maintenance patches for the Allwinner H3. The first patch
resolves artifact download errors by updating the URLs to the armbian.com server.

The second patch is a fix for the EMAC that is used by the Allwinner H3 / Orange Pi PC machine.

ChangeLog:

v3:
 - fixed the acceptance tests by using up-to-date armbian.com URLs

v2:
 - added Reviewed-By tags
 - changed URL for artifacts to github.com/nieklinnenbank/QemuArtifacts

Kind regards,

Niek

Niek Linnenbank (5):
  hw/net/allwinner-sun8i-emac: traverse transmit queue using TX_CUR_DESC
    register value
  tests/acceptance/boot_linux_console: remove Armbian 19.11.3 bionic
    test for orangepi-pc machine
  tests/acceptance/boot_linux_console: change URL for
    test_arm_orangepi_bionic_20_08
  tests/acceptance: update sunxi kernel from armbian to 5.10.16
  tests/acceptance: drop ARMBIAN_ARTIFACTS_CACHED condition for
    orangepi-pc, cubieboard tests

 hw/net/allwinner-sun8i-emac.c          |  58 ++++++------
 tests/acceptance/boot_linux_console.py | 120 +++++++++----------------
 tests/acceptance/replay_kernel.py      |  10 +--
 3 files changed, 77 insertions(+), 111 deletions(-)

-- 
2.25.1



^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH v3 1/5] hw/net/allwinner-sun8i-emac: traverse transmit queue using TX_CUR_DESC register value
  2021-03-04 20:35 [PATCH v3 0/5] Allwinner H3 fixes for EMAC and acceptance tests Niek Linnenbank
@ 2021-03-04 20:35 ` Niek Linnenbank
  2021-03-04 20:35 ` [PATCH v3 2/5] tests/acceptance/boot_linux_console: remove Armbian 19.11.3 bionic test for orangepi-pc machine Niek Linnenbank
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 25+ messages in thread
From: Niek Linnenbank @ 2021-03-04 20:35 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, thuth, berrange, f4bug, b.galvani,
	Niek Linnenbank, qemu-arm, Pavel.Dovgaluk, crosa, philmd

Currently the emulated EMAC for sun8i always traverses the transmit queue
from the head when transferring packets. It searches for a list of consecutive
descriptors whichs are flagged as ready for processing and transmits their payloads
accordingly. The controller stops processing once it finds a descriptor that is not
marked ready.

While the above behaviour works in most situations, it is not the same as the actual
EMAC in hardware. Actual hardware uses the TX_CUR_DESC register value to keep track
of the last position in the transmit queue and continues processing from that position
when software triggers the start of DMA processing. The currently emulated behaviour can
lead to packet loss on transmit when software fills the transmit queue with ready
descriptors that overlap the tail of the circular list.

This commit modifies the emulated EMAC for sun8i such that it processes
the transmit queue using the TX_CUR_DESC register in the same way as hardware.

Signed-off-by: Niek Linnenbank <nieklinnenbank@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/net/allwinner-sun8i-emac.c | 58 +++++++++++++++++++----------------
 1 file changed, 32 insertions(+), 26 deletions(-)

diff --git a/hw/net/allwinner-sun8i-emac.c b/hw/net/allwinner-sun8i-emac.c
index 042768922c..e586c147e5 100644
--- a/hw/net/allwinner-sun8i-emac.c
+++ b/hw/net/allwinner-sun8i-emac.c
@@ -339,35 +339,40 @@ static void allwinner_sun8i_emac_update_irq(AwSun8iEmacState *s)
     qemu_set_irq(s->irq, (s->int_sta & s->int_en) != 0);
 }
 
-static uint32_t allwinner_sun8i_emac_next_desc(AwSun8iEmacState *s,
-                                               FrameDescriptor *desc,
-                                               size_t min_size)
+static bool allwinner_sun8i_emac_desc_owned(FrameDescriptor *desc,
+                                            size_t min_buf_size)
 {
-    uint32_t paddr = desc->next;
+    return (desc->status & DESC_STATUS_CTL) && (min_buf_size == 0 ||
+           (desc->status2 & DESC_STATUS2_BUF_SIZE_MASK) >= min_buf_size);
+}
 
-    dma_memory_read(&s->dma_as, paddr, desc, sizeof(*desc));
+static void allwinner_sun8i_emac_get_desc(AwSun8iEmacState *s,
+                                          FrameDescriptor *desc,
+                                          uint32_t phys_addr)
+{
+    dma_memory_read(&s->dma_as, phys_addr, desc, sizeof(*desc));
+}
 
-    if ((desc->status & DESC_STATUS_CTL) &&
-        (desc->status2 & DESC_STATUS2_BUF_SIZE_MASK) >= min_size) {
-        return paddr;
-    } else {
-        return 0;
-    }
+static uint32_t allwinner_sun8i_emac_next_desc(AwSun8iEmacState *s,
+                                               FrameDescriptor *desc)
+{
+    const uint32_t nxt = desc->next;
+    allwinner_sun8i_emac_get_desc(s, desc, nxt);
+    return nxt;
 }
 
-static uint32_t allwinner_sun8i_emac_get_desc(AwSun8iEmacState *s,
-                                              FrameDescriptor *desc,
-                                              uint32_t start_addr,
-                                              size_t min_size)
+static uint32_t allwinner_sun8i_emac_find_desc(AwSun8iEmacState *s,
+                                               FrameDescriptor *desc,
+                                               uint32_t start_addr,
+                                               size_t min_size)
 {
     uint32_t desc_addr = start_addr;
 
     /* Note that the list is a cycle. Last entry points back to the head. */
     while (desc_addr != 0) {
-        dma_memory_read(&s->dma_as, desc_addr, desc, sizeof(*desc));
+        allwinner_sun8i_emac_get_desc(s, desc, desc_addr);
 
-        if ((desc->status & DESC_STATUS_CTL) &&
-            (desc->status2 & DESC_STATUS2_BUF_SIZE_MASK) >= min_size) {
+        if (allwinner_sun8i_emac_desc_owned(desc, min_size)) {
             return desc_addr;
         } else if (desc->next == start_addr) {
             break;
@@ -383,14 +388,14 @@ static uint32_t allwinner_sun8i_emac_rx_desc(AwSun8iEmacState *s,
                                              FrameDescriptor *desc,
                                              size_t min_size)
 {
-    return allwinner_sun8i_emac_get_desc(s, desc, s->rx_desc_curr, min_size);
+    return allwinner_sun8i_emac_find_desc(s, desc, s->rx_desc_curr, min_size);
 }
 
 static uint32_t allwinner_sun8i_emac_tx_desc(AwSun8iEmacState *s,
-                                             FrameDescriptor *desc,
-                                             size_t min_size)
+                                             FrameDescriptor *desc)
 {
-    return allwinner_sun8i_emac_get_desc(s, desc, s->tx_desc_head, min_size);
+    allwinner_sun8i_emac_get_desc(s, desc, s->tx_desc_curr);
+    return s->tx_desc_curr;
 }
 
 static void allwinner_sun8i_emac_flush_desc(AwSun8iEmacState *s,
@@ -470,7 +475,8 @@ static ssize_t allwinner_sun8i_emac_receive(NetClientState *nc,
         bytes_left -= desc_bytes;
 
         /* Move to the next descriptor */
-        s->rx_desc_curr = allwinner_sun8i_emac_next_desc(s, &desc, 64);
+        s->rx_desc_curr = allwinner_sun8i_emac_find_desc(s, &desc, desc.next,
+                                                         AW_SUN8I_EMAC_MIN_PKT_SZ);
         if (!s->rx_desc_curr) {
             /* Not enough buffer space available */
             s->int_sta |= INT_STA_RX_BUF_UA;
@@ -495,10 +501,10 @@ static void allwinner_sun8i_emac_transmit(AwSun8iEmacState *s)
     size_t transmitted = 0;
     static uint8_t packet_buf[2048];
 
-    s->tx_desc_curr = allwinner_sun8i_emac_tx_desc(s, &desc, 0);
+    s->tx_desc_curr = allwinner_sun8i_emac_tx_desc(s, &desc);
 
     /* Read all transmit descriptors */
-    while (s->tx_desc_curr != 0) {
+    while (allwinner_sun8i_emac_desc_owned(&desc, 0)) {
 
         /* Read from physical memory into packet buffer */
         bytes = desc.status2 & DESC_STATUS2_BUF_SIZE_MASK;
@@ -524,7 +530,7 @@ static void allwinner_sun8i_emac_transmit(AwSun8iEmacState *s)
             packet_bytes = 0;
             transmitted++;
         }
-        s->tx_desc_curr = allwinner_sun8i_emac_next_desc(s, &desc, 0);
+        s->tx_desc_curr = allwinner_sun8i_emac_next_desc(s, &desc);
     }
 
     /* Raise transmit completed interrupt */
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v3 2/5] tests/acceptance/boot_linux_console: remove Armbian 19.11.3 bionic test for orangepi-pc machine
  2021-03-04 20:35 [PATCH v3 0/5] Allwinner H3 fixes for EMAC and acceptance tests Niek Linnenbank
  2021-03-04 20:35 ` [PATCH v3 1/5] hw/net/allwinner-sun8i-emac: traverse transmit queue using TX_CUR_DESC register value Niek Linnenbank
@ 2021-03-04 20:35 ` Niek Linnenbank
  2021-03-05 15:16   ` Willian Rampazzo
  2021-03-04 20:35 ` [PATCH v3 3/5] tests/acceptance/boot_linux_console: change URL for test_arm_orangepi_bionic_20_08 Niek Linnenbank
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 25+ messages in thread
From: Niek Linnenbank @ 2021-03-04 20:35 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, thuth, berrange, f4bug, b.galvani,
	Niek Linnenbank, qemu-arm, Pavel.Dovgaluk, crosa, philmd

The image for Armbian 19.11.3 bionic has been removed from the armbian server.
Without the image as input the test arm_orangepi_bionic_19_11 cannot run.

This commit removes the test completely and merges the code of the generic function
do_test_arm_orangepi_uboot_armbian back with the 20.08 test.

Signed-off-by: Niek Linnenbank <nieklinnenbank@gmail.com>
---
 tests/acceptance/boot_linux_console.py | 72 ++++++++------------------
 1 file changed, 23 insertions(+), 49 deletions(-)

diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
index eb01286799..9fadea9958 100644
--- a/tests/acceptance/boot_linux_console.py
+++ b/tests/acceptance/boot_linux_console.py
@@ -802,7 +802,29 @@ def test_arm_orangepi_sd(self):
         # Wait for VM to shut down gracefully
         self.vm.wait()
 
-    def do_test_arm_orangepi_uboot_armbian(self, image_path):
+    @skipUnless(os.getenv('ARMBIAN_ARTIFACTS_CACHED'),
+                'Test artifacts fetched from unreliable apt.armbian.com')
+    @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited')
+    def test_arm_orangepi_bionic_20_08(self):
+        """
+        :avocado: tags=arch:arm
+        :avocado: tags=machine:orangepi-pc
+        :avocado: tags=device:sd
+        """
+
+        # This test download a 275 MiB compressed image and expand it
+        # to 1036 MiB, but the underlying filesystem is 1552 MiB...
+        # As we expand it to 2 GiB we are safe.
+
+        image_url = ('https://dl.armbian.com/orangepipc/archive/'
+                     'Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz')
+        image_hash = ('b4d6775f5673486329e45a0586bf06b6'
+                      'dbe792199fd182ac6b9c7bb6c7d3e6dd')
+        image_path_xz = self.fetch_asset(image_url, asset_hash=image_hash,
+                                         algorithm='sha256')
+        image_path = archive.extract(image_path_xz, self.workdir)
+        image_pow2ceil_expand(image_path)
+
         self.vm.set_console()
         self.vm.add_args('-drive', 'file=' + image_path + ',if=sd,format=raw',
                          '-nic', 'user',
@@ -828,54 +850,6 @@ def do_test_arm_orangepi_uboot_armbian(self, image_path):
                                       'to <orangepipc>')
         self.wait_for_console_pattern('Starting Load Kernel Modules...')
 
-    @skipUnless(os.getenv('ARMBIAN_ARTIFACTS_CACHED'),
-                'Test artifacts fetched from unreliable apt.armbian.com')
-    @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited')
-    @skipUnless(P7ZIP_AVAILABLE, '7z not installed')
-    def test_arm_orangepi_bionic_19_11(self):
-        """
-        :avocado: tags=arch:arm
-        :avocado: tags=machine:orangepi-pc
-        :avocado: tags=device:sd
-        """
-
-        # This test download a 196MB compressed image and expand it to 1GB
-        image_url = ('https://dl.armbian.com/orangepipc/archive/'
-                     'Armbian_19.11.3_Orangepipc_bionic_current_5.3.9.7z')
-        image_hash = '196a8ffb72b0123d92cea4a070894813d305c71e'
-        image_path_7z = self.fetch_asset(image_url, asset_hash=image_hash)
-        image_name = 'Armbian_19.11.3_Orangepipc_bionic_current_5.3.9.img'
-        image_path = os.path.join(self.workdir, image_name)
-        process.run("7z e -o%s %s" % (self.workdir, image_path_7z))
-        image_pow2ceil_expand(image_path)
-
-        self.do_test_arm_orangepi_uboot_armbian(image_path)
-
-    @skipUnless(os.getenv('ARMBIAN_ARTIFACTS_CACHED'),
-                'Test artifacts fetched from unreliable apt.armbian.com')
-    @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited')
-    def test_arm_orangepi_bionic_20_08(self):
-        """
-        :avocado: tags=arch:arm
-        :avocado: tags=machine:orangepi-pc
-        :avocado: tags=device:sd
-        """
-
-        # This test download a 275 MiB compressed image and expand it
-        # to 1036 MiB, but the underlying filesystem is 1552 MiB...
-        # As we expand it to 2 GiB we are safe.
-
-        image_url = ('https://dl.armbian.com/orangepipc/archive/'
-                     'Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz')
-        image_hash = ('b4d6775f5673486329e45a0586bf06b6'
-                      'dbe792199fd182ac6b9c7bb6c7d3e6dd')
-        image_path_xz = self.fetch_asset(image_url, asset_hash=image_hash,
-                                         algorithm='sha256')
-        image_path = archive.extract(image_path_xz, self.workdir)
-        image_pow2ceil_expand(image_path)
-
-        self.do_test_arm_orangepi_uboot_armbian(image_path)
-
     @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited')
     def test_arm_orangepi_uboot_netbsd9(self):
         """
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v3 3/5] tests/acceptance/boot_linux_console: change URL for test_arm_orangepi_bionic_20_08
  2021-03-04 20:35 [PATCH v3 0/5] Allwinner H3 fixes for EMAC and acceptance tests Niek Linnenbank
  2021-03-04 20:35 ` [PATCH v3 1/5] hw/net/allwinner-sun8i-emac: traverse transmit queue using TX_CUR_DESC register value Niek Linnenbank
  2021-03-04 20:35 ` [PATCH v3 2/5] tests/acceptance/boot_linux_console: remove Armbian 19.11.3 bionic test for orangepi-pc machine Niek Linnenbank
@ 2021-03-04 20:35 ` Niek Linnenbank
  2021-03-04 22:30   ` Philippe Mathieu-Daudé
  2021-03-05 14:56   ` Willian Rampazzo
  2021-03-04 20:35 ` [PATCH v3 4/5] tests/acceptance: update sunxi kernel from armbian to 5.10.16 Niek Linnenbank
  2021-03-04 20:35 ` [PATCH v3 5/5] tests/acceptance: drop ARMBIAN_ARTIFACTS_CACHED condition for orangepi-pc, cubieboard tests Niek Linnenbank
  4 siblings, 2 replies; 25+ messages in thread
From: Niek Linnenbank @ 2021-03-04 20:35 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, thuth, berrange, f4bug, b.galvani,
	Niek Linnenbank, qemu-arm, Pavel.Dovgaluk, crosa, philmd

Update the download URL of the Armbian 20.08 Bionic image for
test_arm_orangepi_bionic_20_08 of the orangepi-pc machine.

The archive.armbian.com URL contains more images and should keep stable
for a longer period of time than dl.armbian.com.

Signed-off-by: Niek Linnenbank <nieklinnenbank@gmail.com>
---
 tests/acceptance/boot_linux_console.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
index 9fadea9958..4a7a6830ca 100644
--- a/tests/acceptance/boot_linux_console.py
+++ b/tests/acceptance/boot_linux_console.py
@@ -816,7 +816,7 @@ def test_arm_orangepi_bionic_20_08(self):
         # to 1036 MiB, but the underlying filesystem is 1552 MiB...
         # As we expand it to 2 GiB we are safe.
 
-        image_url = ('https://dl.armbian.com/orangepipc/archive/'
+        image_url = ('https://archive.armbian.com/orangepipc/archive/'
                      'Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz')
         image_hash = ('b4d6775f5673486329e45a0586bf06b6'
                       'dbe792199fd182ac6b9c7bb6c7d3e6dd')
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v3 4/5] tests/acceptance: update sunxi kernel from armbian to 5.10.16
  2021-03-04 20:35 [PATCH v3 0/5] Allwinner H3 fixes for EMAC and acceptance tests Niek Linnenbank
                   ` (2 preceding siblings ...)
  2021-03-04 20:35 ` [PATCH v3 3/5] tests/acceptance/boot_linux_console: change URL for test_arm_orangepi_bionic_20_08 Niek Linnenbank
@ 2021-03-04 20:35 ` Niek Linnenbank
  2021-03-05 15:04   ` Willian Rampazzo
  2021-03-04 20:35 ` [PATCH v3 5/5] tests/acceptance: drop ARMBIAN_ARTIFACTS_CACHED condition for orangepi-pc, cubieboard tests Niek Linnenbank
  4 siblings, 1 reply; 25+ messages in thread
From: Niek Linnenbank @ 2021-03-04 20:35 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, thuth, berrange, f4bug, b.galvani,
	Niek Linnenbank, qemu-arm, Pavel.Dovgaluk, crosa, philmd

The linux kernel 4.20.7 binary for sunxi has been removed from apt.armbian.com:

  $ ARMBIAN_ARTIFACTS_CACHED=yes AVOCADO_ALLOW_LARGE_STORAGE=yes avocado --show=app,console run -t machine:orangepi-pc tests/acceptance/boot_linux_console.py
  Fetching asset from tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_orangepi
  ...
  (1/6) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_orangepi:
    CANCEL: Missing asset https://apt.armbian.com/pool/main/l/linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb (0.55 s)

This commit updates the sunxi kernel to 5.10.16 for the acceptance
tests of the orangepi-pc and cubieboard machines.

Signed-off-by: Niek Linnenbank <nieklinnenbank@gmail.com>
---
 tests/acceptance/boot_linux_console.py | 40 +++++++++++++-------------
 tests/acceptance/replay_kernel.py      |  8 +++---
 2 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
index 4a7a6830ca..04a8b23352 100644
--- a/tests/acceptance/boot_linux_console.py
+++ b/tests/acceptance/boot_linux_console.py
@@ -515,12 +515,12 @@ def test_arm_cubieboard_initrd(self):
         :avocado: tags=machine:cubieboard
         """
         deb_url = ('https://apt.armbian.com/pool/main/l/'
-                   'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb')
-        deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315'
+                   'linux-5.10.16-sunxi/linux-image-current-sunxi_21.02.2_armhf.deb')
+        deb_hash = '9fa84beda245cabf0b4fa84cf6eaa7738ead1da0'
         deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
         kernel_path = self.extract_from_deb(deb_path,
-                                            '/boot/vmlinuz-4.20.7-sunxi')
-        dtb_path = '/usr/lib/linux-image-dev-sunxi/sun4i-a10-cubieboard.dtb'
+                                            '/boot/vmlinuz-5.10.16-sunxi')
+        dtb_path = '/usr/lib/linux-image-current-sunxi/sun4i-a10-cubieboard.dtb'
         dtb_path = self.extract_from_deb(deb_path, dtb_path)
         initrd_url = ('https://github.com/groeck/linux-build-test/raw/'
                       '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/'
@@ -557,12 +557,12 @@ def test_arm_cubieboard_sata(self):
         :avocado: tags=machine:cubieboard
         """
         deb_url = ('https://apt.armbian.com/pool/main/l/'
-                   'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb')
-        deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315'
+                   'linux-5.10.16-sunxi/linux-image-current-sunxi_21.02.2_armhf.deb')
+        deb_hash = '9fa84beda245cabf0b4fa84cf6eaa7738ead1da0'
         deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
         kernel_path = self.extract_from_deb(deb_path,
-                                            '/boot/vmlinuz-4.20.7-sunxi')
-        dtb_path = '/usr/lib/linux-image-dev-sunxi/sun4i-a10-cubieboard.dtb'
+                                            '/boot/vmlinuz-5.10.16-sunxi')
+        dtb_path = '/usr/lib/linux-image-current-sunxi/sun4i-a10-cubieboard.dtb'
         dtb_path = self.extract_from_deb(deb_path, dtb_path)
         rootfs_url = ('https://github.com/groeck/linux-build-test/raw/'
                       '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/'
@@ -686,12 +686,12 @@ def test_arm_orangepi(self):
         :avocado: tags=machine:orangepi-pc
         """
         deb_url = ('https://apt.armbian.com/pool/main/l/'
-                   'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb')
-        deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315'
+                   'linux-5.10.16-sunxi/linux-image-current-sunxi_21.02.2_armhf.deb')
+        deb_hash = '9fa84beda245cabf0b4fa84cf6eaa7738ead1da0'
         deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
         kernel_path = self.extract_from_deb(deb_path,
-                                            '/boot/vmlinuz-4.20.7-sunxi')
-        dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb'
+                                            '/boot/vmlinuz-5.10.16-sunxi')
+        dtb_path = '/usr/lib/linux-image-current-sunxi/sun8i-h3-orangepi-pc.dtb'
         dtb_path = self.extract_from_deb(deb_path, dtb_path)
 
         self.vm.set_console()
@@ -713,12 +713,12 @@ def test_arm_orangepi_initrd(self):
         :avocado: tags=machine:orangepi-pc
         """
         deb_url = ('https://apt.armbian.com/pool/main/l/'
-                   'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb')
-        deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315'
+                   'linux-5.10.16-sunxi/linux-image-current-sunxi_21.02.2_armhf.deb')
+        deb_hash = '9fa84beda245cabf0b4fa84cf6eaa7738ead1da0'
         deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
         kernel_path = self.extract_from_deb(deb_path,
-                                            '/boot/vmlinuz-4.20.7-sunxi')
-        dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb'
+                                            '/boot/vmlinuz-5.10.16-sunxi')
+        dtb_path = '/usr/lib/linux-image-current-sunxi/sun8i-h3-orangepi-pc.dtb'
         dtb_path = self.extract_from_deb(deb_path, dtb_path)
         initrd_url = ('https://github.com/groeck/linux-build-test/raw/'
                       '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/'
@@ -758,12 +758,12 @@ def test_arm_orangepi_sd(self):
         :avocado: tags=device:sd
         """
         deb_url = ('https://apt.armbian.com/pool/main/l/'
-                   'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb')
-        deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315'
+                   'linux-5.10.16-sunxi/linux-image-current-sunxi_21.02.2_armhf.deb')
+        deb_hash = '9fa84beda245cabf0b4fa84cf6eaa7738ead1da0'
         deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
         kernel_path = self.extract_from_deb(deb_path,
-                                            '/boot/vmlinuz-4.20.7-sunxi')
-        dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb'
+                                            '/boot/vmlinuz-5.10.16-sunxi')
+        dtb_path = '/usr/lib/linux-image-current-sunxi/sun8i-h3-orangepi-pc.dtb'
         dtb_path = self.extract_from_deb(deb_path, dtb_path)
         rootfs_url = ('http://storage.kernelci.org/images/rootfs/buildroot/'
                       'kci-2019.02/armel/base/rootfs.ext2.xz')
diff --git a/tests/acceptance/replay_kernel.py b/tests/acceptance/replay_kernel.py
index c1cb862468..8c68caae31 100644
--- a/tests/acceptance/replay_kernel.py
+++ b/tests/acceptance/replay_kernel.py
@@ -185,12 +185,12 @@ def test_arm_cubieboard_initrd(self):
         :avocado: tags=machine:cubieboard
         """
         deb_url = ('https://apt.armbian.com/pool/main/l/'
-                   'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb')
-        deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315'
+                   'linux-5.10.16-sunxi/linux-image-current-sunxi_21.02.2_armhf.deb')
+        deb_hash = '9fa84beda245cabf0b4fa84cf6eaa7738ead1da0'
         deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
         kernel_path = self.extract_from_deb(deb_path,
-                                            '/boot/vmlinuz-4.20.7-sunxi')
-        dtb_path = '/usr/lib/linux-image-dev-sunxi/sun4i-a10-cubieboard.dtb'
+                                            '/boot/vmlinuz-5.10.16-sunxi')
+        dtb_path = '/usr/lib/linux-image-current-sunxi/sun4i-a10-cubieboard.dtb'
         dtb_path = self.extract_from_deb(deb_path, dtb_path)
         initrd_url = ('https://github.com/groeck/linux-build-test/raw/'
                       '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/'
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v3 5/5] tests/acceptance: drop ARMBIAN_ARTIFACTS_CACHED condition for orangepi-pc, cubieboard tests
  2021-03-04 20:35 [PATCH v3 0/5] Allwinner H3 fixes for EMAC and acceptance tests Niek Linnenbank
                   ` (3 preceding siblings ...)
  2021-03-04 20:35 ` [PATCH v3 4/5] tests/acceptance: update sunxi kernel from armbian to 5.10.16 Niek Linnenbank
@ 2021-03-04 20:35 ` Niek Linnenbank
  2021-03-05 15:02   ` Willian Rampazzo
  4 siblings, 1 reply; 25+ messages in thread
From: Niek Linnenbank @ 2021-03-04 20:35 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, thuth, berrange, f4bug, b.galvani,
	Niek Linnenbank, qemu-arm, Pavel.Dovgaluk, crosa, philmd

Previously the ARMBIAN_ARTIFACTS_CACHED pre-condition was added to allow running
tests that have already existing armbian.com artifacts stored in the local avocado cache,
but do not have working URLs to download a fresh copy.

At this time of writing the URLs for artifacts on the armbian.com server are updated and working.
Any future broken URLs will result in a skipped acceptance test, for example:

 (1/5) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_orangepi:
  CANCEL: Missing asset https://apt.armbian.com/pool/main/l/linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb (0.53 s)

This commits removes the ARMBIAN_ARTIFACTS_CACHED pre-condition such that
the acceptance tests for the orangepi-pc and cubieboard machines can run.

Signed-off-by: Niek Linnenbank <nieklinnenbank@gmail.com>
---
 tests/acceptance/boot_linux_console.py | 12 ------------
 tests/acceptance/replay_kernel.py      |  2 --
 2 files changed, 14 deletions(-)

diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
index 04a8b23352..1ca32ecf25 100644
--- a/tests/acceptance/boot_linux_console.py
+++ b/tests/acceptance/boot_linux_console.py
@@ -507,8 +507,6 @@ def test_arm_exynos4210_initrd(self):
         self.wait_for_console_pattern('Boot successful.')
         # TODO user command, for now the uart is stuck
 
-    @skipUnless(os.getenv('ARMBIAN_ARTIFACTS_CACHED'),
-                'Test artifacts fetched from unreliable apt.armbian.com')
     def test_arm_cubieboard_initrd(self):
         """
         :avocado: tags=arch:arm
@@ -549,8 +547,6 @@ def test_arm_cubieboard_initrd(self):
                                                 'system-control@1c00000')
         # cubieboard's reboot is not functioning; omit reboot test.
 
-    @skipUnless(os.getenv('ARMBIAN_ARTIFACTS_CACHED'),
-                'Test artifacts fetched from unreliable apt.armbian.com')
     def test_arm_cubieboard_sata(self):
         """
         :avocado: tags=arch:arm
@@ -678,8 +674,6 @@ def test_arm_quanta_gsj_initrd(self):
         self.wait_for_console_pattern(
                 'Give root password for system maintenance')
 
-    @skipUnless(os.getenv('ARMBIAN_ARTIFACTS_CACHED'),
-                'Test artifacts fetched from unreliable apt.armbian.com')
     def test_arm_orangepi(self):
         """
         :avocado: tags=arch:arm
@@ -705,8 +699,6 @@ def test_arm_orangepi(self):
         console_pattern = 'Kernel command line: %s' % kernel_command_line
         self.wait_for_console_pattern(console_pattern)
 
-    @skipUnless(os.getenv('ARMBIAN_ARTIFACTS_CACHED'),
-                'Test artifacts fetched from unreliable apt.armbian.com')
     def test_arm_orangepi_initrd(self):
         """
         :avocado: tags=arch:arm
@@ -749,8 +741,6 @@ def test_arm_orangepi_initrd(self):
         # Wait for VM to shut down gracefully
         self.vm.wait()
 
-    @skipUnless(os.getenv('ARMBIAN_ARTIFACTS_CACHED'),
-                'Test artifacts fetched from unreliable apt.armbian.com')
     def test_arm_orangepi_sd(self):
         """
         :avocado: tags=arch:arm
@@ -802,8 +792,6 @@ def test_arm_orangepi_sd(self):
         # Wait for VM to shut down gracefully
         self.vm.wait()
 
-    @skipUnless(os.getenv('ARMBIAN_ARTIFACTS_CACHED'),
-                'Test artifacts fetched from unreliable apt.armbian.com')
     @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited')
     def test_arm_orangepi_bionic_20_08(self):
         """
diff --git a/tests/acceptance/replay_kernel.py b/tests/acceptance/replay_kernel.py
index 8c68caae31..71facdaa75 100644
--- a/tests/acceptance/replay_kernel.py
+++ b/tests/acceptance/replay_kernel.py
@@ -177,8 +177,6 @@ def test_arm_virt(self):
         self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=1)
 
     @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab')
-    @skipUnless(os.getenv('ARMBIAN_ARTIFACTS_CACHED'),
-                'Test artifacts fetched from unreliable apt.armbian.com')
     def test_arm_cubieboard_initrd(self):
         """
         :avocado: tags=arch:arm
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 25+ messages in thread

* Re: [PATCH v3 3/5] tests/acceptance/boot_linux_console: change URL for test_arm_orangepi_bionic_20_08
  2021-03-04 20:35 ` [PATCH v3 3/5] tests/acceptance/boot_linux_console: change URL for test_arm_orangepi_bionic_20_08 Niek Linnenbank
@ 2021-03-04 22:30   ` Philippe Mathieu-Daudé
  2021-03-05 14:56   ` Willian Rampazzo
  1 sibling, 0 replies; 25+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-04 22:30 UTC (permalink / raw)
  To: Niek Linnenbank, qemu-devel
  Cc: peter.maydell, thuth, berrange, f4bug, b.galvani, qemu-arm,
	Pavel.Dovgaluk, crosa

On 3/4/21 9:35 PM, Niek Linnenbank wrote:
> Update the download URL of the Armbian 20.08 Bionic image for
> test_arm_orangepi_bionic_20_08 of the orangepi-pc machine.
> 
> The archive.armbian.com URL contains more images and should keep stable
> for a longer period of time than dl.armbian.com.
> 
> Signed-off-by: Niek Linnenbank <nieklinnenbank@gmail.com>
> ---
>  tests/acceptance/boot_linux_console.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v3 3/5] tests/acceptance/boot_linux_console: change URL for test_arm_orangepi_bionic_20_08
  2021-03-04 20:35 ` [PATCH v3 3/5] tests/acceptance/boot_linux_console: change URL for test_arm_orangepi_bionic_20_08 Niek Linnenbank
  2021-03-04 22:30   ` Philippe Mathieu-Daudé
@ 2021-03-05 14:56   ` Willian Rampazzo
  1 sibling, 0 replies; 25+ messages in thread
From: Willian Rampazzo @ 2021-03-05 14:56 UTC (permalink / raw)
  To: Niek Linnenbank
  Cc: Peter Maydell, Thomas Huth, Daniel Berrange, qemu-devel,
	Philippe Mathieu-Daudé,
	b.galvani, qemu-arm, Pavel Dovgalyuk, Cleber Rosa Junior,
	Philippe Mathieu Daude

On Thu, Mar 4, 2021 at 5:42 PM Niek Linnenbank <nieklinnenbank@gmail.com> wrote:
>
> Update the download URL of the Armbian 20.08 Bionic image for
> test_arm_orangepi_bionic_20_08 of the orangepi-pc machine.
>
> The archive.armbian.com URL contains more images and should keep stable
> for a longer period of time than dl.armbian.com.
>
> Signed-off-by: Niek Linnenbank <nieklinnenbank@gmail.com>
> ---
>  tests/acceptance/boot_linux_console.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Willian Rampazzo <willianr@redhat.com>



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v3 5/5] tests/acceptance: drop ARMBIAN_ARTIFACTS_CACHED condition for orangepi-pc, cubieboard tests
  2021-03-04 20:35 ` [PATCH v3 5/5] tests/acceptance: drop ARMBIAN_ARTIFACTS_CACHED condition for orangepi-pc, cubieboard tests Niek Linnenbank
@ 2021-03-05 15:02   ` Willian Rampazzo
  0 siblings, 0 replies; 25+ messages in thread
From: Willian Rampazzo @ 2021-03-05 15:02 UTC (permalink / raw)
  To: Niek Linnenbank
  Cc: Peter Maydell, Thomas Huth, Daniel Berrange, qemu-devel,
	Philippe Mathieu-Daudé,
	b.galvani, qemu-arm, Pavel Dovgalyuk, Cleber Rosa Junior,
	Philippe Mathieu Daude

On Thu, Mar 4, 2021 at 5:48 PM Niek Linnenbank <nieklinnenbank@gmail.com> wrote:
>
> Previously the ARMBIAN_ARTIFACTS_CACHED pre-condition was added to allow running
> tests that have already existing armbian.com artifacts stored in the local avocado cache,
> but do not have working URLs to download a fresh copy.
>
> At this time of writing the URLs for artifacts on the armbian.com server are updated and working.
> Any future broken URLs will result in a skipped acceptance test, for example:
>
>  (1/5) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_orangepi:
>   CANCEL: Missing asset https://apt.armbian.com/pool/main/l/linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb (0.53 s)
>
> This commits removes the ARMBIAN_ARTIFACTS_CACHED pre-condition such that
> the acceptance tests for the orangepi-pc and cubieboard machines can run.
>
> Signed-off-by: Niek Linnenbank <nieklinnenbank@gmail.com>
> ---
>  tests/acceptance/boot_linux_console.py | 12 ------------
>  tests/acceptance/replay_kernel.py      |  2 --
>  2 files changed, 14 deletions(-)
>

Considering the tests are already canceled when an asset is not
available, this makes a lot of sense, so:

Reviewed-by: Willian Rampazzo <willianr@redhat.com>



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v3 4/5] tests/acceptance: update sunxi kernel from armbian to 5.10.16
  2021-03-04 20:35 ` [PATCH v3 4/5] tests/acceptance: update sunxi kernel from armbian to 5.10.16 Niek Linnenbank
@ 2021-03-05 15:04   ` Willian Rampazzo
  2021-03-08  7:49     ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 25+ messages in thread
From: Willian Rampazzo @ 2021-03-05 15:04 UTC (permalink / raw)
  To: Niek Linnenbank
  Cc: Peter Maydell, Thomas Huth, Daniel Berrange, qemu-devel,
	Philippe Mathieu-Daudé,
	b.galvani, qemu-arm, Pavel Dovgalyuk, Cleber Rosa Junior,
	Philippe Mathieu Daude

On Thu, Mar 4, 2021 at 5:45 PM Niek Linnenbank <nieklinnenbank@gmail.com> wrote:
>
> The linux kernel 4.20.7 binary for sunxi has been removed from apt.armbian.com:
>
>   $ ARMBIAN_ARTIFACTS_CACHED=yes AVOCADO_ALLOW_LARGE_STORAGE=yes avocado --show=app,console run -t machine:orangepi-pc tests/acceptance/boot_linux_console.py
>   Fetching asset from tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_orangepi
>   ...
>   (1/6) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_orangepi:
>     CANCEL: Missing asset https://apt.armbian.com/pool/main/l/linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb (0.55 s)
>
> This commit updates the sunxi kernel to 5.10.16 for the acceptance
> tests of the orangepi-pc and cubieboard machines.
>
> Signed-off-by: Niek Linnenbank <nieklinnenbank@gmail.com>
> ---
>  tests/acceptance/boot_linux_console.py | 40 +++++++++++++-------------
>  tests/acceptance/replay_kernel.py      |  8 +++---
>  2 files changed, 24 insertions(+), 24 deletions(-)
>

I think some devs will not like it, but, for me, it is fine as we
don't have the old kernel available anymore:

Reviewed-by: Willian Rampazzo <willianr@redhat.com>



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v3 2/5] tests/acceptance/boot_linux_console: remove Armbian 19.11.3 bionic test for orangepi-pc machine
  2021-03-04 20:35 ` [PATCH v3 2/5] tests/acceptance/boot_linux_console: remove Armbian 19.11.3 bionic test for orangepi-pc machine Niek Linnenbank
@ 2021-03-05 15:16   ` Willian Rampazzo
  2021-03-08  7:52     ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 25+ messages in thread
From: Willian Rampazzo @ 2021-03-05 15:16 UTC (permalink / raw)
  To: Niek Linnenbank
  Cc: Peter Maydell, Thomas Huth, Daniel Berrange, qemu-devel,
	Philippe Mathieu-Daudé,
	b.galvani, qemu-arm, Pavel Dovgalyuk, Cleber Rosa Junior,
	Philippe Mathieu Daude

On Thu, Mar 4, 2021 at 5:44 PM Niek Linnenbank <nieklinnenbank@gmail.com> wrote:
>
> The image for Armbian 19.11.3 bionic has been removed from the armbian server.
> Without the image as input the test arm_orangepi_bionic_19_11 cannot run.
>
> This commit removes the test completely and merges the code of the generic function
> do_test_arm_orangepi_uboot_armbian back with the 20.08 test.
>
> Signed-off-by: Niek Linnenbank <nieklinnenbank@gmail.com>
> ---
>  tests/acceptance/boot_linux_console.py | 72 ++++++++------------------
>  1 file changed, 23 insertions(+), 49 deletions(-)
>
> diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
> index eb01286799..9fadea9958 100644
> --- a/tests/acceptance/boot_linux_console.py
> +++ b/tests/acceptance/boot_linux_console.py
> @@ -802,7 +802,29 @@ def test_arm_orangepi_sd(self):
>          # Wait for VM to shut down gracefully
>          self.vm.wait()
>
> -    def do_test_arm_orangepi_uboot_armbian(self, image_path):
> +    @skipUnless(os.getenv('ARMBIAN_ARTIFACTS_CACHED'),
> +                'Test artifacts fetched from unreliable apt.armbian.com')
> +    @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited')
> +    def test_arm_orangepi_bionic_20_08(self):
> +        """
> +        :avocado: tags=arch:arm
> +        :avocado: tags=machine:orangepi-pc
> +        :avocado: tags=device:sd
> +        """
> +
> +        # This test download a 275 MiB compressed image and expand it
> +        # to 1036 MiB, but the underlying filesystem is 1552 MiB...
> +        # As we expand it to 2 GiB we are safe.
> +
> +        image_url = ('https://dl.armbian.com/orangepipc/archive/'
> +                     'Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz')

The Armbian 20 is not available on this link anymore. I can browse just 21.

What if we change this test to use local assets, for people that have
them and for CI that has the files cached. See
https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg00614.html
for details.



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v3 4/5] tests/acceptance: update sunxi kernel from armbian to 5.10.16
  2021-03-05 15:04   ` Willian Rampazzo
@ 2021-03-08  7:49     ` Philippe Mathieu-Daudé
  2021-03-08 20:27       ` Niek Linnenbank
  0 siblings, 1 reply; 25+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-08  7:49 UTC (permalink / raw)
  To: Willian Rampazzo, Niek Linnenbank
  Cc: Peter Maydell, Thomas Huth, Daniel Berrange, qemu-devel,
	b.galvani, qemu-arm, Pavel Dovgalyuk, Cleber Rosa Junior,
	Philippe Mathieu Daude

On 3/5/21 4:04 PM, Willian Rampazzo wrote:
> On Thu, Mar 4, 2021 at 5:45 PM Niek Linnenbank <nieklinnenbank@gmail.com> wrote:
>>
>> The linux kernel 4.20.7 binary for sunxi has been removed from apt.armbian.com:
>>
>>   $ ARMBIAN_ARTIFACTS_CACHED=yes AVOCADO_ALLOW_LARGE_STORAGE=yes avocado --show=app,console run -t machine:orangepi-pc tests/acceptance/boot_linux_console.py
>>   Fetching asset from tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_orangepi
>>   ...
>>   (1/6) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_orangepi:
>>     CANCEL: Missing asset https://apt.armbian.com/pool/main/l/linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb (0.55 s)
>>
>> This commit updates the sunxi kernel to 5.10.16 for the acceptance
>> tests of the orangepi-pc and cubieboard machines.
>>
>> Signed-off-by: Niek Linnenbank <nieklinnenbank@gmail.com>
>> ---
>>  tests/acceptance/boot_linux_console.py | 40 +++++++++++++-------------
>>  tests/acceptance/replay_kernel.py      |  8 +++---
>>  2 files changed, 24 insertions(+), 24 deletions(-)
>>
> 
> I think some devs will not like it,
Maybe you refer to my previous NACKs regarding similar changes in
integration tests. Niek is the author of the test and the maintainer
of the machine, so if he is OK to stop testing the 4.20.7 kernels
and test the 5.10.16 from now on, I won't object.

> but, for me, it is fine as we
> don't have the old kernel available anymore:
> 
> Reviewed-by: Willian Rampazzo <willianr@redhat.com>
> 



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v3 2/5] tests/acceptance/boot_linux_console: remove Armbian 19.11.3 bionic test for orangepi-pc machine
  2021-03-05 15:16   ` Willian Rampazzo
@ 2021-03-08  7:52     ` Philippe Mathieu-Daudé
  2021-03-08 20:32       ` Niek Linnenbank
  0 siblings, 1 reply; 25+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-08  7:52 UTC (permalink / raw)
  To: Willian Rampazzo, Niek Linnenbank
  Cc: Peter Maydell, Thomas Huth, Daniel Berrange, qemu-devel,
	b.galvani, qemu-arm, Pavel Dovgalyuk, Cleber Rosa Junior,
	Philippe Mathieu Daude

On 3/5/21 4:16 PM, Willian Rampazzo wrote:
> On Thu, Mar 4, 2021 at 5:44 PM Niek Linnenbank <nieklinnenbank@gmail.com> wrote:
>>
>> The image for Armbian 19.11.3 bionic has been removed from the armbian server.
>> Without the image as input the test arm_orangepi_bionic_19_11 cannot run.
>>
>> This commit removes the test completely and merges the code of the generic function
>> do_test_arm_orangepi_uboot_armbian back with the 20.08 test.
>>
>> Signed-off-by: Niek Linnenbank <nieklinnenbank@gmail.com>
>> ---
>>  tests/acceptance/boot_linux_console.py | 72 ++++++++------------------
>>  1 file changed, 23 insertions(+), 49 deletions(-)
>>
>> diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
>> index eb01286799..9fadea9958 100644
>> --- a/tests/acceptance/boot_linux_console.py
>> +++ b/tests/acceptance/boot_linux_console.py
>> @@ -802,7 +802,29 @@ def test_arm_orangepi_sd(self):
>>          # Wait for VM to shut down gracefully
>>          self.vm.wait()
>>
>> -    def do_test_arm_orangepi_uboot_armbian(self, image_path):
>> +    @skipUnless(os.getenv('ARMBIAN_ARTIFACTS_CACHED'),
>> +                'Test artifacts fetched from unreliable apt.armbian.com')
>> +    @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited')
>> +    def test_arm_orangepi_bionic_20_08(self):
>> +        """
>> +        :avocado: tags=arch:arm
>> +        :avocado: tags=machine:orangepi-pc
>> +        :avocado: tags=device:sd
>> +        """
>> +
>> +        # This test download a 275 MiB compressed image and expand it
>> +        # to 1036 MiB, but the underlying filesystem is 1552 MiB...
>> +        # As we expand it to 2 GiB we are safe.
>> +
>> +        image_url = ('https://dl.armbian.com/orangepipc/archive/'
>> +                     'Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz')
> 
> The Armbian 20 is not available on this link anymore. I can browse just 21.

Cat-and-mouse game *sigh*.



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v3 4/5] tests/acceptance: update sunxi kernel from armbian to 5.10.16
  2021-03-08  7:49     ` Philippe Mathieu-Daudé
@ 2021-03-08 20:27       ` Niek Linnenbank
  0 siblings, 0 replies; 25+ messages in thread
From: Niek Linnenbank @ 2021-03-08 20:27 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, Thomas Huth, Daniel Berrange, Pavel Dovgalyuk,
	qemu-devel, Beniamino Galvani, qemu-arm, Willian Rampazzo,
	Cleber Rosa Junior

[-- Attachment #1: Type: text/plain, Size: 2221 bytes --]

Hi Philippe, Willian,

Thanks for reviewing!

On Mon, Mar 8, 2021 at 8:50 AM Philippe Mathieu-Daudé <philmd@redhat.com>
wrote:

> On 3/5/21 4:04 PM, Willian Rampazzo wrote:
> > On Thu, Mar 4, 2021 at 5:45 PM Niek Linnenbank <nieklinnenbank@gmail.com>
> wrote:
> >>
> >> The linux kernel 4.20.7 binary for sunxi has been removed from
> apt.armbian.com:
> >>
> >>   $ ARMBIAN_ARTIFACTS_CACHED=yes AVOCADO_ALLOW_LARGE_STORAGE=yes
> avocado --show=app,console run -t machine:orangepi-pc
> tests/acceptance/boot_linux_console.py
> >>   Fetching asset from
> tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_orangepi
> >>   ...
> >>   (1/6)
> tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_orangepi:
> >>     CANCEL: Missing asset
> https://apt.armbian.com/pool/main/l/linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb
> (0.55 s)
> >>
> >> This commit updates the sunxi kernel to 5.10.16 for the acceptance
> >> tests of the orangepi-pc and cubieboard machines.
> >>
> >> Signed-off-by: Niek Linnenbank <nieklinnenbank@gmail.com>
> >> ---
> >>  tests/acceptance/boot_linux_console.py | 40 +++++++++++++-------------
> >>  tests/acceptance/replay_kernel.py      |  8 +++---
> >>  2 files changed, 24 insertions(+), 24 deletions(-)
> >>
> >
> > I think some devs will not like it,
> Maybe you refer to my previous NACKs regarding similar changes in
> integration tests. Niek is the author of the test and the maintainer
> of the machine, so if he is OK to stop testing the 4.20.7 kernels
> and test the 5.10.16 from now on, I won't object.
>

For me the 4.20.7 kernel would have been OK if it was still available. With
that version removed,
I looked at what is now available on https://apt.armbian.com/pool/main/l/.
There are quite a lot of packaged kernels there
and 5.10.16 seemed to me a good balance of running newer kernel code with a
version that will hopefully stay around for a while.


>
> > but, for me, it is fine as we
> > don't have the old kernel available anymore:
> >
> > Reviewed-by: Willian Rampazzo <willianr@redhat.com>
> >
>
> Thanks, will add your reviewed-by tag.

Regards,
Niek

-- 
Niek Linnenbank

[-- Attachment #2: Type: text/html, Size: 3540 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v3 2/5] tests/acceptance/boot_linux_console: remove Armbian 19.11.3 bionic test for orangepi-pc machine
  2021-03-08  7:52     ` Philippe Mathieu-Daudé
@ 2021-03-08 20:32       ` Niek Linnenbank
  2021-03-08 20:41         ` Willian Rampazzo
  0 siblings, 1 reply; 25+ messages in thread
From: Niek Linnenbank @ 2021-03-08 20:32 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, Thomas Huth, Daniel Berrange, Pavel Dovgalyuk,
	qemu-devel, Beniamino Galvani, qemu-arm, Willian Rampazzo,
	Cleber Rosa Junior

[-- Attachment #1: Type: text/plain, Size: 2663 bytes --]

Hi Philippe, Willian,

On Mon, Mar 8, 2021 at 8:52 AM Philippe Mathieu-Daudé <philmd@redhat.com>
wrote:

> On 3/5/21 4:16 PM, Willian Rampazzo wrote:
> > On Thu, Mar 4, 2021 at 5:44 PM Niek Linnenbank <nieklinnenbank@gmail.com>
> wrote:
> >>
> >> The image for Armbian 19.11.3 bionic has been removed from the armbian
> server.
> >> Without the image as input the test arm_orangepi_bionic_19_11 cannot
> run.
> >>
> >> This commit removes the test completely and merges the code of the
> generic function
> >> do_test_arm_orangepi_uboot_armbian back with the 20.08 test.
> >>
> >> Signed-off-by: Niek Linnenbank <nieklinnenbank@gmail.com>
> >> ---
> >>  tests/acceptance/boot_linux_console.py | 72 ++++++++------------------
> >>  1 file changed, 23 insertions(+), 49 deletions(-)
> >>
> >> diff --git a/tests/acceptance/boot_linux_console.py
> b/tests/acceptance/boot_linux_console.py
> >> index eb01286799..9fadea9958 100644
> >> --- a/tests/acceptance/boot_linux_console.py
> >> +++ b/tests/acceptance/boot_linux_console.py
> >> @@ -802,7 +802,29 @@ def test_arm_orangepi_sd(self):
> >>          # Wait for VM to shut down gracefully
> >>          self.vm.wait()
> >>
> >> -    def do_test_arm_orangepi_uboot_armbian(self, image_path):
> >> +    @skipUnless(os.getenv('ARMBIAN_ARTIFACTS_CACHED'),
> >> +                'Test artifacts fetched from unreliable
> apt.armbian.com')
> >> +    @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage
> limited')
> >> +    def test_arm_orangepi_bionic_20_08(self):
> >> +        """
> >> +        :avocado: tags=arch:arm
> >> +        :avocado: tags=machine:orangepi-pc
> >> +        :avocado: tags=device:sd
> >> +        """
> >> +
> >> +        # This test download a 275 MiB compressed image and expand it
> >> +        # to 1036 MiB, but the underlying filesystem is 1552 MiB...
> >> +        # As we expand it to 2 GiB we are safe.
> >> +
> >> +        image_url = ('https://dl.armbian.com/orangepipc/archive/'
> >> +
>  'Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz')
> >
> > The Armbian 20 is not available on this link anymore. I can browse just
> 21.
>
> Cat-and-mouse game *sigh*.
>
>
Just to clarify here: in this patch I wanted to only make the change to
remove the test for the 19.11.3 image.
And in the 3rd patch (tests/acceptance/boot_linux_console: change URL for
test_arm_orangepi_bionic_20_08)
do the update for to correct the 20.08 link. So each patch fixes one
problem at a time.

Does that make sense, or do you prefer that I combine them in a single
patch instead?

Regards,
Niek

-- 
Niek Linnenbank

[-- Attachment #2: Type: text/html, Size: 3933 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v3 2/5] tests/acceptance/boot_linux_console: remove Armbian 19.11.3 bionic test for orangepi-pc machine
  2021-03-08 20:32       ` Niek Linnenbank
@ 2021-03-08 20:41         ` Willian Rampazzo
  2021-03-08 20:44           ` Willian Rampazzo
  0 siblings, 1 reply; 25+ messages in thread
From: Willian Rampazzo @ 2021-03-08 20:41 UTC (permalink / raw)
  To: Niek Linnenbank
  Cc: Peter Maydell, Thomas Huth, Daniel Berrange, qemu-devel,
	Beniamino Galvani, qemu-arm, Pavel Dovgalyuk, Cleber Rosa Junior,
	Philippe Mathieu-Daudé

On Mon, Mar 8, 2021 at 5:32 PM Niek Linnenbank <nieklinnenbank@gmail.com> wrote:
>
> Hi Philippe, Willian,
>
> On Mon, Mar 8, 2021 at 8:52 AM Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>>
>> On 3/5/21 4:16 PM, Willian Rampazzo wrote:
>> > On Thu, Mar 4, 2021 at 5:44 PM Niek Linnenbank <nieklinnenbank@gmail.com> wrote:
>> >>
>> >> The image for Armbian 19.11.3 bionic has been removed from the armbian server.
>> >> Without the image as input the test arm_orangepi_bionic_19_11 cannot run.
>> >>
>> >> This commit removes the test completely and merges the code of the generic function
>> >> do_test_arm_orangepi_uboot_armbian back with the 20.08 test.
>> >>
>> >> Signed-off-by: Niek Linnenbank <nieklinnenbank@gmail.com>
>> >> ---
>> >>  tests/acceptance/boot_linux_console.py | 72 ++++++++------------------
>> >>  1 file changed, 23 insertions(+), 49 deletions(-)
>> >>
>> >> diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
>> >> index eb01286799..9fadea9958 100644
>> >> --- a/tests/acceptance/boot_linux_console.py
>> >> +++ b/tests/acceptance/boot_linux_console.py
>> >> @@ -802,7 +802,29 @@ def test_arm_orangepi_sd(self):
>> >>          # Wait for VM to shut down gracefully
>> >>          self.vm.wait()
>> >>
>> >> -    def do_test_arm_orangepi_uboot_armbian(self, image_path):
>> >> +    @skipUnless(os.getenv('ARMBIAN_ARTIFACTS_CACHED'),
>> >> +                'Test artifacts fetched from unreliable apt.armbian.com')
>> >> +    @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited')
>> >> +    def test_arm_orangepi_bionic_20_08(self):
>> >> +        """
>> >> +        :avocado: tags=arch:arm
>> >> +        :avocado: tags=machine:orangepi-pc
>> >> +        :avocado: tags=device:sd
>> >> +        """
>> >> +
>> >> +        # This test download a 275 MiB compressed image and expand it
>> >> +        # to 1036 MiB, but the underlying filesystem is 1552 MiB...
>> >> +        # As we expand it to 2 GiB we are safe.
>> >> +
>> >> +        image_url = ('https://dl.armbian.com/orangepipc/archive/'
>> >> +                     'Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz')
>> >
>> > The Armbian 20 is not available on this link anymore. I can browse just 21.
>>
>> Cat-and-mouse game *sigh*.
>>
>
> Just to clarify here: in this patch I wanted to only make the change to remove the test for the 19.11.3 image.
> And in the 3rd patch (tests/acceptance/boot_linux_console: change URL for test_arm_orangepi_bionic_20_08)
> do the update for to correct the 20.08 link. So each patch fixes one problem at a time.
>
> Does that make sense, or do you prefer that I combine them in a single patch instead?

Ops, I forgot about the 3rd patch in this series. That makes sense to
me, sorry for the mess.

>
> Regards,
> Niek
>
> --
> Niek Linnenbank
>



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v3 2/5] tests/acceptance/boot_linux_console: remove Armbian 19.11.3 bionic test for orangepi-pc machine
  2021-03-08 20:41         ` Willian Rampazzo
@ 2021-03-08 20:44           ` Willian Rampazzo
  2021-03-22 16:53             ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 25+ messages in thread
From: Willian Rampazzo @ 2021-03-08 20:44 UTC (permalink / raw)
  To: Niek Linnenbank
  Cc: Peter Maydell, Thomas Huth, Daniel Berrange, qemu-devel,
	Beniamino Galvani, qemu-arm, Pavel Dovgalyuk, Cleber Rosa Junior,
	Philippe Mathieu-Daudé

On Mon, Mar 8, 2021 at 5:41 PM Willian Rampazzo <wrampazz@redhat.com> wrote:
>
> On Mon, Mar 8, 2021 at 5:32 PM Niek Linnenbank <nieklinnenbank@gmail.com> wrote:
> >
> > Hi Philippe, Willian,
> >
> > On Mon, Mar 8, 2021 at 8:52 AM Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
> >>
> >> On 3/5/21 4:16 PM, Willian Rampazzo wrote:
> >> > On Thu, Mar 4, 2021 at 5:44 PM Niek Linnenbank <nieklinnenbank@gmail.com> wrote:
> >> >>
> >> >> The image for Armbian 19.11.3 bionic has been removed from the armbian server.
> >> >> Without the image as input the test arm_orangepi_bionic_19_11 cannot run.
> >> >>
> >> >> This commit removes the test completely and merges the code of the generic function
> >> >> do_test_arm_orangepi_uboot_armbian back with the 20.08 test.
> >> >>
> >> >> Signed-off-by: Niek Linnenbank <nieklinnenbank@gmail.com>
> >> >> ---
> >> >>  tests/acceptance/boot_linux_console.py | 72 ++++++++------------------
> >> >>  1 file changed, 23 insertions(+), 49 deletions(-)
> >> >>
> >> >> diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
> >> >> index eb01286799..9fadea9958 100644
> >> >> --- a/tests/acceptance/boot_linux_console.py
> >> >> +++ b/tests/acceptance/boot_linux_console.py
> >> >> @@ -802,7 +802,29 @@ def test_arm_orangepi_sd(self):
> >> >>          # Wait for VM to shut down gracefully
> >> >>          self.vm.wait()
> >> >>
> >> >> -    def do_test_arm_orangepi_uboot_armbian(self, image_path):
> >> >> +    @skipUnless(os.getenv('ARMBIAN_ARTIFACTS_CACHED'),
> >> >> +                'Test artifacts fetched from unreliable apt.armbian.com')
> >> >> +    @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited')
> >> >> +    def test_arm_orangepi_bionic_20_08(self):
> >> >> +        """
> >> >> +        :avocado: tags=arch:arm
> >> >> +        :avocado: tags=machine:orangepi-pc
> >> >> +        :avocado: tags=device:sd
> >> >> +        """
> >> >> +
> >> >> +        # This test download a 275 MiB compressed image and expand it
> >> >> +        # to 1036 MiB, but the underlying filesystem is 1552 MiB...
> >> >> +        # As we expand it to 2 GiB we are safe.
> >> >> +
> >> >> +        image_url = ('https://dl.armbian.com/orangepipc/archive/'
> >> >> +                     'Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz')
> >> >
> >> > The Armbian 20 is not available on this link anymore. I can browse just 21.
> >>
> >> Cat-and-mouse game *sigh*.
> >>
> >
> > Just to clarify here: in this patch I wanted to only make the change to remove the test for the 19.11.3 image.
> > And in the 3rd patch (tests/acceptance/boot_linux_console: change URL for test_arm_orangepi_bionic_20_08)
> > do the update for to correct the 20.08 link. So each patch fixes one problem at a time.
> >
> > Does that make sense, or do you prefer that I combine them in a single patch instead?
>
> Ops, I forgot about the 3rd patch in this series. That makes sense to
> me, sorry for the mess.
>

And, in this case,

Reviewed-by: Willian Rampazzo <willianr@redhat.com>

> >
> > Regards,
> > Niek
> >
> > --
> > Niek Linnenbank
> >



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v3 2/5] tests/acceptance/boot_linux_console: remove Armbian 19.11.3 bionic test for orangepi-pc machine
  2021-03-08 20:44           ` Willian Rampazzo
@ 2021-03-22 16:53             ` Philippe Mathieu-Daudé
  2021-03-22 16:59               ` Philippe Mathieu-Daudé
  2021-03-22 17:18               ` Willian Rampazzo
  0 siblings, 2 replies; 25+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-22 16:53 UTC (permalink / raw)
  To: Willian Rampazzo
  Cc: Peter Maydell, Thomas Huth, Daniel Berrange, qemu-devel,
	Beniamino Galvani, Niek Linnenbank, qemu-arm, Pavel Dovgalyuk,
	Cleber Rosa Junior

Hi Willian,

On 3/8/21 9:44 PM, Willian Rampazzo wrote:
> On Mon, Mar 8, 2021 at 5:41 PM Willian Rampazzo <wrampazz@redhat.com> wrote:
>>
>> On Mon, Mar 8, 2021 at 5:32 PM Niek Linnenbank <nieklinnenbank@gmail.com> wrote:
>>>
>>> Hi Philippe, Willian,
>>>
>>> On Mon, Mar 8, 2021 at 8:52 AM Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>>>>
>>>> On 3/5/21 4:16 PM, Willian Rampazzo wrote:
>>>>> On Thu, Mar 4, 2021 at 5:44 PM Niek Linnenbank <nieklinnenbank@gmail.com> wrote:
>>>>>>
>>>>>> The image for Armbian 19.11.3 bionic has been removed from the armbian server.
>>>>>> Without the image as input the test arm_orangepi_bionic_19_11 cannot run.
>>>>>>
>>>>>> This commit removes the test completely and merges the code of the generic function
>>>>>> do_test_arm_orangepi_uboot_armbian back with the 20.08 test.
>>>>>>
>>>>>> Signed-off-by: Niek Linnenbank <nieklinnenbank@gmail.com>
>>>>>> ---
>>>>>>  tests/acceptance/boot_linux_console.py | 72 ++++++++------------------
>>>>>>  1 file changed, 23 insertions(+), 49 deletions(-)
>>>>>>
>>>>>> diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
>>>>>> index eb01286799..9fadea9958 100644
>>>>>> --- a/tests/acceptance/boot_linux_console.py
>>>>>> +++ b/tests/acceptance/boot_linux_console.py
>>>>>> @@ -802,7 +802,29 @@ def test_arm_orangepi_sd(self):
>>>>>>          # Wait for VM to shut down gracefully
>>>>>>          self.vm.wait()
>>>>>>
>>>>>> -    def do_test_arm_orangepi_uboot_armbian(self, image_path):
>>>>>> +    @skipUnless(os.getenv('ARMBIAN_ARTIFACTS_CACHED'),
>>>>>> +                'Test artifacts fetched from unreliable apt.armbian.com')
>>>>>> +    @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited')
>>>>>> +    def test_arm_orangepi_bionic_20_08(self):
>>>>>> +        """
>>>>>> +        :avocado: tags=arch:arm
>>>>>> +        :avocado: tags=machine:orangepi-pc
>>>>>> +        :avocado: tags=device:sd
>>>>>> +        """
>>>>>> +
>>>>>> +        # This test download a 275 MiB compressed image and expand it
>>>>>> +        # to 1036 MiB, but the underlying filesystem is 1552 MiB...
>>>>>> +        # As we expand it to 2 GiB we are safe.
>>>>>> +
>>>>>> +        image_url = ('https://dl.armbian.com/orangepipc/archive/'
>>>>>> +                     'Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz')
>>>>>
>>>>> The Armbian 20 is not available on this link anymore. I can browse just 21.
>>>>
>>>> Cat-and-mouse game *sigh*.

2021-03-22 17:18:10,701 download         L0067 INFO | Fetching
https://archive.armbian.com/orangepipc/archive/Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz
-> /home/phil/avocado/da
ta/cache/by_location/f2eb27a12b81ce15e93f340fabbced2136af1caa/Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz.nfwdzivg
2021-03-22 17:18:11,263 asset            L0136 INFO | Temporary asset
file unavailable due to failed download attempt.
2021-03-22 17:18:11,263 asset            L0368 ERROR| URLError: <urlopen
error [Errno 113] No route to host>

It might be a temporary problem, but looking long term the
current setup doesn't scale IMHO.

>>> Just to clarify here: in this patch I wanted to only make the change to remove the test for the 19.11.3 image.
>>> And in the 3rd patch (tests/acceptance/boot_linux_console: change URL for test_arm_orangepi_bionic_20_08)
>>> do the update for to correct the 20.08 link. So each patch fixes one problem at a time.
>>>
>>> Does that make sense, or do you prefer that I combine them in a single patch instead?
>>
>> Ops, I forgot about the 3rd patch in this series. That makes sense to
>> me, sorry for the mess.
>>
> 
> And, in this case,
> 
> Reviewed-by: Willian Rampazzo <willianr@redhat.com>
> 
>>>
>>> Regards,
>>> Niek
>>>
>>> --
>>> Niek Linnenbank
>>>
> 



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v3 2/5] tests/acceptance/boot_linux_console: remove Armbian 19.11.3 bionic test for orangepi-pc machine
  2021-03-22 16:53             ` Philippe Mathieu-Daudé
@ 2021-03-22 16:59               ` Philippe Mathieu-Daudé
  2021-03-22 17:12                 ` Willian Rampazzo
  2021-03-22 17:18               ` Willian Rampazzo
  1 sibling, 1 reply; 25+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-22 16:59 UTC (permalink / raw)
  To: Willian Rampazzo, Beraldo Leal
  Cc: Peter Maydell, Thomas Huth, Daniel Berrange, qemu-devel,
	Beniamino Galvani, Niek Linnenbank, qemu-arm, Pavel Dovgalyuk,
	Cleber Rosa Junior

On Mon, Mar 22, 2021 at 5:54 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> Hi Willian,
>
> On 3/8/21 9:44 PM, Willian Rampazzo wrote:
> > On Mon, Mar 8, 2021 at 5:41 PM Willian Rampazzo <wrampazz@redhat.com> wrote:
> >>

> >>>>>> -    def do_test_arm_orangepi_uboot_armbian(self, image_path):
> >>>>>> +    @skipUnless(os.getenv('ARMBIAN_ARTIFACTS_CACHED'),
> >>>>>> +                'Test artifacts fetched from unreliable apt.armbian.com')
> >>>>>> +    @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited')
> >>>>>> +    def test_arm_orangepi_bionic_20_08(self):
> >>>>>> +        """
> >>>>>> +        :avocado: tags=arch:arm
> >>>>>> +        :avocado: tags=machine:orangepi-pc
> >>>>>> +        :avocado: tags=device:sd
> >>>>>> +        """
> >>>>>> +
> >>>>>> +        # This test download a 275 MiB compressed image and expand it
> >>>>>> +        # to 1036 MiB, but the underlying filesystem is 1552 MiB...
> >>>>>> +        # As we expand it to 2 GiB we are safe.
> >>>>>> +
> >>>>>> +        image_url = ('https://dl.armbian.com/orangepipc/archive/'
> >>>>>> +                     'Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz')
> >>>>>
> >>>>> The Armbian 20 is not available on this link anymore. I can browse just 21.
> >>>>
> >>>> Cat-and-mouse game *sigh*.
>
> 2021-03-22 17:18:10,701 download         L0067 INFO | Fetching
> https://archive.armbian.com/orangepipc/archive/Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz
> -> /home/phil/avocado/da
> ta/cache/by_location/f2eb27a12b81ce15e93f340fabbced2136af1caa/Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz.nfwdzivg
> 2021-03-22 17:18:11,263 asset            L0136 INFO | Temporary asset
> file unavailable due to failed download attempt.
> 2021-03-22 17:18:11,263 asset            L0368 ERROR| URLError: <urlopen
> error [Errno 113] No route to host>
>
> It might be a temporary problem, but looking long term the
> current setup doesn't scale IMHO.

Also I just noticed I *do* have the image cached, even twice:

$ find /home/phil/avocado/data/cache/by_location/ -name
Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz -ls
  131661 280768 -rw-rw-r--   1 phil     phil     287501560 Oct 23
12:45 /home/phil/avocado/data/cache/by_location/cac379e6a4480624b000dfde1b5d935454254ce2/Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz
  131761 280776 -rw-rw-r--   1 phil     phil     287501560 Feb 20
00:39 /home/phil/avocado/data/cache/by_location/aac619d9e7ea3726ebc86c159fddfb9d3f6274a5/Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz

But the hash is different.

Cleber, why not use the blob hash as a cache key? It is supposed to be
constant...

Cc'ing Beraldo because I guess remember he worked on improving Avocado cache.

> >>> Just to clarify here: in this patch I wanted to only make the change to remove the test for the 19.11.3 image.
> >>> And in the 3rd patch (tests/acceptance/boot_linux_console: change URL for test_arm_orangepi_bionic_20_08)
> >>> do the update for to correct the 20.08 link. So each patch fixes one problem at a time.


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v3 2/5] tests/acceptance/boot_linux_console: remove Armbian 19.11.3 bionic test for orangepi-pc machine
  2021-03-22 16:59               ` Philippe Mathieu-Daudé
@ 2021-03-22 17:12                 ` Willian Rampazzo
  2021-03-22 17:24                   ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 25+ messages in thread
From: Willian Rampazzo @ 2021-03-22 17:12 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, Thomas Huth, Daniel Berrange, Beraldo Leal,
	qemu-devel, Beniamino Galvani, Niek Linnenbank, qemu-arm,
	Pavel Dovgalyuk, Cleber Rosa Junior

Hi Philippe,

On Mon, Mar 22, 2021 at 1:59 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> On Mon, Mar 22, 2021 at 5:54 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> >
> > Hi Willian,
> >
> > On 3/8/21 9:44 PM, Willian Rampazzo wrote:
> > > On Mon, Mar 8, 2021 at 5:41 PM Willian Rampazzo <wrampazz@redhat.com> wrote:
> > >>
>
> > >>>>>> -    def do_test_arm_orangepi_uboot_armbian(self, image_path):
> > >>>>>> +    @skipUnless(os.getenv('ARMBIAN_ARTIFACTS_CACHED'),
> > >>>>>> +                'Test artifacts fetched from unreliable apt.armbian.com')
> > >>>>>> +    @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited')
> > >>>>>> +    def test_arm_orangepi_bionic_20_08(self):
> > >>>>>> +        """
> > >>>>>> +        :avocado: tags=arch:arm
> > >>>>>> +        :avocado: tags=machine:orangepi-pc
> > >>>>>> +        :avocado: tags=device:sd
> > >>>>>> +        """
> > >>>>>> +
> > >>>>>> +        # This test download a 275 MiB compressed image and expand it
> > >>>>>> +        # to 1036 MiB, but the underlying filesystem is 1552 MiB...
> > >>>>>> +        # As we expand it to 2 GiB we are safe.
> > >>>>>> +
> > >>>>>> +        image_url = ('https://dl.armbian.com/orangepipc/archive/'
> > >>>>>> +                     'Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz')
> > >>>>>
> > >>>>> The Armbian 20 is not available on this link anymore. I can browse just 21.
> > >>>>
> > >>>> Cat-and-mouse game *sigh*.
> >
> > 2021-03-22 17:18:10,701 download         L0067 INFO | Fetching
> > https://archive.armbian.com/orangepipc/archive/Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz
> > -> /home/phil/avocado/da
> > ta/cache/by_location/f2eb27a12b81ce15e93f340fabbced2136af1caa/Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz.nfwdzivg
> > 2021-03-22 17:18:11,263 asset            L0136 INFO | Temporary asset
> > file unavailable due to failed download attempt.
> > 2021-03-22 17:18:11,263 asset            L0368 ERROR| URLError: <urlopen
> > error [Errno 113] No route to host>
> >
> > It might be a temporary problem, but looking long term the
> > current setup doesn't scale IMHO.
>
> Also I just noticed I *do* have the image cached, even twice:
>
> $ find /home/phil/avocado/data/cache/by_location/ -name
> Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz -ls
>   131661 280768 -rw-rw-r--   1 phil     phil     287501560 Oct 23
> 12:45 /home/phil/avocado/data/cache/by_location/cac379e6a4480624b000dfde1b5d935454254ce2/Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz
>   131761 280776 -rw-rw-r--   1 phil     phil     287501560 Feb 20
> 00:39 /home/phil/avocado/data/cache/by_location/aac619d9e7ea3726ebc86c159fddfb9d3f6274a5/Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz
>
> But the hash is different.
>

You have 2 images because you fetched them from different locations.
When you fetch by location, the assets go to the directory
representing the hash of the location, This allows, for example, the
fetch of multiple initrd or vmlinuz files from different locations,
representing different files, but with the same name. Also, this was
one of your requests some time ago :)

What Beraldo worked on in the last week was a way to remove "unused"
files. Your cache is a good example of files that are not necessary
anymore because now you are using a different location to fetch them.

> Cleber, why not use the blob hash as a cache key? It is supposed to be
> constant...
>

You can do that by setting the test to download the file by name, and
not by location.

> Cc'ing Beraldo because I guess remember he worked on improving Avocado cache.
>
> > >>> Just to clarify here: in this patch I wanted to only make the change to remove the test for the 19.11.3 image.
> > >>> And in the 3rd patch (tests/acceptance/boot_linux_console: change URL for test_arm_orangepi_bionic_20_08)
> > >>> do the update for to correct the 20.08 link. So each patch fixes one problem at a time.
>



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v3 2/5] tests/acceptance/boot_linux_console: remove Armbian 19.11.3 bionic test for orangepi-pc machine
  2021-03-22 16:53             ` Philippe Mathieu-Daudé
  2021-03-22 16:59               ` Philippe Mathieu-Daudé
@ 2021-03-22 17:18               ` Willian Rampazzo
  2021-03-22 18:47                 ` Philippe Mathieu-Daudé
  1 sibling, 1 reply; 25+ messages in thread
From: Willian Rampazzo @ 2021-03-22 17:18 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, Thomas Huth, Daniel Berrange, qemu-devel,
	Beniamino Galvani, Niek Linnenbank, qemu-arm, Pavel Dovgalyuk,
	Cleber Rosa Junior

Hi Philippe,

On Mon, Mar 22, 2021 at 1:54 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> Hi Willian,
>
> On 3/8/21 9:44 PM, Willian Rampazzo wrote:
> > On Mon, Mar 8, 2021 at 5:41 PM Willian Rampazzo <wrampazz@redhat.com> wrote:
> >>
> >> On Mon, Mar 8, 2021 at 5:32 PM Niek Linnenbank <nieklinnenbank@gmail.com> wrote:
> >>>
> >>> Hi Philippe, Willian,
> >>>
> >>> On Mon, Mar 8, 2021 at 8:52 AM Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
> >>>>
> >>>> On 3/5/21 4:16 PM, Willian Rampazzo wrote:
> >>>>> On Thu, Mar 4, 2021 at 5:44 PM Niek Linnenbank <nieklinnenbank@gmail.com> wrote:
> >>>>>>
> >>>>>> The image for Armbian 19.11.3 bionic has been removed from the armbian server.
> >>>>>> Without the image as input the test arm_orangepi_bionic_19_11 cannot run.
> >>>>>>
> >>>>>> This commit removes the test completely and merges the code of the generic function
> >>>>>> do_test_arm_orangepi_uboot_armbian back with the 20.08 test.
> >>>>>>
> >>>>>> Signed-off-by: Niek Linnenbank <nieklinnenbank@gmail.com>
> >>>>>> ---
> >>>>>>  tests/acceptance/boot_linux_console.py | 72 ++++++++------------------
> >>>>>>  1 file changed, 23 insertions(+), 49 deletions(-)
> >>>>>>
> >>>>>> diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
> >>>>>> index eb01286799..9fadea9958 100644
> >>>>>> --- a/tests/acceptance/boot_linux_console.py
> >>>>>> +++ b/tests/acceptance/boot_linux_console.py
> >>>>>> @@ -802,7 +802,29 @@ def test_arm_orangepi_sd(self):
> >>>>>>          # Wait for VM to shut down gracefully
> >>>>>>          self.vm.wait()
> >>>>>>
> >>>>>> -    def do_test_arm_orangepi_uboot_armbian(self, image_path):
> >>>>>> +    @skipUnless(os.getenv('ARMBIAN_ARTIFACTS_CACHED'),
> >>>>>> +                'Test artifacts fetched from unreliable apt.armbian.com')
> >>>>>> +    @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited')
> >>>>>> +    def test_arm_orangepi_bionic_20_08(self):
> >>>>>> +        """
> >>>>>> +        :avocado: tags=arch:arm
> >>>>>> +        :avocado: tags=machine:orangepi-pc
> >>>>>> +        :avocado: tags=device:sd
> >>>>>> +        """
> >>>>>> +
> >>>>>> +        # This test download a 275 MiB compressed image and expand it
> >>>>>> +        # to 1036 MiB, but the underlying filesystem is 1552 MiB...
> >>>>>> +        # As we expand it to 2 GiB we are safe.
> >>>>>> +
> >>>>>> +        image_url = ('https://dl.armbian.com/orangepipc/archive/'
> >>>>>> +                     'Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz')
> >>>>>
> >>>>> The Armbian 20 is not available on this link anymore. I can browse just 21.
> >>>>
> >>>> Cat-and-mouse game *sigh*.
>
> 2021-03-22 17:18:10,701 download         L0067 INFO | Fetching
> https://archive.armbian.com/orangepipc/archive/Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz
> -> /home/phil/avocado/da
> ta/cache/by_location/f2eb27a12b81ce15e93f340fabbced2136af1caa/Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz.nfwdzivg
> 2021-03-22 17:18:11,263 asset            L0136 INFO | Temporary asset
> file unavailable due to failed download attempt.
> 2021-03-22 17:18:11,263 asset            L0368 ERROR| URLError: <urlopen
> error [Errno 113] No route to host>
>
> It might be a temporary problem, but looking long term the
> current setup doesn't scale IMHO.
>

Have you changed something in the test? The test is supposed to skip
when the asset is not available in the cache. What was the result of
this test execution? Skip, fail, or error? If it was not Skip, we need
to investigate what happened.

> >>> Just to clarify here: in this patch I wanted to only make the change to remove the test for the 19.11.3 image.
> >>> And in the 3rd patch (tests/acceptance/boot_linux_console: change URL for test_arm_orangepi_bionic_20_08)
> >>> do the update for to correct the 20.08 link. So each patch fixes one problem at a time.
> >>>
> >>> Does that make sense, or do you prefer that I combine them in a single patch instead?
> >>
> >> Ops, I forgot about the 3rd patch in this series. That makes sense to
> >> me, sorry for the mess.
> >>
> >
> > And, in this case,
> >
> > Reviewed-by: Willian Rampazzo <willianr@redhat.com>
> >
> >>>
> >>> Regards,
> >>> Niek
> >>>
> >>> --
> >>> Niek Linnenbank
> >>>
> >
>



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v3 2/5] tests/acceptance/boot_linux_console: remove Armbian 19.11.3 bionic test for orangepi-pc machine
  2021-03-22 17:12                 ` Willian Rampazzo
@ 2021-03-22 17:24                   ` Philippe Mathieu-Daudé
  2021-03-22 17:37                     ` Willian Rampazzo
  0 siblings, 1 reply; 25+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-22 17:24 UTC (permalink / raw)
  To: Willian Rampazzo
  Cc: Peter Maydell, Thomas Huth, Daniel Berrange, Beraldo Leal,
	qemu-devel, Beniamino Galvani, Niek Linnenbank, qemu-arm,
	Pavel Dovgalyuk, Cleber Rosa Junior

On 3/22/21 6:12 PM, Willian Rampazzo wrote:
> Hi Philippe,
> 
> On Mon, Mar 22, 2021 at 1:59 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>>
>> On Mon, Mar 22, 2021 at 5:54 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>>>
>>> Hi Willian,
>>>
>>> On 3/8/21 9:44 PM, Willian Rampazzo wrote:
>>>> On Mon, Mar 8, 2021 at 5:41 PM Willian Rampazzo <wrampazz@redhat.com> wrote:
>>>>>
>>
>>>>>>>>> -    def do_test_arm_orangepi_uboot_armbian(self, image_path):
>>>>>>>>> +    @skipUnless(os.getenv('ARMBIAN_ARTIFACTS_CACHED'),
>>>>>>>>> +                'Test artifacts fetched from unreliable apt.armbian.com')
>>>>>>>>> +    @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited')
>>>>>>>>> +    def test_arm_orangepi_bionic_20_08(self):
>>>>>>>>> +        """
>>>>>>>>> +        :avocado: tags=arch:arm
>>>>>>>>> +        :avocado: tags=machine:orangepi-pc
>>>>>>>>> +        :avocado: tags=device:sd
>>>>>>>>> +        """
>>>>>>>>> +
>>>>>>>>> +        # This test download a 275 MiB compressed image and expand it
>>>>>>>>> +        # to 1036 MiB, but the underlying filesystem is 1552 MiB...
>>>>>>>>> +        # As we expand it to 2 GiB we are safe.
>>>>>>>>> +
>>>>>>>>> +        image_url = ('https://dl.armbian.com/orangepipc/archive/'
>>>>>>>>> +                     'Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz')
>>>>>>>>
>>>>>>>> The Armbian 20 is not available on this link anymore. I can browse just 21.
>>>>>>>
>>>>>>> Cat-and-mouse game *sigh*.
>>>
>>> 2021-03-22 17:18:10,701 download         L0067 INFO | Fetching
>>> https://archive.armbian.com/orangepipc/archive/Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz
>>> -> /home/phil/avocado/da
>>> ta/cache/by_location/f2eb27a12b81ce15e93f340fabbced2136af1caa/Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz.nfwdzivg
>>> 2021-03-22 17:18:11,263 asset            L0136 INFO | Temporary asset
>>> file unavailable due to failed download attempt.
>>> 2021-03-22 17:18:11,263 asset            L0368 ERROR| URLError: <urlopen
>>> error [Errno 113] No route to host>
>>>
>>> It might be a temporary problem, but looking long term the
>>> current setup doesn't scale IMHO.
>>
>> Also I just noticed I *do* have the image cached, even twice:
>>
>> $ find /home/phil/avocado/data/cache/by_location/ -name
>> Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz -ls
>>   131661 280768 -rw-rw-r--   1 phil     phil     287501560 Oct 23
>> 12:45 /home/phil/avocado/data/cache/by_location/cac379e6a4480624b000dfde1b5d935454254ce2/Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz
>>   131761 280776 -rw-rw-r--   1 phil     phil     287501560 Feb 20
>> 00:39 /home/phil/avocado/data/cache/by_location/aac619d9e7ea3726ebc86c159fddfb9d3f6274a5/Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz
>>
>> But the hash is different.
>>
> 
> You have 2 images because you fetched them from different locations.
> When you fetch by location, the assets go to the directory
> representing the hash of the location, This allows, for example, the
> fetch of multiple initrd or vmlinuz files from different locations,
> representing different files, but with the same name. Also, this was
> one of your requests some time ago :)

My request because we were fetching different artifacts for different
tests but all files had the same filename, i.e.:

url1://path1/to/vmlinux
url2://path2/to/vmlinux
url3://yet/another/path/to/vmlinux

I was obviously short sighted.

> What Beraldo worked on in the last week was a way to remove "unused"
> files. Your cache is a good example of files that are not necessary
> anymore because now you are using a different location to fetch them.

OK, I'll watch closely how you decide a cached file is "unused"...

> 
>> Cleber, why not use the blob hash as a cache key? It is supposed to be
>> constant...
>>
> 
> You can do that by setting the test to download the file by name, and
> not by location.

How so? Isn't it what I just described earlier we wanted to avoid?

> 
>> Cc'ing Beraldo because I guess remember he worked on improving Avocado cache.
>>
>>>>>> Just to clarify here: in this patch I wanted to only make the change to remove the test for the 19.11.3 image.
>>>>>> And in the 3rd patch (tests/acceptance/boot_linux_console: change URL for test_arm_orangepi_bionic_20_08)
>>>>>> do the update for to correct the 20.08 link. So each patch fixes one problem at a time.
>>
> 
> 


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v3 2/5] tests/acceptance/boot_linux_console: remove Armbian 19.11.3 bionic test for orangepi-pc machine
  2021-03-22 17:24                   ` Philippe Mathieu-Daudé
@ 2021-03-22 17:37                     ` Willian Rampazzo
  0 siblings, 0 replies; 25+ messages in thread
From: Willian Rampazzo @ 2021-03-22 17:37 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, Thomas Huth, Daniel Berrange, Beraldo Leal,
	qemu-devel, Beniamino Galvani, Niek Linnenbank, qemu-arm,
	Pavel Dovgalyuk, Cleber Rosa Junior

On Mon, Mar 22, 2021 at 2:24 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> On 3/22/21 6:12 PM, Willian Rampazzo wrote:
> > Hi Philippe,
> >
> > On Mon, Mar 22, 2021 at 1:59 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> >>
> >> On Mon, Mar 22, 2021 at 5:54 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> >>>
> >>> Hi Willian,
> >>>
> >>> On 3/8/21 9:44 PM, Willian Rampazzo wrote:
> >>>> On Mon, Mar 8, 2021 at 5:41 PM Willian Rampazzo <wrampazz@redhat.com> wrote:
> >>>>>
> >>
> >>>>>>>>> -    def do_test_arm_orangepi_uboot_armbian(self, image_path):
> >>>>>>>>> +    @skipUnless(os.getenv('ARMBIAN_ARTIFACTS_CACHED'),
> >>>>>>>>> +                'Test artifacts fetched from unreliable apt.armbian.com')
> >>>>>>>>> +    @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited')
> >>>>>>>>> +    def test_arm_orangepi_bionic_20_08(self):
> >>>>>>>>> +        """
> >>>>>>>>> +        :avocado: tags=arch:arm
> >>>>>>>>> +        :avocado: tags=machine:orangepi-pc
> >>>>>>>>> +        :avocado: tags=device:sd
> >>>>>>>>> +        """
> >>>>>>>>> +
> >>>>>>>>> +        # This test download a 275 MiB compressed image and expand it
> >>>>>>>>> +        # to 1036 MiB, but the underlying filesystem is 1552 MiB...
> >>>>>>>>> +        # As we expand it to 2 GiB we are safe.
> >>>>>>>>> +
> >>>>>>>>> +        image_url = ('https://dl.armbian.com/orangepipc/archive/'
> >>>>>>>>> +                     'Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz')
> >>>>>>>>
> >>>>>>>> The Armbian 20 is not available on this link anymore. I can browse just 21.
> >>>>>>>
> >>>>>>> Cat-and-mouse game *sigh*.
> >>>
> >>> 2021-03-22 17:18:10,701 download         L0067 INFO | Fetching
> >>> https://archive.armbian.com/orangepipc/archive/Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz
> >>> -> /home/phil/avocado/da
> >>> ta/cache/by_location/f2eb27a12b81ce15e93f340fabbced2136af1caa/Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz.nfwdzivg
> >>> 2021-03-22 17:18:11,263 asset            L0136 INFO | Temporary asset
> >>> file unavailable due to failed download attempt.
> >>> 2021-03-22 17:18:11,263 asset            L0368 ERROR| URLError: <urlopen
> >>> error [Errno 113] No route to host>
> >>>
> >>> It might be a temporary problem, but looking long term the
> >>> current setup doesn't scale IMHO.
> >>
> >> Also I just noticed I *do* have the image cached, even twice:
> >>
> >> $ find /home/phil/avocado/data/cache/by_location/ -name
> >> Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz -ls
> >>   131661 280768 -rw-rw-r--   1 phil     phil     287501560 Oct 23
> >> 12:45 /home/phil/avocado/data/cache/by_location/cac379e6a4480624b000dfde1b5d935454254ce2/Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz
> >>   131761 280776 -rw-rw-r--   1 phil     phil     287501560 Feb 20
> >> 00:39 /home/phil/avocado/data/cache/by_location/aac619d9e7ea3726ebc86c159fddfb9d3f6274a5/Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz
> >>
> >> But the hash is different.
> >>
> >
> > You have 2 images because you fetched them from different locations.
> > When you fetch by location, the assets go to the directory
> > representing the hash of the location, This allows, for example, the
> > fetch of multiple initrd or vmlinuz files from different locations,
> > representing different files, but with the same name. Also, this was
> > one of your requests some time ago :)
>
> My request because we were fetching different artifacts for different
> tests but all files had the same filename, i.e.:
>
> url1://path1/to/vmlinux
> url2://path2/to/vmlinux
> url3://yet/another/path/to/vmlinux
>
> I was obviously short sighted.
>
> > What Beraldo worked on in the last week was a way to remove "unused"
> > files. Your cache is a good example of files that are not necessary
> > anymore because now you are using a different location to fetch them.
>
> OK, I'll watch closely how you decide a cached file is "unused"...
>
> >
> >> Cleber, why not use the blob hash as a cache key? It is supposed to be
> >> constant...
> >>
> >
> > You can do that by setting the test to download the file by name, and
> > not by location.
>
> How so? Isn't it what I just described earlier we wanted to avoid?
>

Yep, but if you are sure there won't be another file called
`Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz` that means
another thing than what the file name describes, in this case, it can
be fetched by name. It will still check the file hash to make sure it
is the file needed, but it opens the possibility to download the same
file from different locations without duplicating it in the cache.

For this case, I think it makes sense to fetch it and add it to the
`by_name` location in the cache.

> >
> >> Cc'ing Beraldo because I guess remember he worked on improving Avocado cache.
> >>
> >>>>>> Just to clarify here: in this patch I wanted to only make the change to remove the test for the 19.11.3 image.
> >>>>>> And in the 3rd patch (tests/acceptance/boot_linux_console: change URL for test_arm_orangepi_bionic_20_08)
> >>>>>> do the update for to correct the 20.08 link. So each patch fixes one problem at a time.
> >>
> >
> >
>



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v3 2/5] tests/acceptance/boot_linux_console: remove Armbian 19.11.3 bionic test for orangepi-pc machine
  2021-03-22 17:18               ` Willian Rampazzo
@ 2021-03-22 18:47                 ` Philippe Mathieu-Daudé
  2021-03-22 19:10                   ` Willian Rampazzo
  0 siblings, 1 reply; 25+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-22 18:47 UTC (permalink / raw)
  To: Willian Rampazzo
  Cc: Peter Maydell, Thomas Huth, Daniel Berrange, qemu-devel,
	Beniamino Galvani, Niek Linnenbank, qemu-arm, Pavel Dovgalyuk,
	Cleber Rosa Junior

On 3/22/21 6:18 PM, Willian Rampazzo wrote:
> Hi Philippe,
> 
> On Mon, Mar 22, 2021 at 1:54 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>>
>> Hi Willian,
>>
>> On 3/8/21 9:44 PM, Willian Rampazzo wrote:
>>> On Mon, Mar 8, 2021 at 5:41 PM Willian Rampazzo <wrampazz@redhat.com> wrote:
>>>>
>>>> On Mon, Mar 8, 2021 at 5:32 PM Niek Linnenbank <nieklinnenbank@gmail.com> wrote:
>>>>>
>>>>> Hi Philippe, Willian,
>>>>>
>>>>> On Mon, Mar 8, 2021 at 8:52 AM Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>>>>>>
>>>>>> On 3/5/21 4:16 PM, Willian Rampazzo wrote:
>>>>>>> On Thu, Mar 4, 2021 at 5:44 PM Niek Linnenbank <nieklinnenbank@gmail.com> wrote:
>>>>>>>>
>>>>>>>> The image for Armbian 19.11.3 bionic has been removed from the armbian server.
>>>>>>>> Without the image as input the test arm_orangepi_bionic_19_11 cannot run.
>>>>>>>>
>>>>>>>> This commit removes the test completely and merges the code of the generic function
>>>>>>>> do_test_arm_orangepi_uboot_armbian back with the 20.08 test.
>>>>>>>>
>>>>>>>> Signed-off-by: Niek Linnenbank <nieklinnenbank@gmail.com>
>>>>>>>> ---
>>>>>>>>  tests/acceptance/boot_linux_console.py | 72 ++++++++------------------
>>>>>>>>  1 file changed, 23 insertions(+), 49 deletions(-)
>>>>>>>>
>>>>>>>> diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
>>>>>>>> index eb01286799..9fadea9958 100644
>>>>>>>> --- a/tests/acceptance/boot_linux_console.py
>>>>>>>> +++ b/tests/acceptance/boot_linux_console.py
>>>>>>>> @@ -802,7 +802,29 @@ def test_arm_orangepi_sd(self):
>>>>>>>>          # Wait for VM to shut down gracefully
>>>>>>>>          self.vm.wait()
>>>>>>>>
>>>>>>>> -    def do_test_arm_orangepi_uboot_armbian(self, image_path):
>>>>>>>> +    @skipUnless(os.getenv('ARMBIAN_ARTIFACTS_CACHED'),
>>>>>>>> +                'Test artifacts fetched from unreliable apt.armbian.com')
>>>>>>>> +    @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited')
>>>>>>>> +    def test_arm_orangepi_bionic_20_08(self):
>>>>>>>> +        """
>>>>>>>> +        :avocado: tags=arch:arm
>>>>>>>> +        :avocado: tags=machine:orangepi-pc
>>>>>>>> +        :avocado: tags=device:sd
>>>>>>>> +        """
>>>>>>>> +
>>>>>>>> +        # This test download a 275 MiB compressed image and expand it
>>>>>>>> +        # to 1036 MiB, but the underlying filesystem is 1552 MiB...
>>>>>>>> +        # As we expand it to 2 GiB we are safe.
>>>>>>>> +
>>>>>>>> +        image_url = ('https://dl.armbian.com/orangepipc/archive/'
>>>>>>>> +                     'Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz')
>>>>>>>
>>>>>>> The Armbian 20 is not available on this link anymore. I can browse just 21.
>>>>>>
>>>>>> Cat-and-mouse game *sigh*.
>>
>> 2021-03-22 17:18:10,701 download         L0067 INFO | Fetching
>> https://archive.armbian.com/orangepipc/archive/Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz
>> -> /home/phil/avocado/da
>> ta/cache/by_location/f2eb27a12b81ce15e93f340fabbced2136af1caa/Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz.nfwdzivg
>> 2021-03-22 17:18:11,263 asset            L0136 INFO | Temporary asset
>> file unavailable due to failed download attempt.
>> 2021-03-22 17:18:11,263 asset            L0368 ERROR| URLError: <urlopen
>> error [Errno 113] No route to host>
>>
>> It might be a temporary problem, but looking long term the
>> current setup doesn't scale IMHO.
>>
> 
> Have you changed something in the test? The test is supposed to skip
> when the asset is not available in the cache. What was the result of
> this test execution? Skip, fail, or error? If it was not Skip, we need
> to investigate what happened.

No change, on commit b1847509268.

The result was all good but 1 "Cancelled" so I looked at the job.log.

All good IMO.


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v3 2/5] tests/acceptance/boot_linux_console: remove Armbian 19.11.3 bionic test for orangepi-pc machine
  2021-03-22 18:47                 ` Philippe Mathieu-Daudé
@ 2021-03-22 19:10                   ` Willian Rampazzo
  0 siblings, 0 replies; 25+ messages in thread
From: Willian Rampazzo @ 2021-03-22 19:10 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, Thomas Huth, Daniel Berrange, qemu-devel,
	Beniamino Galvani, Niek Linnenbank, qemu-arm, Pavel Dovgalyuk,
	Cleber Rosa Junior

On Mon, Mar 22, 2021 at 3:47 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> On 3/22/21 6:18 PM, Willian Rampazzo wrote:
> > Hi Philippe,
> >
> > On Mon, Mar 22, 2021 at 1:54 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> >>
> >> Hi Willian,
> >>
> >> On 3/8/21 9:44 PM, Willian Rampazzo wrote:
> >>> On Mon, Mar 8, 2021 at 5:41 PM Willian Rampazzo <wrampazz@redhat.com> wrote:
> >>>>
> >>>> On Mon, Mar 8, 2021 at 5:32 PM Niek Linnenbank <nieklinnenbank@gmail.com> wrote:
> >>>>>
> >>>>> Hi Philippe, Willian,
> >>>>>
> >>>>> On Mon, Mar 8, 2021 at 8:52 AM Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
> >>>>>>
> >>>>>> On 3/5/21 4:16 PM, Willian Rampazzo wrote:
> >>>>>>> On Thu, Mar 4, 2021 at 5:44 PM Niek Linnenbank <nieklinnenbank@gmail.com> wrote:
> >>>>>>>>
> >>>>>>>> The image for Armbian 19.11.3 bionic has been removed from the armbian server.
> >>>>>>>> Without the image as input the test arm_orangepi_bionic_19_11 cannot run.
> >>>>>>>>
> >>>>>>>> This commit removes the test completely and merges the code of the generic function
> >>>>>>>> do_test_arm_orangepi_uboot_armbian back with the 20.08 test.
> >>>>>>>>
> >>>>>>>> Signed-off-by: Niek Linnenbank <nieklinnenbank@gmail.com>
> >>>>>>>> ---
> >>>>>>>>  tests/acceptance/boot_linux_console.py | 72 ++++++++------------------
> >>>>>>>>  1 file changed, 23 insertions(+), 49 deletions(-)
> >>>>>>>>
> >>>>>>>> diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
> >>>>>>>> index eb01286799..9fadea9958 100644
> >>>>>>>> --- a/tests/acceptance/boot_linux_console.py
> >>>>>>>> +++ b/tests/acceptance/boot_linux_console.py
> >>>>>>>> @@ -802,7 +802,29 @@ def test_arm_orangepi_sd(self):
> >>>>>>>>          # Wait for VM to shut down gracefully
> >>>>>>>>          self.vm.wait()
> >>>>>>>>
> >>>>>>>> -    def do_test_arm_orangepi_uboot_armbian(self, image_path):
> >>>>>>>> +    @skipUnless(os.getenv('ARMBIAN_ARTIFACTS_CACHED'),
> >>>>>>>> +                'Test artifacts fetched from unreliable apt.armbian.com')
> >>>>>>>> +    @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited')
> >>>>>>>> +    def test_arm_orangepi_bionic_20_08(self):
> >>>>>>>> +        """
> >>>>>>>> +        :avocado: tags=arch:arm
> >>>>>>>> +        :avocado: tags=machine:orangepi-pc
> >>>>>>>> +        :avocado: tags=device:sd
> >>>>>>>> +        """
> >>>>>>>> +
> >>>>>>>> +        # This test download a 275 MiB compressed image and expand it
> >>>>>>>> +        # to 1036 MiB, but the underlying filesystem is 1552 MiB...
> >>>>>>>> +        # As we expand it to 2 GiB we are safe.
> >>>>>>>> +
> >>>>>>>> +        image_url = ('https://dl.armbian.com/orangepipc/archive/'
> >>>>>>>> +                     'Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz')
> >>>>>>>
> >>>>>>> The Armbian 20 is not available on this link anymore. I can browse just 21.
> >>>>>>
> >>>>>> Cat-and-mouse game *sigh*.
> >>
> >> 2021-03-22 17:18:10,701 download         L0067 INFO | Fetching
> >> https://archive.armbian.com/orangepipc/archive/Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz
> >> -> /home/phil/avocado/da
> >> ta/cache/by_location/f2eb27a12b81ce15e93f340fabbced2136af1caa/Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz.nfwdzivg
> >> 2021-03-22 17:18:11,263 asset            L0136 INFO | Temporary asset
> >> file unavailable due to failed download attempt.
> >> 2021-03-22 17:18:11,263 asset            L0368 ERROR| URLError: <urlopen
> >> error [Errno 113] No route to host>
> >>
> >> It might be a temporary problem, but looking long term the
> >> current setup doesn't scale IMHO.
> >>
> >
> > Have you changed something in the test? The test is supposed to skip
> > when the asset is not available in the cache. What was the result of
> > this test execution? Skip, fail, or error? If it was not Skip, we need
> > to investigate what happened.
>
> No change, on commit b1847509268.
>
> The result was all good but 1 "Cancelled" so I looked at the job.log.
>
> All good IMO.
>

Okay, good! Unfortunately, I don't think there is much more we can do
on the qemu side or on Avocado side to handle network glitches.



^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2021-03-22 19:12 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-04 20:35 [PATCH v3 0/5] Allwinner H3 fixes for EMAC and acceptance tests Niek Linnenbank
2021-03-04 20:35 ` [PATCH v3 1/5] hw/net/allwinner-sun8i-emac: traverse transmit queue using TX_CUR_DESC register value Niek Linnenbank
2021-03-04 20:35 ` [PATCH v3 2/5] tests/acceptance/boot_linux_console: remove Armbian 19.11.3 bionic test for orangepi-pc machine Niek Linnenbank
2021-03-05 15:16   ` Willian Rampazzo
2021-03-08  7:52     ` Philippe Mathieu-Daudé
2021-03-08 20:32       ` Niek Linnenbank
2021-03-08 20:41         ` Willian Rampazzo
2021-03-08 20:44           ` Willian Rampazzo
2021-03-22 16:53             ` Philippe Mathieu-Daudé
2021-03-22 16:59               ` Philippe Mathieu-Daudé
2021-03-22 17:12                 ` Willian Rampazzo
2021-03-22 17:24                   ` Philippe Mathieu-Daudé
2021-03-22 17:37                     ` Willian Rampazzo
2021-03-22 17:18               ` Willian Rampazzo
2021-03-22 18:47                 ` Philippe Mathieu-Daudé
2021-03-22 19:10                   ` Willian Rampazzo
2021-03-04 20:35 ` [PATCH v3 3/5] tests/acceptance/boot_linux_console: change URL for test_arm_orangepi_bionic_20_08 Niek Linnenbank
2021-03-04 22:30   ` Philippe Mathieu-Daudé
2021-03-05 14:56   ` Willian Rampazzo
2021-03-04 20:35 ` [PATCH v3 4/5] tests/acceptance: update sunxi kernel from armbian to 5.10.16 Niek Linnenbank
2021-03-05 15:04   ` Willian Rampazzo
2021-03-08  7:49     ` Philippe Mathieu-Daudé
2021-03-08 20:27       ` Niek Linnenbank
2021-03-04 20:35 ` [PATCH v3 5/5] tests/acceptance: drop ARMBIAN_ARTIFACTS_CACHED condition for orangepi-pc, cubieboard tests Niek Linnenbank
2021-03-05 15:02   ` Willian Rampazzo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).