New paste Repaste Download
================================================================================= test session starts ==================================================================================
platform linux -- Python 3.12.3, pytest-8.3.5, pluggy-1.5.0 -- /home/byaremkiv/git/link/venv/bin/python3
cachedir: .pytest_cache
metadata: {'Python': '3.12.3', 'Platform': 'Linux-6.11.0-24-generic-x86_64-with-glibc2.39', 'Packages': {'pytest': '8.3.5', 'pluggy': '1.5.0'}, 'Plugins': {'cov': '6.1.1', 'html': '4.1.1', 'order': '1.3.0', 'metadata': '3.1.1'}}
rootdir: /home/byaremkiv/git/link
plugins: cov-6.1.1, html-4.1.1, order-1.3.0, metadata-3.1.1
collecting ...
collected 3 items                                                                                                                                                                      
test/functional/simple_test.py::test_program_2_devices[0052005a464d500a20333836] PASSED                                                                                          [ 33%]
test/functional/simple_test.py::test_program_2_devices[002100554241500820323735] PASSED                                                                                          [ 66%]
test/functional/simple_test.py::test_connect_links FAILED                                                                                                                        [100%]
======================================================================================= FAILURES =======================================================================================
__________________________________________________________________________________ test_connect_links __________________________________________________________________________________
    def test_connect_links():
       # 0. Get Device IDs
       device_id_1 = config_file["device_id_1"]
       device_id_2 = config_file["device_id_2"]
       device_1 = find_device(device_id_1)
       device_2 = find_device(device_id_2)
       assert device_1, f"Device with ID {device_id_1} not found"
       assert device_2, f"Device with ID {device_id_2} not found"
    
       # 1. Reset the devices
       reset_device(device_1)
       reset_device(device_2)
    
       # 2. Make 1 device as slave another is master by default
       device_1 = find_device(device_id_1)
       device_2 = find_device(device_id_2)
>      change_master_to_slave(device_1)
test/functional/simple_test.py:28:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/functional/common.py:56: in change_master_to_slave
    device.write(0x01, list(bytes.fromhex(data)))
venv/lib/python3.12/site-packages/usb/core.py:1000: in write
    intf, ep = self._ctx.setup_request(self, endpoint)
venv/lib/python3.12/site-packages/usb/core.py:113: in wrapper
    return f(self, *args, **kwargs)
venv/lib/python3.12/site-packages/usb/core.py:234: in setup_request
    self.managed_claim_interface(device, intf)
venv/lib/python3.12/site-packages/usb/core.py:113: in wrapper
    return f(self, *args, **kwargs)
venv/lib/python3.12/site-packages/usb/core.py:180: in managed_claim_interface
    self.backend.claim_interface(self.handle, i)
venv/lib/python3.12/site-packages/usb/backend/libusb1.py:833: in claim_interface
    _check(self.lib.libusb_claim_interface(dev_handle.handle, intf))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
ret = -6
    def _check(ret):
        if hasattr(ret, 'value'):
            ret = ret.value
    
        if ret < 0:
            if ret == LIBUSB_ERROR_NOT_SUPPORTED:
                raise NotImplementedError(_strerror(ret))
            elif ret == LIBUSB_ERROR_TIMEOUT:
                raise USBTimeoutError(_strerror(ret), ret, _libusb_errno[ret])
            else:
>               raise USBError(_strerror(ret), ret, _libusb_errno[ret])
E               usb.core.USBError: [Errno 16] Resource busy
venv/lib/python3.12/site-packages/usb/backend/libusb1.py:604: USBError
--------------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------------
Retrying to find device...
Retrying to find device...
Retrying to find device...
Retrying to find device...
Retrying to find device...
Retrying to find device...
Retrying to find device...
Retrying to find device...
Retrying to find device...
Retrying to find device...
Retrying to find device...
Retrying to find device...
Retrying to find device...
Retrying to find device...
Retrying to find device...
Retrying to find device...
Retrying to find device...
Retrying to find device...
=================================================================================== warnings summary ===================================================================================
test/functional/simple_test.py::test_program_2_devices[0052005a464d500a20333836]
test/functional/simple_test.py::test_program_2_devices[002100554241500820323735]
  <frozen _collections_abc>:813: DeprecationWarning: Will be removed in 1.0. Access properties with Device.properties.
test/functional/simple_test.py::test_program_2_devices[0052005a464d500a20333836]
test/functional/simple_test.py::test_program_2_devices[0052005a464d500a20333836]
test/functional/simple_test.py::test_program_2_devices[0052005a464d500a20333836]
test/functional/simple_test.py::test_program_2_devices[0052005a464d500a20333836]
test/functional/simple_test.py::test_program_2_devices[002100554241500820323735]
test/functional/simple_test.py::test_program_2_devices[002100554241500820323735]
test/functional/simple_test.py::test_program_2_devices[002100554241500820323735]
test/functional/simple_test.py::test_program_2_devices[002100554241500820323735]
  <frozen _collections_abc>:807: DeprecationWarning: Will be removed in 1.0. Access properties with Device.properties.
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================================================================================== PASSES ========================================================================================
___________________________________________________________________ test_program_2_devices[0052005a464d500a20333836] ___________________________________________________________________
--------------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------------
Device found: DEVICE ID 1939:1945 on Bus 003 Address 119 =================
bLength                :   0x12 (18 bytes)
bDescriptorType        :    0x1 Device
bcdUSB                 :  0x210 USB 2.1
bDeviceClass           :   0xef Miscellaneous
bDeviceSubClass        :    0x2
bDeviceProtocol        :    0x1
bMaxPacketSize0        :   0x40 (64 bytes)
idVendor               : 0x1939
idProduct              : 0x1945
bcdDevice              :    0x1 Device 0.01
iManufacturer          :    0x1 sine.engineering
iProduct               :    0x2 sine.link
iSerialNumber          :    0x6   0/0052005a464d500a20333836
bNumConfigurations     :    0x1
  CONFIGURATION 1: 400 mA ==================================
   bLength              :    0x9 (9 bytes)
   bDescriptorType      :    0x2 Configuration
   wTotalLength         :   0xa4 (164 bytes)
   bNumInterfaces       :    0x5
   bConfigurationValue  :    0x1
   iConfiguration       :    0x0
   bmAttributes         :   0x80 Bus Powered
   bMaxPower            :   0xc8 (400 mA)
    INTERFACE 0: Vendor Specific ===========================
     bLength            :    0x9 (9 bytes)
     bDescriptorType    :    0x4 Interface
     bInterfaceNumber   :    0x0
     bAlternateSetting  :    0x0
     bNumEndpoints      :    0x2
     bInterfaceClass    :   0xff Vendor Specific
     bInterfaceSubClass :    0x0
     bInterfaceProtocol :    0x0
     iInterface         :    0x3 sine.link BULK
      ENDPOINT 0x1: Bulk OUT ===============================
       bLength          :    0x7 (7 bytes)
       bDescriptorType  :    0x5 Endpoint
       bEndpointAddress :    0x1 OUT
       bmAttributes     :    0x2 Bulk
       wMaxPacketSize   :   0x40 (64 bytes)
       bInterval        :    0x0
      ENDPOINT 0x82: Bulk IN ===============================
       bLength          :    0x7 (7 bytes)
       bDescriptorType  :    0x5 Endpoint
       bEndpointAddress :   0x82 IN
       bmAttributes     :    0x2 Bulk
       wMaxPacketSize   :   0x40 (64 bytes)
       bInterval        :    0x0
    INTERFACE 1: CDC Communication =========================
     bLength            :    0x9 (9 bytes)
     bDescriptorType    :    0x4 Interface
     bInterfaceNumber   :    0x1
     bAlternateSetting  :    0x0
     bNumEndpoints      :    0x1
     bInterfaceClass    :    0x2 CDC Communication
     bInterfaceSubClass :    0x2
     bInterfaceProtocol :    0x0
     iInterface         :    0x4 sine.link CDC1
      ENDPOINT 0x83: Interrupt IN ==========================
       bLength          :    0x7 (7 bytes)
       bDescriptorType  :    0x5 Endpoint
       bEndpointAddress :   0x83 IN
       bmAttributes     :    0x3 Interrupt
       wMaxPacketSize   :    0x8 (8 bytes)
       bInterval        :   0x10
    INTERFACE 2: CDC Data ==================================
     bLength            :    0x9 (9 bytes)
     bDescriptorType    :    0x4 Interface
     bInterfaceNumber   :    0x2
     bAlternateSetting  :    0x0
     bNumEndpoints      :    0x2
     bInterfaceClass    :    0xa CDC Data
     bInterfaceSubClass :    0x0
     bInterfaceProtocol :    0x0
     iInterface         :    0x0
      ENDPOINT 0x4: Bulk OUT ===============================
       bLength          :    0x7 (7 bytes)
       bDescriptorType  :    0x5 Endpoint
       bEndpointAddress :    0x4 OUT
       bmAttributes     :    0x2 Bulk
       wMaxPacketSize   :   0x40 (64 bytes)
       bInterval        :    0x0
      ENDPOINT 0x84: Bulk IN ===============================
       bLength          :    0x7 (7 bytes)
       bDescriptorType  :    0x5 Endpoint
       bEndpointAddress :   0x84 IN
       bmAttributes     :    0x2 Bulk
       wMaxPacketSize   :   0x40 (64 bytes)
       bInterval        :    0x0
    INTERFACE 3: CDC Communication =========================
     bLength            :    0x9 (9 bytes)
     bDescriptorType    :    0x4 Interface
     bInterfaceNumber   :    0x3
     bAlternateSetting  :    0x0
     bNumEndpoints      :    0x1
     bInterfaceClass    :    0x2 CDC Communication
     bInterfaceSubClass :    0x2
     bInterfaceProtocol :    0x0
     iInterface         :    0x5 sine.link CDC2
      ENDPOINT 0x85: Interrupt IN ==========================
       bLength          :    0x7 (7 bytes)
       bDescriptorType  :    0x5 Endpoint
       bEndpointAddress :   0x85 IN
       bmAttributes     :    0x3 Interrupt
       wMaxPacketSize   :    0x8 (8 bytes)
       bInterval        :   0x10
    INTERFACE 4: CDC Data ==================================
     bLength            :    0x9 (9 bytes)
     bDescriptorType    :    0x4 Interface
     bInterfaceNumber   :    0x4
     bAlternateSetting  :    0x0
     bNumEndpoints      :    0x2
     bInterfaceClass    :    0xa CDC Data
     bInterfaceSubClass :    0x0
     bInterfaceProtocol :    0x0
     iInterface         :    0x0
      ENDPOINT 0x6: Bulk OUT ===============================
       bLength          :    0x7 (7 bytes)
       bDescriptorType  :    0x5 Endpoint
       bEndpointAddress :    0x6 OUT
       bmAttributes     :    0x2 Bulk
       wMaxPacketSize   :   0x40 (64 bytes)
       bInterval        :    0x0
      ENDPOINT 0x86: Bulk IN ===============================
       bLength          :    0x7 (7 bytes)
       bDescriptorType  :    0x5 Endpoint
       bEndpointAddress :   0x86 IN
       bmAttributes     :    0x2 Bulk
       wMaxPacketSize   :   0x40 (64 bytes)
       bInterval        :    0x0
rebooting device...
waiting for the bootloader...
New device detected: node=/dev/sda vendor=dead model=4002 serial=1234567890
Device is mounted at: /media/byaremkiv/C926-4671
Removable storage detected: /media/byaremkiv/C926-4671
Firmware successfully copied to: /media/byaremkiv/C926-4671/RadioLink.encbin
___________________________________________________________________ test_program_2_devices[002100554241500820323735] ___________________________________________________________________
--------------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------------
Device found: DEVICE ID 1939:1945 on Bus 003 Address 120 =================
bLength                :   0x12 (18 bytes)
bDescriptorType        :    0x1 Device
bcdUSB                 :  0x210 USB 2.1
bDeviceClass           :   0xef Miscellaneous
bDeviceSubClass        :    0x2
bDeviceProtocol        :    0x1
bMaxPacketSize0        :   0x40 (64 bytes)
idVendor               : 0x1939
idProduct              : 0x1945
bcdDevice              :    0x1 Device 0.01
iManufacturer          :    0x1 sine.engineering
iProduct               :    0x2 sine.link
iSerialNumber          :    0x6   0/002100554241500820323735
bNumConfigurations     :    0x1
  CONFIGURATION 1: 400 mA ==================================
   bLength              :    0x9 (9 bytes)
   bDescriptorType      :    0x2 Configuration
   wTotalLength         :   0xa4 (164 bytes)
   bNumInterfaces       :    0x5
   bConfigurationValue  :    0x1
   iConfiguration       :    0x0
   bmAttributes         :   0x80 Bus Powered
   bMaxPower            :   0xc8 (400 mA)
    INTERFACE 0: Vendor Specific ===========================
     bLength            :    0x9 (9 bytes)
     bDescriptorType    :    0x4 Interface
     bInterfaceNumber   :    0x0
     bAlternateSetting  :    0x0
     bNumEndpoints      :    0x2
     bInterfaceClass    :   0xff Vendor Specific
     bInterfaceSubClass :    0x0
     bInterfaceProtocol :    0x0
     iInterface         :    0x3 sine.link BULK
      ENDPOINT 0x1: Bulk OUT ===============================
       bLength          :    0x7 (7 bytes)
       bDescriptorType  :    0x5 Endpoint
       bEndpointAddress :    0x1 OUT
       bmAttributes     :    0x2 Bulk
       wMaxPacketSize   :   0x40 (64 bytes)
       bInterval        :    0x0
      ENDPOINT 0x82: Bulk IN ===============================
       bLength          :    0x7 (7 bytes)
       bDescriptorType  :    0x5 Endpoint
       bEndpointAddress :   0x82 IN
       bmAttributes     :    0x2 Bulk
       wMaxPacketSize   :   0x40 (64 bytes)
       bInterval        :    0x0
    INTERFACE 1: CDC Communication =========================
     bLength            :    0x9 (9 bytes)
     bDescriptorType    :    0x4 Interface
     bInterfaceNumber   :    0x1
     bAlternateSetting  :    0x0
     bNumEndpoints      :    0x1
     bInterfaceClass    :    0x2 CDC Communication
     bInterfaceSubClass :    0x2
     bInterfaceProtocol :    0x0
     iInterface         :    0x4 sine.link CDC1
      ENDPOINT 0x83: Interrupt IN ==========================
       bLength          :    0x7 (7 bytes)
       bDescriptorType  :    0x5 Endpoint
       bEndpointAddress :   0x83 IN
       bmAttributes     :    0x3 Interrupt
       wMaxPacketSize   :    0x8 (8 bytes)
       bInterval        :   0x10
    INTERFACE 2: CDC Data ==================================
     bLength            :    0x9 (9 bytes)
     bDescriptorType    :    0x4 Interface
     bInterfaceNumber   :    0x2
     bAlternateSetting  :    0x0
     bNumEndpoints      :    0x2
     bInterfaceClass    :    0xa CDC Data
     bInterfaceSubClass :    0x0
     bInterfaceProtocol :    0x0
     iInterface         :    0x0
      ENDPOINT 0x4: Bulk OUT ===============================
       bLength          :    0x7 (7 bytes)
       bDescriptorType  :    0x5 Endpoint
       bEndpointAddress :    0x4 OUT
       bmAttributes     :    0x2 Bulk
       wMaxPacketSize   :   0x40 (64 bytes)
       bInterval        :    0x0
      ENDPOINT 0x84: Bulk IN ===============================
       bLength          :    0x7 (7 bytes)
       bDescriptorType  :    0x5 Endpoint
       bEndpointAddress :   0x84 IN
       bmAttributes     :    0x2 Bulk
       wMaxPacketSize   :   0x40 (64 bytes)
       bInterval        :    0x0
    INTERFACE 3: CDC Communication =========================
     bLength            :    0x9 (9 bytes)
     bDescriptorType    :    0x4 Interface
     bInterfaceNumber   :    0x3
     bAlternateSetting  :    0x0
     bNumEndpoints      :    0x1
     bInterfaceClass    :    0x2 CDC Communication
     bInterfaceSubClass :    0x2
     bInterfaceProtocol :    0x0
     iInterface         :    0x5 sine.link CDC2
      ENDPOINT 0x85: Interrupt IN ==========================
       bLength          :    0x7 (7 bytes)
       bDescriptorType  :    0x5 Endpoint
       bEndpointAddress :   0x85 IN
       bmAttributes     :    0x3 Interrupt
       wMaxPacketSize   :    0x8 (8 bytes)
       bInterval        :   0x10
    INTERFACE 4: CDC Data ==================================
     bLength            :    0x9 (9 bytes)
     bDescriptorType    :    0x4 Interface
     bInterfaceNumber   :    0x4
     bAlternateSetting  :    0x0
     bNumEndpoints      :    0x2
     bInterfaceClass    :    0xa CDC Data
     bInterfaceSubClass :    0x0
     bInterfaceProtocol :    0x0
     iInterface         :    0x0
      ENDPOINT 0x6: Bulk OUT ===============================
       bLength          :    0x7 (7 bytes)
       bDescriptorType  :    0x5 Endpoint
       bEndpointAddress :    0x6 OUT
       bmAttributes     :    0x2 Bulk
       wMaxPacketSize   :   0x40 (64 bytes)
       bInterval        :    0x0
      ENDPOINT 0x86: Bulk IN ===============================
       bLength          :    0x7 (7 bytes)
       bDescriptorType  :    0x5 Endpoint
       bEndpointAddress :   0x86 IN
       bmAttributes     :    0x2 Bulk
       wMaxPacketSize   :   0x40 (64 bytes)
       bInterval        :    0x0
rebooting device...
waiting for the bootloader...
New device detected: node=/dev/sda vendor=dead model=4002 serial=1234567890
Device is mounted at: /media/byaremkiv/C926-4671
Removable storage detected: /media/byaremkiv/C926-4671
Firmware successfully copied to: /media/byaremkiv/C926-4671/RadioLink.encbin
--------------------------------------------------------- generated xml file: /home/byaremkiv/git/link/output/test_report.xml ----------------------------------------------------------
======================================================================  [31m [1m1 failed [0m,  [32m2 passed [0m,  [33m10 warnings [0m [31m in 16.17s [0m [31m =======================================================================
Filename: None. Size: 19kb. View raw, , hex, or download this file.

This paste expires on 2025-05-16 16:02:54.634660. Pasted through deprecated-web.