Mock Version: 5.6 Mock Version: 5.6 Mock Version: 5.6 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --noclean --target noarch --nodeps /builddir/build/SPECS/dist-git.spec'], chrootPath='/var/lib/mock/f41-build-51959928-6218932/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=201600uid=1000gid=425user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.meyv40ui:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']unshare_net=TrueprintOutput=False) Using nspawn with args ['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.meyv40ui:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', 'b21539f3d08d48e2ab3b3ea075e2be98', '-D', '/var/lib/mock/f41-build-51959928-6218932/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.meyv40ui:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'bash', '--login', '-c', '/usr/bin/rpmbuild -bs --noclean --target noarch --nodeps /builddir/build/SPECS/dist-git.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0', 'SYSTEMD_SECCOMP': '0'} and shell False Building target platforms: noarch Building for target noarch warning: line 81: Possible unexpanded macro in: Requires: selinux-policy >= %{_selinux_policy_version} setting SOURCE_DATE_EPOCH=1706054400 Wrote: /builddir/build/SRPMS/dist-git-1.17-5.fc41.src.rpm RPM build warnings: line 81: Possible unexpanded macro in: Requires: selinux-policy >= %{_selinux_policy_version} Child return code was: 0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --noclean --target noarch --nodeps /builddir/build/SPECS/dist-git.spec'], chrootPath='/var/lib/mock/f41-build-51959928-6218932/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=201600uid=1000gid=425user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.meyv40ui:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']unshare_net=TrueprintOutput=False) Using nspawn with args ['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.meyv40ui:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '00dcf39635a8477e8e9c200baa9b39ad', '-D', '/var/lib/mock/f41-build-51959928-6218932/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.meyv40ui:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'bash', '--login', '-c', '/usr/bin/rpmbuild -bb --noclean --target noarch --nodeps /builddir/build/SPECS/dist-git.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0', 'SYSTEMD_SECCOMP': '0'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1706054400 Executing(%mkbuilddir): /bin/sh -e /var/tmp/rpm-tmp.hCJCPa + umask 022 + cd /builddir/build/BUILD/dist-git-1.17-build + test -d /builddir/build/BUILD/dist-git-1.17-build + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w /builddir/build/BUILD/dist-git-1.17-build + /usr/bin/rm -rf /builddir/build/BUILD/dist-git-1.17-build + /usr/bin/mkdir -p /builddir/build/BUILD/dist-git-1.17-build + /usr/bin/mkdir -p /builddir/build/BUILD/dist-git-1.17-build/SPECPARTS + RPM_EC=0 ++ jobs -p + exit 0 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.TaookR + umask 022 + cd /builddir/build/BUILD/dist-git-1.17-build + cd /builddir/build/BUILD/dist-git-1.17-build + rm -rf dist-git-1.17 + /usr/lib/rpm/rpmuncompress -x /builddir/build/SOURCES/dist-git-1.17.tar.gz + STATUS=0 + '[' 0 -ne 0 ']' + cd dist-git-1.17 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + RPM_EC=0 ++ jobs -p + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.9mfOPs + umask 022 + cd /builddir/build/BUILD/dist-git-1.17-build + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd dist-git-1.17 + cd selinux + for selinuxvariant in mls targeted + make NAME=mls -f /usr/share/selinux/devel/Makefile Compiling mls dist_git module Creating mls dist_git.pp policy package rm tmp/dist_git.mod.fc tmp/dist_git.mod + mv dist_git.pp dist_git.pp.mls + make NAME=mls -f /usr/share/selinux/devel/Makefile clean rm -fR tmp rm -f *.pp + for selinuxvariant in mls targeted + make NAME=targeted -f /usr/share/selinux/devel/Makefile Compiling targeted dist_git module Creating targeted dist_git.pp policy package rm tmp/dist_git.mod.fc tmp/dist_git.mod + mv dist_git.pp dist_git.pp.targeted + make NAME=targeted -f /usr/share/selinux/devel/Makefile clean rm -fR tmp rm -f *.pp /builddir/build/BUILD/dist-git-1.17-build/dist-git-1.17 + cd - + RPM_EC=0 ++ jobs -p + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.SXy3d1 + umask 022 + cd /builddir/build/BUILD/dist-git-1.17-build + '[' /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT '!=' / ']' + rm -rf /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT ++ dirname /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT + mkdir -p /builddir/build/BUILD/dist-git-1.17-build + mkdir /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd dist-git-1.17 + install -d /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT/usr/share/dist-git/ + cp -a scripts/dist-git/dist-git-gc scripts/dist-git/hooks scripts/dist-git/mkbranch scripts/dist-git/mkbranch_branching scripts/dist-git/remove_unused_sources scripts/dist-git/setup_git_package /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT/usr/share/dist-git/ + install -d /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT/etc/dist-git + cp -a configs/dist-git/dist-git.conf /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT/etc/dist-git/ + install -d /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT/etc/httpd/conf.d/dist-git + mkdir -p /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT/usr/lib/systemd/system + cp -a configs/httpd/dist-git.conf /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT/etc/httpd/conf.d/ + cp -a configs/httpd/dist-git/git-smart-http.conf configs/httpd/dist-git/lookaside-upload.conf.example configs/httpd/dist-git/lookaside.conf configs/httpd/dist-git/manifest.conf /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT/etc/httpd/conf.d/dist-git/ + cp -a configs/systemd/dist-git-gc.service configs/systemd/dist-git-gc.timer configs/systemd/dist-git.socket configs/systemd/dist-git@.service /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT/usr/lib/systemd/system/ + install -d /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT/var/lib/dist-git + install -d /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT/var/lib/dist-git/git + install -d /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT/var/lib/dist-git/cache + install -d /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT/var/lib/dist-git/cache/lookaside + install -d /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT/var/lib/dist-git/cache/lookaside/pkgs + install -d /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT/var/lib/dist-git/web + cp -a scripts/httpd/upload.cgi /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT/var/lib/dist-git/web/ + install -d /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT/usr/bin + ln -s /usr/share/dist-git/setup_git_package /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT/usr/bin/setup_git_package + ln -s /usr/share/dist-git/mkbranch /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT/usr/bin/mkbranch + ln -s /usr/share/dist-git/mkbranch_branching /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT/usr/bin/mkbranch_branching + ln -s /usr/share/dist-git/remove_unused_sources /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT/usr/bin/remove_unused_sources + mv /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT/usr/share/dist-git/dist-git-gc /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT/usr/bin/dist-git-gc + cd selinux + for selinuxvariant in mls targeted + install -d /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT/usr/share/selinux/mls + install -p -m 644 dist_git.pp.mls /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT/usr/share/selinux/mls/dist_git.pp + for selinuxvariant in mls targeted + install -d /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT/usr/share/selinux/targeted + install -p -m 644 dist_git.pp.targeted /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT/usr/share/selinux/targeted/dist_git.pp /builddir/build/BUILD/dist-git-1.17-build/dist-git-1.17 + cd - + hardlink -cv /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT/usr/share/selinux Mode: real Method: sha256 Files: 2 Linked: 0 files Compared: 0 xattrs Compared: 0 files Saved: 0 B Duration: 0.000683 seconds + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-ldconfig + /usr/lib/rpm/brp-compress + /usr/lib/rpm/brp-strip /usr/bin/strip + /usr/lib/rpm/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump + /usr/lib/rpm/redhat/brp-strip-lto /usr/bin/strip + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/check-rpaths + /usr/lib/rpm/redhat/brp-mangle-shebangs mangling shebang in /usr/share/dist-git/hooks/grok_update from /bin/bash to #!/usr/bin/bash mangling shebang in /usr/share/dist-git/hooks/post-receive from /bin/bash to #!/usr/bin/bash mangling shebang in /usr/share/dist-git/mkbranch from /bin/bash to #!/usr/bin/bash mangling shebang in /usr/share/dist-git/mkbranch_branching from /bin/bash to #!/usr/bin/bash mangling shebang in /usr/share/dist-git/remove_unused_sources from /bin/bash to #!/usr/bin/bash mangling shebang in /usr/share/dist-git/setup_git_package from /bin/bash to #!/usr/bin/bash + /usr/lib/rpm/brp-remove-la-files + env /usr/lib/rpm/redhat/brp-python-bytecompile '' 1 0 -j8 + /usr/lib/rpm/redhat/brp-python-hardlink + /usr/bin/add-determinism --brp -j8 /builddir/build/BUILD/dist-git-1.17-build/BUILDROOT Scanned 25 directories and 24 files, processed 0 inodes, 0 modified (0 replaced + 0 rewritten), 0 unsupported format, 0 errors Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.DbrKU7 + umask 022 + cd /builddir/build/BUILD/dist-git-1.17-build + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd dist-git-1.17 + pytest -vv . ============================= test session starts ============================== platform linux -- Python 3.13.0b3, pytest-7.4.3, pluggy-1.3.0 -- /usr/bin/python3 cachedir: .pytest_cache rootdir: /builddir/build/BUILD/dist-git-1.17-build/dist-git-1.17 collecting ... collected 42 items tests/test_upload_script.py::UploadTest::test_accepts_sha_512_hash_0_pkg FAILED [ 2%] tests/test_upload_script.py::UploadTest::test_accepts_sha_512_hash_1_rpms_pkg FAILED [ 4%] tests/test_upload_script.py::UploadTest::test_accepts_sha_512_hash_2_apbs_pkg FAILED [ 7%] tests/test_upload_script.py::UploadTest::test_bad_sha512_hash_0_pkg FAILED [ 9%] tests/test_upload_script.py::UploadTest::test_bad_sha512_hash_1_rpms_pkg FAILED [ 11%] tests/test_upload_script.py::UploadTest::test_bad_sha512_hash_2_apbs_pkg FAILED [ 14%] tests/test_upload_script.py::UploadTest::test_check_existing_file_0_pkg FAILED [ 16%] tests/test_upload_script.py::UploadTest::test_check_existing_file_1_rpms_pkg FAILED [ 19%] tests/test_upload_script.py::UploadTest::test_check_existing_file_2_apbs_pkg FAILED [ 21%] tests/test_upload_script.py::UploadTest::test_check_existing_file_3_old FAILED [ 23%] tests/test_upload_script.py::UploadTest::test_check_existing_file_4_rpms_old FAILED [ 26%] tests/test_upload_script.py::UploadTest::test_check_existing_file_5_apbs_old FAILED [ 28%] tests/test_upload_script.py::UploadTest::test_check_existing_file_with_bad_hash_0_pkg FAILED [ 30%] tests/test_upload_script.py::UploadTest::test_check_existing_file_with_bad_hash_1_rpms_pkg FAILED [ 33%] tests/test_upload_script.py::UploadTest::test_check_existing_file_with_bad_hash_2_apbs_pkg FAILED [ 35%] tests/test_upload_script.py::UploadTest::test_check_existing_sha512_correct_0_pkg FAILED [ 38%] tests/test_upload_script.py::UploadTest::test_check_existing_sha512_correct_1_rpms_pkg FAILED [ 40%] tests/test_upload_script.py::UploadTest::test_check_existing_sha512_correct_2_apbs_pkg FAILED [ 42%] tests/test_upload_script.py::UploadTest::test_check_existing_sha512_mismatch_0_pkg FAILED [ 45%] tests/test_upload_script.py::UploadTest::test_check_existing_sha512_mismatch_1_rpms_pkg FAILED [ 47%] tests/test_upload_script.py::UploadTest::test_check_existing_sha512_mismatch_2_apbs_pkg FAILED [ 50%] tests/test_upload_script.py::UploadTest::test_check_missing_file_0_pkg FAILED [ 52%] tests/test_upload_script.py::UploadTest::test_check_missing_file_1_rpms_pkg FAILED [ 54%] tests/test_upload_script.py::UploadTest::test_check_missing_file_2_apbs_pkg FAILED [ 57%] tests/test_upload_script.py::UploadTest::test_rejects_unknown_hash_0_pkg FAILED [ 59%] tests/test_upload_script.py::UploadTest::test_rejects_unknown_hash_1_rpms_pkg FAILED [ 61%] tests/test_upload_script.py::UploadTest::test_rejects_unknown_hash_2_apbs_pkg FAILED [ 64%] tests/test_upload_script.py::UploadTest::test_upload_file_0_pkg FAILED [ 66%] tests/test_upload_script.py::UploadTest::test_upload_file_1_rpms_pkg FAILED [ 69%] tests/test_upload_script.py::UploadTest::test_upload_file_2_apbs_pkg FAILED [ 71%] tests/test_upload_script.py::UploadTest::test_upload_file_bad_checksum_0_pkg FAILED [ 73%] tests/test_upload_script.py::UploadTest::test_upload_file_bad_checksum_1_rpms_pkg FAILED [ 76%] tests/test_upload_script.py::UploadTest::test_upload_file_bad_checksum_2_apbs_pkg FAILED [ 78%] tests/test_upload_script.py::UploadTest::test_upload_invalid_mtime_0_pkg FAILED [ 80%] tests/test_upload_script.py::UploadTest::test_upload_invalid_mtime_1_rpms_pkg FAILED [ 83%] tests/test_upload_script.py::UploadTest::test_upload_invalid_mtime_2_apbs_pkg FAILED [ 85%] tests/test_upload_script.py::UploadTest::test_upload_mtime_0_pkg FAILED [ 88%] tests/test_upload_script.py::UploadTest::test_upload_mtime_1_rpms_pkg FAILED [ 90%] tests/test_upload_script.py::UploadTest::test_upload_mtime_2_apbs_pkg FAILED [ 92%] tests/test_upload_script.py::UploadTest::test_upload_to_non_existing_module_0_bad FAILED [ 95%] tests/test_upload_script.py::UploadTest::test_upload_to_non_existing_module_1_rpms_bad FAILED [ 97%] tests/test_upload_script.py::UploadTest::test_upload_to_non_existing_module_2_apbs_bad FAILED [100%] =================================== FAILURES =================================== __________________ UploadTest.test_accepts_sha_512_hash_0_pkg __________________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:232: in test_accepts_sha_512_hash self.assertEqual(resp, 'File new.txt size 7 SHA512 %s stored OK\n' % NEW_SHA512) E AssertionError: '' != 'File new.txt size 7 SHA512 d3d67bc3e38489[122 chars]OK\n' E + File new.txt size 7 SHA512 d3d67bc3e3848925892de9b132c9ff4054a05c9dbc7b4366d16b5c6b87c898df60da162e9ec415d4dc16470128ef52c11c44fc06da2841543ddeb351b10e9fb2 stored OK ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmpkatg8rti/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpkatg8rti/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpkatg8rti/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpkatg8rti/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpkatg8rti/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpkatg8rti/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpkatg8rti/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpkatg8rti/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpkatg8rti/srv/git/apbs/pkg.git/.keep Creating /tmp/tmpkatg8rti/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmpkatg8rti/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpkatg8rti/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpkatg8rti/srv/git/rpms/old.git/.keep Creating /tmp/tmpkatg8rti/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpkatg8rti/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpkatg8rti/srv/git/rpms/old.git/.keep Creating /tmp/tmpkatg8rti/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpkatg8rti/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpkatg8rti/srv/git/apbs/old.git/.keep Creating /tmp/tmpkatg8rti/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmpkatg8rti/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpkatg8rti/new.txt b'127.0.0.1 - - [01/Jul/2024 17:04:15] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmpkatg8rti/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:16] CGI script exit code 1\n' _______________ UploadTest.test_accepts_sha_512_hash_1_rpms_pkg ________________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:232: in test_accepts_sha_512_hash self.assertEqual(resp, 'File new.txt size 7 SHA512 %s stored OK\n' % NEW_SHA512) E AssertionError: '' != 'File new.txt size 7 SHA512 d3d67bc3e38489[122 chars]OK\n' E + File new.txt size 7 SHA512 d3d67bc3e3848925892de9b132c9ff4054a05c9dbc7b4366d16b5c6b87c898df60da162e9ec415d4dc16470128ef52c11c44fc06da2841543ddeb351b10e9fb2 stored OK ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmpgmvd16cb/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpgmvd16cb/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpgmvd16cb/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpgmvd16cb/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpgmvd16cb/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpgmvd16cb/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpgmvd16cb/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpgmvd16cb/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpgmvd16cb/srv/git/apbs/pkg.git/.keep Creating /tmp/tmpgmvd16cb/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmpgmvd16cb/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpgmvd16cb/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpgmvd16cb/srv/git/rpms/old.git/.keep Creating /tmp/tmpgmvd16cb/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpgmvd16cb/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpgmvd16cb/srv/git/rpms/old.git/.keep Creating /tmp/tmpgmvd16cb/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpgmvd16cb/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpgmvd16cb/srv/git/apbs/old.git/.keep Creating /tmp/tmpgmvd16cb/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmpgmvd16cb/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpgmvd16cb/new.txt b'127.0.0.1 - - [01/Jul/2024 17:04:16] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmpgmvd16cb/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:16] CGI script exit code 1\n' _______________ UploadTest.test_accepts_sha_512_hash_2_apbs_pkg ________________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:232: in test_accepts_sha_512_hash self.assertEqual(resp, 'File new.txt size 7 SHA512 %s stored OK\n' % NEW_SHA512) E AssertionError: '' != 'File new.txt size 7 SHA512 d3d67bc3e38489[122 chars]OK\n' E + File new.txt size 7 SHA512 d3d67bc3e3848925892de9b132c9ff4054a05c9dbc7b4366d16b5c6b87c898df60da162e9ec415d4dc16470128ef52c11c44fc06da2841543ddeb351b10e9fb2 stored OK ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmpm6_jyldj/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpm6_jyldj/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpm6_jyldj/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpm6_jyldj/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpm6_jyldj/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpm6_jyldj/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpm6_jyldj/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpm6_jyldj/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpm6_jyldj/srv/git/apbs/pkg.git/.keep Creating /tmp/tmpm6_jyldj/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmpm6_jyldj/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpm6_jyldj/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpm6_jyldj/srv/git/rpms/old.git/.keep Creating /tmp/tmpm6_jyldj/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpm6_jyldj/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpm6_jyldj/srv/git/rpms/old.git/.keep Creating /tmp/tmpm6_jyldj/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpm6_jyldj/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpm6_jyldj/srv/git/apbs/old.git/.keep Creating /tmp/tmpm6_jyldj/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmpm6_jyldj/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpm6_jyldj/new.txt b'127.0.0.1 - - [01/Jul/2024 17:04:16] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmpm6_jyldj/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:16] CGI script exit code 1\n' ____________________ UploadTest.test_bad_sha512_hash_0_pkg _____________________ self = def _new_conn(self): """Establish a socket connection and set nodelay settings on it. :return: New socket connection. """ extra_kw = {} if self.source_address: extra_kw["source_address"] = self.source_address if self.socket_options: extra_kw["socket_options"] = self.socket_options try: > conn = connection.create_connection( (self._dns_host, self.port), self.timeout, **extra_kw ) /usr/lib/python3.13/site-packages/urllib3/connection.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/urllib3/util/connection.py:95: in create_connection raise err _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ address = ('localhost', 8888), timeout = None, source_address = None socket_options = [(6, 1, 1)] def create_connection( address, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, source_address=None, socket_options=None, ): """Connect to *address* and return the socket object. Convenience function. Connect to *address* (a 2-tuple ``(host, port)``) and return the socket object. Passing the optional *timeout* parameter will set the timeout on the socket instance before attempting to connect. If no *timeout* is supplied, the global default timeout setting returned by :func:`socket.getdefaulttimeout` is used. If *source_address* is set it must be a tuple of (host, port) for the socket to bind as a source address before making the connection. An host of '' or port 0 tells the OS to use the default. """ host, port = address if host.startswith("["): host = host.strip("[]") err = None # Using the value from allowed_gai_family() in the context of getaddrinfo lets # us select whether to work with IPv4 DNS records, IPv6 records, or both. # The original create_connection function always returns all records. family = allowed_gai_family() try: host.encode("idna") except UnicodeError: return six.raise_from( LocationParseError(u"'%s', label empty or too long" % host), None ) for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): af, socktype, proto, canonname, sa = res sock = None try: sock = socket.socket(af, socktype, proto) # If provided, set socket level options before connecting. _set_socket_options(sock, socket_options) if timeout is not socket._GLOBAL_DEFAULT_TIMEOUT: sock.settimeout(timeout) if source_address: sock.bind(source_address) > sock.connect(sa) E ConnectionRefusedError: [Errno 111] Connection refused /usr/lib/python3.13/site-packages/urllib3/util/connection.py:85: ConnectionRefusedError During handling of the above exception, another exception occurred: self = method = 'POST', url = '/cgi-bin/upload.cgi' body = b'--747da86729c134a838119e02fa0010ed\r\nContent-Disposition: form-data; name="name"\r\n\r\npkg\r\n--747da86729c134a838...Disposition: form-data; name="file"; filename="hello.txt"\r\n\r\nhello.txt\r\n--747da86729c134a838119e02fa0010ed--\r\n' headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Content-Length': '335', 'Content-Type': 'multipart/form-data; boundary=747da86729c134a838119e02fa0010ed'} retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) redirect = False, assert_same_host = False timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None release_conn = False, chunked = False, body_pos = None response_kw = {'decode_content': False, 'preload_content': False} parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/cgi-bin/upload.cgi', query=None, fragment=None) destination_scheme = None, conn = None, release_this_conn = True http_tunnel_required = False, err = None, clean_exit = False def urlopen( self, method, url, body=None, headers=None, retries=None, redirect=True, assert_same_host=True, timeout=_Default, pool_timeout=None, release_conn=None, chunked=False, body_pos=None, **response_kw ): """ Get a connection from the pool and perform an HTTP request. This is the lowest level call for making a request, so you'll need to specify all the raw details. .. note:: More commonly, it's appropriate to use a convenience method provided by :class:`.RequestMethods`, such as :meth:`request`. .. note:: `release_conn` will only behave as expected if `preload_content=False` because we want to make `preload_content=False` the default behaviour someday soon without breaking backwards compatibility. :param method: HTTP request method (such as GET, POST, PUT, etc.) :param url: The URL to perform the request on. :param body: Data to send in the request body, either :class:`str`, :class:`bytes`, an iterable of :class:`str`/:class:`bytes`, or a file-like object. :param headers: Dictionary of custom headers to send, such as User-Agent, If-None-Match, etc. If None, pool headers are used. If provided, these headers completely replace any pool-specific headers. :param retries: Configure the number of retries to allow before raising a :class:`~urllib3.exceptions.MaxRetryError` exception. Pass ``None`` to retry until you receive a response. Pass a :class:`~urllib3.util.retry.Retry` object for fine-grained control over different types of retries. Pass an integer number to retry connection errors that many times, but no other types of errors. Pass zero to never retry. If ``False``, then retries are disabled and any exception is raised immediately. Also, instead of raising a MaxRetryError on redirects, the redirect response will be returned. :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. :param redirect: If True, automatically handle redirects (status codes 301, 302, 303, 307, 308). Each redirect counts as a retry. Disabling retries will disable redirect, too. :param assert_same_host: If ``True``, will make sure that the host of the pool requests is consistent else will raise HostChangedError. When ``False``, you can use the pool on an HTTP proxy and request foreign hosts. :param timeout: If specified, overrides the default timeout for this one request. It may be a float (in seconds) or an instance of :class:`urllib3.util.Timeout`. :param pool_timeout: If set and the pool is set to block=True, then this method will block for ``pool_timeout`` seconds and raise EmptyPoolError if no connection is available within the time period. :param release_conn: If False, then the urlopen call will not release the connection back into the pool once a response is received (but will release if you read the entire contents of the response such as when `preload_content=True`). This is useful if you're not preloading the response's content immediately. You will need to call ``r.release_conn()`` on the response ``r`` to return the connection back into the pool. If None, it takes the value of ``response_kw.get('preload_content', True)``. :param chunked: If True, urllib3 will send the body using chunked transfer encoding. Otherwise, urllib3 will send the body using the standard content-length form. Defaults to False. :param int body_pos: Position to seek to in file-like body in the event of a retry or redirect. Typically this won't need to be set because urllib3 will auto-populate the value when needed. :param \\**response_kw: Additional parameters are passed to :meth:`urllib3.response.HTTPResponse.from_httplib` """ parsed_url = parse_url(url) destination_scheme = parsed_url.scheme if headers is None: headers = self.headers if not isinstance(retries, Retry): retries = Retry.from_int(retries, redirect=redirect, default=self.retries) if release_conn is None: release_conn = response_kw.get("preload_content", True) # Check host if assert_same_host and not self.is_same_host(url): raise HostChangedError(self, url, retries) # Ensure that the URL we're connecting to is properly encoded if url.startswith("/"): url = six.ensure_str(_encode_target(url)) else: url = six.ensure_str(parsed_url.url) conn = None # Track whether `conn` needs to be released before # returning/raising/recursing. Update this variable if necessary, and # leave `release_conn` constant throughout the function. That way, if # the function recurses, the original value of `release_conn` will be # passed down into the recursive call, and its value will be respected. # # See issue #651 [1] for details. # # [1] release_this_conn = release_conn http_tunnel_required = connection_requires_http_tunnel( self.proxy, self.proxy_config, destination_scheme ) # Merge the proxy headers. Only done when not using HTTP CONNECT. We # have to copy the headers dict so we can safely change it without those # changes being reflected in anyone else's copy. if not http_tunnel_required: headers = headers.copy() headers.update(self.proxy_headers) # Must keep the exception bound to a separate variable or else Python 3 # complains about UnboundLocalError. err = None # Keep track of whether we cleanly exited the except block. This # ensures we do proper cleanup in finally. clean_exit = False # Rewind body position, if needed. Record current position # for future rewinds in the event of a redirect/retry. body_pos = set_file_position(body, body_pos) try: # Request a connection from the queue. timeout_obj = self._get_timeout(timeout) conn = self._get_conn(timeout=pool_timeout) conn.timeout = timeout_obj.connect_timeout is_new_proxy_conn = self.proxy is not None and not getattr( conn, "sock", None ) if is_new_proxy_conn and http_tunnel_required: self._prepare_proxy(conn) # Make the request on the httplib connection object. > httplib_response = self._make_request( conn, method, url, timeout=timeout_obj, body=body, headers=headers, chunked=chunked, ) /usr/lib/python3.13/site-packages/urllib3/connectionpool.py:715: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/urllib3/connectionpool.py:416: in _make_request conn.request(method, url, **httplib_request_kw) /usr/lib/python3.13/site-packages/urllib3/connection.py:244: in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) /usr/lib64/python3.13/http/client.py:1336: in request self._send_request(method, url, body, headers, encode_chunked) /usr/lib64/python3.13/http/client.py:1382: in _send_request self.endheaders(body, encode_chunked=encode_chunked) /usr/lib64/python3.13/http/client.py:1331: in endheaders self._send_output(message_body, encode_chunked=encode_chunked) /usr/lib64/python3.13/http/client.py:1091: in _send_output self.send(msg) /usr/lib64/python3.13/http/client.py:1035: in send self.connect() /usr/lib/python3.13/site-packages/urllib3/connection.py:205: in connect conn = self._new_conn() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _new_conn(self): """Establish a socket connection and set nodelay settings on it. :return: New socket connection. """ extra_kw = {} if self.source_address: extra_kw["source_address"] = self.source_address if self.socket_options: extra_kw["socket_options"] = self.socket_options try: conn = connection.create_connection( (self._dns_host, self.port), self.timeout, **extra_kw ) except SocketTimeout: raise ConnectTimeoutError( self, "Connection to %s timed out. (connect timeout=%s)" % (self.host, self.timeout), ) except SocketError as e: > raise NewConnectionError( self, "Failed to establish a new connection: %s" % e ) E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused /usr/lib/python3.13/site-packages/urllib3/connection.py:186: NewConnectionError During handling of the above exception, another exception occurred: self = request = , stream = False timeout = Timeout(connect=None, read=None, total=None), verify = True cert = None, proxies = OrderedDict() def send( self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None ): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest ` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) ` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection_with_tls_context( request, verify, proxies=proxies, cert=cert ) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers( request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies, ) chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError: raise ValueError( f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " f"or a single float to set both timeouts to the same value." ) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: > resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout, chunked=chunked, ) /usr/lib/python3.13/site-packages/requests/adapters.py:667: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/urllib3/connectionpool.py:801: in urlopen retries = retries.increment( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Retry(total=0, connect=None, read=False, redirect=None, status=None) method = 'POST', url = '/cgi-bin/upload.cgi', response = None error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') _pool = _stacktrace = def increment( self, method=None, url=None, response=None, error=None, _pool=None, _stacktrace=None, ): """Return a new Retry object with incremented retry counters. :param response: A response object, or None, if the server did not return a response. :type response: :class:`~urllib3.response.HTTPResponse` :param Exception error: An error encountered during the request, or None if the response was received successfully. :return: A new ``Retry`` object. """ if self.total is False and error: # Disabled, indicate to re-raise the error. raise six.reraise(type(error), error, _stacktrace) total = self.total if total is not None: total -= 1 connect = self.connect read = self.read redirect = self.redirect status_count = self.status other = self.other cause = "unknown" status = None redirect_location = None if error and self._is_connection_error(error): # Connect retry? if connect is False: raise six.reraise(type(error), error, _stacktrace) elif connect is not None: connect -= 1 elif error and self._is_read_error(error): # Read retry? if read is False or not self._is_method_retryable(method): raise six.reraise(type(error), error, _stacktrace) elif read is not None: read -= 1 elif error: # Other retry? if other is not None: other -= 1 elif response and response.get_redirect_location(): # Redirect retry? if redirect is not None: redirect -= 1 cause = "too many redirects" redirect_location = response.get_redirect_location() status = response.status else: # Incrementing because of a server error like a 500 in # status_forcelist and the given method is in the allowed_methods cause = ResponseError.GENERIC_ERROR if response and response.status: if status_count is not None: status_count -= 1 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) status = response.status history = self.history + ( RequestHistory(method, url, error, status, redirect_location), ) new_retry = self.new( total=total, connect=connect, read=read, redirect=redirect, status=status_count, other=other, history=history, ) if new_retry.is_exhausted(): > raise MaxRetryError(_pool, url, error or ResponseError(cause)) E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8888): Max retries exceeded with url: /cgi-bin/upload.cgi (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) /usr/lib/python3.13/site-packages/urllib3/util/retry.py:594: MaxRetryError During handling of the above exception, another exception occurred: a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:238: in test_bad_sha512_hash resp = self.upload(module, hash='ABC', hashtype='sha512', filepath=test_file) tests/test_upload_script.py:159: in upload response = requests.post(self.url, data=args, files=files) /usr/lib/python3.13/site-packages/requests/api.py:115: in post return request("post", url, data=data, json=json, **kwargs) /usr/lib/python3.13/site-packages/requests/api.py:59: in request return session.request(method=method, url=url, **kwargs) /usr/lib/python3.13/site-packages/requests/sessions.py:589: in request resp = self.send(prep, **send_kwargs) /usr/lib/python3.13/site-packages/requests/sessions.py:703: in send r = adapter.send(request, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = , stream = False timeout = Timeout(connect=None, read=None, total=None), verify = True cert = None, proxies = OrderedDict() def send( self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None ): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest ` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) ` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection_with_tls_context( request, verify, proxies=proxies, cert=cert ) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers( request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies, ) chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError: raise ValueError( f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " f"or a single float to set both timeouts to the same value." ) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout, chunked=chunked, ) except (ProtocolError, OSError) as err: raise ConnectionError(err, request=request) except MaxRetryError as e: if isinstance(e.reason, ConnectTimeoutError): # TODO: Remove this in 3.0.0: see #2811 if not isinstance(e.reason, NewConnectionError): raise ConnectTimeout(e, request=request) if isinstance(e.reason, ResponseError): raise RetryError(e, request=request) if isinstance(e.reason, _ProxyError): raise ProxyError(e, request=request) if isinstance(e.reason, _SSLError): # This branch is for urllib3 v1.22 and later. raise SSLError(e, request=request) > raise ConnectionError(e, request=request) E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8888): Max retries exceeded with url: /cgi-bin/upload.cgi (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) /usr/lib/python3.13/site-packages/requests/adapters.py:700: ConnectionError ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmp4v_tq8ws/srv/git/rpms/pkg.git/.keep Creating /tmp/tmp4v_tq8ws/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmp4v_tq8ws/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp4v_tq8ws/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp4v_tq8ws/srv/git/rpms/pkg.git/.keep Creating /tmp/tmp4v_tq8ws/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmp4v_tq8ws/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp4v_tq8ws/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp4v_tq8ws/srv/git/apbs/pkg.git/.keep Creating /tmp/tmp4v_tq8ws/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmp4v_tq8ws/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp4v_tq8ws/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp4v_tq8ws/srv/git/rpms/old.git/.keep Creating /tmp/tmp4v_tq8ws/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmp4v_tq8ws/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp4v_tq8ws/srv/git/rpms/old.git/.keep Creating /tmp/tmp4v_tq8ws/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmp4v_tq8ws/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp4v_tq8ws/srv/git/apbs/old.git/.keep Creating /tmp/tmp4v_tq8ws/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmp4v_tq8ws/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp4v_tq8ws/hello.txt __________________ UploadTest.test_bad_sha512_hash_1_rpms_pkg __________________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:239: in test_bad_sha512_hash self.assertEqual(resp, 'SHA512 check failed. Received %s instead of ABC.\n' % SHA512) E AssertionError: '' != 'SHA512 check failed. Received acec329f80c[131 chars]C.\n' E + SHA512 check failed. Received acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff instead of ABC. ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmpzs__fx23/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpzs__fx23/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpzs__fx23/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpzs__fx23/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpzs__fx23/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpzs__fx23/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpzs__fx23/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpzs__fx23/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpzs__fx23/srv/git/apbs/pkg.git/.keep Creating /tmp/tmpzs__fx23/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmpzs__fx23/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpzs__fx23/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpzs__fx23/srv/git/rpms/old.git/.keep Creating /tmp/tmpzs__fx23/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpzs__fx23/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpzs__fx23/srv/git/rpms/old.git/.keep Creating /tmp/tmpzs__fx23/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpzs__fx23/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpzs__fx23/srv/git/apbs/old.git/.keep Creating /tmp/tmpzs__fx23/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmpzs__fx23/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpzs__fx23/hello.txt b'127.0.0.1 - - [01/Jul/2024 17:04:17] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmpzs__fx23/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:17] CGI script exit code 1\n' __________________ UploadTest.test_bad_sha512_hash_2_apbs_pkg __________________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:239: in test_bad_sha512_hash self.assertEqual(resp, 'SHA512 check failed. Received %s instead of ABC.\n' % SHA512) E AssertionError: '' != 'SHA512 check failed. Received acec329f80c[131 chars]C.\n' E + SHA512 check failed. Received acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff instead of ABC. ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmp6hugidt2/srv/git/rpms/pkg.git/.keep Creating /tmp/tmp6hugidt2/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmp6hugidt2/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp6hugidt2/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp6hugidt2/srv/git/rpms/pkg.git/.keep Creating /tmp/tmp6hugidt2/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmp6hugidt2/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp6hugidt2/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp6hugidt2/srv/git/apbs/pkg.git/.keep Creating /tmp/tmp6hugidt2/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmp6hugidt2/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp6hugidt2/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp6hugidt2/srv/git/rpms/old.git/.keep Creating /tmp/tmp6hugidt2/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmp6hugidt2/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp6hugidt2/srv/git/rpms/old.git/.keep Creating /tmp/tmp6hugidt2/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmp6hugidt2/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp6hugidt2/srv/git/apbs/old.git/.keep Creating /tmp/tmp6hugidt2/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmp6hugidt2/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp6hugidt2/hello.txt b'127.0.0.1 - - [01/Jul/2024 17:04:17] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmp6hugidt2/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:17] CGI script exit code 1\n' __________________ UploadTest.test_check_existing_file_0_pkg ___________________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:190: in test_check_existing_file self.assertEqual(resp, 'Available\n') E AssertionError: '' != 'Available\n' E + Available ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmp946694di/srv/git/rpms/pkg.git/.keep Creating /tmp/tmp946694di/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmp946694di/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp946694di/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp946694di/srv/git/rpms/pkg.git/.keep Creating /tmp/tmp946694di/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmp946694di/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp946694di/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp946694di/srv/git/apbs/pkg.git/.keep Creating /tmp/tmp946694di/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmp946694di/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp946694di/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp946694di/srv/git/rpms/old.git/.keep Creating /tmp/tmp946694di/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmp946694di/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp946694di/srv/git/rpms/old.git/.keep Creating /tmp/tmp946694di/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmp946694di/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp946694di/srv/git/apbs/old.git/.keep Creating /tmp/tmp946694di/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmp946694di/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt b'127.0.0.1 - - [01/Jul/2024 17:04:17] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmp946694di/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:17] CGI script exit code 1\n' ________________ UploadTest.test_check_existing_file_1_rpms_pkg ________________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:190: in test_check_existing_file self.assertEqual(resp, 'Available\n') E AssertionError: '' != 'Available\n' E + Available ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmpk4slyxxb/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpk4slyxxb/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpk4slyxxb/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpk4slyxxb/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpk4slyxxb/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpk4slyxxb/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpk4slyxxb/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpk4slyxxb/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpk4slyxxb/srv/git/apbs/pkg.git/.keep Creating /tmp/tmpk4slyxxb/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmpk4slyxxb/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpk4slyxxb/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpk4slyxxb/srv/git/rpms/old.git/.keep Creating /tmp/tmpk4slyxxb/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpk4slyxxb/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpk4slyxxb/srv/git/rpms/old.git/.keep Creating /tmp/tmpk4slyxxb/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpk4slyxxb/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpk4slyxxb/srv/git/apbs/old.git/.keep Creating /tmp/tmpk4slyxxb/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmpk4slyxxb/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt b'127.0.0.1 - - [01/Jul/2024 17:04:17] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmpk4slyxxb/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:18] CGI script exit code 1\n' ________________ UploadTest.test_check_existing_file_2_apbs_pkg ________________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:190: in test_check_existing_file self.assertEqual(resp, 'Available\n') E AssertionError: '' != 'Available\n' E + Available ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmp0mfr2iex/srv/git/rpms/pkg.git/.keep Creating /tmp/tmp0mfr2iex/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmp0mfr2iex/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp0mfr2iex/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp0mfr2iex/srv/git/rpms/pkg.git/.keep Creating /tmp/tmp0mfr2iex/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmp0mfr2iex/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp0mfr2iex/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp0mfr2iex/srv/git/apbs/pkg.git/.keep Creating /tmp/tmp0mfr2iex/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmp0mfr2iex/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp0mfr2iex/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp0mfr2iex/srv/git/rpms/old.git/.keep Creating /tmp/tmp0mfr2iex/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmp0mfr2iex/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp0mfr2iex/srv/git/rpms/old.git/.keep Creating /tmp/tmp0mfr2iex/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmp0mfr2iex/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp0mfr2iex/srv/git/apbs/old.git/.keep Creating /tmp/tmp0mfr2iex/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmp0mfr2iex/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt b'127.0.0.1 - - [01/Jul/2024 17:04:18] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmp0mfr2iex/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:18] CGI script exit code 1\n' __________________ UploadTest.test_check_existing_file_3_old ___________________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:190: in test_check_existing_file self.assertEqual(resp, 'Available\n') E AssertionError: '' != 'Available\n' E + Available ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmp13brqh7u/srv/git/rpms/pkg.git/.keep Creating /tmp/tmp13brqh7u/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmp13brqh7u/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp13brqh7u/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp13brqh7u/srv/git/rpms/pkg.git/.keep Creating /tmp/tmp13brqh7u/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmp13brqh7u/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp13brqh7u/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp13brqh7u/srv/git/apbs/pkg.git/.keep Creating /tmp/tmp13brqh7u/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmp13brqh7u/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp13brqh7u/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp13brqh7u/srv/git/rpms/old.git/.keep Creating /tmp/tmp13brqh7u/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmp13brqh7u/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp13brqh7u/srv/git/rpms/old.git/.keep Creating /tmp/tmp13brqh7u/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmp13brqh7u/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp13brqh7u/srv/git/apbs/old.git/.keep Creating /tmp/tmp13brqh7u/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmp13brqh7u/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt b'127.0.0.1 - - [01/Jul/2024 17:04:18] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmp13brqh7u/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:18] CGI script exit code 1\n' ________________ UploadTest.test_check_existing_file_4_rpms_old ________________ self = def _new_conn(self): """Establish a socket connection and set nodelay settings on it. :return: New socket connection. """ extra_kw = {} if self.source_address: extra_kw["source_address"] = self.source_address if self.socket_options: extra_kw["socket_options"] = self.socket_options try: > conn = connection.create_connection( (self._dns_host, self.port), self.timeout, **extra_kw ) /usr/lib/python3.13/site-packages/urllib3/connection.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/urllib3/util/connection.py:95: in create_connection raise err _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ address = ('localhost', 8888), timeout = None, source_address = None socket_options = [(6, 1, 1)] def create_connection( address, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, source_address=None, socket_options=None, ): """Connect to *address* and return the socket object. Convenience function. Connect to *address* (a 2-tuple ``(host, port)``) and return the socket object. Passing the optional *timeout* parameter will set the timeout on the socket instance before attempting to connect. If no *timeout* is supplied, the global default timeout setting returned by :func:`socket.getdefaulttimeout` is used. If *source_address* is set it must be a tuple of (host, port) for the socket to bind as a source address before making the connection. An host of '' or port 0 tells the OS to use the default. """ host, port = address if host.startswith("["): host = host.strip("[]") err = None # Using the value from allowed_gai_family() in the context of getaddrinfo lets # us select whether to work with IPv4 DNS records, IPv6 records, or both. # The original create_connection function always returns all records. family = allowed_gai_family() try: host.encode("idna") except UnicodeError: return six.raise_from( LocationParseError(u"'%s', label empty or too long" % host), None ) for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): af, socktype, proto, canonname, sa = res sock = None try: sock = socket.socket(af, socktype, proto) # If provided, set socket level options before connecting. _set_socket_options(sock, socket_options) if timeout is not socket._GLOBAL_DEFAULT_TIMEOUT: sock.settimeout(timeout) if source_address: sock.bind(source_address) > sock.connect(sa) E ConnectionRefusedError: [Errno 111] Connection refused /usr/lib/python3.13/site-packages/urllib3/util/connection.py:85: ConnectionRefusedError During handling of the above exception, another exception occurred: self = method = 'POST', url = '/cgi-bin/upload.cgi' body = 'name=rpms%2Fold&md5sum=2e54144ba487ae25d03a3caba233da71&filename=hello.txt' headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Content-Length': '74', 'Content-Type': 'application/x-www-form-urlencoded'} retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) redirect = False, assert_same_host = False timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None release_conn = False, chunked = False, body_pos = None response_kw = {'decode_content': False, 'preload_content': False} parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/cgi-bin/upload.cgi', query=None, fragment=None) destination_scheme = None, conn = None, release_this_conn = True http_tunnel_required = False, err = None, clean_exit = False def urlopen( self, method, url, body=None, headers=None, retries=None, redirect=True, assert_same_host=True, timeout=_Default, pool_timeout=None, release_conn=None, chunked=False, body_pos=None, **response_kw ): """ Get a connection from the pool and perform an HTTP request. This is the lowest level call for making a request, so you'll need to specify all the raw details. .. note:: More commonly, it's appropriate to use a convenience method provided by :class:`.RequestMethods`, such as :meth:`request`. .. note:: `release_conn` will only behave as expected if `preload_content=False` because we want to make `preload_content=False` the default behaviour someday soon without breaking backwards compatibility. :param method: HTTP request method (such as GET, POST, PUT, etc.) :param url: The URL to perform the request on. :param body: Data to send in the request body, either :class:`str`, :class:`bytes`, an iterable of :class:`str`/:class:`bytes`, or a file-like object. :param headers: Dictionary of custom headers to send, such as User-Agent, If-None-Match, etc. If None, pool headers are used. If provided, these headers completely replace any pool-specific headers. :param retries: Configure the number of retries to allow before raising a :class:`~urllib3.exceptions.MaxRetryError` exception. Pass ``None`` to retry until you receive a response. Pass a :class:`~urllib3.util.retry.Retry` object for fine-grained control over different types of retries. Pass an integer number to retry connection errors that many times, but no other types of errors. Pass zero to never retry. If ``False``, then retries are disabled and any exception is raised immediately. Also, instead of raising a MaxRetryError on redirects, the redirect response will be returned. :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. :param redirect: If True, automatically handle redirects (status codes 301, 302, 303, 307, 308). Each redirect counts as a retry. Disabling retries will disable redirect, too. :param assert_same_host: If ``True``, will make sure that the host of the pool requests is consistent else will raise HostChangedError. When ``False``, you can use the pool on an HTTP proxy and request foreign hosts. :param timeout: If specified, overrides the default timeout for this one request. It may be a float (in seconds) or an instance of :class:`urllib3.util.Timeout`. :param pool_timeout: If set and the pool is set to block=True, then this method will block for ``pool_timeout`` seconds and raise EmptyPoolError if no connection is available within the time period. :param release_conn: If False, then the urlopen call will not release the connection back into the pool once a response is received (but will release if you read the entire contents of the response such as when `preload_content=True`). This is useful if you're not preloading the response's content immediately. You will need to call ``r.release_conn()`` on the response ``r`` to return the connection back into the pool. If None, it takes the value of ``response_kw.get('preload_content', True)``. :param chunked: If True, urllib3 will send the body using chunked transfer encoding. Otherwise, urllib3 will send the body using the standard content-length form. Defaults to False. :param int body_pos: Position to seek to in file-like body in the event of a retry or redirect. Typically this won't need to be set because urllib3 will auto-populate the value when needed. :param \\**response_kw: Additional parameters are passed to :meth:`urllib3.response.HTTPResponse.from_httplib` """ parsed_url = parse_url(url) destination_scheme = parsed_url.scheme if headers is None: headers = self.headers if not isinstance(retries, Retry): retries = Retry.from_int(retries, redirect=redirect, default=self.retries) if release_conn is None: release_conn = response_kw.get("preload_content", True) # Check host if assert_same_host and not self.is_same_host(url): raise HostChangedError(self, url, retries) # Ensure that the URL we're connecting to is properly encoded if url.startswith("/"): url = six.ensure_str(_encode_target(url)) else: url = six.ensure_str(parsed_url.url) conn = None # Track whether `conn` needs to be released before # returning/raising/recursing. Update this variable if necessary, and # leave `release_conn` constant throughout the function. That way, if # the function recurses, the original value of `release_conn` will be # passed down into the recursive call, and its value will be respected. # # See issue #651 [1] for details. # # [1] release_this_conn = release_conn http_tunnel_required = connection_requires_http_tunnel( self.proxy, self.proxy_config, destination_scheme ) # Merge the proxy headers. Only done when not using HTTP CONNECT. We # have to copy the headers dict so we can safely change it without those # changes being reflected in anyone else's copy. if not http_tunnel_required: headers = headers.copy() headers.update(self.proxy_headers) # Must keep the exception bound to a separate variable or else Python 3 # complains about UnboundLocalError. err = None # Keep track of whether we cleanly exited the except block. This # ensures we do proper cleanup in finally. clean_exit = False # Rewind body position, if needed. Record current position # for future rewinds in the event of a redirect/retry. body_pos = set_file_position(body, body_pos) try: # Request a connection from the queue. timeout_obj = self._get_timeout(timeout) conn = self._get_conn(timeout=pool_timeout) conn.timeout = timeout_obj.connect_timeout is_new_proxy_conn = self.proxy is not None and not getattr( conn, "sock", None ) if is_new_proxy_conn and http_tunnel_required: self._prepare_proxy(conn) # Make the request on the httplib connection object. > httplib_response = self._make_request( conn, method, url, timeout=timeout_obj, body=body, headers=headers, chunked=chunked, ) /usr/lib/python3.13/site-packages/urllib3/connectionpool.py:715: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/urllib3/connectionpool.py:416: in _make_request conn.request(method, url, **httplib_request_kw) /usr/lib/python3.13/site-packages/urllib3/connection.py:244: in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) /usr/lib64/python3.13/http/client.py:1336: in request self._send_request(method, url, body, headers, encode_chunked) /usr/lib64/python3.13/http/client.py:1382: in _send_request self.endheaders(body, encode_chunked=encode_chunked) /usr/lib64/python3.13/http/client.py:1331: in endheaders self._send_output(message_body, encode_chunked=encode_chunked) /usr/lib64/python3.13/http/client.py:1091: in _send_output self.send(msg) /usr/lib64/python3.13/http/client.py:1035: in send self.connect() /usr/lib/python3.13/site-packages/urllib3/connection.py:205: in connect conn = self._new_conn() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _new_conn(self): """Establish a socket connection and set nodelay settings on it. :return: New socket connection. """ extra_kw = {} if self.source_address: extra_kw["source_address"] = self.source_address if self.socket_options: extra_kw["socket_options"] = self.socket_options try: conn = connection.create_connection( (self._dns_host, self.port), self.timeout, **extra_kw ) except SocketTimeout: raise ConnectTimeoutError( self, "Connection to %s timed out. (connect timeout=%s)" % (self.host, self.timeout), ) except SocketError as e: > raise NewConnectionError( self, "Failed to establish a new connection: %s" % e ) E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused /usr/lib/python3.13/site-packages/urllib3/connection.py:186: NewConnectionError During handling of the above exception, another exception occurred: self = request = , stream = False timeout = Timeout(connect=None, read=None, total=None), verify = True cert = None, proxies = OrderedDict() def send( self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None ): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest ` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) ` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection_with_tls_context( request, verify, proxies=proxies, cert=cert ) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers( request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies, ) chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError: raise ValueError( f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " f"or a single float to set both timeouts to the same value." ) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: > resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout, chunked=chunked, ) /usr/lib/python3.13/site-packages/requests/adapters.py:667: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/urllib3/connectionpool.py:801: in urlopen retries = retries.increment( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Retry(total=0, connect=None, read=False, redirect=None, status=None) method = 'POST', url = '/cgi-bin/upload.cgi', response = None error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') _pool = _stacktrace = def increment( self, method=None, url=None, response=None, error=None, _pool=None, _stacktrace=None, ): """Return a new Retry object with incremented retry counters. :param response: A response object, or None, if the server did not return a response. :type response: :class:`~urllib3.response.HTTPResponse` :param Exception error: An error encountered during the request, or None if the response was received successfully. :return: A new ``Retry`` object. """ if self.total is False and error: # Disabled, indicate to re-raise the error. raise six.reraise(type(error), error, _stacktrace) total = self.total if total is not None: total -= 1 connect = self.connect read = self.read redirect = self.redirect status_count = self.status other = self.other cause = "unknown" status = None redirect_location = None if error and self._is_connection_error(error): # Connect retry? if connect is False: raise six.reraise(type(error), error, _stacktrace) elif connect is not None: connect -= 1 elif error and self._is_read_error(error): # Read retry? if read is False or not self._is_method_retryable(method): raise six.reraise(type(error), error, _stacktrace) elif read is not None: read -= 1 elif error: # Other retry? if other is not None: other -= 1 elif response and response.get_redirect_location(): # Redirect retry? if redirect is not None: redirect -= 1 cause = "too many redirects" redirect_location = response.get_redirect_location() status = response.status else: # Incrementing because of a server error like a 500 in # status_forcelist and the given method is in the allowed_methods cause = ResponseError.GENERIC_ERROR if response and response.status: if status_count is not None: status_count -= 1 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) status = response.status history = self.history + ( RequestHistory(method, url, error, status, redirect_location), ) new_retry = self.new( total=total, connect=connect, read=read, redirect=redirect, status=status_count, other=other, history=history, ) if new_retry.is_exhausted(): > raise MaxRetryError(_pool, url, error or ResponseError(cause)) E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8888): Max retries exceeded with url: /cgi-bin/upload.cgi (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) /usr/lib/python3.13/site-packages/urllib3/util/retry.py:594: MaxRetryError During handling of the above exception, another exception occurred: a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:189: in test_check_existing_file resp = self.upload(module, hash=HASH, filename='hello.txt') tests/test_upload_script.py:159: in upload response = requests.post(self.url, data=args, files=files) /usr/lib/python3.13/site-packages/requests/api.py:115: in post return request("post", url, data=data, json=json, **kwargs) /usr/lib/python3.13/site-packages/requests/api.py:59: in request return session.request(method=method, url=url, **kwargs) /usr/lib/python3.13/site-packages/requests/sessions.py:589: in request resp = self.send(prep, **send_kwargs) /usr/lib/python3.13/site-packages/requests/sessions.py:703: in send r = adapter.send(request, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = , stream = False timeout = Timeout(connect=None, read=None, total=None), verify = True cert = None, proxies = OrderedDict() def send( self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None ): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest ` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) ` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection_with_tls_context( request, verify, proxies=proxies, cert=cert ) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers( request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies, ) chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError: raise ValueError( f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " f"or a single float to set both timeouts to the same value." ) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout, chunked=chunked, ) except (ProtocolError, OSError) as err: raise ConnectionError(err, request=request) except MaxRetryError as e: if isinstance(e.reason, ConnectTimeoutError): # TODO: Remove this in 3.0.0: see #2811 if not isinstance(e.reason, NewConnectionError): raise ConnectTimeout(e, request=request) if isinstance(e.reason, ResponseError): raise RetryError(e, request=request) if isinstance(e.reason, _ProxyError): raise ProxyError(e, request=request) if isinstance(e.reason, _SSLError): # This branch is for urllib3 v1.22 and later. raise SSLError(e, request=request) > raise ConnectionError(e, request=request) E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8888): Max retries exceeded with url: /cgi-bin/upload.cgi (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) /usr/lib/python3.13/site-packages/requests/adapters.py:700: ConnectionError ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmp201uwc87/srv/git/rpms/pkg.git/.keep Creating /tmp/tmp201uwc87/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmp201uwc87/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp201uwc87/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp201uwc87/srv/git/rpms/pkg.git/.keep Creating /tmp/tmp201uwc87/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmp201uwc87/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp201uwc87/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp201uwc87/srv/git/apbs/pkg.git/.keep Creating /tmp/tmp201uwc87/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmp201uwc87/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp201uwc87/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp201uwc87/srv/git/rpms/old.git/.keep Creating /tmp/tmp201uwc87/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmp201uwc87/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp201uwc87/srv/git/rpms/old.git/.keep Creating /tmp/tmp201uwc87/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmp201uwc87/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp201uwc87/srv/git/apbs/old.git/.keep Creating /tmp/tmp201uwc87/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmp201uwc87/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt ________________ UploadTest.test_check_existing_file_5_apbs_old ________________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:190: in test_check_existing_file self.assertEqual(resp, 'Available\n') E AssertionError: '' != 'Available\n' E + Available ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmpo7olk1s8/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpo7olk1s8/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpo7olk1s8/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpo7olk1s8/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpo7olk1s8/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpo7olk1s8/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpo7olk1s8/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpo7olk1s8/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpo7olk1s8/srv/git/apbs/pkg.git/.keep Creating /tmp/tmpo7olk1s8/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmpo7olk1s8/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpo7olk1s8/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpo7olk1s8/srv/git/rpms/old.git/.keep Creating /tmp/tmpo7olk1s8/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpo7olk1s8/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpo7olk1s8/srv/git/rpms/old.git/.keep Creating /tmp/tmpo7olk1s8/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpo7olk1s8/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpo7olk1s8/srv/git/apbs/old.git/.keep Creating /tmp/tmpo7olk1s8/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmpo7olk1s8/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt b'127.0.0.1 - - [01/Jul/2024 17:04:19] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmpo7olk1s8/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:19] CGI script exit code 1\n' ___________ UploadTest.test_check_existing_file_with_bad_hash_0_pkg ____________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:195: in test_check_existing_file_with_bad_hash self.assertEqual(resp, 'Missing\n') E AssertionError: '' != 'Missing\n' E + Missing ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmpx7vrvssi/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpx7vrvssi/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpx7vrvssi/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpx7vrvssi/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpx7vrvssi/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpx7vrvssi/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpx7vrvssi/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpx7vrvssi/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpx7vrvssi/srv/git/apbs/pkg.git/.keep Creating /tmp/tmpx7vrvssi/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmpx7vrvssi/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpx7vrvssi/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpx7vrvssi/srv/git/rpms/old.git/.keep Creating /tmp/tmpx7vrvssi/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpx7vrvssi/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpx7vrvssi/srv/git/rpms/old.git/.keep Creating /tmp/tmpx7vrvssi/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpx7vrvssi/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpx7vrvssi/srv/git/apbs/old.git/.keep Creating /tmp/tmpx7vrvssi/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmpx7vrvssi/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt b'127.0.0.1 - - [01/Jul/2024 17:04:19] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmpx7vrvssi/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:19] CGI script exit code 1\n' _________ UploadTest.test_check_existing_file_with_bad_hash_1_rpms_pkg _________ self = def _new_conn(self): """Establish a socket connection and set nodelay settings on it. :return: New socket connection. """ extra_kw = {} if self.source_address: extra_kw["source_address"] = self.source_address if self.socket_options: extra_kw["socket_options"] = self.socket_options try: > conn = connection.create_connection( (self._dns_host, self.port), self.timeout, **extra_kw ) /usr/lib/python3.13/site-packages/urllib3/connection.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/urllib3/util/connection.py:95: in create_connection raise err _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ address = ('localhost', 8888), timeout = None, source_address = None socket_options = [(6, 1, 1)] def create_connection( address, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, source_address=None, socket_options=None, ): """Connect to *address* and return the socket object. Convenience function. Connect to *address* (a 2-tuple ``(host, port)``) and return the socket object. Passing the optional *timeout* parameter will set the timeout on the socket instance before attempting to connect. If no *timeout* is supplied, the global default timeout setting returned by :func:`socket.getdefaulttimeout` is used. If *source_address* is set it must be a tuple of (host, port) for the socket to bind as a source address before making the connection. An host of '' or port 0 tells the OS to use the default. """ host, port = address if host.startswith("["): host = host.strip("[]") err = None # Using the value from allowed_gai_family() in the context of getaddrinfo lets # us select whether to work with IPv4 DNS records, IPv6 records, or both. # The original create_connection function always returns all records. family = allowed_gai_family() try: host.encode("idna") except UnicodeError: return six.raise_from( LocationParseError(u"'%s', label empty or too long" % host), None ) for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): af, socktype, proto, canonname, sa = res sock = None try: sock = socket.socket(af, socktype, proto) # If provided, set socket level options before connecting. _set_socket_options(sock, socket_options) if timeout is not socket._GLOBAL_DEFAULT_TIMEOUT: sock.settimeout(timeout) if source_address: sock.bind(source_address) > sock.connect(sa) E ConnectionRefusedError: [Errno 111] Connection refused /usr/lib/python3.13/site-packages/urllib3/util/connection.py:85: ConnectionRefusedError During handling of the above exception, another exception occurred: self = method = 'POST', url = '/cgi-bin/upload.cgi' body = 'name=rpms%2Fpkg&md5sum=abc&filename=hello.txt' headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Content-Length': '45', 'Content-Type': 'application/x-www-form-urlencoded'} retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) redirect = False, assert_same_host = False timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None release_conn = False, chunked = False, body_pos = None response_kw = {'decode_content': False, 'preload_content': False} parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/cgi-bin/upload.cgi', query=None, fragment=None) destination_scheme = None, conn = None, release_this_conn = True http_tunnel_required = False, err = None, clean_exit = False def urlopen( self, method, url, body=None, headers=None, retries=None, redirect=True, assert_same_host=True, timeout=_Default, pool_timeout=None, release_conn=None, chunked=False, body_pos=None, **response_kw ): """ Get a connection from the pool and perform an HTTP request. This is the lowest level call for making a request, so you'll need to specify all the raw details. .. note:: More commonly, it's appropriate to use a convenience method provided by :class:`.RequestMethods`, such as :meth:`request`. .. note:: `release_conn` will only behave as expected if `preload_content=False` because we want to make `preload_content=False` the default behaviour someday soon without breaking backwards compatibility. :param method: HTTP request method (such as GET, POST, PUT, etc.) :param url: The URL to perform the request on. :param body: Data to send in the request body, either :class:`str`, :class:`bytes`, an iterable of :class:`str`/:class:`bytes`, or a file-like object. :param headers: Dictionary of custom headers to send, such as User-Agent, If-None-Match, etc. If None, pool headers are used. If provided, these headers completely replace any pool-specific headers. :param retries: Configure the number of retries to allow before raising a :class:`~urllib3.exceptions.MaxRetryError` exception. Pass ``None`` to retry until you receive a response. Pass a :class:`~urllib3.util.retry.Retry` object for fine-grained control over different types of retries. Pass an integer number to retry connection errors that many times, but no other types of errors. Pass zero to never retry. If ``False``, then retries are disabled and any exception is raised immediately. Also, instead of raising a MaxRetryError on redirects, the redirect response will be returned. :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. :param redirect: If True, automatically handle redirects (status codes 301, 302, 303, 307, 308). Each redirect counts as a retry. Disabling retries will disable redirect, too. :param assert_same_host: If ``True``, will make sure that the host of the pool requests is consistent else will raise HostChangedError. When ``False``, you can use the pool on an HTTP proxy and request foreign hosts. :param timeout: If specified, overrides the default timeout for this one request. It may be a float (in seconds) or an instance of :class:`urllib3.util.Timeout`. :param pool_timeout: If set and the pool is set to block=True, then this method will block for ``pool_timeout`` seconds and raise EmptyPoolError if no connection is available within the time period. :param release_conn: If False, then the urlopen call will not release the connection back into the pool once a response is received (but will release if you read the entire contents of the response such as when `preload_content=True`). This is useful if you're not preloading the response's content immediately. You will need to call ``r.release_conn()`` on the response ``r`` to return the connection back into the pool. If None, it takes the value of ``response_kw.get('preload_content', True)``. :param chunked: If True, urllib3 will send the body using chunked transfer encoding. Otherwise, urllib3 will send the body using the standard content-length form. Defaults to False. :param int body_pos: Position to seek to in file-like body in the event of a retry or redirect. Typically this won't need to be set because urllib3 will auto-populate the value when needed. :param \\**response_kw: Additional parameters are passed to :meth:`urllib3.response.HTTPResponse.from_httplib` """ parsed_url = parse_url(url) destination_scheme = parsed_url.scheme if headers is None: headers = self.headers if not isinstance(retries, Retry): retries = Retry.from_int(retries, redirect=redirect, default=self.retries) if release_conn is None: release_conn = response_kw.get("preload_content", True) # Check host if assert_same_host and not self.is_same_host(url): raise HostChangedError(self, url, retries) # Ensure that the URL we're connecting to is properly encoded if url.startswith("/"): url = six.ensure_str(_encode_target(url)) else: url = six.ensure_str(parsed_url.url) conn = None # Track whether `conn` needs to be released before # returning/raising/recursing. Update this variable if necessary, and # leave `release_conn` constant throughout the function. That way, if # the function recurses, the original value of `release_conn` will be # passed down into the recursive call, and its value will be respected. # # See issue #651 [1] for details. # # [1] release_this_conn = release_conn http_tunnel_required = connection_requires_http_tunnel( self.proxy, self.proxy_config, destination_scheme ) # Merge the proxy headers. Only done when not using HTTP CONNECT. We # have to copy the headers dict so we can safely change it without those # changes being reflected in anyone else's copy. if not http_tunnel_required: headers = headers.copy() headers.update(self.proxy_headers) # Must keep the exception bound to a separate variable or else Python 3 # complains about UnboundLocalError. err = None # Keep track of whether we cleanly exited the except block. This # ensures we do proper cleanup in finally. clean_exit = False # Rewind body position, if needed. Record current position # for future rewinds in the event of a redirect/retry. body_pos = set_file_position(body, body_pos) try: # Request a connection from the queue. timeout_obj = self._get_timeout(timeout) conn = self._get_conn(timeout=pool_timeout) conn.timeout = timeout_obj.connect_timeout is_new_proxy_conn = self.proxy is not None and not getattr( conn, "sock", None ) if is_new_proxy_conn and http_tunnel_required: self._prepare_proxy(conn) # Make the request on the httplib connection object. > httplib_response = self._make_request( conn, method, url, timeout=timeout_obj, body=body, headers=headers, chunked=chunked, ) /usr/lib/python3.13/site-packages/urllib3/connectionpool.py:715: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/urllib3/connectionpool.py:416: in _make_request conn.request(method, url, **httplib_request_kw) /usr/lib/python3.13/site-packages/urllib3/connection.py:244: in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) /usr/lib64/python3.13/http/client.py:1336: in request self._send_request(method, url, body, headers, encode_chunked) /usr/lib64/python3.13/http/client.py:1382: in _send_request self.endheaders(body, encode_chunked=encode_chunked) /usr/lib64/python3.13/http/client.py:1331: in endheaders self._send_output(message_body, encode_chunked=encode_chunked) /usr/lib64/python3.13/http/client.py:1091: in _send_output self.send(msg) /usr/lib64/python3.13/http/client.py:1035: in send self.connect() /usr/lib/python3.13/site-packages/urllib3/connection.py:205: in connect conn = self._new_conn() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _new_conn(self): """Establish a socket connection and set nodelay settings on it. :return: New socket connection. """ extra_kw = {} if self.source_address: extra_kw["source_address"] = self.source_address if self.socket_options: extra_kw["socket_options"] = self.socket_options try: conn = connection.create_connection( (self._dns_host, self.port), self.timeout, **extra_kw ) except SocketTimeout: raise ConnectTimeoutError( self, "Connection to %s timed out. (connect timeout=%s)" % (self.host, self.timeout), ) except SocketError as e: > raise NewConnectionError( self, "Failed to establish a new connection: %s" % e ) E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused /usr/lib/python3.13/site-packages/urllib3/connection.py:186: NewConnectionError During handling of the above exception, another exception occurred: self = request = , stream = False timeout = Timeout(connect=None, read=None, total=None), verify = True cert = None, proxies = OrderedDict() def send( self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None ): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest ` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) ` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection_with_tls_context( request, verify, proxies=proxies, cert=cert ) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers( request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies, ) chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError: raise ValueError( f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " f"or a single float to set both timeouts to the same value." ) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: > resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout, chunked=chunked, ) /usr/lib/python3.13/site-packages/requests/adapters.py:667: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/urllib3/connectionpool.py:801: in urlopen retries = retries.increment( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Retry(total=0, connect=None, read=False, redirect=None, status=None) method = 'POST', url = '/cgi-bin/upload.cgi', response = None error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') _pool = _stacktrace = def increment( self, method=None, url=None, response=None, error=None, _pool=None, _stacktrace=None, ): """Return a new Retry object with incremented retry counters. :param response: A response object, or None, if the server did not return a response. :type response: :class:`~urllib3.response.HTTPResponse` :param Exception error: An error encountered during the request, or None if the response was received successfully. :return: A new ``Retry`` object. """ if self.total is False and error: # Disabled, indicate to re-raise the error. raise six.reraise(type(error), error, _stacktrace) total = self.total if total is not None: total -= 1 connect = self.connect read = self.read redirect = self.redirect status_count = self.status other = self.other cause = "unknown" status = None redirect_location = None if error and self._is_connection_error(error): # Connect retry? if connect is False: raise six.reraise(type(error), error, _stacktrace) elif connect is not None: connect -= 1 elif error and self._is_read_error(error): # Read retry? if read is False or not self._is_method_retryable(method): raise six.reraise(type(error), error, _stacktrace) elif read is not None: read -= 1 elif error: # Other retry? if other is not None: other -= 1 elif response and response.get_redirect_location(): # Redirect retry? if redirect is not None: redirect -= 1 cause = "too many redirects" redirect_location = response.get_redirect_location() status = response.status else: # Incrementing because of a server error like a 500 in # status_forcelist and the given method is in the allowed_methods cause = ResponseError.GENERIC_ERROR if response and response.status: if status_count is not None: status_count -= 1 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) status = response.status history = self.history + ( RequestHistory(method, url, error, status, redirect_location), ) new_retry = self.new( total=total, connect=connect, read=read, redirect=redirect, status=status_count, other=other, history=history, ) if new_retry.is_exhausted(): > raise MaxRetryError(_pool, url, error or ResponseError(cause)) E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8888): Max retries exceeded with url: /cgi-bin/upload.cgi (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) /usr/lib/python3.13/site-packages/urllib3/util/retry.py:594: MaxRetryError During handling of the above exception, another exception occurred: a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:194: in test_check_existing_file_with_bad_hash resp = self.upload(module, hash='abc', filename='hello.txt') tests/test_upload_script.py:159: in upload response = requests.post(self.url, data=args, files=files) /usr/lib/python3.13/site-packages/requests/api.py:115: in post return request("post", url, data=data, json=json, **kwargs) /usr/lib/python3.13/site-packages/requests/api.py:59: in request return session.request(method=method, url=url, **kwargs) /usr/lib/python3.13/site-packages/requests/sessions.py:589: in request resp = self.send(prep, **send_kwargs) /usr/lib/python3.13/site-packages/requests/sessions.py:703: in send r = adapter.send(request, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = , stream = False timeout = Timeout(connect=None, read=None, total=None), verify = True cert = None, proxies = OrderedDict() def send( self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None ): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest ` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) ` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection_with_tls_context( request, verify, proxies=proxies, cert=cert ) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers( request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies, ) chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError: raise ValueError( f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " f"or a single float to set both timeouts to the same value." ) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout, chunked=chunked, ) except (ProtocolError, OSError) as err: raise ConnectionError(err, request=request) except MaxRetryError as e: if isinstance(e.reason, ConnectTimeoutError): # TODO: Remove this in 3.0.0: see #2811 if not isinstance(e.reason, NewConnectionError): raise ConnectTimeout(e, request=request) if isinstance(e.reason, ResponseError): raise RetryError(e, request=request) if isinstance(e.reason, _ProxyError): raise ProxyError(e, request=request) if isinstance(e.reason, _SSLError): # This branch is for urllib3 v1.22 and later. raise SSLError(e, request=request) > raise ConnectionError(e, request=request) E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8888): Max retries exceeded with url: /cgi-bin/upload.cgi (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) /usr/lib/python3.13/site-packages/requests/adapters.py:700: ConnectionError ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmpn_aicbm5/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpn_aicbm5/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpn_aicbm5/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpn_aicbm5/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpn_aicbm5/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpn_aicbm5/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpn_aicbm5/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpn_aicbm5/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpn_aicbm5/srv/git/apbs/pkg.git/.keep Creating /tmp/tmpn_aicbm5/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmpn_aicbm5/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpn_aicbm5/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpn_aicbm5/srv/git/rpms/old.git/.keep Creating /tmp/tmpn_aicbm5/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpn_aicbm5/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpn_aicbm5/srv/git/rpms/old.git/.keep Creating /tmp/tmpn_aicbm5/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpn_aicbm5/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpn_aicbm5/srv/git/apbs/old.git/.keep Creating /tmp/tmpn_aicbm5/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmpn_aicbm5/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt _________ UploadTest.test_check_existing_file_with_bad_hash_2_apbs_pkg _________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:195: in test_check_existing_file_with_bad_hash self.assertEqual(resp, 'Missing\n') E AssertionError: '' != 'Missing\n' E + Missing ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmpuh7dhocb/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpuh7dhocb/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpuh7dhocb/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpuh7dhocb/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpuh7dhocb/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpuh7dhocb/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpuh7dhocb/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpuh7dhocb/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpuh7dhocb/srv/git/apbs/pkg.git/.keep Creating /tmp/tmpuh7dhocb/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmpuh7dhocb/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpuh7dhocb/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpuh7dhocb/srv/git/rpms/old.git/.keep Creating /tmp/tmpuh7dhocb/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpuh7dhocb/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpuh7dhocb/srv/git/rpms/old.git/.keep Creating /tmp/tmpuh7dhocb/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpuh7dhocb/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpuh7dhocb/srv/git/apbs/old.git/.keep Creating /tmp/tmpuh7dhocb/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmpuh7dhocb/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt b'127.0.0.1 - - [01/Jul/2024 17:04:20] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmpuh7dhocb/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:20] CGI script exit code 1\n' _____________ UploadTest.test_check_existing_sha512_correct_0_pkg ______________ self = def _new_conn(self): """Establish a socket connection and set nodelay settings on it. :return: New socket connection. """ extra_kw = {} if self.source_address: extra_kw["source_address"] = self.source_address if self.socket_options: extra_kw["socket_options"] = self.socket_options try: > conn = connection.create_connection( (self._dns_host, self.port), self.timeout, **extra_kw ) /usr/lib/python3.13/site-packages/urllib3/connection.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/urllib3/util/connection.py:95: in create_connection raise err _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ address = ('localhost', 8888), timeout = None, source_address = None socket_options = [(6, 1, 1)] def create_connection( address, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, source_address=None, socket_options=None, ): """Connect to *address* and return the socket object. Convenience function. Connect to *address* (a 2-tuple ``(host, port)``) and return the socket object. Passing the optional *timeout* parameter will set the timeout on the socket instance before attempting to connect. If no *timeout* is supplied, the global default timeout setting returned by :func:`socket.getdefaulttimeout` is used. If *source_address* is set it must be a tuple of (host, port) for the socket to bind as a source address before making the connection. An host of '' or port 0 tells the OS to use the default. """ host, port = address if host.startswith("["): host = host.strip("[]") err = None # Using the value from allowed_gai_family() in the context of getaddrinfo lets # us select whether to work with IPv4 DNS records, IPv6 records, or both. # The original create_connection function always returns all records. family = allowed_gai_family() try: host.encode("idna") except UnicodeError: return six.raise_from( LocationParseError(u"'%s', label empty or too long" % host), None ) for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): af, socktype, proto, canonname, sa = res sock = None try: sock = socket.socket(af, socktype, proto) # If provided, set socket level options before connecting. _set_socket_options(sock, socket_options) if timeout is not socket._GLOBAL_DEFAULT_TIMEOUT: sock.settimeout(timeout) if source_address: sock.bind(source_address) > sock.connect(sa) E ConnectionRefusedError: [Errno 111] Connection refused /usr/lib/python3.13/site-packages/urllib3/util/connection.py:85: ConnectionRefusedError During handling of the above exception, another exception occurred: self = method = 'POST', url = '/cgi-bin/upload.cgi' body = 'name=pkg&sha512sum=acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff&filename=hello.txt' headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Content-Length': '166', 'Content-Type': 'application/x-www-form-urlencoded'} retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) redirect = False, assert_same_host = False timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None release_conn = False, chunked = False, body_pos = None response_kw = {'decode_content': False, 'preload_content': False} parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/cgi-bin/upload.cgi', query=None, fragment=None) destination_scheme = None, conn = None, release_this_conn = True http_tunnel_required = False, err = None, clean_exit = False def urlopen( self, method, url, body=None, headers=None, retries=None, redirect=True, assert_same_host=True, timeout=_Default, pool_timeout=None, release_conn=None, chunked=False, body_pos=None, **response_kw ): """ Get a connection from the pool and perform an HTTP request. This is the lowest level call for making a request, so you'll need to specify all the raw details. .. note:: More commonly, it's appropriate to use a convenience method provided by :class:`.RequestMethods`, such as :meth:`request`. .. note:: `release_conn` will only behave as expected if `preload_content=False` because we want to make `preload_content=False` the default behaviour someday soon without breaking backwards compatibility. :param method: HTTP request method (such as GET, POST, PUT, etc.) :param url: The URL to perform the request on. :param body: Data to send in the request body, either :class:`str`, :class:`bytes`, an iterable of :class:`str`/:class:`bytes`, or a file-like object. :param headers: Dictionary of custom headers to send, such as User-Agent, If-None-Match, etc. If None, pool headers are used. If provided, these headers completely replace any pool-specific headers. :param retries: Configure the number of retries to allow before raising a :class:`~urllib3.exceptions.MaxRetryError` exception. Pass ``None`` to retry until you receive a response. Pass a :class:`~urllib3.util.retry.Retry` object for fine-grained control over different types of retries. Pass an integer number to retry connection errors that many times, but no other types of errors. Pass zero to never retry. If ``False``, then retries are disabled and any exception is raised immediately. Also, instead of raising a MaxRetryError on redirects, the redirect response will be returned. :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. :param redirect: If True, automatically handle redirects (status codes 301, 302, 303, 307, 308). Each redirect counts as a retry. Disabling retries will disable redirect, too. :param assert_same_host: If ``True``, will make sure that the host of the pool requests is consistent else will raise HostChangedError. When ``False``, you can use the pool on an HTTP proxy and request foreign hosts. :param timeout: If specified, overrides the default timeout for this one request. It may be a float (in seconds) or an instance of :class:`urllib3.util.Timeout`. :param pool_timeout: If set and the pool is set to block=True, then this method will block for ``pool_timeout`` seconds and raise EmptyPoolError if no connection is available within the time period. :param release_conn: If False, then the urlopen call will not release the connection back into the pool once a response is received (but will release if you read the entire contents of the response such as when `preload_content=True`). This is useful if you're not preloading the response's content immediately. You will need to call ``r.release_conn()`` on the response ``r`` to return the connection back into the pool. If None, it takes the value of ``response_kw.get('preload_content', True)``. :param chunked: If True, urllib3 will send the body using chunked transfer encoding. Otherwise, urllib3 will send the body using the standard content-length form. Defaults to False. :param int body_pos: Position to seek to in file-like body in the event of a retry or redirect. Typically this won't need to be set because urllib3 will auto-populate the value when needed. :param \\**response_kw: Additional parameters are passed to :meth:`urllib3.response.HTTPResponse.from_httplib` """ parsed_url = parse_url(url) destination_scheme = parsed_url.scheme if headers is None: headers = self.headers if not isinstance(retries, Retry): retries = Retry.from_int(retries, redirect=redirect, default=self.retries) if release_conn is None: release_conn = response_kw.get("preload_content", True) # Check host if assert_same_host and not self.is_same_host(url): raise HostChangedError(self, url, retries) # Ensure that the URL we're connecting to is properly encoded if url.startswith("/"): url = six.ensure_str(_encode_target(url)) else: url = six.ensure_str(parsed_url.url) conn = None # Track whether `conn` needs to be released before # returning/raising/recursing. Update this variable if necessary, and # leave `release_conn` constant throughout the function. That way, if # the function recurses, the original value of `release_conn` will be # passed down into the recursive call, and its value will be respected. # # See issue #651 [1] for details. # # [1] release_this_conn = release_conn http_tunnel_required = connection_requires_http_tunnel( self.proxy, self.proxy_config, destination_scheme ) # Merge the proxy headers. Only done when not using HTTP CONNECT. We # have to copy the headers dict so we can safely change it without those # changes being reflected in anyone else's copy. if not http_tunnel_required: headers = headers.copy() headers.update(self.proxy_headers) # Must keep the exception bound to a separate variable or else Python 3 # complains about UnboundLocalError. err = None # Keep track of whether we cleanly exited the except block. This # ensures we do proper cleanup in finally. clean_exit = False # Rewind body position, if needed. Record current position # for future rewinds in the event of a redirect/retry. body_pos = set_file_position(body, body_pos) try: # Request a connection from the queue. timeout_obj = self._get_timeout(timeout) conn = self._get_conn(timeout=pool_timeout) conn.timeout = timeout_obj.connect_timeout is_new_proxy_conn = self.proxy is not None and not getattr( conn, "sock", None ) if is_new_proxy_conn and http_tunnel_required: self._prepare_proxy(conn) # Make the request on the httplib connection object. > httplib_response = self._make_request( conn, method, url, timeout=timeout_obj, body=body, headers=headers, chunked=chunked, ) /usr/lib/python3.13/site-packages/urllib3/connectionpool.py:715: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/urllib3/connectionpool.py:416: in _make_request conn.request(method, url, **httplib_request_kw) /usr/lib/python3.13/site-packages/urllib3/connection.py:244: in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) /usr/lib64/python3.13/http/client.py:1336: in request self._send_request(method, url, body, headers, encode_chunked) /usr/lib64/python3.13/http/client.py:1382: in _send_request self.endheaders(body, encode_chunked=encode_chunked) /usr/lib64/python3.13/http/client.py:1331: in endheaders self._send_output(message_body, encode_chunked=encode_chunked) /usr/lib64/python3.13/http/client.py:1091: in _send_output self.send(msg) /usr/lib64/python3.13/http/client.py:1035: in send self.connect() /usr/lib/python3.13/site-packages/urllib3/connection.py:205: in connect conn = self._new_conn() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _new_conn(self): """Establish a socket connection and set nodelay settings on it. :return: New socket connection. """ extra_kw = {} if self.source_address: extra_kw["source_address"] = self.source_address if self.socket_options: extra_kw["socket_options"] = self.socket_options try: conn = connection.create_connection( (self._dns_host, self.port), self.timeout, **extra_kw ) except SocketTimeout: raise ConnectTimeoutError( self, "Connection to %s timed out. (connect timeout=%s)" % (self.host, self.timeout), ) except SocketError as e: > raise NewConnectionError( self, "Failed to establish a new connection: %s" % e ) E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused /usr/lib/python3.13/site-packages/urllib3/connection.py:186: NewConnectionError During handling of the above exception, another exception occurred: self = request = , stream = False timeout = Timeout(connect=None, read=None, total=None), verify = True cert = None, proxies = OrderedDict() def send( self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None ): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest ` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) ` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection_with_tls_context( request, verify, proxies=proxies, cert=cert ) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers( request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies, ) chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError: raise ValueError( f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " f"or a single float to set both timeouts to the same value." ) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: > resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout, chunked=chunked, ) /usr/lib/python3.13/site-packages/requests/adapters.py:667: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/urllib3/connectionpool.py:801: in urlopen retries = retries.increment( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Retry(total=0, connect=None, read=False, redirect=None, status=None) method = 'POST', url = '/cgi-bin/upload.cgi', response = None error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') _pool = _stacktrace = def increment( self, method=None, url=None, response=None, error=None, _pool=None, _stacktrace=None, ): """Return a new Retry object with incremented retry counters. :param response: A response object, or None, if the server did not return a response. :type response: :class:`~urllib3.response.HTTPResponse` :param Exception error: An error encountered during the request, or None if the response was received successfully. :return: A new ``Retry`` object. """ if self.total is False and error: # Disabled, indicate to re-raise the error. raise six.reraise(type(error), error, _stacktrace) total = self.total if total is not None: total -= 1 connect = self.connect read = self.read redirect = self.redirect status_count = self.status other = self.other cause = "unknown" status = None redirect_location = None if error and self._is_connection_error(error): # Connect retry? if connect is False: raise six.reraise(type(error), error, _stacktrace) elif connect is not None: connect -= 1 elif error and self._is_read_error(error): # Read retry? if read is False or not self._is_method_retryable(method): raise six.reraise(type(error), error, _stacktrace) elif read is not None: read -= 1 elif error: # Other retry? if other is not None: other -= 1 elif response and response.get_redirect_location(): # Redirect retry? if redirect is not None: redirect -= 1 cause = "too many redirects" redirect_location = response.get_redirect_location() status = response.status else: # Incrementing because of a server error like a 500 in # status_forcelist and the given method is in the allowed_methods cause = ResponseError.GENERIC_ERROR if response and response.status: if status_count is not None: status_count -= 1 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) status = response.status history = self.history + ( RequestHistory(method, url, error, status, redirect_location), ) new_retry = self.new( total=total, connect=connect, read=read, redirect=redirect, status=status_count, other=other, history=history, ) if new_retry.is_exhausted(): > raise MaxRetryError(_pool, url, error or ResponseError(cause)) E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8888): Max retries exceeded with url: /cgi-bin/upload.cgi (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) /usr/lib/python3.13/site-packages/urllib3/util/retry.py:594: MaxRetryError During handling of the above exception, another exception occurred: a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:243: in test_check_existing_sha512_correct resp = self.upload(module, hash=SHA512, hashtype='sha512', filename='hello.txt') tests/test_upload_script.py:159: in upload response = requests.post(self.url, data=args, files=files) /usr/lib/python3.13/site-packages/requests/api.py:115: in post return request("post", url, data=data, json=json, **kwargs) /usr/lib/python3.13/site-packages/requests/api.py:59: in request return session.request(method=method, url=url, **kwargs) /usr/lib/python3.13/site-packages/requests/sessions.py:589: in request resp = self.send(prep, **send_kwargs) /usr/lib/python3.13/site-packages/requests/sessions.py:703: in send r = adapter.send(request, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = , stream = False timeout = Timeout(connect=None, read=None, total=None), verify = True cert = None, proxies = OrderedDict() def send( self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None ): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest ` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) ` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection_with_tls_context( request, verify, proxies=proxies, cert=cert ) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers( request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies, ) chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError: raise ValueError( f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " f"or a single float to set both timeouts to the same value." ) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout, chunked=chunked, ) except (ProtocolError, OSError) as err: raise ConnectionError(err, request=request) except MaxRetryError as e: if isinstance(e.reason, ConnectTimeoutError): # TODO: Remove this in 3.0.0: see #2811 if not isinstance(e.reason, NewConnectionError): raise ConnectTimeout(e, request=request) if isinstance(e.reason, ResponseError): raise RetryError(e, request=request) if isinstance(e.reason, _ProxyError): raise ProxyError(e, request=request) if isinstance(e.reason, _SSLError): # This branch is for urllib3 v1.22 and later. raise SSLError(e, request=request) > raise ConnectionError(e, request=request) E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8888): Max retries exceeded with url: /cgi-bin/upload.cgi (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) /usr/lib/python3.13/site-packages/requests/adapters.py:700: ConnectionError ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmpkqwzyk2s/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpkqwzyk2s/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpkqwzyk2s/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpkqwzyk2s/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpkqwzyk2s/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpkqwzyk2s/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpkqwzyk2s/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpkqwzyk2s/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpkqwzyk2s/srv/git/apbs/pkg.git/.keep Creating /tmp/tmpkqwzyk2s/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmpkqwzyk2s/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpkqwzyk2s/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpkqwzyk2s/srv/git/rpms/old.git/.keep Creating /tmp/tmpkqwzyk2s/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpkqwzyk2s/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpkqwzyk2s/srv/git/rpms/old.git/.keep Creating /tmp/tmpkqwzyk2s/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpkqwzyk2s/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpkqwzyk2s/srv/git/apbs/old.git/.keep Creating /tmp/tmpkqwzyk2s/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmpkqwzyk2s/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt ___________ UploadTest.test_check_existing_sha512_correct_1_rpms_pkg ___________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:244: in test_check_existing_sha512_correct self.assertEqual(resp, 'Available\n') E AssertionError: '' != 'Available\n' E + Available ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmpd5gokobd/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpd5gokobd/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpd5gokobd/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpd5gokobd/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpd5gokobd/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpd5gokobd/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpd5gokobd/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpd5gokobd/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpd5gokobd/srv/git/apbs/pkg.git/.keep Creating /tmp/tmpd5gokobd/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmpd5gokobd/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpd5gokobd/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpd5gokobd/srv/git/rpms/old.git/.keep Creating /tmp/tmpd5gokobd/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpd5gokobd/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpd5gokobd/srv/git/rpms/old.git/.keep Creating /tmp/tmpd5gokobd/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpd5gokobd/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpd5gokobd/srv/git/apbs/old.git/.keep Creating /tmp/tmpd5gokobd/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmpd5gokobd/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt b'127.0.0.1 - - [01/Jul/2024 17:04:20] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmpd5gokobd/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:20] CGI script exit code 1\n' ___________ UploadTest.test_check_existing_sha512_correct_2_apbs_pkg ___________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:244: in test_check_existing_sha512_correct self.assertEqual(resp, 'Available\n') E AssertionError: '' != 'Available\n' E + Available ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmpxggs6zop/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpxggs6zop/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpxggs6zop/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpxggs6zop/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpxggs6zop/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpxggs6zop/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpxggs6zop/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpxggs6zop/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpxggs6zop/srv/git/apbs/pkg.git/.keep Creating /tmp/tmpxggs6zop/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmpxggs6zop/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpxggs6zop/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpxggs6zop/srv/git/rpms/old.git/.keep Creating /tmp/tmpxggs6zop/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpxggs6zop/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpxggs6zop/srv/git/rpms/old.git/.keep Creating /tmp/tmpxggs6zop/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpxggs6zop/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpxggs6zop/srv/git/apbs/old.git/.keep Creating /tmp/tmpxggs6zop/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmpxggs6zop/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt b'127.0.0.1 - - [01/Jul/2024 17:04:21] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmpxggs6zop/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:21] CGI script exit code 1\n' _____________ UploadTest.test_check_existing_sha512_mismatch_0_pkg _____________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:249: in test_check_existing_sha512_mismatch self.assertEqual(resp, 'Missing\n') E AssertionError: '' != 'Missing\n' E + Missing ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmppze_ey_v/srv/git/rpms/pkg.git/.keep Creating /tmp/tmppze_ey_v/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmppze_ey_v/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmppze_ey_v/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmppze_ey_v/srv/git/rpms/pkg.git/.keep Creating /tmp/tmppze_ey_v/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmppze_ey_v/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmppze_ey_v/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmppze_ey_v/srv/git/apbs/pkg.git/.keep Creating /tmp/tmppze_ey_v/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmppze_ey_v/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmppze_ey_v/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmppze_ey_v/srv/git/rpms/old.git/.keep Creating /tmp/tmppze_ey_v/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmppze_ey_v/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmppze_ey_v/srv/git/rpms/old.git/.keep Creating /tmp/tmppze_ey_v/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmppze_ey_v/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmppze_ey_v/srv/git/apbs/old.git/.keep Creating /tmp/tmppze_ey_v/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmppze_ey_v/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt b'127.0.0.1 - - [01/Jul/2024 17:04:21] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmppze_ey_v/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:21] CGI script exit code 1\n' __________ UploadTest.test_check_existing_sha512_mismatch_1_rpms_pkg ___________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:249: in test_check_existing_sha512_mismatch self.assertEqual(resp, 'Missing\n') E AssertionError: '' != 'Missing\n' E + Missing ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmp__iijhg4/srv/git/rpms/pkg.git/.keep Creating /tmp/tmp__iijhg4/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmp__iijhg4/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp__iijhg4/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp__iijhg4/srv/git/rpms/pkg.git/.keep Creating /tmp/tmp__iijhg4/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmp__iijhg4/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp__iijhg4/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp__iijhg4/srv/git/apbs/pkg.git/.keep Creating /tmp/tmp__iijhg4/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmp__iijhg4/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp__iijhg4/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp__iijhg4/srv/git/rpms/old.git/.keep Creating /tmp/tmp__iijhg4/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmp__iijhg4/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp__iijhg4/srv/git/rpms/old.git/.keep Creating /tmp/tmp__iijhg4/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmp__iijhg4/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp__iijhg4/srv/git/apbs/old.git/.keep Creating /tmp/tmp__iijhg4/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmp__iijhg4/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt b'127.0.0.1 - - [01/Jul/2024 17:04:21] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmp__iijhg4/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:21] CGI script exit code 1\n' __________ UploadTest.test_check_existing_sha512_mismatch_2_apbs_pkg ___________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:249: in test_check_existing_sha512_mismatch self.assertEqual(resp, 'Missing\n') E AssertionError: '' != 'Missing\n' E + Missing ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmpp17cxig0/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpp17cxig0/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpp17cxig0/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpp17cxig0/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpp17cxig0/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpp17cxig0/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpp17cxig0/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpp17cxig0/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpp17cxig0/srv/git/apbs/pkg.git/.keep Creating /tmp/tmpp17cxig0/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmpp17cxig0/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpp17cxig0/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpp17cxig0/srv/git/rpms/old.git/.keep Creating /tmp/tmpp17cxig0/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpp17cxig0/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpp17cxig0/srv/git/rpms/old.git/.keep Creating /tmp/tmpp17cxig0/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpp17cxig0/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpp17cxig0/srv/git/apbs/old.git/.keep Creating /tmp/tmpp17cxig0/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmpp17cxig0/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt b'127.0.0.1 - - [01/Jul/2024 17:04:21] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmpp17cxig0/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:21] CGI script exit code 1\n' ___________________ UploadTest.test_check_missing_file_0_pkg ___________________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:200: in test_check_missing_file self.assertEqual(resp, 'Missing\n') E AssertionError: '' != 'Missing\n' E + Missing ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmp1cd2ac4o/srv/git/rpms/pkg.git/.keep Creating /tmp/tmp1cd2ac4o/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmp1cd2ac4o/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp1cd2ac4o/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp1cd2ac4o/srv/git/rpms/pkg.git/.keep Creating /tmp/tmp1cd2ac4o/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmp1cd2ac4o/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp1cd2ac4o/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp1cd2ac4o/srv/git/apbs/pkg.git/.keep Creating /tmp/tmp1cd2ac4o/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmp1cd2ac4o/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp1cd2ac4o/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp1cd2ac4o/srv/git/rpms/old.git/.keep Creating /tmp/tmp1cd2ac4o/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmp1cd2ac4o/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp1cd2ac4o/srv/git/rpms/old.git/.keep Creating /tmp/tmp1cd2ac4o/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmp1cd2ac4o/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp1cd2ac4o/srv/git/apbs/old.git/.keep Creating /tmp/tmp1cd2ac4o/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmp1cd2ac4o/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt b'127.0.0.1 - - [01/Jul/2024 17:04:21] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmp1cd2ac4o/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:22] CGI script exit code 1\n' ________________ UploadTest.test_check_missing_file_1_rpms_pkg _________________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:200: in test_check_missing_file self.assertEqual(resp, 'Missing\n') E AssertionError: '' != 'Missing\n' E + Missing ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmptfymfwzi/srv/git/rpms/pkg.git/.keep Creating /tmp/tmptfymfwzi/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmptfymfwzi/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmptfymfwzi/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmptfymfwzi/srv/git/rpms/pkg.git/.keep Creating /tmp/tmptfymfwzi/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmptfymfwzi/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmptfymfwzi/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmptfymfwzi/srv/git/apbs/pkg.git/.keep Creating /tmp/tmptfymfwzi/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmptfymfwzi/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmptfymfwzi/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmptfymfwzi/srv/git/rpms/old.git/.keep Creating /tmp/tmptfymfwzi/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmptfymfwzi/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmptfymfwzi/srv/git/rpms/old.git/.keep Creating /tmp/tmptfymfwzi/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmptfymfwzi/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmptfymfwzi/srv/git/apbs/old.git/.keep Creating /tmp/tmptfymfwzi/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmptfymfwzi/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt b'127.0.0.1 - - [01/Jul/2024 17:04:22] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmptfymfwzi/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:22] CGI script exit code 1\n' ________________ UploadTest.test_check_missing_file_2_apbs_pkg _________________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:200: in test_check_missing_file self.assertEqual(resp, 'Missing\n') E AssertionError: '' != 'Missing\n' E + Missing ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmpx2bgqvzl/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpx2bgqvzl/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpx2bgqvzl/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpx2bgqvzl/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpx2bgqvzl/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpx2bgqvzl/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpx2bgqvzl/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpx2bgqvzl/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpx2bgqvzl/srv/git/apbs/pkg.git/.keep Creating /tmp/tmpx2bgqvzl/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmpx2bgqvzl/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpx2bgqvzl/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpx2bgqvzl/srv/git/rpms/old.git/.keep Creating /tmp/tmpx2bgqvzl/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpx2bgqvzl/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpx2bgqvzl/srv/git/rpms/old.git/.keep Creating /tmp/tmpx2bgqvzl/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpx2bgqvzl/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpx2bgqvzl/srv/git/apbs/old.git/.keep Creating /tmp/tmpx2bgqvzl/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmpx2bgqvzl/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt b'127.0.0.1 - - [01/Jul/2024 17:04:22] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmpx2bgqvzl/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:22] CGI script exit code 1\n' __________________ UploadTest.test_rejects_unknown_hash_0_pkg __________________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:226: in test_rejects_unknown_hash self.assertEqual(resp, "Required checksum is not present\n") E AssertionError: '' != 'Required checksum is not present\n' E + Required checksum is not present ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmprln4u3bq/srv/git/rpms/pkg.git/.keep Creating /tmp/tmprln4u3bq/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmprln4u3bq/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmprln4u3bq/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmprln4u3bq/srv/git/rpms/pkg.git/.keep Creating /tmp/tmprln4u3bq/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmprln4u3bq/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmprln4u3bq/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmprln4u3bq/srv/git/apbs/pkg.git/.keep Creating /tmp/tmprln4u3bq/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmprln4u3bq/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmprln4u3bq/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmprln4u3bq/srv/git/rpms/old.git/.keep Creating /tmp/tmprln4u3bq/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmprln4u3bq/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmprln4u3bq/srv/git/rpms/old.git/.keep Creating /tmp/tmprln4u3bq/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmprln4u3bq/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmprln4u3bq/srv/git/apbs/old.git/.keep Creating /tmp/tmprln4u3bq/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmprln4u3bq/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmprln4u3bq/hello.txt b'127.0.0.1 - - [01/Jul/2024 17:04:22] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmprln4u3bq/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:22] CGI script exit code 1\n' _______________ UploadTest.test_rejects_unknown_hash_1_rpms_pkg ________________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:226: in test_rejects_unknown_hash self.assertEqual(resp, "Required checksum is not present\n") E AssertionError: '' != 'Required checksum is not present\n' E + Required checksum is not present ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmp8k273qzu/srv/git/rpms/pkg.git/.keep Creating /tmp/tmp8k273qzu/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmp8k273qzu/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp8k273qzu/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp8k273qzu/srv/git/rpms/pkg.git/.keep Creating /tmp/tmp8k273qzu/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmp8k273qzu/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp8k273qzu/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp8k273qzu/srv/git/apbs/pkg.git/.keep Creating /tmp/tmp8k273qzu/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmp8k273qzu/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp8k273qzu/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp8k273qzu/srv/git/rpms/old.git/.keep Creating /tmp/tmp8k273qzu/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmp8k273qzu/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp8k273qzu/srv/git/rpms/old.git/.keep Creating /tmp/tmp8k273qzu/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmp8k273qzu/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp8k273qzu/srv/git/apbs/old.git/.keep Creating /tmp/tmp8k273qzu/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmp8k273qzu/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp8k273qzu/hello.txt b'127.0.0.1 - - [01/Jul/2024 17:04:22] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmp8k273qzu/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:22] CGI script exit code 1\n' _______________ UploadTest.test_rejects_unknown_hash_2_apbs_pkg ________________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:226: in test_rejects_unknown_hash self.assertEqual(resp, "Required checksum is not present\n") E AssertionError: '' != 'Required checksum is not present\n' E + Required checksum is not present ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmpn8izss75/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpn8izss75/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpn8izss75/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpn8izss75/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpn8izss75/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpn8izss75/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpn8izss75/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpn8izss75/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpn8izss75/srv/git/apbs/pkg.git/.keep Creating /tmp/tmpn8izss75/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmpn8izss75/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpn8izss75/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpn8izss75/srv/git/rpms/old.git/.keep Creating /tmp/tmpn8izss75/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpn8izss75/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpn8izss75/srv/git/rpms/old.git/.keep Creating /tmp/tmpn8izss75/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpn8izss75/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpn8izss75/srv/git/apbs/old.git/.keep Creating /tmp/tmpn8izss75/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmpn8izss75/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpn8izss75/hello.txt b'127.0.0.1 - - [01/Jul/2024 17:04:23] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmpn8izss75/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:23] CGI script exit code 1\n' ______________________ UploadTest.test_upload_file_0_pkg _______________________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:206: in test_upload_file self.assertEqual(resp, 'File new.txt size 7 MD5 %s stored OK\n' % NEW_HASH) E AssertionError: '' != 'File new.txt size 7 MD5 fce67ea4590d3b789fff55a37271f29f stored OK\n' E + File new.txt size 7 MD5 fce67ea4590d3b789fff55a37271f29f stored OK ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmpt02thp9v/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpt02thp9v/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpt02thp9v/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpt02thp9v/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpt02thp9v/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpt02thp9v/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpt02thp9v/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpt02thp9v/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpt02thp9v/srv/git/apbs/pkg.git/.keep Creating /tmp/tmpt02thp9v/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmpt02thp9v/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpt02thp9v/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpt02thp9v/srv/git/rpms/old.git/.keep Creating /tmp/tmpt02thp9v/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpt02thp9v/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpt02thp9v/srv/git/rpms/old.git/.keep Creating /tmp/tmpt02thp9v/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpt02thp9v/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpt02thp9v/srv/git/apbs/old.git/.keep Creating /tmp/tmpt02thp9v/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmpt02thp9v/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpt02thp9v/new.txt b'127.0.0.1 - - [01/Jul/2024 17:04:23] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmpt02thp9v/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:23] CGI script exit code 1\n' ____________________ UploadTest.test_upload_file_1_rpms_pkg ____________________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:206: in test_upload_file self.assertEqual(resp, 'File new.txt size 7 MD5 %s stored OK\n' % NEW_HASH) E AssertionError: '' != 'File new.txt size 7 MD5 fce67ea4590d3b789fff55a37271f29f stored OK\n' E + File new.txt size 7 MD5 fce67ea4590d3b789fff55a37271f29f stored OK ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmph35yrzyb/srv/git/rpms/pkg.git/.keep Creating /tmp/tmph35yrzyb/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmph35yrzyb/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmph35yrzyb/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmph35yrzyb/srv/git/rpms/pkg.git/.keep Creating /tmp/tmph35yrzyb/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmph35yrzyb/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmph35yrzyb/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmph35yrzyb/srv/git/apbs/pkg.git/.keep Creating /tmp/tmph35yrzyb/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmph35yrzyb/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmph35yrzyb/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmph35yrzyb/srv/git/rpms/old.git/.keep Creating /tmp/tmph35yrzyb/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmph35yrzyb/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmph35yrzyb/srv/git/rpms/old.git/.keep Creating /tmp/tmph35yrzyb/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmph35yrzyb/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmph35yrzyb/srv/git/apbs/old.git/.keep Creating /tmp/tmph35yrzyb/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmph35yrzyb/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmph35yrzyb/new.txt b'127.0.0.1 - - [01/Jul/2024 17:04:23] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmph35yrzyb/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:23] CGI script exit code 1\n' ____________________ UploadTest.test_upload_file_2_apbs_pkg ____________________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:206: in test_upload_file self.assertEqual(resp, 'File new.txt size 7 MD5 %s stored OK\n' % NEW_HASH) E AssertionError: '' != 'File new.txt size 7 MD5 fce67ea4590d3b789fff55a37271f29f stored OK\n' E + File new.txt size 7 MD5 fce67ea4590d3b789fff55a37271f29f stored OK ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmpq8wl9513/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpq8wl9513/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpq8wl9513/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpq8wl9513/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpq8wl9513/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpq8wl9513/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpq8wl9513/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpq8wl9513/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpq8wl9513/srv/git/apbs/pkg.git/.keep Creating /tmp/tmpq8wl9513/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmpq8wl9513/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpq8wl9513/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpq8wl9513/srv/git/rpms/old.git/.keep Creating /tmp/tmpq8wl9513/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpq8wl9513/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpq8wl9513/srv/git/rpms/old.git/.keep Creating /tmp/tmpq8wl9513/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpq8wl9513/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpq8wl9513/srv/git/apbs/old.git/.keep Creating /tmp/tmpq8wl9513/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmpq8wl9513/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpq8wl9513/new.txt b'127.0.0.1 - - [01/Jul/2024 17:04:23] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmpq8wl9513/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:23] CGI script exit code 1\n' ________________ UploadTest.test_upload_file_bad_checksum_0_pkg ________________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:214: in test_upload_file_bad_checksum self.assertEqual(resp, 'MD5 check failed. Received %s instead of ABC.\n' % HASH) E AssertionError: '' != 'MD5 check failed. Received 2e54144ba487ae25d03a3caba233da71 instead of ABC.\n' E + MD5 check failed. Received 2e54144ba487ae25d03a3caba233da71 instead of ABC. ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmpc8t_35bu/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpc8t_35bu/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpc8t_35bu/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpc8t_35bu/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpc8t_35bu/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpc8t_35bu/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpc8t_35bu/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpc8t_35bu/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpc8t_35bu/srv/git/apbs/pkg.git/.keep Creating /tmp/tmpc8t_35bu/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmpc8t_35bu/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpc8t_35bu/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpc8t_35bu/srv/git/rpms/old.git/.keep Creating /tmp/tmpc8t_35bu/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpc8t_35bu/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpc8t_35bu/srv/git/rpms/old.git/.keep Creating /tmp/tmpc8t_35bu/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpc8t_35bu/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpc8t_35bu/srv/git/apbs/old.git/.keep Creating /tmp/tmpc8t_35bu/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmpc8t_35bu/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpc8t_35bu/hello.txt b'127.0.0.1 - - [01/Jul/2024 17:04:24] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmpc8t_35bu/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:24] CGI script exit code 1\n' _____________ UploadTest.test_upload_file_bad_checksum_1_rpms_pkg ______________ self = def _new_conn(self): """Establish a socket connection and set nodelay settings on it. :return: New socket connection. """ extra_kw = {} if self.source_address: extra_kw["source_address"] = self.source_address if self.socket_options: extra_kw["socket_options"] = self.socket_options try: > conn = connection.create_connection( (self._dns_host, self.port), self.timeout, **extra_kw ) /usr/lib/python3.13/site-packages/urllib3/connection.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/urllib3/util/connection.py:95: in create_connection raise err _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ address = ('localhost', 8888), timeout = None, source_address = None socket_options = [(6, 1, 1)] def create_connection( address, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, source_address=None, socket_options=None, ): """Connect to *address* and return the socket object. Convenience function. Connect to *address* (a 2-tuple ``(host, port)``) and return the socket object. Passing the optional *timeout* parameter will set the timeout on the socket instance before attempting to connect. If no *timeout* is supplied, the global default timeout setting returned by :func:`socket.getdefaulttimeout` is used. If *source_address* is set it must be a tuple of (host, port) for the socket to bind as a source address before making the connection. An host of '' or port 0 tells the OS to use the default. """ host, port = address if host.startswith("["): host = host.strip("[]") err = None # Using the value from allowed_gai_family() in the context of getaddrinfo lets # us select whether to work with IPv4 DNS records, IPv6 records, or both. # The original create_connection function always returns all records. family = allowed_gai_family() try: host.encode("idna") except UnicodeError: return six.raise_from( LocationParseError(u"'%s', label empty or too long" % host), None ) for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): af, socktype, proto, canonname, sa = res sock = None try: sock = socket.socket(af, socktype, proto) # If provided, set socket level options before connecting. _set_socket_options(sock, socket_options) if timeout is not socket._GLOBAL_DEFAULT_TIMEOUT: sock.settimeout(timeout) if source_address: sock.bind(source_address) > sock.connect(sa) E ConnectionRefusedError: [Errno 111] Connection refused /usr/lib/python3.13/site-packages/urllib3/util/connection.py:85: ConnectionRefusedError During handling of the above exception, another exception occurred: self = method = 'POST', url = '/cgi-bin/upload.cgi' body = b'--ef6b5b4286c7e3a04452658743fc5fbb\r\nContent-Disposition: form-data; name="name"\r\n\r\nrpms/pkg\r\n--ef6b5b4286c7e...Disposition: form-data; name="file"; filename="hello.txt"\r\n\r\nhello.txt\r\n--ef6b5b4286c7e3a04452658743fc5fbb--\r\n' headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Content-Length': '337', 'Content-Type': 'multipart/form-data; boundary=ef6b5b4286c7e3a04452658743fc5fbb'} retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) redirect = False, assert_same_host = False timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None release_conn = False, chunked = False, body_pos = None response_kw = {'decode_content': False, 'preload_content': False} parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/cgi-bin/upload.cgi', query=None, fragment=None) destination_scheme = None, conn = None, release_this_conn = True http_tunnel_required = False, err = None, clean_exit = False def urlopen( self, method, url, body=None, headers=None, retries=None, redirect=True, assert_same_host=True, timeout=_Default, pool_timeout=None, release_conn=None, chunked=False, body_pos=None, **response_kw ): """ Get a connection from the pool and perform an HTTP request. This is the lowest level call for making a request, so you'll need to specify all the raw details. .. note:: More commonly, it's appropriate to use a convenience method provided by :class:`.RequestMethods`, such as :meth:`request`. .. note:: `release_conn` will only behave as expected if `preload_content=False` because we want to make `preload_content=False` the default behaviour someday soon without breaking backwards compatibility. :param method: HTTP request method (such as GET, POST, PUT, etc.) :param url: The URL to perform the request on. :param body: Data to send in the request body, either :class:`str`, :class:`bytes`, an iterable of :class:`str`/:class:`bytes`, or a file-like object. :param headers: Dictionary of custom headers to send, such as User-Agent, If-None-Match, etc. If None, pool headers are used. If provided, these headers completely replace any pool-specific headers. :param retries: Configure the number of retries to allow before raising a :class:`~urllib3.exceptions.MaxRetryError` exception. Pass ``None`` to retry until you receive a response. Pass a :class:`~urllib3.util.retry.Retry` object for fine-grained control over different types of retries. Pass an integer number to retry connection errors that many times, but no other types of errors. Pass zero to never retry. If ``False``, then retries are disabled and any exception is raised immediately. Also, instead of raising a MaxRetryError on redirects, the redirect response will be returned. :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. :param redirect: If True, automatically handle redirects (status codes 301, 302, 303, 307, 308). Each redirect counts as a retry. Disabling retries will disable redirect, too. :param assert_same_host: If ``True``, will make sure that the host of the pool requests is consistent else will raise HostChangedError. When ``False``, you can use the pool on an HTTP proxy and request foreign hosts. :param timeout: If specified, overrides the default timeout for this one request. It may be a float (in seconds) or an instance of :class:`urllib3.util.Timeout`. :param pool_timeout: If set and the pool is set to block=True, then this method will block for ``pool_timeout`` seconds and raise EmptyPoolError if no connection is available within the time period. :param release_conn: If False, then the urlopen call will not release the connection back into the pool once a response is received (but will release if you read the entire contents of the response such as when `preload_content=True`). This is useful if you're not preloading the response's content immediately. You will need to call ``r.release_conn()`` on the response ``r`` to return the connection back into the pool. If None, it takes the value of ``response_kw.get('preload_content', True)``. :param chunked: If True, urllib3 will send the body using chunked transfer encoding. Otherwise, urllib3 will send the body using the standard content-length form. Defaults to False. :param int body_pos: Position to seek to in file-like body in the event of a retry or redirect. Typically this won't need to be set because urllib3 will auto-populate the value when needed. :param \\**response_kw: Additional parameters are passed to :meth:`urllib3.response.HTTPResponse.from_httplib` """ parsed_url = parse_url(url) destination_scheme = parsed_url.scheme if headers is None: headers = self.headers if not isinstance(retries, Retry): retries = Retry.from_int(retries, redirect=redirect, default=self.retries) if release_conn is None: release_conn = response_kw.get("preload_content", True) # Check host if assert_same_host and not self.is_same_host(url): raise HostChangedError(self, url, retries) # Ensure that the URL we're connecting to is properly encoded if url.startswith("/"): url = six.ensure_str(_encode_target(url)) else: url = six.ensure_str(parsed_url.url) conn = None # Track whether `conn` needs to be released before # returning/raising/recursing. Update this variable if necessary, and # leave `release_conn` constant throughout the function. That way, if # the function recurses, the original value of `release_conn` will be # passed down into the recursive call, and its value will be respected. # # See issue #651 [1] for details. # # [1] release_this_conn = release_conn http_tunnel_required = connection_requires_http_tunnel( self.proxy, self.proxy_config, destination_scheme ) # Merge the proxy headers. Only done when not using HTTP CONNECT. We # have to copy the headers dict so we can safely change it without those # changes being reflected in anyone else's copy. if not http_tunnel_required: headers = headers.copy() headers.update(self.proxy_headers) # Must keep the exception bound to a separate variable or else Python 3 # complains about UnboundLocalError. err = None # Keep track of whether we cleanly exited the except block. This # ensures we do proper cleanup in finally. clean_exit = False # Rewind body position, if needed. Record current position # for future rewinds in the event of a redirect/retry. body_pos = set_file_position(body, body_pos) try: # Request a connection from the queue. timeout_obj = self._get_timeout(timeout) conn = self._get_conn(timeout=pool_timeout) conn.timeout = timeout_obj.connect_timeout is_new_proxy_conn = self.proxy is not None and not getattr( conn, "sock", None ) if is_new_proxy_conn and http_tunnel_required: self._prepare_proxy(conn) # Make the request on the httplib connection object. > httplib_response = self._make_request( conn, method, url, timeout=timeout_obj, body=body, headers=headers, chunked=chunked, ) /usr/lib/python3.13/site-packages/urllib3/connectionpool.py:715: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/urllib3/connectionpool.py:416: in _make_request conn.request(method, url, **httplib_request_kw) /usr/lib/python3.13/site-packages/urllib3/connection.py:244: in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) /usr/lib64/python3.13/http/client.py:1336: in request self._send_request(method, url, body, headers, encode_chunked) /usr/lib64/python3.13/http/client.py:1382: in _send_request self.endheaders(body, encode_chunked=encode_chunked) /usr/lib64/python3.13/http/client.py:1331: in endheaders self._send_output(message_body, encode_chunked=encode_chunked) /usr/lib64/python3.13/http/client.py:1091: in _send_output self.send(msg) /usr/lib64/python3.13/http/client.py:1035: in send self.connect() /usr/lib/python3.13/site-packages/urllib3/connection.py:205: in connect conn = self._new_conn() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _new_conn(self): """Establish a socket connection and set nodelay settings on it. :return: New socket connection. """ extra_kw = {} if self.source_address: extra_kw["source_address"] = self.source_address if self.socket_options: extra_kw["socket_options"] = self.socket_options try: conn = connection.create_connection( (self._dns_host, self.port), self.timeout, **extra_kw ) except SocketTimeout: raise ConnectTimeoutError( self, "Connection to %s timed out. (connect timeout=%s)" % (self.host, self.timeout), ) except SocketError as e: > raise NewConnectionError( self, "Failed to establish a new connection: %s" % e ) E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused /usr/lib/python3.13/site-packages/urllib3/connection.py:186: NewConnectionError During handling of the above exception, another exception occurred: self = request = , stream = False timeout = Timeout(connect=None, read=None, total=None), verify = True cert = None, proxies = OrderedDict() def send( self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None ): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest ` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) ` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection_with_tls_context( request, verify, proxies=proxies, cert=cert ) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers( request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies, ) chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError: raise ValueError( f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " f"or a single float to set both timeouts to the same value." ) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: > resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout, chunked=chunked, ) /usr/lib/python3.13/site-packages/requests/adapters.py:667: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/urllib3/connectionpool.py:801: in urlopen retries = retries.increment( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Retry(total=0, connect=None, read=False, redirect=None, status=None) method = 'POST', url = '/cgi-bin/upload.cgi', response = None error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') _pool = _stacktrace = def increment( self, method=None, url=None, response=None, error=None, _pool=None, _stacktrace=None, ): """Return a new Retry object with incremented retry counters. :param response: A response object, or None, if the server did not return a response. :type response: :class:`~urllib3.response.HTTPResponse` :param Exception error: An error encountered during the request, or None if the response was received successfully. :return: A new ``Retry`` object. """ if self.total is False and error: # Disabled, indicate to re-raise the error. raise six.reraise(type(error), error, _stacktrace) total = self.total if total is not None: total -= 1 connect = self.connect read = self.read redirect = self.redirect status_count = self.status other = self.other cause = "unknown" status = None redirect_location = None if error and self._is_connection_error(error): # Connect retry? if connect is False: raise six.reraise(type(error), error, _stacktrace) elif connect is not None: connect -= 1 elif error and self._is_read_error(error): # Read retry? if read is False or not self._is_method_retryable(method): raise six.reraise(type(error), error, _stacktrace) elif read is not None: read -= 1 elif error: # Other retry? if other is not None: other -= 1 elif response and response.get_redirect_location(): # Redirect retry? if redirect is not None: redirect -= 1 cause = "too many redirects" redirect_location = response.get_redirect_location() status = response.status else: # Incrementing because of a server error like a 500 in # status_forcelist and the given method is in the allowed_methods cause = ResponseError.GENERIC_ERROR if response and response.status: if status_count is not None: status_count -= 1 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) status = response.status history = self.history + ( RequestHistory(method, url, error, status, redirect_location), ) new_retry = self.new( total=total, connect=connect, read=read, redirect=redirect, status=status_count, other=other, history=history, ) if new_retry.is_exhausted(): > raise MaxRetryError(_pool, url, error or ResponseError(cause)) E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8888): Max retries exceeded with url: /cgi-bin/upload.cgi (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) /usr/lib/python3.13/site-packages/urllib3/util/retry.py:594: MaxRetryError During handling of the above exception, another exception occurred: a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:213: in test_upload_file_bad_checksum resp = self.upload(module, hash='ABC', filepath=test_file) tests/test_upload_script.py:159: in upload response = requests.post(self.url, data=args, files=files) /usr/lib/python3.13/site-packages/requests/api.py:115: in post return request("post", url, data=data, json=json, **kwargs) /usr/lib/python3.13/site-packages/requests/api.py:59: in request return session.request(method=method, url=url, **kwargs) /usr/lib/python3.13/site-packages/requests/sessions.py:589: in request resp = self.send(prep, **send_kwargs) /usr/lib/python3.13/site-packages/requests/sessions.py:703: in send r = adapter.send(request, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = , stream = False timeout = Timeout(connect=None, read=None, total=None), verify = True cert = None, proxies = OrderedDict() def send( self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None ): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest ` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) ` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection_with_tls_context( request, verify, proxies=proxies, cert=cert ) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers( request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies, ) chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError: raise ValueError( f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " f"or a single float to set both timeouts to the same value." ) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout, chunked=chunked, ) except (ProtocolError, OSError) as err: raise ConnectionError(err, request=request) except MaxRetryError as e: if isinstance(e.reason, ConnectTimeoutError): # TODO: Remove this in 3.0.0: see #2811 if not isinstance(e.reason, NewConnectionError): raise ConnectTimeout(e, request=request) if isinstance(e.reason, ResponseError): raise RetryError(e, request=request) if isinstance(e.reason, _ProxyError): raise ProxyError(e, request=request) if isinstance(e.reason, _SSLError): # This branch is for urllib3 v1.22 and later. raise SSLError(e, request=request) > raise ConnectionError(e, request=request) E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8888): Max retries exceeded with url: /cgi-bin/upload.cgi (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) /usr/lib/python3.13/site-packages/requests/adapters.py:700: ConnectionError ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmpfl8aff_9/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpfl8aff_9/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpfl8aff_9/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpfl8aff_9/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpfl8aff_9/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpfl8aff_9/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpfl8aff_9/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpfl8aff_9/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpfl8aff_9/srv/git/apbs/pkg.git/.keep Creating /tmp/tmpfl8aff_9/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmpfl8aff_9/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpfl8aff_9/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpfl8aff_9/srv/git/rpms/old.git/.keep Creating /tmp/tmpfl8aff_9/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpfl8aff_9/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpfl8aff_9/srv/git/rpms/old.git/.keep Creating /tmp/tmpfl8aff_9/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpfl8aff_9/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpfl8aff_9/srv/git/apbs/old.git/.keep Creating /tmp/tmpfl8aff_9/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmpfl8aff_9/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpfl8aff_9/hello.txt _____________ UploadTest.test_upload_file_bad_checksum_2_apbs_pkg ______________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:214: in test_upload_file_bad_checksum self.assertEqual(resp, 'MD5 check failed. Received %s instead of ABC.\n' % HASH) E AssertionError: '' != 'MD5 check failed. Received 2e54144ba487ae25d03a3caba233da71 instead of ABC.\n' E + MD5 check failed. Received 2e54144ba487ae25d03a3caba233da71 instead of ABC. ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmp8tn7dfc3/srv/git/rpms/pkg.git/.keep Creating /tmp/tmp8tn7dfc3/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmp8tn7dfc3/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp8tn7dfc3/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp8tn7dfc3/srv/git/rpms/pkg.git/.keep Creating /tmp/tmp8tn7dfc3/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmp8tn7dfc3/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp8tn7dfc3/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp8tn7dfc3/srv/git/apbs/pkg.git/.keep Creating /tmp/tmp8tn7dfc3/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmp8tn7dfc3/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp8tn7dfc3/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp8tn7dfc3/srv/git/rpms/old.git/.keep Creating /tmp/tmp8tn7dfc3/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmp8tn7dfc3/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp8tn7dfc3/srv/git/rpms/old.git/.keep Creating /tmp/tmp8tn7dfc3/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmp8tn7dfc3/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp8tn7dfc3/srv/git/apbs/old.git/.keep Creating /tmp/tmp8tn7dfc3/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmp8tn7dfc3/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp8tn7dfc3/hello.txt b'127.0.0.1 - - [01/Jul/2024 17:04:25] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmp8tn7dfc3/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:25] CGI script exit code 1\n' __________________ UploadTest.test_upload_invalid_mtime_0_pkg __________________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:261: in test_upload_invalid_mtime self.assertEqual(resp, 'Invalid value sent for mtime "abc". Aborting.\n') E AssertionError: '' != 'Invalid value sent for mtime "abc". Aborting.\n' E + Invalid value sent for mtime "abc". Aborting. ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmp7lp5wvqy/srv/git/rpms/pkg.git/.keep Creating /tmp/tmp7lp5wvqy/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmp7lp5wvqy/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp7lp5wvqy/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp7lp5wvqy/srv/git/rpms/pkg.git/.keep Creating /tmp/tmp7lp5wvqy/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmp7lp5wvqy/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp7lp5wvqy/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp7lp5wvqy/srv/git/apbs/pkg.git/.keep Creating /tmp/tmp7lp5wvqy/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmp7lp5wvqy/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp7lp5wvqy/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp7lp5wvqy/srv/git/rpms/old.git/.keep Creating /tmp/tmp7lp5wvqy/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmp7lp5wvqy/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp7lp5wvqy/srv/git/rpms/old.git/.keep Creating /tmp/tmp7lp5wvqy/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmp7lp5wvqy/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp7lp5wvqy/srv/git/apbs/old.git/.keep Creating /tmp/tmp7lp5wvqy/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmp7lp5wvqy/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp7lp5wvqy/new.txt b'127.0.0.1 - - [01/Jul/2024 17:04:25] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmp7lp5wvqy/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:25] CGI script exit code 1\n' _______________ UploadTest.test_upload_invalid_mtime_1_rpms_pkg ________________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:261: in test_upload_invalid_mtime self.assertEqual(resp, 'Invalid value sent for mtime "abc". Aborting.\n') E AssertionError: '' != 'Invalid value sent for mtime "abc". Aborting.\n' E + Invalid value sent for mtime "abc". Aborting. ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmp47txl7k7/srv/git/rpms/pkg.git/.keep Creating /tmp/tmp47txl7k7/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmp47txl7k7/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp47txl7k7/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp47txl7k7/srv/git/rpms/pkg.git/.keep Creating /tmp/tmp47txl7k7/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmp47txl7k7/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp47txl7k7/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp47txl7k7/srv/git/apbs/pkg.git/.keep Creating /tmp/tmp47txl7k7/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmp47txl7k7/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp47txl7k7/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp47txl7k7/srv/git/rpms/old.git/.keep Creating /tmp/tmp47txl7k7/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmp47txl7k7/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp47txl7k7/srv/git/rpms/old.git/.keep Creating /tmp/tmp47txl7k7/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmp47txl7k7/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp47txl7k7/srv/git/apbs/old.git/.keep Creating /tmp/tmp47txl7k7/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmp47txl7k7/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp47txl7k7/new.txt b'127.0.0.1 - - [01/Jul/2024 17:04:25] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmp47txl7k7/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:25] CGI script exit code 1\n' _______________ UploadTest.test_upload_invalid_mtime_2_apbs_pkg ________________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:261: in test_upload_invalid_mtime self.assertEqual(resp, 'Invalid value sent for mtime "abc". Aborting.\n') E AssertionError: '' != 'Invalid value sent for mtime "abc". Aborting.\n' E + Invalid value sent for mtime "abc". Aborting. ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmpc2h4xx3b/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpc2h4xx3b/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpc2h4xx3b/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpc2h4xx3b/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpc2h4xx3b/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpc2h4xx3b/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpc2h4xx3b/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpc2h4xx3b/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpc2h4xx3b/srv/git/apbs/pkg.git/.keep Creating /tmp/tmpc2h4xx3b/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmpc2h4xx3b/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpc2h4xx3b/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpc2h4xx3b/srv/git/rpms/old.git/.keep Creating /tmp/tmpc2h4xx3b/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpc2h4xx3b/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpc2h4xx3b/srv/git/rpms/old.git/.keep Creating /tmp/tmpc2h4xx3b/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpc2h4xx3b/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpc2h4xx3b/srv/git/apbs/old.git/.keep Creating /tmp/tmpc2h4xx3b/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmpc2h4xx3b/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpc2h4xx3b/new.txt b'127.0.0.1 - - [01/Jul/2024 17:04:25] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmpc2h4xx3b/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:25] CGI script exit code 1\n' ______________________ UploadTest.test_upload_mtime_0_pkg ______________________ self = def _new_conn(self): """Establish a socket connection and set nodelay settings on it. :return: New socket connection. """ extra_kw = {} if self.source_address: extra_kw["source_address"] = self.source_address if self.socket_options: extra_kw["socket_options"] = self.socket_options try: > conn = connection.create_connection( (self._dns_host, self.port), self.timeout, **extra_kw ) /usr/lib/python3.13/site-packages/urllib3/connection.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/urllib3/util/connection.py:95: in create_connection raise err _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ address = ('localhost', 8888), timeout = None, source_address = None socket_options = [(6, 1, 1)] def create_connection( address, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, source_address=None, socket_options=None, ): """Connect to *address* and return the socket object. Convenience function. Connect to *address* (a 2-tuple ``(host, port)``) and return the socket object. Passing the optional *timeout* parameter will set the timeout on the socket instance before attempting to connect. If no *timeout* is supplied, the global default timeout setting returned by :func:`socket.getdefaulttimeout` is used. If *source_address* is set it must be a tuple of (host, port) for the socket to bind as a source address before making the connection. An host of '' or port 0 tells the OS to use the default. """ host, port = address if host.startswith("["): host = host.strip("[]") err = None # Using the value from allowed_gai_family() in the context of getaddrinfo lets # us select whether to work with IPv4 DNS records, IPv6 records, or both. # The original create_connection function always returns all records. family = allowed_gai_family() try: host.encode("idna") except UnicodeError: return six.raise_from( LocationParseError(u"'%s', label empty or too long" % host), None ) for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): af, socktype, proto, canonname, sa = res sock = None try: sock = socket.socket(af, socktype, proto) # If provided, set socket level options before connecting. _set_socket_options(sock, socket_options) if timeout is not socket._GLOBAL_DEFAULT_TIMEOUT: sock.settimeout(timeout) if source_address: sock.bind(source_address) > sock.connect(sa) E ConnectionRefusedError: [Errno 111] Connection refused /usr/lib/python3.13/site-packages/urllib3/util/connection.py:85: ConnectionRefusedError During handling of the above exception, another exception occurred: self = method = 'POST', url = '/cgi-bin/upload.cgi' body = b'--e5c8d202bd1d51509fd21fb437354985\r\nContent-Disposition: form-data; name="name"\r\n\r\npkg\r\n--e5c8d202bd1d51509f...ent-Disposition: form-data; name="file"; filename="new.txt"\r\n\r\nnew.txt\r\n--e5c8d202bd1d51509fd21fb437354985--\r\n' headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Content-Length': '447', 'Content-Type': 'multipart/form-data; boundary=e5c8d202bd1d51509fd21fb437354985'} retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) redirect = False, assert_same_host = False timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None release_conn = False, chunked = False, body_pos = None response_kw = {'decode_content': False, 'preload_content': False} parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/cgi-bin/upload.cgi', query=None, fragment=None) destination_scheme = None, conn = None, release_this_conn = True http_tunnel_required = False, err = None, clean_exit = False def urlopen( self, method, url, body=None, headers=None, retries=None, redirect=True, assert_same_host=True, timeout=_Default, pool_timeout=None, release_conn=None, chunked=False, body_pos=None, **response_kw ): """ Get a connection from the pool and perform an HTTP request. This is the lowest level call for making a request, so you'll need to specify all the raw details. .. note:: More commonly, it's appropriate to use a convenience method provided by :class:`.RequestMethods`, such as :meth:`request`. .. note:: `release_conn` will only behave as expected if `preload_content=False` because we want to make `preload_content=False` the default behaviour someday soon without breaking backwards compatibility. :param method: HTTP request method (such as GET, POST, PUT, etc.) :param url: The URL to perform the request on. :param body: Data to send in the request body, either :class:`str`, :class:`bytes`, an iterable of :class:`str`/:class:`bytes`, or a file-like object. :param headers: Dictionary of custom headers to send, such as User-Agent, If-None-Match, etc. If None, pool headers are used. If provided, these headers completely replace any pool-specific headers. :param retries: Configure the number of retries to allow before raising a :class:`~urllib3.exceptions.MaxRetryError` exception. Pass ``None`` to retry until you receive a response. Pass a :class:`~urllib3.util.retry.Retry` object for fine-grained control over different types of retries. Pass an integer number to retry connection errors that many times, but no other types of errors. Pass zero to never retry. If ``False``, then retries are disabled and any exception is raised immediately. Also, instead of raising a MaxRetryError on redirects, the redirect response will be returned. :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. :param redirect: If True, automatically handle redirects (status codes 301, 302, 303, 307, 308). Each redirect counts as a retry. Disabling retries will disable redirect, too. :param assert_same_host: If ``True``, will make sure that the host of the pool requests is consistent else will raise HostChangedError. When ``False``, you can use the pool on an HTTP proxy and request foreign hosts. :param timeout: If specified, overrides the default timeout for this one request. It may be a float (in seconds) or an instance of :class:`urllib3.util.Timeout`. :param pool_timeout: If set and the pool is set to block=True, then this method will block for ``pool_timeout`` seconds and raise EmptyPoolError if no connection is available within the time period. :param release_conn: If False, then the urlopen call will not release the connection back into the pool once a response is received (but will release if you read the entire contents of the response such as when `preload_content=True`). This is useful if you're not preloading the response's content immediately. You will need to call ``r.release_conn()`` on the response ``r`` to return the connection back into the pool. If None, it takes the value of ``response_kw.get('preload_content', True)``. :param chunked: If True, urllib3 will send the body using chunked transfer encoding. Otherwise, urllib3 will send the body using the standard content-length form. Defaults to False. :param int body_pos: Position to seek to in file-like body in the event of a retry or redirect. Typically this won't need to be set because urllib3 will auto-populate the value when needed. :param \\**response_kw: Additional parameters are passed to :meth:`urllib3.response.HTTPResponse.from_httplib` """ parsed_url = parse_url(url) destination_scheme = parsed_url.scheme if headers is None: headers = self.headers if not isinstance(retries, Retry): retries = Retry.from_int(retries, redirect=redirect, default=self.retries) if release_conn is None: release_conn = response_kw.get("preload_content", True) # Check host if assert_same_host and not self.is_same_host(url): raise HostChangedError(self, url, retries) # Ensure that the URL we're connecting to is properly encoded if url.startswith("/"): url = six.ensure_str(_encode_target(url)) else: url = six.ensure_str(parsed_url.url) conn = None # Track whether `conn` needs to be released before # returning/raising/recursing. Update this variable if necessary, and # leave `release_conn` constant throughout the function. That way, if # the function recurses, the original value of `release_conn` will be # passed down into the recursive call, and its value will be respected. # # See issue #651 [1] for details. # # [1] release_this_conn = release_conn http_tunnel_required = connection_requires_http_tunnel( self.proxy, self.proxy_config, destination_scheme ) # Merge the proxy headers. Only done when not using HTTP CONNECT. We # have to copy the headers dict so we can safely change it without those # changes being reflected in anyone else's copy. if not http_tunnel_required: headers = headers.copy() headers.update(self.proxy_headers) # Must keep the exception bound to a separate variable or else Python 3 # complains about UnboundLocalError. err = None # Keep track of whether we cleanly exited the except block. This # ensures we do proper cleanup in finally. clean_exit = False # Rewind body position, if needed. Record current position # for future rewinds in the event of a redirect/retry. body_pos = set_file_position(body, body_pos) try: # Request a connection from the queue. timeout_obj = self._get_timeout(timeout) conn = self._get_conn(timeout=pool_timeout) conn.timeout = timeout_obj.connect_timeout is_new_proxy_conn = self.proxy is not None and not getattr( conn, "sock", None ) if is_new_proxy_conn and http_tunnel_required: self._prepare_proxy(conn) # Make the request on the httplib connection object. > httplib_response = self._make_request( conn, method, url, timeout=timeout_obj, body=body, headers=headers, chunked=chunked, ) /usr/lib/python3.13/site-packages/urllib3/connectionpool.py:715: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/urllib3/connectionpool.py:416: in _make_request conn.request(method, url, **httplib_request_kw) /usr/lib/python3.13/site-packages/urllib3/connection.py:244: in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) /usr/lib64/python3.13/http/client.py:1336: in request self._send_request(method, url, body, headers, encode_chunked) /usr/lib64/python3.13/http/client.py:1382: in _send_request self.endheaders(body, encode_chunked=encode_chunked) /usr/lib64/python3.13/http/client.py:1331: in endheaders self._send_output(message_body, encode_chunked=encode_chunked) /usr/lib64/python3.13/http/client.py:1091: in _send_output self.send(msg) /usr/lib64/python3.13/http/client.py:1035: in send self.connect() /usr/lib/python3.13/site-packages/urllib3/connection.py:205: in connect conn = self._new_conn() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _new_conn(self): """Establish a socket connection and set nodelay settings on it. :return: New socket connection. """ extra_kw = {} if self.source_address: extra_kw["source_address"] = self.source_address if self.socket_options: extra_kw["socket_options"] = self.socket_options try: conn = connection.create_connection( (self._dns_host, self.port), self.timeout, **extra_kw ) except SocketTimeout: raise ConnectTimeoutError( self, "Connection to %s timed out. (connect timeout=%s)" % (self.host, self.timeout), ) except SocketError as e: > raise NewConnectionError( self, "Failed to establish a new connection: %s" % e ) E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused /usr/lib/python3.13/site-packages/urllib3/connection.py:186: NewConnectionError During handling of the above exception, another exception occurred: self = request = , stream = False timeout = Timeout(connect=None, read=None, total=None), verify = True cert = None, proxies = OrderedDict() def send( self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None ): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest ` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) ` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection_with_tls_context( request, verify, proxies=proxies, cert=cert ) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers( request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies, ) chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError: raise ValueError( f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " f"or a single float to set both timeouts to the same value." ) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: > resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout, chunked=chunked, ) /usr/lib/python3.13/site-packages/requests/adapters.py:667: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/urllib3/connectionpool.py:801: in urlopen retries = retries.increment( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Retry(total=0, connect=None, read=False, redirect=None, status=None) method = 'POST', url = '/cgi-bin/upload.cgi', response = None error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') _pool = _stacktrace = def increment( self, method=None, url=None, response=None, error=None, _pool=None, _stacktrace=None, ): """Return a new Retry object with incremented retry counters. :param response: A response object, or None, if the server did not return a response. :type response: :class:`~urllib3.response.HTTPResponse` :param Exception error: An error encountered during the request, or None if the response was received successfully. :return: A new ``Retry`` object. """ if self.total is False and error: # Disabled, indicate to re-raise the error. raise six.reraise(type(error), error, _stacktrace) total = self.total if total is not None: total -= 1 connect = self.connect read = self.read redirect = self.redirect status_count = self.status other = self.other cause = "unknown" status = None redirect_location = None if error and self._is_connection_error(error): # Connect retry? if connect is False: raise six.reraise(type(error), error, _stacktrace) elif connect is not None: connect -= 1 elif error and self._is_read_error(error): # Read retry? if read is False or not self._is_method_retryable(method): raise six.reraise(type(error), error, _stacktrace) elif read is not None: read -= 1 elif error: # Other retry? if other is not None: other -= 1 elif response and response.get_redirect_location(): # Redirect retry? if redirect is not None: redirect -= 1 cause = "too many redirects" redirect_location = response.get_redirect_location() status = response.status else: # Incrementing because of a server error like a 500 in # status_forcelist and the given method is in the allowed_methods cause = ResponseError.GENERIC_ERROR if response and response.status: if status_count is not None: status_count -= 1 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) status = response.status history = self.history + ( RequestHistory(method, url, error, status, redirect_location), ) new_retry = self.new( total=total, connect=connect, read=read, redirect=redirect, status=status_count, other=other, history=history, ) if new_retry.is_exhausted(): > raise MaxRetryError(_pool, url, error or ResponseError(cause)) E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8888): Max retries exceeded with url: /cgi-bin/upload.cgi (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) /usr/lib/python3.13/site-packages/urllib3/util/retry.py:594: MaxRetryError During handling of the above exception, another exception occurred: a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:254: in test_upload_mtime resp = self.upload(module, hash=NEW_HASH, filepath=test_file, mtime="1234") tests/test_upload_script.py:159: in upload response = requests.post(self.url, data=args, files=files) /usr/lib/python3.13/site-packages/requests/api.py:115: in post return request("post", url, data=data, json=json, **kwargs) /usr/lib/python3.13/site-packages/requests/api.py:59: in request return session.request(method=method, url=url, **kwargs) /usr/lib/python3.13/site-packages/requests/sessions.py:589: in request resp = self.send(prep, **send_kwargs) /usr/lib/python3.13/site-packages/requests/sessions.py:703: in send r = adapter.send(request, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = , stream = False timeout = Timeout(connect=None, read=None, total=None), verify = True cert = None, proxies = OrderedDict() def send( self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None ): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest ` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) ` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection_with_tls_context( request, verify, proxies=proxies, cert=cert ) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers( request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies, ) chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError: raise ValueError( f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " f"or a single float to set both timeouts to the same value." ) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout, chunked=chunked, ) except (ProtocolError, OSError) as err: raise ConnectionError(err, request=request) except MaxRetryError as e: if isinstance(e.reason, ConnectTimeoutError): # TODO: Remove this in 3.0.0: see #2811 if not isinstance(e.reason, NewConnectionError): raise ConnectTimeout(e, request=request) if isinstance(e.reason, ResponseError): raise RetryError(e, request=request) if isinstance(e.reason, _ProxyError): raise ProxyError(e, request=request) if isinstance(e.reason, _SSLError): # This branch is for urllib3 v1.22 and later. raise SSLError(e, request=request) > raise ConnectionError(e, request=request) E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8888): Max retries exceeded with url: /cgi-bin/upload.cgi (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) /usr/lib/python3.13/site-packages/requests/adapters.py:700: ConnectionError ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmp2of5_07a/srv/git/rpms/pkg.git/.keep Creating /tmp/tmp2of5_07a/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmp2of5_07a/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp2of5_07a/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp2of5_07a/srv/git/rpms/pkg.git/.keep Creating /tmp/tmp2of5_07a/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmp2of5_07a/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp2of5_07a/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp2of5_07a/srv/git/apbs/pkg.git/.keep Creating /tmp/tmp2of5_07a/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmp2of5_07a/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp2of5_07a/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp2of5_07a/srv/git/rpms/old.git/.keep Creating /tmp/tmp2of5_07a/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmp2of5_07a/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp2of5_07a/srv/git/rpms/old.git/.keep Creating /tmp/tmp2of5_07a/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmp2of5_07a/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp2of5_07a/srv/git/apbs/old.git/.keep Creating /tmp/tmp2of5_07a/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmp2of5_07a/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp2of5_07a/new.txt ___________________ UploadTest.test_upload_mtime_1_rpms_pkg ____________________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:255: in test_upload_mtime self.assertFileExists(ns_module, 'new.txt', NEW_HASH, mtime=1234) tests/test_upload_script.py:183: in assertFileExists self.assertTrue(os.path.exists(path), '%s should exist' % path) E AssertionError: False is not true : /tmp/tmp4kridcyg/srv/cache/lookaside/rpms/pkg/new.txt/fce67ea4590d3b789fff55a37271f29f/new.txt should exist ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmp4kridcyg/srv/git/rpms/pkg.git/.keep Creating /tmp/tmp4kridcyg/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmp4kridcyg/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp4kridcyg/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp4kridcyg/srv/git/rpms/pkg.git/.keep Creating /tmp/tmp4kridcyg/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmp4kridcyg/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp4kridcyg/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp4kridcyg/srv/git/apbs/pkg.git/.keep Creating /tmp/tmp4kridcyg/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmp4kridcyg/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp4kridcyg/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp4kridcyg/srv/git/rpms/old.git/.keep Creating /tmp/tmp4kridcyg/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmp4kridcyg/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp4kridcyg/srv/git/rpms/old.git/.keep Creating /tmp/tmp4kridcyg/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmp4kridcyg/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp4kridcyg/srv/git/apbs/old.git/.keep Creating /tmp/tmp4kridcyg/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmp4kridcyg/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp4kridcyg/new.txt b'127.0.0.1 - - [01/Jul/2024 17:04:26] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmp4kridcyg/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:26] CGI script exit code 1\n' ___________________ UploadTest.test_upload_mtime_2_apbs_pkg ____________________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:255: in test_upload_mtime self.assertFileExists(ns_module, 'new.txt', NEW_HASH, mtime=1234) tests/test_upload_script.py:183: in assertFileExists self.assertTrue(os.path.exists(path), '%s should exist' % path) E AssertionError: False is not true : /tmp/tmpsg4ory6i/srv/cache/lookaside/apbs/pkg/new.txt/fce67ea4590d3b789fff55a37271f29f/new.txt should exist ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmpsg4ory6i/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpsg4ory6i/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpsg4ory6i/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpsg4ory6i/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpsg4ory6i/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpsg4ory6i/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpsg4ory6i/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpsg4ory6i/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpsg4ory6i/srv/git/apbs/pkg.git/.keep Creating /tmp/tmpsg4ory6i/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmpsg4ory6i/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpsg4ory6i/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpsg4ory6i/srv/git/rpms/old.git/.keep Creating /tmp/tmpsg4ory6i/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpsg4ory6i/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpsg4ory6i/srv/git/rpms/old.git/.keep Creating /tmp/tmpsg4ory6i/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpsg4ory6i/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpsg4ory6i/srv/git/apbs/old.git/.keep Creating /tmp/tmpsg4ory6i/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmpsg4ory6i/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpsg4ory6i/new.txt b'127.0.0.1 - - [01/Jul/2024 17:04:26] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmpsg4ory6i/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:26] CGI script exit code 1\n' _____________ UploadTest.test_upload_to_non_existing_module_0_bad ______________ self = def _new_conn(self): """Establish a socket connection and set nodelay settings on it. :return: New socket connection. """ extra_kw = {} if self.source_address: extra_kw["source_address"] = self.source_address if self.socket_options: extra_kw["socket_options"] = self.socket_options try: > conn = connection.create_connection( (self._dns_host, self.port), self.timeout, **extra_kw ) /usr/lib/python3.13/site-packages/urllib3/connection.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/urllib3/util/connection.py:95: in create_connection raise err _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ address = ('localhost', 8888), timeout = None, source_address = None socket_options = [(6, 1, 1)] def create_connection( address, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, source_address=None, socket_options=None, ): """Connect to *address* and return the socket object. Convenience function. Connect to *address* (a 2-tuple ``(host, port)``) and return the socket object. Passing the optional *timeout* parameter will set the timeout on the socket instance before attempting to connect. If no *timeout* is supplied, the global default timeout setting returned by :func:`socket.getdefaulttimeout` is used. If *source_address* is set it must be a tuple of (host, port) for the socket to bind as a source address before making the connection. An host of '' or port 0 tells the OS to use the default. """ host, port = address if host.startswith("["): host = host.strip("[]") err = None # Using the value from allowed_gai_family() in the context of getaddrinfo lets # us select whether to work with IPv4 DNS records, IPv6 records, or both. # The original create_connection function always returns all records. family = allowed_gai_family() try: host.encode("idna") except UnicodeError: return six.raise_from( LocationParseError(u"'%s', label empty or too long" % host), None ) for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): af, socktype, proto, canonname, sa = res sock = None try: sock = socket.socket(af, socktype, proto) # If provided, set socket level options before connecting. _set_socket_options(sock, socket_options) if timeout is not socket._GLOBAL_DEFAULT_TIMEOUT: sock.settimeout(timeout) if source_address: sock.bind(source_address) > sock.connect(sa) E ConnectionRefusedError: [Errno 111] Connection refused /usr/lib/python3.13/site-packages/urllib3/util/connection.py:85: ConnectionRefusedError During handling of the above exception, another exception occurred: self = method = 'POST', url = '/cgi-bin/upload.cgi' body = b'--d038a2254f64b41320c6ce85d049d61b\r\nContent-Disposition: form-data; name="name"\r\n\r\nbad\r\n--d038a2254f64b41320...Disposition: form-data; name="file"; filename="hello.txt"\r\n\r\nhello.txt\r\n--d038a2254f64b41320c6ce85d049d61b--\r\n' headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Content-Length': '361', 'Content-Type': 'multipart/form-data; boundary=d038a2254f64b41320c6ce85d049d61b'} retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) redirect = False, assert_same_host = False timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None release_conn = False, chunked = False, body_pos = None response_kw = {'decode_content': False, 'preload_content': False} parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/cgi-bin/upload.cgi', query=None, fragment=None) destination_scheme = None, conn = None, release_this_conn = True http_tunnel_required = False, err = None, clean_exit = False def urlopen( self, method, url, body=None, headers=None, retries=None, redirect=True, assert_same_host=True, timeout=_Default, pool_timeout=None, release_conn=None, chunked=False, body_pos=None, **response_kw ): """ Get a connection from the pool and perform an HTTP request. This is the lowest level call for making a request, so you'll need to specify all the raw details. .. note:: More commonly, it's appropriate to use a convenience method provided by :class:`.RequestMethods`, such as :meth:`request`. .. note:: `release_conn` will only behave as expected if `preload_content=False` because we want to make `preload_content=False` the default behaviour someday soon without breaking backwards compatibility. :param method: HTTP request method (such as GET, POST, PUT, etc.) :param url: The URL to perform the request on. :param body: Data to send in the request body, either :class:`str`, :class:`bytes`, an iterable of :class:`str`/:class:`bytes`, or a file-like object. :param headers: Dictionary of custom headers to send, such as User-Agent, If-None-Match, etc. If None, pool headers are used. If provided, these headers completely replace any pool-specific headers. :param retries: Configure the number of retries to allow before raising a :class:`~urllib3.exceptions.MaxRetryError` exception. Pass ``None`` to retry until you receive a response. Pass a :class:`~urllib3.util.retry.Retry` object for fine-grained control over different types of retries. Pass an integer number to retry connection errors that many times, but no other types of errors. Pass zero to never retry. If ``False``, then retries are disabled and any exception is raised immediately. Also, instead of raising a MaxRetryError on redirects, the redirect response will be returned. :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. :param redirect: If True, automatically handle redirects (status codes 301, 302, 303, 307, 308). Each redirect counts as a retry. Disabling retries will disable redirect, too. :param assert_same_host: If ``True``, will make sure that the host of the pool requests is consistent else will raise HostChangedError. When ``False``, you can use the pool on an HTTP proxy and request foreign hosts. :param timeout: If specified, overrides the default timeout for this one request. It may be a float (in seconds) or an instance of :class:`urllib3.util.Timeout`. :param pool_timeout: If set and the pool is set to block=True, then this method will block for ``pool_timeout`` seconds and raise EmptyPoolError if no connection is available within the time period. :param release_conn: If False, then the urlopen call will not release the connection back into the pool once a response is received (but will release if you read the entire contents of the response such as when `preload_content=True`). This is useful if you're not preloading the response's content immediately. You will need to call ``r.release_conn()`` on the response ``r`` to return the connection back into the pool. If None, it takes the value of ``response_kw.get('preload_content', True)``. :param chunked: If True, urllib3 will send the body using chunked transfer encoding. Otherwise, urllib3 will send the body using the standard content-length form. Defaults to False. :param int body_pos: Position to seek to in file-like body in the event of a retry or redirect. Typically this won't need to be set because urllib3 will auto-populate the value when needed. :param \\**response_kw: Additional parameters are passed to :meth:`urllib3.response.HTTPResponse.from_httplib` """ parsed_url = parse_url(url) destination_scheme = parsed_url.scheme if headers is None: headers = self.headers if not isinstance(retries, Retry): retries = Retry.from_int(retries, redirect=redirect, default=self.retries) if release_conn is None: release_conn = response_kw.get("preload_content", True) # Check host if assert_same_host and not self.is_same_host(url): raise HostChangedError(self, url, retries) # Ensure that the URL we're connecting to is properly encoded if url.startswith("/"): url = six.ensure_str(_encode_target(url)) else: url = six.ensure_str(parsed_url.url) conn = None # Track whether `conn` needs to be released before # returning/raising/recursing. Update this variable if necessary, and # leave `release_conn` constant throughout the function. That way, if # the function recurses, the original value of `release_conn` will be # passed down into the recursive call, and its value will be respected. # # See issue #651 [1] for details. # # [1] release_this_conn = release_conn http_tunnel_required = connection_requires_http_tunnel( self.proxy, self.proxy_config, destination_scheme ) # Merge the proxy headers. Only done when not using HTTP CONNECT. We # have to copy the headers dict so we can safely change it without those # changes being reflected in anyone else's copy. if not http_tunnel_required: headers = headers.copy() headers.update(self.proxy_headers) # Must keep the exception bound to a separate variable or else Python 3 # complains about UnboundLocalError. err = None # Keep track of whether we cleanly exited the except block. This # ensures we do proper cleanup in finally. clean_exit = False # Rewind body position, if needed. Record current position # for future rewinds in the event of a redirect/retry. body_pos = set_file_position(body, body_pos) try: # Request a connection from the queue. timeout_obj = self._get_timeout(timeout) conn = self._get_conn(timeout=pool_timeout) conn.timeout = timeout_obj.connect_timeout is_new_proxy_conn = self.proxy is not None and not getattr( conn, "sock", None ) if is_new_proxy_conn and http_tunnel_required: self._prepare_proxy(conn) # Make the request on the httplib connection object. > httplib_response = self._make_request( conn, method, url, timeout=timeout_obj, body=body, headers=headers, chunked=chunked, ) /usr/lib/python3.13/site-packages/urllib3/connectionpool.py:715: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/urllib3/connectionpool.py:416: in _make_request conn.request(method, url, **httplib_request_kw) /usr/lib/python3.13/site-packages/urllib3/connection.py:244: in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) /usr/lib64/python3.13/http/client.py:1336: in request self._send_request(method, url, body, headers, encode_chunked) /usr/lib64/python3.13/http/client.py:1382: in _send_request self.endheaders(body, encode_chunked=encode_chunked) /usr/lib64/python3.13/http/client.py:1331: in endheaders self._send_output(message_body, encode_chunked=encode_chunked) /usr/lib64/python3.13/http/client.py:1091: in _send_output self.send(msg) /usr/lib64/python3.13/http/client.py:1035: in send self.connect() /usr/lib/python3.13/site-packages/urllib3/connection.py:205: in connect conn = self._new_conn() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _new_conn(self): """Establish a socket connection and set nodelay settings on it. :return: New socket connection. """ extra_kw = {} if self.source_address: extra_kw["source_address"] = self.source_address if self.socket_options: extra_kw["socket_options"] = self.socket_options try: conn = connection.create_connection( (self._dns_host, self.port), self.timeout, **extra_kw ) except SocketTimeout: raise ConnectTimeoutError( self, "Connection to %s timed out. (connect timeout=%s)" % (self.host, self.timeout), ) except SocketError as e: > raise NewConnectionError( self, "Failed to establish a new connection: %s" % e ) E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused /usr/lib/python3.13/site-packages/urllib3/connection.py:186: NewConnectionError During handling of the above exception, another exception occurred: self = request = , stream = False timeout = Timeout(connect=None, read=None, total=None), verify = True cert = None, proxies = OrderedDict() def send( self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None ): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest ` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) ` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection_with_tls_context( request, verify, proxies=proxies, cert=cert ) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers( request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies, ) chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError: raise ValueError( f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " f"or a single float to set both timeouts to the same value." ) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: > resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout, chunked=chunked, ) /usr/lib/python3.13/site-packages/requests/adapters.py:667: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/urllib3/connectionpool.py:801: in urlopen retries = retries.increment( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Retry(total=0, connect=None, read=False, redirect=None, status=None) method = 'POST', url = '/cgi-bin/upload.cgi', response = None error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') _pool = _stacktrace = def increment( self, method=None, url=None, response=None, error=None, _pool=None, _stacktrace=None, ): """Return a new Retry object with incremented retry counters. :param response: A response object, or None, if the server did not return a response. :type response: :class:`~urllib3.response.HTTPResponse` :param Exception error: An error encountered during the request, or None if the response was received successfully. :return: A new ``Retry`` object. """ if self.total is False and error: # Disabled, indicate to re-raise the error. raise six.reraise(type(error), error, _stacktrace) total = self.total if total is not None: total -= 1 connect = self.connect read = self.read redirect = self.redirect status_count = self.status other = self.other cause = "unknown" status = None redirect_location = None if error and self._is_connection_error(error): # Connect retry? if connect is False: raise six.reraise(type(error), error, _stacktrace) elif connect is not None: connect -= 1 elif error and self._is_read_error(error): # Read retry? if read is False or not self._is_method_retryable(method): raise six.reraise(type(error), error, _stacktrace) elif read is not None: read -= 1 elif error: # Other retry? if other is not None: other -= 1 elif response and response.get_redirect_location(): # Redirect retry? if redirect is not None: redirect -= 1 cause = "too many redirects" redirect_location = response.get_redirect_location() status = response.status else: # Incrementing because of a server error like a 500 in # status_forcelist and the given method is in the allowed_methods cause = ResponseError.GENERIC_ERROR if response and response.status: if status_count is not None: status_count -= 1 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) status = response.status history = self.history + ( RequestHistory(method, url, error, status, redirect_location), ) new_retry = self.new( total=total, connect=connect, read=read, redirect=redirect, status=status_count, other=other, history=history, ) if new_retry.is_exhausted(): > raise MaxRetryError(_pool, url, error or ResponseError(cause)) E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8888): Max retries exceeded with url: /cgi-bin/upload.cgi (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) /usr/lib/python3.13/site-packages/urllib3/util/retry.py:594: MaxRetryError During handling of the above exception, another exception occurred: a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:219: in test_upload_to_non_existing_module resp = self.upload(module, hash=HASH, filepath=test_file) tests/test_upload_script.py:159: in upload response = requests.post(self.url, data=args, files=files) /usr/lib/python3.13/site-packages/requests/api.py:115: in post return request("post", url, data=data, json=json, **kwargs) /usr/lib/python3.13/site-packages/requests/api.py:59: in request return session.request(method=method, url=url, **kwargs) /usr/lib/python3.13/site-packages/requests/sessions.py:589: in request resp = self.send(prep, **send_kwargs) /usr/lib/python3.13/site-packages/requests/sessions.py:703: in send r = adapter.send(request, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = , stream = False timeout = Timeout(connect=None, read=None, total=None), verify = True cert = None, proxies = OrderedDict() def send( self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None ): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest ` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) ` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection_with_tls_context( request, verify, proxies=proxies, cert=cert ) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers( request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies, ) chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError: raise ValueError( f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " f"or a single float to set both timeouts to the same value." ) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout, chunked=chunked, ) except (ProtocolError, OSError) as err: raise ConnectionError(err, request=request) except MaxRetryError as e: if isinstance(e.reason, ConnectTimeoutError): # TODO: Remove this in 3.0.0: see #2811 if not isinstance(e.reason, NewConnectionError): raise ConnectTimeout(e, request=request) if isinstance(e.reason, ResponseError): raise RetryError(e, request=request) if isinstance(e.reason, _ProxyError): raise ProxyError(e, request=request) if isinstance(e.reason, _SSLError): # This branch is for urllib3 v1.22 and later. raise SSLError(e, request=request) > raise ConnectionError(e, request=request) E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8888): Max retries exceeded with url: /cgi-bin/upload.cgi (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) /usr/lib/python3.13/site-packages/requests/adapters.py:700: ConnectionError ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmp2gh2ajhk/srv/git/rpms/pkg.git/.keep Creating /tmp/tmp2gh2ajhk/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmp2gh2ajhk/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp2gh2ajhk/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp2gh2ajhk/srv/git/rpms/pkg.git/.keep Creating /tmp/tmp2gh2ajhk/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmp2gh2ajhk/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp2gh2ajhk/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp2gh2ajhk/srv/git/apbs/pkg.git/.keep Creating /tmp/tmp2gh2ajhk/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmp2gh2ajhk/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp2gh2ajhk/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmp2gh2ajhk/srv/git/rpms/old.git/.keep Creating /tmp/tmp2gh2ajhk/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmp2gh2ajhk/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp2gh2ajhk/srv/git/rpms/old.git/.keep Creating /tmp/tmp2gh2ajhk/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmp2gh2ajhk/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp2gh2ajhk/srv/git/apbs/old.git/.keep Creating /tmp/tmp2gh2ajhk/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmp2gh2ajhk/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmp2gh2ajhk/hello.txt ___________ UploadTest.test_upload_to_non_existing_module_1_rpms_bad ___________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:220: in test_upload_to_non_existing_module self.assertEqual(resp, 'Module "%s" does not exist!\n' % ns_module) E AssertionError: '' != 'Module "rpms/bad" does not exist!\n' E + Module "rpms/bad" does not exist! ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmpvr37ad7o/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpvr37ad7o/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpvr37ad7o/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpvr37ad7o/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpvr37ad7o/srv/git/rpms/pkg.git/.keep Creating /tmp/tmpvr37ad7o/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmpvr37ad7o/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpvr37ad7o/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpvr37ad7o/srv/git/apbs/pkg.git/.keep Creating /tmp/tmpvr37ad7o/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmpvr37ad7o/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpvr37ad7o/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmpvr37ad7o/srv/git/rpms/old.git/.keep Creating /tmp/tmpvr37ad7o/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpvr37ad7o/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpvr37ad7o/srv/git/rpms/old.git/.keep Creating /tmp/tmpvr37ad7o/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmpvr37ad7o/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpvr37ad7o/srv/git/apbs/old.git/.keep Creating /tmp/tmpvr37ad7o/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmpvr37ad7o/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmpvr37ad7o/hello.txt b'127.0.0.1 - - [01/Jul/2024 17:04:27] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmpvr37ad7o/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:27] CGI script exit code 1\n' ___________ UploadTest.test_upload_to_non_existing_module_2_apbs_bad ___________ a = (,) kw = {} @wraps(func) def standalone_func(*a, **kw): > return func(*(a + p.args), **p.kwargs, **kw) /usr/lib/python3.13/site-packages/parameterized/parameterized.py:620: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_upload_script.py:220: in test_upload_to_non_existing_module self.assertEqual(resp, 'Module "%s" does not exist!\n' % ns_module) E AssertionError: '' != 'Module "apbs/bad" does not exist!\n' E + Module "apbs/bad" does not exist! ----------------------------- Captured stdout call ----------------------------- Creating /tmp/tmplo7k7jok/srv/git/rpms/pkg.git/.keep Creating /tmp/tmplo7k7jok/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmplo7k7jok/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmplo7k7jok/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmplo7k7jok/srv/git/rpms/pkg.git/.keep Creating /tmp/tmplo7k7jok/srv/cache/lookaside/rpms/pkg/.keep Creating /tmp/tmplo7k7jok/srv/cache/lookaside/rpms/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmplo7k7jok/srv/cache/lookaside/rpms/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmplo7k7jok/srv/git/apbs/pkg.git/.keep Creating /tmp/tmplo7k7jok/srv/cache/lookaside/apbs/pkg/.keep Creating /tmp/tmplo7k7jok/srv/cache/lookaside/apbs/pkg/hello.txt/md5/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmplo7k7jok/srv/cache/lookaside/apbs/pkg/hello.txt/sha512/acec329f80cc50edbab0dfbc2283d427ac673f84e6d8b949101791867b9b7771a53d2ffb1f8386189227beed4395b9a78171a1349700e2885c70ae14358d72ff/hello.txt Creating /tmp/tmplo7k7jok/srv/git/rpms/old.git/.keep Creating /tmp/tmplo7k7jok/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmplo7k7jok/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmplo7k7jok/srv/git/rpms/old.git/.keep Creating /tmp/tmplo7k7jok/srv/cache/lookaside/rpms/old/.keep Creating /tmp/tmplo7k7jok/srv/cache/lookaside/rpms/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmplo7k7jok/srv/git/apbs/old.git/.keep Creating /tmp/tmplo7k7jok/srv/cache/lookaside/apbs/old/.keep Creating /tmp/tmplo7k7jok/srv/cache/lookaside/apbs/old/hello.txt/2e54144ba487ae25d03a3caba233da71/hello.txt Creating /tmp/tmplo7k7jok/hello.txt b'127.0.0.1 - - [01/Jul/2024 17:04:27] "POST /cgi-bin/upload.cgi HTTP/1.1" 200 -\nTraceback (most recent call last):\n File "/tmp/tmplo7k7jok/cgi-bin/upload.cgi", line 9, in \n import cgi\nModuleNotFoundError: No module named \'cgi\'\n127.0.0.1 - - [01/Jul/2024 17:04:27] CGI script exit code 1\n' =========================== short test summary info ============================ FAILED tests/test_upload_script.py::UploadTest::test_accepts_sha_512_hash_0_pkg FAILED tests/test_upload_script.py::UploadTest::test_accepts_sha_512_hash_1_rpms_pkg FAILED tests/test_upload_script.py::UploadTest::test_accepts_sha_512_hash_2_apbs_pkg FAILED tests/test_upload_script.py::UploadTest::test_bad_sha512_hash_0_pkg - ... FAILED tests/test_upload_script.py::UploadTest::test_bad_sha512_hash_1_rpms_pkg FAILED tests/test_upload_script.py::UploadTest::test_bad_sha512_hash_2_apbs_pkg FAILED tests/test_upload_script.py::UploadTest::test_check_existing_file_0_pkg FAILED tests/test_upload_script.py::UploadTest::test_check_existing_file_1_rpms_pkg FAILED tests/test_upload_script.py::UploadTest::test_check_existing_file_2_apbs_pkg FAILED tests/test_upload_script.py::UploadTest::test_check_existing_file_3_old FAILED tests/test_upload_script.py::UploadTest::test_check_existing_file_4_rpms_old FAILED tests/test_upload_script.py::UploadTest::test_check_existing_file_5_apbs_old FAILED tests/test_upload_script.py::UploadTest::test_check_existing_file_with_bad_hash_0_pkg FAILED tests/test_upload_script.py::UploadTest::test_check_existing_file_with_bad_hash_1_rpms_pkg FAILED tests/test_upload_script.py::UploadTest::test_check_existing_file_with_bad_hash_2_apbs_pkg FAILED tests/test_upload_script.py::UploadTest::test_check_existing_sha512_correct_0_pkg FAILED tests/test_upload_script.py::UploadTest::test_check_existing_sha512_correct_1_rpms_pkg FAILED tests/test_upload_script.py::UploadTest::test_check_existing_sha512_correct_2_apbs_pkg FAILED tests/test_upload_script.py::UploadTest::test_check_existing_sha512_mismatch_0_pkg FAILED tests/test_upload_script.py::UploadTest::test_check_existing_sha512_mismatch_1_rpms_pkg FAILED tests/test_upload_script.py::UploadTest::test_check_existing_sha512_mismatch_2_apbs_pkg FAILED tests/test_upload_script.py::UploadTest::test_check_missing_file_0_pkg FAILED tests/test_upload_script.py::UploadTest::test_check_missing_file_1_rpms_pkg FAILED tests/test_upload_script.py::UploadTest::test_check_missing_file_2_apbs_pkg FAILED tests/test_upload_script.py::UploadTest::test_rejects_unknown_hash_0_pkg FAILED tests/test_upload_script.py::UploadTest::test_rejects_unknown_hash_1_rpms_pkg FAILED tests/test_upload_script.py::UploadTest::test_rejects_unknown_hash_2_apbs_pkg FAILED tests/test_upload_script.py::UploadTest::test_upload_file_0_pkg - Asse... FAILED tests/test_upload_script.py::UploadTest::test_upload_file_1_rpms_pkg FAILED tests/test_upload_script.py::UploadTest::test_upload_file_2_apbs_pkg FAILED tests/test_upload_script.py::UploadTest::test_upload_file_bad_checksum_0_pkg FAILED tests/test_upload_script.py::UploadTest::test_upload_file_bad_checksum_1_rpms_pkg FAILED tests/test_upload_script.py::UploadTest::test_upload_file_bad_checksum_2_apbs_pkg FAILED tests/test_upload_script.py::UploadTest::test_upload_invalid_mtime_0_pkg FAILED tests/test_upload_script.py::UploadTest::test_upload_invalid_mtime_1_rpms_pkg FAILED tests/test_upload_script.py::UploadTest::test_upload_invalid_mtime_2_apbs_pkg FAILED tests/test_upload_script.py::UploadTest::test_upload_mtime_0_pkg - req... FAILED tests/test_upload_script.py::UploadTest::test_upload_mtime_1_rpms_pkg FAILED tests/test_upload_script.py::UploadTest::test_upload_mtime_2_apbs_pkg FAILED tests/test_upload_script.py::UploadTest::test_upload_to_non_existing_module_0_bad FAILED tests/test_upload_script.py::UploadTest::test_upload_to_non_existing_module_1_rpms_bad FAILED tests/test_upload_script.py::UploadTest::test_upload_to_non_existing_module_2_apbs_bad ============================= 42 failed in 12.20s ============================== RPM build errors: error: Bad exit status from /var/tmp/rpm-tmp.DbrKU7 (%check) Bad exit status from /var/tmp/rpm-tmp.DbrKU7 (%check) Child return code was: 1 EXCEPTION: [Error('Command failed: \n # /usr/bin/systemd-nspawn -q -M 00dcf39635a8477e8e9c200baa9b39ad -D /var/lib/mock/f41-build-51959928-6218932/root -a -u mockbuild --capability=cap_ipc_lock --bind=/tmp/mock-resolv.meyv40ui:/etc/resolv.conf --bind=/dev/btrfs-control --bind=/dev/mapper/control --bind=/dev/fuse --bind=/dev/loop-control --bind=/dev/loop0 --bind=/dev/loop1 --bind=/dev/loop2 --bind=/dev/loop3 --bind=/dev/loop4 --bind=/dev/loop5 --bind=/dev/loop6 --bind=/dev/loop7 --bind=/dev/loop8 --bind=/dev/loop9 --bind=/dev/loop10 --bind=/dev/loop11 --console=pipe --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/builddir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin \'--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"\' \'--setenv=PS1= \\s-\\v\\$ \' --setenv=LANG=C.UTF-8 --resolv-conf=off bash --login -c \'/usr/bin/rpmbuild -bb --noclean --target noarch --nodeps /builddir/build/SPECS/dist-git.spec\'\n', 1)] Traceback (most recent call last): File "/usr/lib/python3.12/site-packages/mockbuild/trace_decorator.py", line 93, in trace result = func(*args, **kw) ^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/mockbuild/util.py", line 612, in do_with_status raise exception.Error("Command failed: \n # %s\n%s" % (cmd_pretty(command, env), output), child.returncode) mockbuild.exception.Error: Command failed: # /usr/bin/systemd-nspawn -q -M 00dcf39635a8477e8e9c200baa9b39ad -D /var/lib/mock/f41-build-51959928-6218932/root -a -u mockbuild --capability=cap_ipc_lock --bind=/tmp/mock-resolv.meyv40ui:/etc/resolv.conf --bind=/dev/btrfs-control --bind=/dev/mapper/control --bind=/dev/fuse --bind=/dev/loop-control --bind=/dev/loop0 --bind=/dev/loop1 --bind=/dev/loop2 --bind=/dev/loop3 --bind=/dev/loop4 --bind=/dev/loop5 --bind=/dev/loop6 --bind=/dev/loop7 --bind=/dev/loop8 --bind=/dev/loop9 --bind=/dev/loop10 --bind=/dev/loop11 --console=pipe --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/builddir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin '--setenv=PROMPT_COMMAND=printf "\033]0;\007"' '--setenv=PS1= \s-\v\$ ' --setenv=LANG=C.UTF-8 --resolv-conf=off bash --login -c '/usr/bin/rpmbuild -bb --noclean --target noarch --nodeps /builddir/build/SPECS/dist-git.spec'