==> Building on p ==> Checking for remote environment... ==> Syncing package to remote host... sending incremental file list created directory packages/python-setproctitle ./ PKGBUILD 1,090 100% 0.00kB/s 0:00:00 1,090 100% 0.00kB/s 0:00:00 (xfr#1, to-chk=1/3) python-setproctitle-1.2.3-1.log 293 100% 286.13kB/s 0:00:00 293 100% 286.13kB/s 0:00:00 (xfr#2, to-chk=0/3) sent 995 bytes received 108 bytes 735.33 bytes/sec total size is 1,278 speedup is 1.16 ==> Patching arch to riscv64... ==> Running extra-riscv64-build -- -d /home/felix/packages/riscv64-pkg-cache:/var/cache/pacman/pkg -l felix21 on remote host... [?25l:: Synchronizing package databases... core downloading... extra downloading... community downloading... :: Starting full system upgrade... there is nothing to do [?25h==> Building in chroot for [extra] (riscv64)... ==> Synchronizing chroot copy [/var/lib/archbuild/extra-riscv64/root] -> [felix21]...done ==> Making package: python-setproctitle 1.2.3-1 (Tue Aug 9 21:03:22 2022) ==> Retrieving sources...  -> Downloading setproctitle-1.2.3.tar.gz... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 23618 100 23618 0 0 177k 0 --:--:-- --:--:-- --:--:-- 177k ==> Validating source files with sha256sums... setproctitle-1.2.3.tar.gz ... Passed ==> Making package: python-setproctitle 1.2.3-1 (Tue Aug 9 21:03:54 2022) ==> Checking runtime dependencies... ==> Installing missing dependencies... [?25lresolving dependencies... looking for conflicting packages... Package (2) New Version Net Change core/libnsl 2.0.0-2 0.06 MiB core/python 3.10.5-1 80.43 MiB Total Installed Size: 80.49 MiB :: Proceed with installation? [Y/n] checking keyring... checking package integrity... loading package files... checking for file conflicts... :: Processing package changes... installing libnsl... installing python... Optional dependencies for python python-setuptools python-pip sqlite [installed] mpdecimal: for decimal xz: for lzma [installed] tk: for tkinter [?25h==> Checking buildtime dependencies... ==> Installing missing dependencies... [?25lresolving dependencies... looking for conflicting packages... Package (18) New Version Net Change community/python-apipkg 3.0.1-1 0.04 MiB extra/python-appdirs 1.4.4-6 0.07 MiB extra/python-attrs 21.4.0-1 0.45 MiB community/python-iniconfig 1.1.1-5 0.02 MiB community/python-more-itertools 8.13.0-2 0.48 MiB extra/python-ordered-set 4.0.2-6 0.06 MiB extra/python-packaging 21.3-1 0.26 MiB extra/python-pep517 0.12.0-4 0.13 MiB community/python-pluggy 1.0.0-1 0.10 MiB community/python-py 1.11.0-1 0.71 MiB extra/python-pyparsing 3.0.9-1 0.96 MiB extra/python-tomli 2.0.1-1 0.08 MiB core/procps-ng 3.3.17-1 1.43 MiB community/python-build 0.8.0-1 0.97 MiB community/python-installer 0.5.1-1 1.13 MiB community/python-pytest 7.1.2-1 2.62 MiB extra/python-setuptools 1:59.5.0-1 2.96 MiB community/python-wheel 0.37.1-1 0.16 MiB Total Installed Size: 12.64 MiB :: Proceed with installation? [Y/n] checking keyring... checking package integrity... loading package files... checking for file conflicts... :: Processing package changes... installing python-appdirs... installing python-more-itertools... installing python-ordered-set... installing python-pyparsing... Optional dependencies for python-pyparsing python-railroad-diagrams: for generating Railroad Diagrams python-jinja: for generating Railroad Diagrams installing python-packaging... installing python-setuptools... installing python-wheel... Optional dependencies for python-wheel python-keyring: for wheel.signatures python-xdg: for wheel.signatures installing python-tomli... installing python-pep517... installing python-build... Optional dependencies for python-build python-virtualenv: Use virtualenv for build isolation installing python-installer... installing python-attrs... installing python-iniconfig... installing python-pluggy... installing python-apipkg... installing python-py... installing python-pytest... installing procps-ng... [?25h==> Retrieving sources...  -> Found setproctitle-1.2.3.tar.gz ==> WARNING: Skipping all source file integrity checks. ==> Extracting sources...  -> Extracting setproctitle-1.2.3.tar.gz with bsdtar ==> Starting build()... running egg_info writing setproctitle.egg-info/PKG-INFO writing dependency_links to setproctitle.egg-info/dependency_links.txt writing requirements to setproctitle.egg-info/requires.txt writing top-level names to setproctitle.egg-info/top_level.txt reading manifest file 'setproctitle.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching 'Makefile' writing manifest file 'setproctitle.egg-info/SOURCES.txt' running bdist_wheel running build running build_ext building 'setproctitle' extension creating build creating build/temp.linux-riscv64-3.10 creating build/temp.linux-riscv64-3.10/src gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=rv64gc -mabi=lp64d -O3 -pipe -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -flto=auto -ffat-lto-objects -march=rv64gc -mabi=lp64d -O3 -pipe -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -flto=auto -march=rv64gc -mabi=lp64d -O3 -pipe -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -flto=auto -march=rv64gc -mabi=lp64d -O2 -pipe -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -flto=auto -fPIC -DSPT_VERSION=1.2.3 -DHAVE_SYS_PRCTL_H=1 -I/usr/include/python3.10 -c src/setproctitle.c -o build/temp.linux-riscv64-3.10/src/setproctitle.o gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=rv64gc -mabi=lp64d -O3 -pipe -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -flto=auto -ffat-lto-objects -march=rv64gc -mabi=lp64d -O3 -pipe -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -flto=auto -march=rv64gc -mabi=lp64d -O3 -pipe -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -flto=auto -march=rv64gc -mabi=lp64d -O2 -pipe -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -flto=auto -fPIC -DSPT_VERSION=1.2.3 -DHAVE_SYS_PRCTL_H=1 -I/usr/include/python3.10 -c src/spt_debug.c -o build/temp.linux-riscv64-3.10/src/spt_debug.o gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=rv64gc -mabi=lp64d -O3 -pipe -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -flto=auto -ffat-lto-objects -march=rv64gc -mabi=lp64d -O3 -pipe -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -flto=auto -march=rv64gc -mabi=lp64d -O3 -pipe -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -flto=auto -march=rv64gc -mabi=lp64d -O2 -pipe -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -flto=auto -fPIC -DSPT_VERSION=1.2.3 -DHAVE_SYS_PRCTL_H=1 -I/usr/include/python3.10 -c src/spt_setup.c -o build/temp.linux-riscv64-3.10/src/spt_setup.o gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=rv64gc -mabi=lp64d -O3 -pipe -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -flto=auto -ffat-lto-objects -march=rv64gc -mabi=lp64d -O3 -pipe -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -flto=auto -march=rv64gc -mabi=lp64d -O3 -pipe -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -flto=auto -march=rv64gc -mabi=lp64d -O2 -pipe -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -flto=auto -fPIC -DSPT_VERSION=1.2.3 -DHAVE_SYS_PRCTL_H=1 -I/usr/include/python3.10 -c src/spt_status.c -o build/temp.linux-riscv64-3.10/src/spt_status.o gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=rv64gc -mabi=lp64d -O3 -pipe -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -flto=auto -ffat-lto-objects -march=rv64gc -mabi=lp64d -O3 -pipe -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -flto=auto -march=rv64gc -mabi=lp64d -O3 -pipe -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -flto=auto -march=rv64gc -mabi=lp64d -O2 -pipe -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -flto=auto -fPIC -DSPT_VERSION=1.2.3 -DHAVE_SYS_PRCTL_H=1 -I/usr/include/python3.10 -c src/spt_strlcpy.c -o build/temp.linux-riscv64-3.10/src/spt_strlcpy.o creating build/lib.linux-riscv64-3.10 gcc -shared -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto -march=rv64gc -mabi=lp64d -O2 -pipe -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -flto=auto build/temp.linux-riscv64-3.10/src/setproctitle.o build/temp.linux-riscv64-3.10/src/spt_debug.o build/temp.linux-riscv64-3.10/src/spt_setup.o build/temp.linux-riscv64-3.10/src/spt_status.o build/temp.linux-riscv64-3.10/src/spt_strlcpy.o -L/usr/lib -o build/lib.linux-riscv64-3.10/setproctitle.cpython-310-riscv64-linux-gnu.so installing to build/bdist.linux-riscv64/wheel running install running install_lib creating build/bdist.linux-riscv64 creating build/bdist.linux-riscv64/wheel copying build/lib.linux-riscv64-3.10/setproctitle.cpython-310-riscv64-linux-gnu.so -> build/bdist.linux-riscv64/wheel running install_egg_info running egg_info writing setproctitle.egg-info/PKG-INFO writing dependency_links to setproctitle.egg-info/dependency_links.txt writing requirements to setproctitle.egg-info/requires.txt writing top-level names to setproctitle.egg-info/top_level.txt reading manifest file 'setproctitle.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching 'Makefile' writing manifest file 'setproctitle.egg-info/SOURCES.txt' Copying setproctitle.egg-info to build/bdist.linux-riscv64/wheel/setproctitle-1.2.3-py3.10.egg-info running install_scripts creating build/bdist.linux-riscv64/wheel/setproctitle-1.2.3.dist-info/WHEEL creating '/build/python-setproctitle/src/setproctitle-1.2.3/dist/tmpfgxig4bm/setproctitle-1.2.3-cp310-cp310-linux_riscv64.whl' and adding 'build/bdist.linux-riscv64/wheel' to it adding 'setproctitle.cpython-310-riscv64-linux-gnu.so' adding 'setproctitle-1.2.3.dist-info/METADATA' adding 'setproctitle-1.2.3.dist-info/WHEEL' adding 'setproctitle-1.2.3.dist-info/top_level.txt' adding 'setproctitle-1.2.3.dist-info/RECORD' removing build/bdist.linux-riscv64/wheel * Getting dependencies for wheel... * Building wheel... Successfully built setproctitle-1.2.3-cp310-cp310-linux_riscv64.whl ==> Starting check()... ============================= test session starts ============================== platform linux -- Python 3.10.5, pytest-7.1.2, pluggy-1.0.0 rootdir: /build/python-setproctitle/src/setproctitle-1.2.3 collected 23 items ../../tests/setproctitle_test.py ...F....FFFFFFFF.. [ 78%] ../../tests/setthreadtitle_test.py FFF [ 91%] ../../tests/test_win32.py ss [100%] =================================== FAILURES =================================== ______________________________ test_setproctitle _______________________________ def test_setproctitle(): """setproctitle() can set the process title, duh.""" rv = run_script( r""" import setproctitle setproctitle.setproctitle('Hello, world!') import os print(os.getpid()) # ps can fail on kfreebsd arch # (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=460331) print(os.popen("ps -x -o pid,command 2> /dev/null").read()) """ ) lines = [line for line in rv.splitlines() if line] pid = lines.pop(0) pids = dict([r.strip().split(None, 1) for r in lines]) title = _clean_up_title(pids[pid]) > assert title == "Hello, world!" E AssertionError: assert '/usr/bin/qem...sr/bin/python' == 'Hello, world!' E - Hello, world! E + /usr/bin/qemu-riscv64-static /usr/bin/python /usr/bin/python ../../tests/setproctitle_test.py:112: AssertionError _________________________________ test_issue_8 _________________________________ tmp_pypath = PosixPath('/tmp/pytest-of-builduser/pytest-0/test_issue_80') def test_issue_8(tmp_pypath): """Test that the module works with 'python -m'.""" module = "spt_issue_8" with open(tmp_pypath / f"{module}.py", "w") as f: f.write( r""" import setproctitle setproctitle.setproctitle("Hello, module!") import os print(os.getpid()) print(os.popen("ps -x -o pid,command 2> /dev/null").read()) """ ) rv = run_script(args="-m " + module) lines = [line for line in rv.splitlines() if line] pid = lines.pop(0) pids = dict([r.strip().split(None, 1) for r in lines]) title = _clean_up_title(pids[pid]) > assert title == "Hello, module!" E AssertionError: assert '/usr/bin/qem...m spt_issue_8' == 'Hello, module!' E - Hello, module! E + /usr/bin/qemu-riscv64-static /usr/bin/python /usr/bin/python -m spt_issue_8 ../../tests/setproctitle_test.py:220: AssertionError ______________________________ test_large_cmdline ______________________________ tmp_pypath = PosixPath('/tmp/pytest-of-builduser/pytest-0/test_large_cmdline0') def test_large_cmdline(tmp_pypath): """Test with a 64KB command line.""" module = "longargs" with open(tmp_pypath / f"{module}.py", "w") as f: f.write( r""" import setproctitle setproctitle.setproctitle("Hello, long!") import os print(os.getpid()) print(os.popen("ps -x -o pid,command 2> /dev/null").read()) """ ) rv = run_script(args=f"-m {module} {' '.join(['X' * 1024] * 64)}") lines = [line for line in rv.splitlines() if line] pid = lines.pop(0) pids = dict([r.strip().split(None, 1) for r in lines]) title = _clean_up_title(pids[pid]) > assert title == "Hello, long!" E AssertionError: assert '/usr/bin/qem...XXXXXXXXXXXXX' == 'Hello, long!' E - Hello, long! E + /usr/bin/qemu-riscv64-static /usr/bin/python /usr/bin/python -m longargs XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX... E E ...Full output truncated (1 line hidden), use '-vv' to show ../../tests/setproctitle_test.py:244: AssertionError _________________________________ test_unicode _________________________________ def test_unicode(): """Title can contain unicode characters.""" snowman = "\u2603" try: snowman.encode(sys.getdefaultencoding()) except UnicodeEncodeError: pytest.skip( "default encoding '%s' can't deal with snowmen" % sys.getdefaultencoding() ) try: snowman.encode(sys.getfilesystemencoding()) except UnicodeEncodeError: pytest.skip( "file system encoding '%s' can't deal with snowmen" % sys.getfilesystemencoding() ) rv = run_script( r""" snowman = u'\u2603' import setproctitle setproctitle.setproctitle("Hello, " + snowman + "!") import os import locale from subprocess import Popen, PIPE print(os.getpid()) proc = Popen("ps -x -o pid,command 2> /dev/null", shell=True, close_fds=True, stdout=PIPE, stderr=PIPE) buf = proc.stdout.read() print(buf.decode(locale.getpreferredencoding(), 'replace')) """ ) lines = [line for line in rv.splitlines() if line] pid = lines.pop(0) pids = dict([r.strip().split(None, 1) for r in lines]) snowmen = [ "\u2603", # ps supports unicode r"\M-b\M^X\M^C", # ps output on BSD r"M-bM^XM^C", # ps output on some Darwin < 11.2 "\ufffdM^XM^C", # ps output on Darwin 11.2 ] title = _clean_up_title(pids[pid]) for snowman in snowmen: if title == "Hello, " + snowman + "!": break else: > pytest.fail("unexpected ps output: %r" % title) E Failed: unexpected ps output: '/usr/bin/qemu-riscv64-static /usr/bin/python /usr/bin/python' ../../tests/setproctitle_test.py:298: Failed _______________________________ test_weird_args ________________________________ def test_weird_args(): """No problem with encoded arguments.""" euro = "\u20ac" snowman = "\u2603" try: rv = run_script( r""" import setproctitle setproctitle.setproctitle("Hello, weird args!") import os print(os.getpid()) print(os.popen("ps -x -o pid,command 2> /dev/null").read()) """, args=" ".join(["-", "hello", euro, snowman]), ) except TypeError: pytest.skip("apparently we can't pass unicode args to a program") lines = [line for line in rv.splitlines() if line] pid = lines.pop(0) pids = dict([r.strip().split(None, 1) for r in lines]) title = _clean_up_title(pids[pid]) > assert title == "Hello, weird args!" E AssertionError: assert '/usr/bin/qem...n - hello € ☃' == 'Hello, weird args!' E - Hello, weird args! E + /usr/bin/qemu-riscv64-static /usr/bin/python /usr/bin/python - hello € ☃ ../../tests/setproctitle_test.py:325: AssertionError _______________________________ test_weird_path ________________________________ tmp_path = PosixPath('/tmp/pytest-of-builduser/pytest-0/test_weird_path0') spt_directory = '/build/python-setproctitle/src/setproctitle-1.2.3/build/lib.linux-riscv64-3.10' def test_weird_path(tmp_path, spt_directory): """No problem with encoded argv[0] path.""" _check_4388() euro = "\u20ac" snowman = "\u2603" dir = tmp_path / euro / snowman try: os.makedirs(dir) except UnicodeEncodeError: pytest.skip("file system doesn't support unicode") exc = dir / "python" os.symlink(sys.executable, exc) rv = run_script( f""" import sys sys.path.insert(0, {repr(spt_directory)}) import setproctitle setproctitle.setproctitle("Hello, weird path!") import os print(os.getpid()) print(os.popen("ps -x -o pid,command 2> /dev/null").read()) """, args=" ".join(["-", "foo", "bar", "baz"]), executable=exc, ) lines = [line for line in rv.splitlines() if line] pid = lines.pop(0) pids = dict([r.strip().split(None, 1) for r in lines]) title = _clean_up_title(pids[pid]) > assert title == "Hello, weird path!" E AssertionError: assert '/usr/bin/qem...- foo bar baz' == 'Hello, weird path!' E - Hello, weird path! E + /usr/bin/qemu-riscv64-static /tmp/pytest-of-builduser/pytest-0/test_weird_path0/€/☃/python /tmp/pytest-of-builduser/pytest-0/test_weird_path0/€/☃/python - foo bar baz ../../tests/setproctitle_test.py:362: AssertionError ________________________________ test_embedded _________________________________ pyrun = '/build/python-setproctitle/src/setproctitle-1.2.3/tests/pyrun3.10' spt_directory = '/build/python-setproctitle/src/setproctitle-1.2.3/build/lib.linux-riscv64-3.10' @pytest.mark.embedded @skip_if_pypy @skip_if_macos @skip_if_no_proc_cmdline def test_embedded(pyrun, spt_directory): """Check the module works with embedded Python. """ rv = run_script( f""" import sys sys.path.insert(0, {spt_directory!r}) import setproctitle setproctitle.setproctitle("Hello, embedded!") import os print(os.getpid()) print(os.popen("ps -x -o pid,command 2> /dev/null").read()) """, executable=pyrun, ) lines = [line for line in rv.splitlines() if line] pid = lines.pop(0) pids = dict([r.strip().split(None, 1) for r in lines]) title = _clean_up_title(pids[pid]) > assert title == "Hello, embedded!" E AssertionError: assert '/usr/bin/qem...sts/pyrun3.10' == 'Hello, embedded!' E - Hello, embedded! E + /usr/bin/qemu-riscv64-static /build/python-setproctitle/src/setproctitle-1.2.3/tests/pyrun3.10 /build/python-setproctitle/src/setproctitle-1.2.3/tests/pyrun3.10 ../../tests/setproctitle_test.py:390: AssertionError ___________________________ test_embedded_many_args ____________________________ pyrun = '/build/python-setproctitle/src/setproctitle-1.2.3/tests/pyrun3.10' spt_directory = '/build/python-setproctitle/src/setproctitle-1.2.3/build/lib.linux-riscv64-3.10' @pytest.mark.embedded @skip_if_pypy @skip_if_macos @skip_if_no_proc_cmdline def test_embedded_many_args(pyrun, spt_directory): """Check more complex cmdlines are handled in embedded env too.""" rv = run_script( f""" import sys sys.path.insert(0, {spt_directory!r}) import setproctitle setproctitle.setproctitle("Hello, embedded!") import os print(os.getpid()) print(os.popen("ps -x -o pid,command 2> /dev/null").read()) """, executable=pyrun, args=" ".join(["foo", "bar", "baz"]), ) lines = [line for line in rv.splitlines() if line] pid = lines.pop(0) pids = dict([r.strip().split(None, 1) for r in lines]) title = _clean_up_title(pids[pid]) > assert title == "Hello, embedded!" E AssertionError: assert '/usr/bin/qem...0 foo bar baz' == 'Hello, embedded!' E - Hello, embedded! E + /usr/bin/qemu-riscv64-static /build/python-setproctitle/src/setproctitle-1.2.3/tests/pyrun3.10 /build/python-setproctitle/src/setproctitle-1.2.3/tests/pyrun3.10 foo bar baz ../../tests/setproctitle_test.py:418: AssertionError __________________________________ test_noenv __________________________________ @skip_if_no_proc_env def test_noenv(): """Check that SPT_NOENV avoids clobbering environ.""" env = os.environ.copy() env["SPT_TESTENV"] = "testenv" rv = run_script( """ import os os.environ['SPT_NOENV'] = "1" cmdline_len = len(open('/proc/self/cmdline').read()) print(cmdline_len) print('SPT_TESTENV=testenv' in open('/proc/self/environ').read()) import setproctitle setproctitle.setproctitle('X' * cmdline_len * 10) title = open('/proc/self/cmdline').read().rstrip() print(title) print(len(title)) print('SPT_TESTENV=testenv' in open('/proc/self/environ').read()) """, env=env, ) lines = rv.splitlines() cmdline_len = int(lines[0]) assert lines[1] == "True", "can't verify testenv" title = lines[2] > assert "XXX" in _clean_up_title(title), "title not set as expected" E AssertionError: title not set as expected E assert 'XXX' in '/usr/bin/python\x00' E + where '/usr/bin/python\x00' = _clean_up_title('/usr/bin/python\x00') ../../tests/setproctitle_test.py:450: AssertionError _________________________ test_thread_title_unchanged __________________________ def test_thread_title_unchanged(): rv = run_script( """ from glob import glob def print_stuff(): for fn in sorted(glob("/proc/self/task/*/comm")): with open(fn) as f: print(f.readline().rstrip()) print_stuff() print("---") import setproctitle print_stuff() print("---") print(setproctitle.getthreadtitle()) """ ) before, after, gtt = rv.split("---\n") assert before == after > assert before == gtt E AssertionError: assert 'python\npython\n' == 'python\n' E python E + python ../../tests/setthreadtitle_test.py:39: AssertionError ____________________________ test_set_thread_title _____________________________ def test_set_thread_title(): > run_script( """ from glob import glob import setproctitle setproctitle.setthreadtitle("hello" * 10) (fn,) = glob("/proc/self/task/*/comm") with open(fn) as f: assert f.read().rstrip() == "hello" * 3 """ ) ../../tests/setthreadtitle_test.py:43: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ script = '\nfrom glob import glob\nimport setproctitle\nsetproctitle.setthreadtitle("hello" * 10)\n\n(fn,) = glob("/proc/self/task/*/comm")\nwith open(fn) as f:\n assert f.read().rstrip() == "hello" * 3\n' args = None, executable = '/usr/bin/python', env = None def run_script(script=None, args=None, executable=None, env=None): """run a script in a separate process. if the script completes successfully, return its ``stdout``, else fail the test. """ if executable is None: executable = sys.executable cmdline = str(executable) if args: cmdline = cmdline + " " + args proc = sp.Popen( cmdline, stdin=sp.PIPE, stdout=sp.PIPE, stderr=sp.PIPE, env=env, shell=True, close_fds=True, ) out, err = proc.communicate(script and script.encode()) if 0 != proc.returncode: print(out) print(err) > pytest.fail("test script failed") E Failed: test script failed ../../tests/conftest.py:124: Failed ----------------------------- Captured stdout call ----------------------------- b'' b'Traceback (most recent call last):\n File "", line 6, in \nValueError: too many values to unpack (expected 1)\n' ____________________________ test_set_threads_title ____________________________ def test_set_threads_title(): > run_script( """ import time import threading from glob import glob (fn,) = glob("/proc/self/task/*/comm") with open(fn) as f: orig = f.read().rstrip() import setproctitle def worker(title): setproctitle.setthreadtitle(title) while 1: time.sleep(1) t1 = threading.Thread(target=worker, args=('reader',), daemon=True) t2 = threading.Thread(target=worker, args=('writer',), daemon=True) t1.start() t2.start() comms = [] for fn in glob("/proc/self/task/*/comm"): with open(fn) as f: comms.append(f.read().rstrip()) comms.sort() assert comms == sorted([orig, "reader", "writer"]) """ ) ../../tests/setthreadtitle_test.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ script = '\nimport time\nimport threading\nfrom glob import glob\n\n(fn,) = glob("/proc/self/task/*/comm")\nwith open(fn) as f:...) as f:\n comms.append(f.read().rstrip())\n\ncomms.sort()\nassert comms == sorted([orig, "reader", "writer"])\n' args = None, executable = '/usr/bin/python', env = None def run_script(script=None, args=None, executable=None, env=None): """run a script in a separate process. if the script completes successfully, return its ``stdout``, else fail the test. """ if executable is None: executable = sys.executable cmdline = str(executable) if args: cmdline = cmdline + " " + args proc = sp.Popen( cmdline, stdin=sp.PIPE, stdout=sp.PIPE, stderr=sp.PIPE, env=env, shell=True, close_fds=True, ) out, err = proc.communicate(script and script.encode()) if 0 != proc.returncode: print(out) print(err) > pytest.fail("test script failed") E Failed: test script failed ../../tests/conftest.py:124: Failed ----------------------------- Captured stdout call ----------------------------- b'' b'Traceback (most recent call last):\n File "", line 6, in \nValueError: too many values to unpack (expected 1)\n' =========================== short test summary info ============================ FAILED ../../tests/setproctitle_test.py::test_setproctitle - AssertionError: ... FAILED ../../tests/setproctitle_test.py::test_issue_8 - AssertionError: asser... FAILED ../../tests/setproctitle_test.py::test_large_cmdline - AssertionError:... FAILED ../../tests/setproctitle_test.py::test_unicode - Failed: unexpected ps... FAILED ../../tests/setproctitle_test.py::test_weird_args - AssertionError: as... FAILED ../../tests/setproctitle_test.py::test_weird_path - AssertionError: as... FAILED ../../tests/setproctitle_test.py::test_embedded - AssertionError: asse... FAILED ../../tests/setproctitle_test.py::test_embedded_many_args - AssertionE... FAILED ../../tests/setproctitle_test.py::test_noenv - AssertionError: title n... FAILED ../../tests/setthreadtitle_test.py::test_thread_title_unchanged - Asse... FAILED ../../tests/setthreadtitle_test.py::test_set_thread_title - Failed: te... FAILED ../../tests/setthreadtitle_test.py::test_set_threads_title - Failed: t... =================== 12 failed, 9 passed, 2 skipped in 23.20s =================== ==> ERROR: A failure occurred in check().  Aborting... ==> ERROR: Build failed, check /var/lib/archbuild/extra-riscv64/felix21/build receiving incremental file list python-setproctitle-1.2.3-1-riscv64-build.log python-setproctitle-1.2.3-1-riscv64-check.log sent 62 bytes received 4,779 bytes 1,936.40 bytes/sec total size is 26,382 speedup is 5.45