49
49
from psutil .tests import PYPY
50
50
from psutil .tests import PYTHON_EXE
51
51
from psutil .tests import PYTHON_EXE_ENV
52
- from psutil .tests import QEMU_USER
53
52
from psutil .tests import PsutilTestCase
54
53
from psutil .tests import ThreadTask
55
54
from psutil .tests import call_until
@@ -257,7 +256,6 @@ def test_cpu_percent_numcpus_none(self):
257
256
psutil .Process ().cpu_percent ()
258
257
assert m .called
259
258
260
- @pytest .mark .skipif (QEMU_USER , reason = "QEMU user not supported" )
261
259
def test_cpu_times (self ):
262
260
times = psutil .Process ().cpu_times ()
263
261
assert times .user >= 0.0 , times
@@ -270,7 +268,6 @@ def test_cpu_times(self):
270
268
for name in times ._fields :
271
269
time .strftime ("%H:%M:%S" , time .localtime (getattr (times , name )))
272
270
273
- @pytest .mark .skipif (QEMU_USER , reason = "QEMU user not supported" )
274
271
def test_cpu_times_2 (self ):
275
272
user_time , kernel_time = psutil .Process ().cpu_times ()[:2 ]
276
273
utime , ktime = os .times ()[:2 ]
@@ -642,8 +639,6 @@ def test_memory_maps(self):
642
639
continue
643
640
if BSD and nt .path == "pvclock" :
644
641
continue
645
- if QEMU_USER and "/bin/qemu-" in nt .path :
646
- continue
647
642
assert os .path .isabs (nt .path ), nt .path
648
643
649
644
if POSIX :
@@ -710,7 +705,6 @@ def test_is_running(self):
710
705
assert not p .is_running ()
711
706
assert not p .is_running ()
712
707
713
- @pytest .mark .skipif (QEMU_USER , reason = "QEMU user not supported" )
714
708
def test_exe (self ):
715
709
p = self .spawn_psproc ()
716
710
exe = p .exe ()
@@ -763,9 +757,6 @@ def test_cmdline(self):
763
757
if pyexe != PYTHON_EXE :
764
758
assert ' ' .join (p .cmdline ()[1 :]) == ' ' .join (cmdline [1 :])
765
759
return
766
- if QEMU_USER :
767
- assert ' ' .join (p .cmdline ()[2 :]) == ' ' .join (cmdline )
768
- return
769
760
assert ' ' .join (p .cmdline ()) == ' ' .join (cmdline )
770
761
771
762
@pytest .mark .skipif (PYPY , reason = "broken on PYPY" )
@@ -783,8 +774,6 @@ def test_long_cmdline(self):
783
774
assert p .cmdline () == cmdline
784
775
except psutil .ZombieProcess :
785
776
raise pytest .skip ("OPENBSD: process turned into zombie" )
786
- elif QEMU_USER :
787
- assert p .cmdline ()[2 :] == cmdline
788
777
else :
789
778
ret = p .cmdline ()
790
779
if NETBSD and ret == []:
@@ -798,8 +787,7 @@ def test_name(self):
798
787
pyexe = os .path .basename (os .path .realpath (sys .executable )).lower ()
799
788
assert pyexe .startswith (name ), (pyexe , name )
800
789
801
- @pytest .mark .skipif (PYPY or QEMU_USER , reason = "unreliable on PYPY" )
802
- @pytest .mark .skipif (QEMU_USER , reason = "unreliable on QEMU user" )
790
+ @pytest .mark .skipif (PYPY , reason = "unreliable on PYPY" )
803
791
def test_long_name (self ):
804
792
pyexe = create_py_exe (self .get_testfn (suffix = string .digits * 2 ))
805
793
cmdline = [
@@ -830,7 +818,6 @@ def test_long_name(self):
830
818
# @pytest.mark.skipif(SUNOS, reason="broken on SUNOS")
831
819
# @pytest.mark.skipif(AIX, reason="broken on AIX")
832
820
# @pytest.mark.skipif(PYPY, reason="broken on PYPY")
833
- # @pytest.mark.skipif(QEMU_USER, reason="broken on QEMU user")
834
821
# def test_prog_w_funky_name(self):
835
822
# # Test that name(), exe() and cmdline() correctly handle programs
836
823
# # with funky chars such as spaces and ")", see:
@@ -938,7 +925,6 @@ def cleanup(init):
938
925
except psutil .AccessDenied :
939
926
pass
940
927
941
- @pytest .mark .skipif (QEMU_USER , reason = "QEMU user not supported" )
942
928
def test_status (self ):
943
929
p = psutil .Process ()
944
930
assert p .status () == psutil .STATUS_RUNNING
@@ -1166,7 +1152,6 @@ def test_parent_multi(self):
1166
1152
assert grandchild .parent () == child
1167
1153
assert child .parent () == parent
1168
1154
1169
- @pytest .mark .skipif (QEMU_USER , reason = "QEMU user not supported" )
1170
1155
@retry_on_failure ()
1171
1156
def test_parents (self ):
1172
1157
parent = psutil .Process ()
0 commit comments