Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add arm64 builds #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

feat: add arm64 builds #1

wants to merge 1 commit into from

Conversation

shawaj
Copy link
Owner

@shawaj shawaj commented Apr 10, 2023

add arm64 builds

Summary

  • OS: { type-or-version }
  • Bug fix: { yes/no }
  • Type: { core, doc, performance, scripts, tests, wheels, new-api }
  • Fixes: { comma-separated list of issues fixed by this PR, if any }

Description

{{{
A clear explanation of your bugfix or enhancement. Please read the contributing guidelines before submit:
https://github.com/giampaolo/psutil/blob/master/CONTRIBUTING.md
}}}

@shawaj
Copy link
Owner Author

shawaj commented Apr 10, 2023

Failing on QEMU:

psutil.tests.test_process.TestProcess.test_cmdline ... FAIL
psutil.tests.test_process.TestProcess.test_cpu_times ... FAIL
psutil.tests.test_process.TestProcess.test_cpu_times_2 ... FAIL
psutil.tests.test_process.TestProcess.test_exe ... ERROR
psutil.tests.test_process.TestProcess.test_long_cmdline ... FAIL
psutil.tests.test_process.TestProcess.test_long_name ... FAIL
psutil.tests.test_process.TestProcess.test_memory_maps ... FAIL
psutil.tests.test_process.TestProcess.test_prog_w_funky_name ... FAIL
psutil.tests.test_process.TestProcess.test_status ... FAIL
psutil.tests.test_posix.TestProcess.test_name ... FAIL
psutil.tests.test_contracts.TestFetchAllProcesses.test_all ... FAIL
psutil.tests.test_contracts.TestSystemAPITypes.test_net_if_stats ... ERROR
psutil.tests.test_misc.TestScripts.test_ifconfig ... ERROR
psutil.tests.test_system.TestNetAPIs.test_net_if_addrs ... ERROR
psutil.tests.test_system.TestNetAPIs.test_net_if_stats ... ERROR
psutil.tests.test_linux.TestMisc.test_issue_687 ... AssertionError('3 != 2',), retrying
  FAIL
psutil.tests.test_linux.TestProcessAgainstStatus.test_status ... FAIL
psutil.tests.test_linux.TestSystemNetIfStats.test_mtu ... ERROR

Full output:

  ======================================================================
  ERROR: psutil.tests.test_process.TestProcess.test_exe
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/project/psutil/tests/test_process.py", line 707, in test_exe
      out = sh([exe, "-c", "import os; print('hey')"])
    File "/tmp/tmp.XDTCoa1Gqa/venv/lib/python3.6/site-packages/psutil/tests/__init__.py", line 338, in wrapper
      return fun(*args, **kwargs)
    File "/tmp/tmp.XDTCoa1Gqa/venv/lib/python3.6/site-packages/psutil/tests/__init__.py", line 502, in sh
      p = subprocess.Popen(cmd, **kwds)
    File "/opt/python/cp36-cp36m/lib/python3.6/subprocess.py", line 729, in __init__
      restore_signals, start_new_session)
    File "/opt/python/cp36-cp36m/lib/python3.6/subprocess.py", line 1364, in _execute_child
      raise child_exception_type(errno_num, err_msg, err_filename)
  FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/qemu-aarch64': '/usr/bin/qemu-aarch64'
  
  ======================================================================
  ERROR: psutil.tests.test_contracts.TestSystemAPITypes.test_net_if_stats
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/project/psutil/tests/test_contracts.py", line 287, in test_net_if_stats
      for ifname, info in psutil.net_if_stats().items():
    File "/tmp/tmp.XDTCoa1Gqa/venv/lib/python3.6/site-packages/psutil/__init__.py", line 2221, in net_if_stats
      return _psplatform.net_if_stats()
    File "/tmp/tmp.XDTCoa1Gqa/venv/lib/python3.6/site-packages/psutil/_pslinux.py", line 1071, in net_if_stats
      duplex, speed = cext.net_if_duplex_speed(name)
  OSError: [Errno 38] Function not implemented (originated from ioctl(SIOCETHTOOL))
  
  ======================================================================
  ERROR: psutil.tests.test_misc.TestScripts.test_ifconfig
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/project/psutil/tests/test_misc.py", line 895, in test_ifconfig
      self.assert_stdout('ifconfig.py')
    File "/project/psutil/tests/test_misc.py", line 830, in assert_stdout
      out = sh(cmd, **kwargs).strip()
    File "/tmp/tmp.XDTCoa1Gqa/venv/lib/python3.6/site-packages/psutil/tests/__init__.py", line 338, in wrapper
      return fun(*args, **kwargs)
    File "/tmp/tmp.XDTCoa1Gqa/venv/lib/python3.6/site-packages/psutil/tests/__init__.py", line 509, in sh
      raise RuntimeError(stderr)
  RuntimeError: Traceback (most recent call last):
    File "/project/scripts/ifconfig.py", line 101, in <module>
      main()
    File "/project/scripts/ifconfig.py", line 68, in main
      stats = psutil.net_if_stats()
    File "/tmp/tmp.XDTCoa1Gqa/venv/lib/python3.6/site-packages/psutil/__init__.py", line 2221, in net_if_stats
      return _psplatform.net_if_stats()
    File "/tmp/tmp.XDTCoa1Gqa/venv/lib/python3.6/site-packages/psutil/_pslinux.py", line 1071, in net_if_stats
      duplex, speed = cext.net_if_duplex_speed(name)
  OSError: [Errno 38] Function not implemented (originated from ioctl(SIOCETHTOOL))
  
  
  ======================================================================
  ERROR: psutil.tests.test_system.TestNetAPIs.test_net_if_addrs
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/project/psutil/tests/test_system.py", line 737, in test_net_if_addrs
      nic_stats = psutil.net_if_stats()
    File "/tmp/tmp.XDTCoa1Gqa/venv/lib/python3.6/site-packages/psutil/__init__.py", line 2221, in net_if_stats
      return _psplatform.net_if_stats()
    File "/tmp/tmp.XDTCoa1Gqa/venv/lib/python3.6/site-packages/psutil/_pslinux.py", line 1071, in net_if_stats
      duplex, speed = cext.net_if_duplex_speed(name)
  OSError: [Errno 38] Function not implemented (originated from ioctl(SIOCETHTOOL))
  
  ======================================================================
  ERROR: psutil.tests.test_system.TestNetAPIs.test_net_if_stats
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/project/psutil/tests/test_system.py", line 811, in test_net_if_stats
      nics = psutil.net_if_stats()
    File "/tmp/tmp.XDTCoa1Gqa/venv/lib/python3.6/site-packages/psutil/__init__.py", line 2221, in net_if_stats
      return _psplatform.net_if_stats()
    File "/tmp/tmp.XDTCoa1Gqa/venv/lib/python3.6/site-packages/psutil/_pslinux.py", line 1071, in net_if_stats
      duplex, speed = cext.net_if_duplex_speed(name)
  OSError: [Errno 38] Function not implemented (originated from ioctl(SIOCETHTOOL))
  
  ======================================================================
  ERROR: psutil.tests.test_linux.TestSystemNetIfStats.test_mtu
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/project/psutil/tests/test_linux.py", line 1017, in test_mtu
      for name, stats in psutil.net_if_stats().items():
    File "/tmp/tmp.XDTCoa1Gqa/venv/lib/python3.6/site-packages/psutil/__init__.py", line 2221, in net_if_stats
      return _psplatform.net_if_stats()
    File "/tmp/tmp.XDTCoa1Gqa/venv/lib/python3.6/site-packages/psutil/_pslinux.py", line 1071, in net_if_stats
      duplex, speed = cext.net_if_duplex_speed(name)
  OSError: [Errno 38] Function not implemented (originated from ioctl(SIOCETHTOOL))
  
  ======================================================================
  FAIL: psutil.tests.test_process.TestProcess.test_cmdline
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/project/psutil/tests/test_process.py", line 727, in test_cmdline
      self.assertEqual(' '.join(p.cmdline()), ' '.join(cmdline))
  AssertionError: '/usr/bin/qemu-aarch64 /tmp/tmp.XDTCoa1Gqa/[78 chars](60)' != '/tmp/tmp.XDTCoa1Gqa/venv/bin/python -c imp[20 chars](60)'
  - /usr/bin/qemu-aarch64 /tmp/tmp.XDTCoa1Gqa/venv/bin/python /tmp/tmp.XDTCoa1Gqa/venv/bin/python -c import time; time.sleep(60)
  + /tmp/tmp.XDTCoa1Gqa/venv/bin/python -c import time; time.sleep(60)
  
  
  ======================================================================
  FAIL: psutil.tests.test_process.TestProcess.test_cpu_times
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/project/psutil/tests/test_process.py", line 249, in test_cpu_times
      assert (times.user > 0.0) or (times.system > 0.0), times
  AssertionError: pcputimes(user=0.0, system=0.0, children_user=0.0, children_system=0.0, iowait=0.0)
  
  ======================================================================
  FAIL: psutil.tests.test_process.TestProcess.test_cpu_times_2
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/project/psutil/tests/test_process.py", line 266, in test_cpu_times_2
      raise self.fail("expected: %s, found: %s" % (utime, user_time))
  AssertionError: expected: 5.03, found: 0.0
  
  ======================================================================
  FAIL: psutil.tests.test_process.TestProcess.test_long_cmdline
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/project/psutil/tests/test_process.py", line 735, in test_long_cmdline
      self.assertEqual(p.cmdline(), cmdline)
  AssertionError: Lists differ: ['/usr/bin/qemu-aarch64', '/tmp/@psutil-418-[314 chars]789'] != ['/tmp/@psutil-418-2i333ojy', '0123456789', [260 chars]789']
  
  First differing element 0:
  '/usr/bin/qemu-aarch64'
  '/tmp/@psutil-418-2i333ojy'
  
  First list contains 2 additional elements.
  First extra element 21:
  '0123456789'
  
  - ['/usr/bin/qemu-aarch64',
  -  '/tmp/@psutil-418-2i333ojy',
  ? ^
  
  + ['/tmp/@psutil-418-2i333ojy',
  ? ^
  
  -  '/tmp/@psutil-418-2i333ojy',
     '0[1234](https://github.com/shawaj/psutil/actions/runs/4659298801/jobs/8246004292#step:6:1243)56789',
     '0123456789',
     '0123456789',
     '0123456789',
     '0123456789',
     '0123456789',
     '0123456789',
     '0123456789',
     '0123456789',
     '0123456789',
     '0123456789',
     '0123456789',
     '0123456789',
     '0123456789',
     '0123456789',
     '0123456789',
     '0123456789',
     '0123456789',
     '0123456789',
     '0123456789']
  
  ======================================================================
  FAIL: psutil.tests.test_process.TestProcess.test_long_name
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/project/psutil/tests/test_process.py", line 748, in test_long_name
      self.assertEqual(p.name(), os.path.basename(testfn))
  AssertionError: '@psutil-418-ruh' != '@psutil-418-ruhakhce01234567890123456789'
  - @psutil-418-ruh
  + @psutil-418-ruhakhce01234567890123456789
  
  
  ======================================================================
  FAIL: psutil.tests.test_process.TestProcess.test_memory_maps
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/project/psutil/tests/test_process.py", line 623, in test_memory_maps
      os.path.islink(nt.path), nt.path
  AssertionError: /usr/bin/qemu-aarch64
  
  ======================================================================
  FAIL: psutil.tests.test_process.TestProcess.test_prog_w_funky_name
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/project/psutil/tests/test_process.py", line 764, in test_prog_w_funky_name
      self.assertEqual(p.cmdline(), cmdline)
  AssertionError: Lists differ: ['/usr/bin/qemu-aarch64', '/tmp/@psutil-418-[143 chars], ''] != ['/tmp/@psutil-418-sd06m0_6foo bar )', '-c',[80 chars], '']
  
  First differing element 0:
  '/usr/bin/qemu-aarch64'
  '/tmp/@psutil-418-sd06m0_6foo bar )'
  
  First list contains 2 additional elements.
  First extra element 7:
  'arg3'
  
  - ['/usr/bin/qemu-aarch64',
  -  '/tmp/@psutil-418-sd06m0_6foo bar )',
  ? ^
  
  + ['/tmp/@psutil-418-sd06m0_6foo bar )',
  ? ^
  
  -  '/tmp/@psutil-418-sd06m0_6foo bar )',
     '-c',
     'import time; [time.sleep(0.01) for x in range(3000)];arg1',
     'arg2',
     '',
     'arg3',
     '']
  
  ======================================================================
  FAIL: psutil.tests.test_process.TestProcess.test_status
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/project/psutil/tests/test_process.py", line 853, in test_status
      self.assertEqual(p.status(), psutil.STATUS_RUNNING)
  AssertionError: '?' != 'running'
  - ?
  + running
  
  
  ======================================================================
  FAIL: psutil.tests.test_posix.TestProcess.test_name
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/project/psutil/tests/test_posix.py", line 210, in test_name
      self.assertEqual(name_ps, name_psutil)
  AssertionError: 'qemu-aarch' != 'python'
  - qemu-aarch
  + python
  
  
  ======================================================================
  FAIL: psutil.tests.test_contracts.TestFetchAllProcesses.test_all
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/project/psutil/tests/test_contracts.py", line 448, in test_all
      raise self.fail(''.join(failures))
  AssertionError:     
      ======================================================================
      FAIL: test_status pid=418, ret='?'
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "/project/psutil/tests/test_contracts.py", line 434, in test_all
          meth(value, info)
        File "/project/psutil/tests/test_contracts.py", line 529, in status
          self.assertNotEqual(ret, '?')  # XXX
        File "/opt/python/cp36-cp36m/lib/python3.6/unittest/case.py", line 838, in assertNotEqual
          raise self.failureException(msg)
      AssertionError: '?' == '?'
  
  
  ======================================================================
  FAIL: psutil.tests.test_linux.TestMisc.test_issue_687
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/tmp/tmp.XDTCoa1Gqa/venv/lib/python3.6/site-packages/psutil/tests/__init__.py", line 731, in wrapper
      raise exc
    File "/tmp/tmp.XDTCoa1Gqa/venv/lib/python3.6/site-packages/psutil/tests/__init__.py", line 723, in wrapper
      return fun(*args, **kwargs)
    File "/project/psutil/tests/test_linux.py", line 1565, in test_issue_687
      self.assertEqual(len(threads), 2)
  AssertionError: 3 != 2
  
  ======================================================================
  FAIL: psutil.tests.test_linux.TestProcessAgainstStatus.test_status
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/project/psutil/tests/test_linux.py", line 2251, in test_status
      self.assertEqual(self.proc.status(), value)
  AssertionError: '?' != 'running'
  - ?
  + running
  
  
  ----------------------------------------------------------------------
  Ran 644 tests in 66.031s
  
  FAILED (failures=12, errors=6, skipped=170)
  FAILED
                                                            ✕ 123.21s
Error: Command ['sh', '-c', 'env PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 PSUTIL_SCRIPTS_DIR=/project/scripts python /project/psutil/tests/runner.py && env PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 PSUTIL_SCRIPTS_DIR=/project/scripts python /project/psutil/tests/test_memleaks.py'] failed with code 1. 

Error: Process completed with exit code 1.

@shawaj shawaj force-pushed the shawaj/arm64 branch 3 times, most recently from e0ffa3c to 1209f12 Compare April 10, 2023 18:48
- add arm64, ppc64le, s390x builds via qemu
- add macos universal2 build
- add windows arm64 build
- bump cancel workflow action to latest to remove nodejs warnings
- bump cibuildwheel action to latest

Signed-off-by: Aaron Shaw <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant