tests fail when run in chroot (during package building)

Đang mở
#40 5 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
c, python
Lĩnh vực
networking, testing

Hướng nghiên cứu

Bắt đầu với tests/test_ethtool.py và tests/test_scripts.py, sau đó tái hiện lệnh kiểm thử gói dưới quyền người dùng không đặc quyền bên trong chroot sạch. So sánh các lỗi về quyền, địa chỉ giao diện và offload với các giả định của bài kiểm thử. Được xem là hoàn tất khi các bài kiểm thử có kết quả được xác định trong môi trường đóng gói này và không còn thất bại ngoài dự kiến.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

help wanted

Helloes!
I'm currently pushing python-ethtool to Arch Linux's [community].
On Arch, packages are built in a clean chroot (to ensure package and dependency integrity). There however, the tests fail:

running test                                                                                                                                                                                                                                                          
running egg_info
creating ethtool.egg-info                     
writing ethtool.egg-info/PKG-INFO                                                        
writing dependency_links to ethtool.egg-info/dependency_links.txt
writing top-level names to ethtool.egg-info/top_level.txt                   
writing manifest file 'ethtool.egg-info/SOURCES.txt'            
reading manifest file 'ethtool.egg-info/SOURCES.txt'                  
reading manifest template 'MANIFEST.in'                         
writing manifest file 'ethtool.egg-info/SOURCES.txt'          
running build_ext                            
copying build/lib.linux-x86_64-3.6/ethtool.cpython-36m-x86_64-linux-gnu.so ->       
test_driver_eth (tests.test_scripts.ScriptsTests) ... ok
test_driver_lo (tests.test_scripts.ScriptsTests) ... ok                                                              
test_flags2str (tests.test_scripts.ScriptsTests) ... ok
test_show_coalesce_eth (tests.test_scripts.ScriptsTests) ... ok
test_show_coalesce_lo (tests.test_scripts.ScriptsTests) ... ok
test_show_offload_eth (tests.test_scripts.ScriptsTests) ... ok                                                                                                                                                                                                         
test_show_offload_lo (tests.test_scripts.ScriptsTests) ... FAIL
test_show_ring_eth (tests.test_scripts.ScriptsTests) ... ok
test_show_ring_lo (tests.test_scripts.ScriptsTests) ... ok
test_etherinfo_objects (tests.test_ethtool.EthtoolTests) ... FAIL
test_get_active_devices (tests.test_ethtool.EthtoolTests) ... ERROR            
test_get_interface_info_active (tests.test_ethtool.EthtoolTests) ... FAIL      
test_get_interface_info_all (tests.test_ethtool.EthtoolTests) ... FAIL
test_get_interface_info_invalid (tests.test_ethtool.EthtoolTests) ... ok        
test_invalid_devices (tests.test_ethtool.EthtoolTests) ... ok                                                                                                                                                                                                           
test_full (tests.parse_ifconfig.ParserTests) ... ok
test_local (tests.parse_ifconfig.ParserTests) ... ok
test_parse_ip4addr (tests.parse_ifconfig.ParserTests) ... ok                              
test_parsing_device_line (tests.parse_ifconfig.ParserTests) ... ok
test_parsing_flags_line (tests.parse_ifconfig.ParserTests) ... ok           
test_parsing_ip (tests.parse_ifconfig.ParserTests) ... ok       
                                                                      
======================================================================
ERROR: test_get_active_devices (tests.test_ethtool.EthtoolTests)
----------------------------------------------------------------------
Traceback (most recent call last):                                                   
  File "/build/python-ethtool/src/python-ethtool-0.13/tests/test_ethtool.py", line 245, in test_get_active_devices
    self._functions_accepting_devnames(devname)                                                                       
  File "/build/python-ethtool/src/python-ethtool-0.13/tests/test_ethtool.py", line 147, in _functions_accepting_devnames
    self.assertIsInt(ethtool.get_ufo(devname))
PermissionError: [Errno 1] Operation not permitted           
                                                                                                                                                                                                                                                                        
======================================================================
FAIL: test_show_offload_lo (tests.test_scripts.ScriptsTests)
----------------------------------------------------------------------
Traceback (most recent call last):                       
  File "/build/python-ethtool/src/python-ethtool-0.13/tests/test_scripts.py", line 80, in test_show_offload_lo
    '''                
AssertionError: 'scat[60 chars]ion offload: not supported\ngeneric segmentation offload: on\n' != 'scat[60 chars]ion offload: on\ngeneric segmentation offload: on\n'
  scatter-gather: on
  tcp segmentation offload: on
- udp fragmentation offload: not supported
?                             ------------                       
+ udp fragmentation offload: on                          
?                            +                      
  generic segmentation offload: on                  

======================================================================
FAIL: test_etherinfo_objects (tests.test_ethtool.EthtoolTests)                                                       
----------------------------------------------------------------------
Traceback (most recent call last):                             
  File "/build/python-ethtool/src/python-ethtool-0.13/tests/test_ethtool.py", line 251, in test_etherinfo_objects
    self._verify_etherinfo_object(ei)                                                                                                                                                                                                                                  
  File "/build/python-ethtool/src/python-ethtool-0.13/tests/test_ethtool.py", line 168, in _verify_etherinfo_object
    self.assertEqual(ei.ipv4_address, scraped.inet)        
AssertionError: '10.10.23.10' != '10.10.23.150'           
- 10.10.23.10                                                    
+ 10.10.23.150                                                                 
?           +                                                                  
                                                                      
                                                                                
======================================================================                                                                                                                                                                                                  
FAIL: test_get_interface_info_active (tests.test_ethtool.EthtoolTests)
----------------------------------------------------------------------
Traceback (most recent call last):                                                        
  File "/build/python-ethtool/src/python-ethtool-0.13/tests/test_ethtool.py", line 233, in test_get_interface_info_active
    self._verify_etherinfo_object(ei)                                       
  File "/build/python-ethtool/src/python-ethtool-0.13/tests/test_ethtool.py", line 168, in _verify_etherinfo_object
    self.assertEqual(ei.ipv4_address, scraped.inet)                   
AssertionError: '10.10.23.10' != '10.10.23.150'                       
- 10.10.23.10                                                   
+ 10.10.23.150                                                        
?           +                                                                        
                                                                                                                  
                                                                                                                      
======================================================================                                                  
FAIL: test_get_interface_info_all (tests.test_ethtool.EthtoolTests)
----------------------------------------------------------------------
Traceback (most recent call last):                                                                                                                                                                                                                                      
  File "/build/python-ethtool/src/python-ethtool-0.13/tests/test_ethtool.py", line 238, in test_get_interface_info_all
    self._verify_etherinfo_object(ei)                       
  File "/build/python-ethtool/src/python-ethtool-0.13/tests/test_ethtool.py", line 168, in _verify_etherinfo_object
    self.assertEqual(ei.ipv4_address, scraped.inet)      
AssertionError: '10.10.23.10' != '10.10.23.150'                                                               
- 10.10.23.10          
+ 10.10.23.150                                                                                                                                                       
?           +       
                              
                                          
----------------------------------------------------------------------
Ran 21 tests in 0.015s                                   
                                                    
FAILED (failures=4, errors=1)                       
Test failed: <unittest.runner.TextTestResult run=21 errors=1 failures=4>
Device(name='enp0s25', flagsint=4163, flagsstr='UP,BROADCAST,RUNNING,MULTICAST', mtu=1500)
Device(name='lo', flagsint=73, flagsstr='UP,LOOPBACK,RUNNING', mtu=65536)
Device(name='tap0', flagsint=4163, flagsstr='UP,BROADCAST,RUNNING,MULTICAST', mtu=1500)
Device(name='wlp3s0', flagsint=4099, flagsstr='UP,BROADCAST,MULTICAST', mtu=1500)
error: Test failed: <unittest.runner.TextTestResult run=21 errors=1 failures=4>

Within the chroot, the user, that's building the package is not allowed root privileges. This might lead to the tests failing, but maybe you can provide some more insight?
I'd like to be able to use the tests during packaging for python{2,3}.

Ngôn ngữ chính
C
Star
16
Fork
11
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của fedora-python/python-ethtool

Tất cả issue của fedora-python/python-ethtool

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.