==> Building on electivire ==> Checking for remote environment... ==> Syncing package to remote host... sending incremental file list ./ PKGBUILD 1,097 100% 0.00kB/s 0:00:00 1,097 100% 0.00kB/s 0:00:00 (xfr#1, to-chk=1/3) python-setproctitle-1.3.2-1.log 320 100% 312.50kB/s 0:00:00 320 100% 312.50kB/s 0:00:00 (xfr#2, to-chk=0/3) sent 818 bytes received 75 bytes 595.33 bytes/sec total size is 1,294 speedup is 1.45 ==> Patching arch to riscv64... ==> Running extra-riscv64-build -- -d /home/felix/packages/riscv64-pkg-cache:/var/cache/pacman/pkg -l root9 on remote host... ==> Locking clean chroot...done [?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] -> [root9]...done ==> Making package: python-setproctitle 1.3.2-1 (Thu Apr 20 12:19:39 2023) ==> Retrieving sources...  -> Found setproctitle-1.3.2.tar.gz ==> Validating source files with sha256sums... setproctitle-1.3.2.tar.gz ... Passed ==> Making package: python-setproctitle 1.3.2-1 (Thu Apr 20 12:20:19 2023) ==> Checking runtime dependencies... ==> Installing missing dependencies... [?25lresolving dependencies... looking for conflicting packages... Package (2) New Version Net Change core/libnsl 2.0.0-3 0.06 MiB core/python 3.10.10-1 81.41 MiB Total Installed Size: 81.47 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 (25) New Version Net Change community/python-autocommand 2.2.2-1 0.07 MiB community/python-exceptiongroup 1.1.1-1 0.09 MiB community/python-fastjsonschema 2.16.3-1 0.20 MiB community/python-inflect 6.0.4-1 0.28 MiB community/python-iniconfig 2.0.0-2 0.03 MiB community/python-jaraco.context 4.3.0-1 0.03 MiB community/python-jaraco.functools 3.6.0-1 0.05 MiB community/python-jaraco.text 3.11.1-1 0.07 MiB community/python-more-itertools 9.1.1-1 0.50 MiB extra/python-ordered-set 4.1.0-1 0.06 MiB extra/python-packaging 23.0-1 0.32 MiB extra/python-platformdirs 3.2.0-1 0.14 MiB community/python-pluggy 1.0.0-2 0.10 MiB community/python-pydantic 1.10.7-2 5.84 MiB community/python-pyproject-hooks 1.0.0-1 0.07 MiB extra/python-tomli 2.0.1-1 0.08 MiB extra/python-trove-classifiers 2023.3.9-1 0.11 MiB community/python-typing_extensions 4.5.0-1 0.23 MiB extra/python-validate-pyproject 0.12.2-1 0.22 MiB core/procps-ng 3.3.17-1 1.43 MiB community/python-build 0.10.0-1 1.08 MiB community/python-installer 0.7.0-1 1.22 MiB community/python-pytest 7.3.1-3 2.83 MiB extra/python-setuptools 1:67.6.1-1 3.34 MiB community/python-wheel 0.40.0-1 0.19 MiB Total Installed Size: 18.57 MiB :: Proceed with installation? [Y/n] checking keyring... checking package integrity... loading package files... checking for file conflicts... :: Processing package changes... installing python-more-itertools... installing python-jaraco.functools... installing python-jaraco.context... installing python-autocommand... installing python-typing_extensions... installing python-pydantic... Optional dependencies for python-pydantic python-dotenv: for .env file support python-email-validator: for email validation installing python-inflect... installing python-jaraco.text... installing python-ordered-set... installing python-packaging... installing python-platformdirs... installing python-tomli... installing python-fastjsonschema... installing python-trove-classifiers... installing python-validate-pyproject... installing python-setuptools... installing python-wheel... Optional dependencies for python-wheel python-keyring: for wheel.signatures python-xdg: for wheel.signatures installing python-pyproject-hooks... installing python-build... Optional dependencies for python-build python-virtualenv: Use virtualenv for build isolation installing python-installer... installing python-exceptiongroup... installing python-iniconfig... installing python-pluggy... installing python-pytest... installing procps-ng... [?25h==> Retrieving sources...  -> Found setproctitle-1.3.2.tar.gz ==> WARNING: Skipping all source file integrity checks. ==> Extracting sources...  -> Extracting setproctitle-1.3.2.tar.gz with bsdtar ==> Starting build()... * Getting build dependencies for wheel... 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' * Building wheel... running bdist_wheel running build running build_py creating build creating build/lib.linux-riscv64-cpython-310 creating build/lib.linux-riscv64-cpython-310/setproctitle copying pkg/setproctitle/__init__.py -> build/lib.linux-riscv64-cpython-310/setproctitle copying pkg/setproctitle/py.typed -> build/lib.linux-riscv64-cpython-310/setproctitle running build_ext building 'setproctitle._setproctitle' extension creating build/temp.linux-riscv64-cpython-310 creating build/temp.linux-riscv64-cpython-310/src gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=rv64gc -mabi=lp64d -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=rv64gc -mabi=lp64d -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=rv64gc -mabi=lp64d -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=rv64gc -mabi=lp64d -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -g -ffile-prefix-map=/build/python-setproctitle/src=/usr/src/debug/python-setproctitle -flto=auto -fPIC -DSPT_VERSION=1.3.2 -DHAVE_SYS_PRCTL_H=1 -I/usr/include/python3.10 -c src/setproctitle.c -o build/temp.linux-riscv64-cpython-310/src/setproctitle.o gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=rv64gc -mabi=lp64d -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=rv64gc -mabi=lp64d -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=rv64gc -mabi=lp64d -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=rv64gc -mabi=lp64d -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -g -ffile-prefix-map=/build/python-setproctitle/src=/usr/src/debug/python-setproctitle -flto=auto -fPIC -DSPT_VERSION=1.3.2 -DHAVE_SYS_PRCTL_H=1 -I/usr/include/python3.10 -c src/spt_debug.c -o build/temp.linux-riscv64-cpython-310/src/spt_debug.o gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=rv64gc -mabi=lp64d -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=rv64gc -mabi=lp64d -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=rv64gc -mabi=lp64d -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=rv64gc -mabi=lp64d -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -g -ffile-prefix-map=/build/python-setproctitle/src=/usr/src/debug/python-setproctitle -flto=auto -fPIC -DSPT_VERSION=1.3.2 -DHAVE_SYS_PRCTL_H=1 -I/usr/include/python3.10 -c src/spt_setup.c -o build/temp.linux-riscv64-cpython-310/src/spt_setup.o gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=rv64gc -mabi=lp64d -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=rv64gc -mabi=lp64d -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=rv64gc -mabi=lp64d -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=rv64gc -mabi=lp64d -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -g -ffile-prefix-map=/build/python-setproctitle/src=/usr/src/debug/python-setproctitle -flto=auto -fPIC -DSPT_VERSION=1.3.2 -DHAVE_SYS_PRCTL_H=1 -I/usr/include/python3.10 -c src/spt_status.c -o build/temp.linux-riscv64-cpython-310/src/spt_status.o gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=rv64gc -mabi=lp64d -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=rv64gc -mabi=lp64d -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=rv64gc -mabi=lp64d -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=rv64gc -mabi=lp64d -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -g -ffile-prefix-map=/build/python-setproctitle/src=/usr/src/debug/python-setproctitle -flto=auto -fPIC -DSPT_VERSION=1.3.2 -DHAVE_SYS_PRCTL_H=1 -I/usr/include/python3.10 -c src/spt_strlcpy.c -o build/temp.linux-riscv64-cpython-310/src/spt_strlcpy.o 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 -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -g -ffile-prefix-map=/build/python-setproctitle/src=/usr/src/debug/python-setproctitle -flto=auto build/temp.linux-riscv64-cpython-310/src/setproctitle.o build/temp.linux-riscv64-cpython-310/src/spt_debug.o build/temp.linux-riscv64-cpython-310/src/spt_setup.o build/temp.linux-riscv64-cpython-310/src/spt_status.o build/temp.linux-riscv64-cpython-310/src/spt_strlcpy.o -L/usr/lib -o build/lib.linux-riscv64-cpython-310/setproctitle/_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 creating build/bdist.linux-riscv64/wheel/setproctitle copying build/lib.linux-riscv64-cpython-310/setproctitle/__init__.py -> build/bdist.linux-riscv64/wheel/setproctitle copying build/lib.linux-riscv64-cpython-310/setproctitle/py.typed -> build/bdist.linux-riscv64/wheel/setproctitle copying build/lib.linux-riscv64-cpython-310/setproctitle/_setproctitle.cpython-310-riscv64-linux-gnu.so -> build/bdist.linux-riscv64/wheel/setproctitle 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.3.2-py3.10.egg-info running install_scripts creating build/bdist.linux-riscv64/wheel/setproctitle-1.3.2.dist-info/WHEEL creating '/build/python-setproctitle/src/setproctitle-1.3.2/dist/.tmp-bdhjqflq/setproctitle-1.3.2-cp310-cp310-linux_riscv64.whl' and adding 'build/bdist.linux-riscv64/wheel' to it adding 'setproctitle/__init__.py' adding 'setproctitle/_setproctitle.cpython-310-riscv64-linux-gnu.so' adding 'setproctitle/py.typed' adding 'setproctitle-1.3.2.dist-info/METADATA' adding 'setproctitle-1.3.2.dist-info/WHEEL' adding 'setproctitle-1.3.2.dist-info/top_level.txt' adding 'setproctitle-1.3.2.dist-info/RECORD' removing build/bdist.linux-riscv64/wheel Successfully built setproctitle-1.3.2-cp310-cp310-linux_riscv64.whl ==> Starting check()... ============================= test session starts ============================== platform linux -- Python 3.10.10, pytest-7.3.1, pluggy-1.0.0 rootdir: /build/python-setproctitle/src/setproctitle-1.3.2 collected 28 items ../../tests/module_test.py ... [ 10%] ../../tests/setproctitle_test.py ..Fs....FFFFFFFF.... [ 82%] ../../tests/setthreadtitle_test.py FFF [ 92%] ../../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 ../../tests/setproctitle_test.py:69: 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 -m spt_issue_8 ../../tests/setproctitle_test.py:193: 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 -m longargs XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX... E E ...Full output truncated (1 line hidden), use '-vv' to show ../../tests/setproctitle_test.py:217: 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' ../../tests/setproctitle_test.py:271: 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 - hello € ☃ ../../tests/setproctitle_test.py:298: AssertionError _______________________________ test_weird_path ________________________________ tmp_path = PosixPath('/tmp/pytest-of-builduser/pytest-0/test_weird_path0') spt_directory = '/build/python-setproctitle/src/setproctitle-1.3.2/build/lib.linux-riscv64-cpython-310' 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 / os.path.basename(sys.executable) 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 - foo bar baz ../../tests/setproctitle_test.py:335: AssertionError ________________________________ test_embedded _________________________________ pyrun = '/build/python-setproctitle/src/setproctitle-1.3.2/tests/pyrun3.10' spt_directory = '/build/python-setproctitle/src/setproctitle-1.3.2/build/lib.linux-riscv64-cpython-310' @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.3.2/tests/pyrun3.10 ../../tests/setproctitle_test.py:362: AssertionError ___________________________ test_embedded_many_args ____________________________ pyrun = '/build/python-setproctitle/src/setproctitle-1.3.2/tests/pyrun3.10' spt_directory = '/build/python-setproctitle/src/setproctitle-1.3.2/build/lib.linux-riscv64-cpython-310' @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.3.2/tests/pyrun3.10 foo bar baz ../../tests/setproctitle_test.py:390: 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:422: 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:29: 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:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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: if out: print(out.decode("utf8", "replace"), file=sys.stdout) if err: print(err.decode("utf8", "replace"), file=sys.stderr) > pytest.fail("test script failed") E Failed: test script failed ../../tests/conftest.py:154: Failed ----------------------------- Captured stderr call ----------------------------- Traceback (most recent call last): File "", line 6, in ValueError: too many values to unpack (expected 1) ____________________________ 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:47: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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: if out: print(out.decode("utf8", "replace"), file=sys.stdout) if err: print(err.decode("utf8", "replace"), file=sys.stderr) > pytest.fail("test script failed") E Failed: test script failed ../../tests/conftest.py:154: Failed ----------------------------- Captured stderr call ----------------------------- Traceback (most recent call last): File "", line 6, in ValueError: too many values to unpack (expected 1) =========================== 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, 13 passed, 3 skipped in 33.22s =================== ==> ERROR: A failure occurred in check().  Aborting... ==> ERROR: Build failed, check /var/lib/archbuild/extra-riscv64/root9/build receiving incremental file list python-setproctitle-1.3.2-1-riscv64-build.log python-setproctitle-1.3.2-1-riscv64-check.log sent 62 bytes received 4,937 bytes 1,999.60 bytes/sec total size is 28,892 speedup is 5.78