0s autopkgtest [12:39:07]: starting date and time: 2025-07-09 12:39:07+0000 0s autopkgtest [12:39:07]: git checkout: 508d4a25 a-v-ssh wait_for_ssh: demote "ssh connection failed" to a debug message 0s autopkgtest [12:39:07]: host juju-7f2275-prod-proposed-migration-environment-20; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.lct6wfnz/out --timeout-copy=6000 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:qemu,src:dropbear --apt-upgrade dropbear --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 '--env=ADT_TEST_TRIGGERS=qemu/1:10.0.2+ds-1ubuntu2 dropbear/2025.88-1' -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest-cpu2-ram4-disk20-amd64 --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-20@sto01-15.secgroup --name adt-questing-amd64-dropbear-20250709-123907-juju-7f2275-prod-proposed-migration-environment-20-cdbf142a-73c2-4e8e-8535-f5db850cc4a0 --image adt/ubuntu-questing-amd64-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-20 --net-id=net_prod-autopkgtest-workers-amd64 -e TERM=linux --mirror=http://ftpmaster.internal/ubuntu/ 4s Creating nova instance adt-questing-amd64-dropbear-20250709-123907-juju-7f2275-prod-proposed-migration-environment-20-cdbf142a-73c2-4e8e-8535-f5db850cc4a0 from image adt/ubuntu-questing-amd64-server-20250709.img (UUID c3471638-2fe4-4a2d-8d40-ce75045b9112)... 47s autopkgtest [12:39:54]: testbed dpkg architecture: amd64 47s autopkgtest [12:39:54]: testbed apt version: 3.1.3 47s autopkgtest [12:39:54]: @@@@@@@@@@@@@@@@@@@@ test bed setup 48s autopkgtest [12:39:55]: testbed release detected to be: None 48s autopkgtest [12:39:55]: updating testbed package index (apt update) 48s Get:1 http://ftpmaster.internal/ubuntu questing-proposed InRelease [249 kB] 48s Hit:2 http://ftpmaster.internal/ubuntu questing InRelease 48s Hit:3 http://ftpmaster.internal/ubuntu questing-updates InRelease 49s Hit:4 http://ftpmaster.internal/ubuntu questing-security InRelease 49s Get:5 http://ftpmaster.internal/ubuntu questing-proposed/universe Sources [176 kB] 49s Get:6 http://ftpmaster.internal/ubuntu questing-proposed/multiverse Sources [15.4 kB] 49s Get:7 http://ftpmaster.internal/ubuntu questing-proposed/main Sources [38.1 kB] 49s Get:8 http://ftpmaster.internal/ubuntu questing-proposed/main i386 Packages [41.4 kB] 49s Get:9 http://ftpmaster.internal/ubuntu questing-proposed/main amd64 Packages [62.6 kB] 49s Get:10 http://ftpmaster.internal/ubuntu questing-proposed/universe amd64 Packages [182 kB] 49s Get:11 http://ftpmaster.internal/ubuntu questing-proposed/universe i386 Packages [103 kB] 49s Get:12 http://ftpmaster.internal/ubuntu questing-proposed/multiverse i386 Packages [8592 B] 49s Get:13 http://ftpmaster.internal/ubuntu questing-proposed/multiverse amd64 Packages [16.6 kB] 49s Fetched 893 kB in 0s (1891 kB/s) 49s Reading package lists... 50s autopkgtest [12:39:57]: upgrading testbed (apt dist-upgrade and autopurge) 50s Reading package lists... 50s Building dependency tree... 50s Reading state information... 50s Calculating upgrade... 50s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 51s Reading package lists... 51s Building dependency tree... 51s Reading state information... 51s Solving dependencies... 51s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 53s autopkgtest [12:40:00]: testbed running kernel: Linux 6.15.0-4-generic #4-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 4 14:41:53 UTC 2025 53s autopkgtest [12:40:00]: @@@@@@@@@@@@@@@@@@@@ apt-source dropbear 55s Get:1 http://ftpmaster.internal/ubuntu questing-proposed/universe dropbear 2025.88-1 (dsc) [2542 B] 55s Get:2 http://ftpmaster.internal/ubuntu questing-proposed/universe dropbear 2025.88-1 (tar) [2370 kB] 55s Get:3 http://ftpmaster.internal/ubuntu questing-proposed/universe dropbear 2025.88-1 (asc) [833 B] 55s Get:4 http://ftpmaster.internal/ubuntu questing-proposed/universe dropbear 2025.88-1 (diff) [34.8 kB] 55s gpgv: Signature made Wed May 7 15:05:53 2025 UTC 55s gpgv: using RSA key 469CBAA776FDB1FCD475B304D39A499C3C21A552 55s gpgv: Can't check signature: No public key 55s dpkg-source: warning: cannot verify inline signature for ./dropbear_2025.88-1.dsc: no acceptable signature found 56s autopkgtest [12:40:03]: testing package dropbear version 2025.88-1 56s autopkgtest [12:40:03]: build not needed 57s autopkgtest [12:40:04]: test upstream-tests: preparing testbed 57s Reading package lists... 57s Building dependency tree... 57s Reading state information... 57s Solving dependencies... 57s The following NEW packages will be installed: 57s dropbear-bin libtomcrypt1 libtommath1 python3-asyncssh python3-iniconfig 57s python3-pluggy python3-psutil python3-pytest 57s 0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded. 57s Need to get 1340 kB of archives. 57s After this operation, 5997 kB of additional disk space will be used. 57s Get:1 http://ftpmaster.internal/ubuntu questing/universe amd64 libtommath1 amd64 1.3.0-1 [67.2 kB] 57s Get:2 http://ftpmaster.internal/ubuntu questing/universe amd64 libtomcrypt1 amd64 1.18.2+dfsg-7build1 [384 kB] 57s Get:3 http://ftpmaster.internal/ubuntu questing-proposed/universe amd64 dropbear-bin amd64 2025.88-1 [180 kB] 58s Get:4 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-asyncssh all 2.20.0-1 [242 kB] 58s Get:5 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-iniconfig all 1.1.1-2 [6024 B] 58s Get:6 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-pluggy all 1.5.0-1 [21.0 kB] 58s Get:7 http://ftpmaster.internal/ubuntu questing/main amd64 python3-psutil amd64 7.0.0-2ubuntu1 [188 kB] 58s Get:8 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-pytest all 8.3.5-2 [252 kB] 58s Fetched 1340 kB in 0s (9577 kB/s) 58s Selecting previously unselected package libtommath1:amd64. 58s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 121132 files and directories currently installed.) 58s Preparing to unpack .../0-libtommath1_1.3.0-1_amd64.deb ... 58s Unpacking libtommath1:amd64 (1.3.0-1) ... 58s Selecting previously unselected package libtomcrypt1:amd64. 58s Preparing to unpack .../1-libtomcrypt1_1.18.2+dfsg-7build1_amd64.deb ... 58s Unpacking libtomcrypt1:amd64 (1.18.2+dfsg-7build1) ... 58s Selecting previously unselected package dropbear-bin. 58s Preparing to unpack .../2-dropbear-bin_2025.88-1_amd64.deb ... 58s Unpacking dropbear-bin (2025.88-1) ... 58s Selecting previously unselected package python3-asyncssh. 58s Preparing to unpack .../3-python3-asyncssh_2.20.0-1_all.deb ... 58s Unpacking python3-asyncssh (2.20.0-1) ... 58s Selecting previously unselected package python3-iniconfig. 58s Preparing to unpack .../4-python3-iniconfig_1.1.1-2_all.deb ... 58s Unpacking python3-iniconfig (1.1.1-2) ... 58s Selecting previously unselected package python3-pluggy. 58s Preparing to unpack .../5-python3-pluggy_1.5.0-1_all.deb ... 58s Unpacking python3-pluggy (1.5.0-1) ... 58s Selecting previously unselected package python3-psutil. 58s Preparing to unpack .../6-python3-psutil_7.0.0-2ubuntu1_amd64.deb ... 58s Unpacking python3-psutil (7.0.0-2ubuntu1) ... 58s Selecting previously unselected package python3-pytest. 58s Preparing to unpack .../7-python3-pytest_8.3.5-2_all.deb ... 58s Unpacking python3-pytest (8.3.5-2) ... 58s Setting up python3-iniconfig (1.1.1-2) ... 58s Setting up libtommath1:amd64 (1.3.0-1) ... 58s Setting up python3-psutil (7.0.0-2ubuntu1) ... 58s Setting up python3-asyncssh (2.20.0-1) ... 59s Setting up python3-pluggy (1.5.0-1) ... 59s Setting up libtomcrypt1:amd64 (1.18.2+dfsg-7build1) ... 59s Setting up dropbear-bin (2025.88-1) ... 59s Setting up python3-pytest (8.3.5-2) ... 59s Processing triggers for man-db (2.13.1-1) ... 60s Processing triggers for libc-bin (2.41-6ubuntu2) ... 61s autopkgtest [12:40:08]: test upstream-tests: [----------------------- 61s Generating 256 bit ecdsa key, this may take a while... 61s Key is a ecdsa-sha2-nistp256 key 61s Wrote key to '/home/ubuntu/.ssh/id_ecdsa' 61s Generating 256 bit ecdsa key, this may take a while... 61s Generating 256 bit ecdsa key, this may take a while... 61s Generating 256 bit ecdsa key, this may take a while... 61s Generating 256 bit ecdsa key, this may take a while... 61s Public key portion is: 61s ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGp8vl1mzwY+YvIWvubDu2m8GJLZlW+QSxYITdURwZUA/FyIYvqnpYO3yKKYnxe5kfljWusyoHT7UOB4NltaknE= ubuntu@autopkgtest 61s Fingerprint: SHA256:IdrdQn//p5EUy77IagHVGMd51YwFoRGPDzdC2VMOJfA 61s ============================= test session starts ============================== 61s platform linux -- Python 3.13.5, pytest-8.3.5, pluggy-1.5.0 61s rootdir: /tmp/autopkgtest.izCbV0/build.p2K/src/test 61s plugins: typeguard-4.4.2 61s collected 52 items 61s 61s test_aslr.py . [ 1%] 75s test_channels.py .x........................ [ 51%] 78s test_concurrent.py . [ 53%] 81s test_dropbearconvert.py FFFFFFFFFFFFFFFFFFFFF [ 94%] 82s test_svrauth.py ... [100%] 82s 82s =================================== FAILURES =================================== 82s _________________________ test_from_openssh[None-rsa] __________________________ 82s 82s request = > 82s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_None_rsa_0') 82s keytype = 'rsa', keyformat = None 82s 82s @pytest.mark.parametrize("keytype", keytypes) 82s @pytest.mark.parametrize("keyformat", [None, "PEM"]) 82s def test_from_openssh(request, tmp_path, keytype, keyformat): 82s """ 82s Convert OpenSSH to Dropbear format, 82s PEM and OpenSSH internal 82s """ 82s opt = request.config.option 82s kt, keybits = parse_keytype(keytype) 82s 82s if kt == 'dss' and keyformat is None: 82s pytest.skip("dss doesn't support openssh format") 82s 82s os_kt = kt 82s if os_kt == 'dss': 82s # OpenSSH calls it 'dsa', Dropbear calls it 'dss' 82s os_kt = 'dsa' 82s 82s os_key = tmp_path / 'oskey1' 82s db_key = tmp_path / 'dbkey1' 82s 82s # Generate an OpenSSH key 82s args = [ 82s opt.ssh_keygen, 82s '-f', os_key, 82s '-t', os_kt, 82s '-N', '', # no password 82s ] 82s if keybits is not None: 82s args += ['-b', keybits] 82s if keyformat: 82s args += ['-m', keyformat] 82s > p = subprocess.run(args, check=True) 82s 82s test_dropbearconvert.py:50: 82s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 82s 82s input = None, capture_output = False, timeout = None, check = True 82s popenargs = (['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_None_rsa_0/oskey1'), '-t', 'rsa', '-N', ...],) 82s kwargs = {} 82s process = 82s stdout = None, stderr = None, retcode = 1 82s 82s def run(*popenargs, 82s input=None, capture_output=False, timeout=None, check=False, **kwargs): 82s """Run command with arguments and return a CompletedProcess instance. 82s 82s The returned instance will have attributes args, returncode, stdout and 82s stderr. By default, stdout and stderr are not captured, and those attributes 82s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 82s or pass capture_output=True to capture both. 82s 82s If check is True and the exit code was non-zero, it raises a 82s CalledProcessError. The CalledProcessError object will have the return code 82s in the returncode attribute, and output & stderr attributes if those streams 82s were captured. 82s 82s If timeout (seconds) is given and the process takes too long, 82s a TimeoutExpired exception will be raised. 82s 82s There is an optional argument "input", allowing you to 82s pass bytes or a string to the subprocess's stdin. If you use this argument 82s you may not also use the Popen constructor's "stdin" argument, as 82s it will be used internally. 82s 82s By default, all communication is in bytes, and therefore any "input" should 82s be bytes, and the stdout and stderr will be bytes. If in text mode, any 82s "input" should be a string, and stdout and stderr will be strings decoded 82s according to locale encoding, or by "encoding" if set. Text mode is 82s triggered by setting any of text, encoding, errors or universal_newlines. 82s 82s The other arguments are the same as for the Popen constructor. 82s """ 82s if input is not None: 82s if kwargs.get('stdin') is not None: 82s raise ValueError('stdin and input arguments may not both be used.') 82s kwargs['stdin'] = PIPE 82s 82s if capture_output: 82s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 82s raise ValueError('stdout and stderr arguments may not be used ' 82s 'with capture_output.') 82s kwargs['stdout'] = PIPE 82s kwargs['stderr'] = PIPE 82s 82s with Popen(*popenargs, **kwargs) as process: 82s try: 82s stdout, stderr = process.communicate(input, timeout=timeout) 82s except TimeoutExpired as exc: 82s process.kill() 82s if _mswindows: 82s # Windows accumulates the output in a single blocking 82s # read() call run on child threads, with the timeout 82s # being done in a join() on those threads. communicate() 82s # _after_ kill() is required to collect that and add it 82s # to the exception. 82s exc.stdout, exc.stderr = process.communicate() 82s else: 82s # POSIX _communicate already populated the output so 82s # far into the TimeoutExpired exception. 82s process.wait() 82s raise 82s except: # Including KeyboardInterrupt, communicate handled that. 82s process.kill() 82s # We don't call process.wait() as .__exit__ does that for us. 82s raise 82s retcode = process.poll() 82s if check and retcode: 82s > raise CalledProcessError(retcode, process.args, 82s output=stdout, stderr=stderr) 82s E subprocess.CalledProcessError: Command '['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_None_rsa_0/oskey1'), '-t', 'rsa', '-N', '']' returned non-zero exit status 1. 82s 82s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 82s ----------------------------- Captured stdout call ----------------------------- 82s Generating public/private rsa key pair. 82s ----------------------------- Captured stderr call ----------------------------- 82s Saving key "/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_None_rsa_0/oskey1" failed: Permission denied 82s _______________________ test_from_openssh[None-rsa-4096] _______________________ 82s 82s request = > 82s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_None_rsa_4090') 82s keytype = 'rsa-4096', keyformat = None 82s 82s @pytest.mark.parametrize("keytype", keytypes) 82s @pytest.mark.parametrize("keyformat", [None, "PEM"]) 82s def test_from_openssh(request, tmp_path, keytype, keyformat): 82s """ 82s Convert OpenSSH to Dropbear format, 82s PEM and OpenSSH internal 82s """ 82s opt = request.config.option 82s kt, keybits = parse_keytype(keytype) 82s 82s if kt == 'dss' and keyformat is None: 82s pytest.skip("dss doesn't support openssh format") 82s 82s os_kt = kt 82s if os_kt == 'dss': 82s # OpenSSH calls it 'dsa', Dropbear calls it 'dss' 82s os_kt = 'dsa' 82s 82s os_key = tmp_path / 'oskey1' 82s db_key = tmp_path / 'dbkey1' 82s 82s # Generate an OpenSSH key 82s args = [ 82s opt.ssh_keygen, 82s '-f', os_key, 82s '-t', os_kt, 82s '-N', '', # no password 82s ] 82s if keybits is not None: 82s args += ['-b', keybits] 82s if keyformat: 82s args += ['-m', keyformat] 82s > p = subprocess.run(args, check=True) 82s 82s test_dropbearconvert.py:50: 82s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 82s 82s input = None, capture_output = False, timeout = None, check = True 82s popenargs = (['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_None_rsa_4090/oskey1'), '-t', 'rsa', '-N', ...],) 82s kwargs = {} 82s process = 82s stdout = None, stderr = None, retcode = 1 82s 82s def run(*popenargs, 82s input=None, capture_output=False, timeout=None, check=False, **kwargs): 82s """Run command with arguments and return a CompletedProcess instance. 82s 82s The returned instance will have attributes args, returncode, stdout and 82s stderr. By default, stdout and stderr are not captured, and those attributes 82s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 82s or pass capture_output=True to capture both. 82s 82s If check is True and the exit code was non-zero, it raises a 82s CalledProcessError. The CalledProcessError object will have the return code 82s in the returncode attribute, and output & stderr attributes if those streams 82s were captured. 82s 82s If timeout (seconds) is given and the process takes too long, 82s a TimeoutExpired exception will be raised. 82s 82s There is an optional argument "input", allowing you to 82s pass bytes or a string to the subprocess's stdin. If you use this argument 82s you may not also use the Popen constructor's "stdin" argument, as 82s it will be used internally. 82s 82s By default, all communication is in bytes, and therefore any "input" should 82s be bytes, and the stdout and stderr will be bytes. If in text mode, any 82s "input" should be a string, and stdout and stderr will be strings decoded 82s according to locale encoding, or by "encoding" if set. Text mode is 82s triggered by setting any of text, encoding, errors or universal_newlines. 82s 82s The other arguments are the same as for the Popen constructor. 82s """ 82s if input is not None: 82s if kwargs.get('stdin') is not None: 82s raise ValueError('stdin and input arguments may not both be used.') 82s kwargs['stdin'] = PIPE 82s 82s if capture_output: 82s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 82s raise ValueError('stdout and stderr arguments may not be used ' 82s 'with capture_output.') 82s kwargs['stdout'] = PIPE 82s kwargs['stderr'] = PIPE 82s 82s with Popen(*popenargs, **kwargs) as process: 82s try: 82s stdout, stderr = process.communicate(input, timeout=timeout) 82s except TimeoutExpired as exc: 82s process.kill() 82s if _mswindows: 82s # Windows accumulates the output in a single blocking 82s # read() call run on child threads, with the timeout 82s # being done in a join() on those threads. communicate() 82s # _after_ kill() is required to collect that and add it 82s # to the exception. 82s exc.stdout, exc.stderr = process.communicate() 82s else: 82s # POSIX _communicate already populated the output so 82s # far into the TimeoutExpired exception. 82s process.wait() 82s raise 82s except: # Including KeyboardInterrupt, communicate handled that. 82s process.kill() 82s # We don't call process.wait() as .__exit__ does that for us. 82s raise 82s retcode = process.poll() 82s if check and retcode: 82s > raise CalledProcessError(retcode, process.args, 82s output=stdout, stderr=stderr) 82s E subprocess.CalledProcessError: Command '['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_None_rsa_4090/oskey1'), '-t', 'rsa', '-N', '', '-b', '4096']' returned non-zero exit status 1. 82s 82s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 82s ----------------------------- Captured stdout call ----------------------------- 82s Generating public/private rsa key pair. 82s ----------------------------- Captured stderr call ----------------------------- 82s Saving key "/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_None_rsa_4090/oskey1" failed: Permission denied 82s _______________________ test_from_openssh[None-ed25519] ________________________ 82s 82s request = > 82s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_None_ed255190') 82s keytype = 'ed25519', keyformat = None 82s 82s @pytest.mark.parametrize("keytype", keytypes) 82s @pytest.mark.parametrize("keyformat", [None, "PEM"]) 82s def test_from_openssh(request, tmp_path, keytype, keyformat): 82s """ 82s Convert OpenSSH to Dropbear format, 82s PEM and OpenSSH internal 82s """ 82s opt = request.config.option 82s kt, keybits = parse_keytype(keytype) 82s 82s if kt == 'dss' and keyformat is None: 82s pytest.skip("dss doesn't support openssh format") 82s 82s os_kt = kt 82s if os_kt == 'dss': 82s # OpenSSH calls it 'dsa', Dropbear calls it 'dss' 82s os_kt = 'dsa' 82s 82s os_key = tmp_path / 'oskey1' 82s db_key = tmp_path / 'dbkey1' 82s 82s # Generate an OpenSSH key 82s args = [ 82s opt.ssh_keygen, 82s '-f', os_key, 82s '-t', os_kt, 82s '-N', '', # no password 82s ] 82s if keybits is not None: 82s args += ['-b', keybits] 82s if keyformat: 82s args += ['-m', keyformat] 82s > p = subprocess.run(args, check=True) 82s 82s test_dropbearconvert.py:50: 82s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 82s 82s input = None, capture_output = False, timeout = None, check = True 82s popenargs = (['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_None_ed255190/oskey1'), '-t', 'ed25519', '-N', ...],) 82s kwargs = {} 82s process = 82s stdout = None, stderr = None, retcode = 1 82s 82s def run(*popenargs, 82s input=None, capture_output=False, timeout=None, check=False, **kwargs): 82s """Run command with arguments and return a CompletedProcess instance. 82s 82s The returned instance will have attributes args, returncode, stdout and 82s stderr. By default, stdout and stderr are not captured, and those attributes 82s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 82s or pass capture_output=True to capture both. 82s 82s If check is True and the exit code was non-zero, it raises a 82s CalledProcessError. The CalledProcessError object will have the return code 82s in the returncode attribute, and output & stderr attributes if those streams 82s were captured. 82s 82s If timeout (seconds) is given and the process takes too long, 82s a TimeoutExpired exception will be raised. 82s 82s There is an optional argument "input", allowing you to 82s pass bytes or a string to the subprocess's stdin. If you use this argument 82s you may not also use the Popen constructor's "stdin" argument, as 82s it will be used internally. 82s 82s By default, all communication is in bytes, and therefore any "input" should 82s be bytes, and the stdout and stderr will be bytes. If in text mode, any 82s "input" should be a string, and stdout and stderr will be strings decoded 82s according to locale encoding, or by "encoding" if set. Text mode is 82s triggered by setting any of text, encoding, errors or universal_newlines. 82s 82s The other arguments are the same as for the Popen constructor. 82s """ 82s if input is not None: 82s if kwargs.get('stdin') is not None: 82s raise ValueError('stdin and input arguments may not both be used.') 82s kwargs['stdin'] = PIPE 82s 82s if capture_output: 82s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 82s raise ValueError('stdout and stderr arguments may not be used ' 82s 'with capture_output.') 82s kwargs['stdout'] = PIPE 82s kwargs['stderr'] = PIPE 82s 82s with Popen(*popenargs, **kwargs) as process: 82s try: 82s stdout, stderr = process.communicate(input, timeout=timeout) 82s except TimeoutExpired as exc: 82s process.kill() 82s if _mswindows: 82s # Windows accumulates the output in a single blocking 82s # read() call run on child threads, with the timeout 82s # being done in a join() on those threads. communicate() 82s # _after_ kill() is required to collect that and add it 82s # to the exception. 82s exc.stdout, exc.stderr = process.communicate() 82s else: 82s # POSIX _communicate already populated the output so 82s # far into the TimeoutExpired exception. 82s process.wait() 82s raise 82s except: # Including KeyboardInterrupt, communicate handled that. 82s process.kill() 82s # We don't call process.wait() as .__exit__ does that for us. 82s raise 82s retcode = process.poll() 82s if check and retcode: 82s > raise CalledProcessError(retcode, process.args, 82s output=stdout, stderr=stderr) 82s E subprocess.CalledProcessError: Command '['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_None_ed255190/oskey1'), '-t', 'ed25519', '-N', '']' returned non-zero exit status 1. 82s 82s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 82s ----------------------------- Captured stdout call ----------------------------- 82s Generating public/private ed25519 key pair. 82s ----------------------------- Captured stderr call ----------------------------- 82s Saving key "/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_None_ed255190/oskey1" failed: Permission denied 82s ________________________ test_from_openssh[None-ecdsa] _________________________ 82s 82s request = > 82s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_None_ecdsa_0') 82s keytype = 'ecdsa', keyformat = None 82s 82s @pytest.mark.parametrize("keytype", keytypes) 82s @pytest.mark.parametrize("keyformat", [None, "PEM"]) 82s def test_from_openssh(request, tmp_path, keytype, keyformat): 82s """ 82s Convert OpenSSH to Dropbear format, 82s PEM and OpenSSH internal 82s """ 82s opt = request.config.option 82s kt, keybits = parse_keytype(keytype) 82s 82s if kt == 'dss' and keyformat is None: 82s pytest.skip("dss doesn't support openssh format") 82s 82s os_kt = kt 82s if os_kt == 'dss': 82s # OpenSSH calls it 'dsa', Dropbear calls it 'dss' 82s os_kt = 'dsa' 82s 82s os_key = tmp_path / 'oskey1' 82s db_key = tmp_path / 'dbkey1' 82s 82s # Generate an OpenSSH key 82s args = [ 82s opt.ssh_keygen, 82s '-f', os_key, 82s '-t', os_kt, 82s '-N', '', # no password 82s ] 82s if keybits is not None: 82s args += ['-b', keybits] 82s if keyformat: 82s args += ['-m', keyformat] 82s > p = subprocess.run(args, check=True) 82s 82s test_dropbearconvert.py:50: 82s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 82s 82s input = None, capture_output = False, timeout = None, check = True 82s popenargs = (['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_None_ecdsa_0/oskey1'), '-t', 'ecdsa', '-N', ...],) 82s kwargs = {} 82s process = 82s stdout = None, stderr = None, retcode = 1 82s 82s def run(*popenargs, 82s input=None, capture_output=False, timeout=None, check=False, **kwargs): 82s """Run command with arguments and return a CompletedProcess instance. 82s 82s The returned instance will have attributes args, returncode, stdout and 82s stderr. By default, stdout and stderr are not captured, and those attributes 82s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 82s or pass capture_output=True to capture both. 82s 82s If check is True and the exit code was non-zero, it raises a 82s CalledProcessError. The CalledProcessError object will have the return code 82s in the returncode attribute, and output & stderr attributes if those streams 82s were captured. 82s 82s If timeout (seconds) is given and the process takes too long, 82s a TimeoutExpired exception will be raised. 82s 82s There is an optional argument "input", allowing you to 82s pass bytes or a string to the subprocess's stdin. If you use this argument 82s you may not also use the Popen constructor's "stdin" argument, as 82s it will be used internally. 82s 82s By default, all communication is in bytes, and therefore any "input" should 82s be bytes, and the stdout and stderr will be bytes. If in text mode, any 82s "input" should be a string, and stdout and stderr will be strings decoded 82s according to locale encoding, or by "encoding" if set. Text mode is 82s triggered by setting any of text, encoding, errors or universal_newlines. 82s 82s The other arguments are the same as for the Popen constructor. 82s """ 82s if input is not None: 82s if kwargs.get('stdin') is not None: 82s raise ValueError('stdin and input arguments may not both be used.') 82s kwargs['stdin'] = PIPE 82s 82s if capture_output: 82s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 82s raise ValueError('stdout and stderr arguments may not be used ' 82s 'with capture_output.') 82s kwargs['stdout'] = PIPE 82s kwargs['stderr'] = PIPE 82s 82s with Popen(*popenargs, **kwargs) as process: 82s try: 82s stdout, stderr = process.communicate(input, timeout=timeout) 82s except TimeoutExpired as exc: 82s process.kill() 82s if _mswindows: 82s # Windows accumulates the output in a single blocking 82s # read() call run on child threads, with the timeout 82s # being done in a join() on those threads. communicate() 82s # _after_ kill() is required to collect that and add it 82s # to the exception. 82s exc.stdout, exc.stderr = process.communicate() 82s else: 82s # POSIX _communicate already populated the output so 82s # far into the TimeoutExpired exception. 82s process.wait() 82s raise 82s except: # Including KeyboardInterrupt, communicate handled that. 82s process.kill() 82s # We don't call process.wait() as .__exit__ does that for us. 82s raise 82s retcode = process.poll() 82s if check and retcode: 82s > raise CalledProcessError(retcode, process.args, 82s output=stdout, stderr=stderr) 82s E subprocess.CalledProcessError: Command '['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_None_ecdsa_0/oskey1'), '-t', 'ecdsa', '-N', '']' returned non-zero exit status 1. 82s 82s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 82s ----------------------------- Captured stdout call ----------------------------- 82s Generating public/private ecdsa key pair. 82s ----------------------------- Captured stderr call ----------------------------- 82s Saving key "/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_None_ecdsa_0/oskey1" failed: Permission denied 82s ______________________ test_from_openssh[None-ecdsa-256] _______________________ 82s 82s request = > 82s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_None_ecdsa_20') 82s keytype = 'ecdsa-256', keyformat = None 82s 82s @pytest.mark.parametrize("keytype", keytypes) 82s @pytest.mark.parametrize("keyformat", [None, "PEM"]) 82s def test_from_openssh(request, tmp_path, keytype, keyformat): 82s """ 82s Convert OpenSSH to Dropbear format, 82s PEM and OpenSSH internal 82s """ 82s opt = request.config.option 82s kt, keybits = parse_keytype(keytype) 82s 82s if kt == 'dss' and keyformat is None: 82s pytest.skip("dss doesn't support openssh format") 82s 82s os_kt = kt 82s if os_kt == 'dss': 82s # OpenSSH calls it 'dsa', Dropbear calls it 'dss' 82s os_kt = 'dsa' 82s 82s os_key = tmp_path / 'oskey1' 82s db_key = tmp_path / 'dbkey1' 82s 82s # Generate an OpenSSH key 82s args = [ 82s opt.ssh_keygen, 82s '-f', os_key, 82s '-t', os_kt, 82s '-N', '', # no password 82s ] 82s if keybits is not None: 82s args += ['-b', keybits] 82s if keyformat: 82s args += ['-m', keyformat] 82s > p = subprocess.run(args, check=True) 82s 82s test_dropbearconvert.py:50: 82s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 82s 82s input = None, capture_output = False, timeout = None, check = True 82s popenargs = (['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_None_ecdsa_20/oskey1'), '-t', 'ecdsa', '-N', ...],) 82s kwargs = {} 82s process = 82s stdout = None, stderr = None, retcode = 1 82s 82s def run(*popenargs, 82s input=None, capture_output=False, timeout=None, check=False, **kwargs): 82s """Run command with arguments and return a CompletedProcess instance. 82s 82s The returned instance will have attributes args, returncode, stdout and 82s stderr. By default, stdout and stderr are not captured, and those attributes 82s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 82s or pass capture_output=True to capture both. 82s 82s If check is True and the exit code was non-zero, it raises a 82s CalledProcessError. The CalledProcessError object will have the return code 82s in the returncode attribute, and output & stderr attributes if those streams 82s were captured. 82s 82s If timeout (seconds) is given and the process takes too long, 82s a TimeoutExpired exception will be raised. 82s 82s There is an optional argument "input", allowing you to 82s pass bytes or a string to the subprocess's stdin. If you use this argument 82s you may not also use the Popen constructor's "stdin" argument, as 82s it will be used internally. 82s 82s By default, all communication is in bytes, and therefore any "input" should 82s be bytes, and the stdout and stderr will be bytes. If in text mode, any 82s "input" should be a string, and stdout and stderr will be strings decoded 82s according to locale encoding, or by "encoding" if set. Text mode is 82s triggered by setting any of text, encoding, errors or universal_newlines. 82s 82s The other arguments are the same as for the Popen constructor. 82s """ 82s if input is not None: 82s if kwargs.get('stdin') is not None: 82s raise ValueError('stdin and input arguments may not both be used.') 82s kwargs['stdin'] = PIPE 82s 82s if capture_output: 82s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 82s raise ValueError('stdout and stderr arguments may not be used ' 82s 'with capture_output.') 82s kwargs['stdout'] = PIPE 82s kwargs['stderr'] = PIPE 82s 82s with Popen(*popenargs, **kwargs) as process: 82s try: 82s stdout, stderr = process.communicate(input, timeout=timeout) 82s except TimeoutExpired as exc: 82s process.kill() 82s if _mswindows: 82s # Windows accumulates the output in a single blocking 82s # read() call run on child threads, with the timeout 82s # being done in a join() on those threads. communicate() 82s # _after_ kill() is required to collect that and add it 82s # to the exception. 82s exc.stdout, exc.stderr = process.communicate() 82s else: 82s # POSIX _communicate already populated the output so 82s # far into the TimeoutExpired exception. 82s process.wait() 82s raise 82s except: # Including KeyboardInterrupt, communicate handled that. 82s process.kill() 82s # We don't call process.wait() as .__exit__ does that for us. 82s raise 82s retcode = process.poll() 82s if check and retcode: 82s > raise CalledProcessError(retcode, process.args, 82s output=stdout, stderr=stderr) 82s E subprocess.CalledProcessError: Command '['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_None_ecdsa_20/oskey1'), '-t', 'ecdsa', '-N', '', '-b', '256']' returned non-zero exit status 1. 82s 82s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 82s ----------------------------- Captured stdout call ----------------------------- 82s Generating public/private ecdsa key pair. 82s ----------------------------- Captured stderr call ----------------------------- 82s Saving key "/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_None_ecdsa_20/oskey1" failed: Permission denied 82s ______________________ test_from_openssh[None-ecdsa-384] _______________________ 82s 82s request = > 82s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_None_ecdsa_30') 82s keytype = 'ecdsa-384', keyformat = None 82s 82s @pytest.mark.parametrize("keytype", keytypes) 82s @pytest.mark.parametrize("keyformat", [None, "PEM"]) 82s def test_from_openssh(request, tmp_path, keytype, keyformat): 82s """ 82s Convert OpenSSH to Dropbear format, 82s PEM and OpenSSH internal 82s """ 82s opt = request.config.option 82s kt, keybits = parse_keytype(keytype) 82s 82s if kt == 'dss' and keyformat is None: 82s pytest.skip("dss doesn't support openssh format") 82s 82s os_kt = kt 82s if os_kt == 'dss': 82s # OpenSSH calls it 'dsa', Dropbear calls it 'dss' 82s os_kt = 'dsa' 82s 82s os_key = tmp_path / 'oskey1' 82s db_key = tmp_path / 'dbkey1' 82s 82s # Generate an OpenSSH key 82s args = [ 82s opt.ssh_keygen, 82s '-f', os_key, 82s '-t', os_kt, 82s '-N', '', # no password 82s ] 82s if keybits is not None: 82s args += ['-b', keybits] 82s if keyformat: 82s args += ['-m', keyformat] 82s > p = subprocess.run(args, check=True) 82s 82s test_dropbearconvert.py:50: 82s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 82s 82s input = None, capture_output = False, timeout = None, check = True 82s popenargs = (['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_None_ecdsa_30/oskey1'), '-t', 'ecdsa', '-N', ...],) 82s kwargs = {} 82s process = 82s stdout = None, stderr = None, retcode = 1 82s 82s def run(*popenargs, 82s input=None, capture_output=False, timeout=None, check=False, **kwargs): 82s """Run command with arguments and return a CompletedProcess instance. 82s 82s The returned instance will have attributes args, returncode, stdout and 82s stderr. By default, stdout and stderr are not captured, and those attributes 82s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 82s or pass capture_output=True to capture both. 82s 82s If check is True and the exit code was non-zero, it raises a 82s CalledProcessError. The CalledProcessError object will have the return code 82s in the returncode attribute, and output & stderr attributes if those streams 82s were captured. 82s 82s If timeout (seconds) is given and the process takes too long, 82s a TimeoutExpired exception will be raised. 82s 82s There is an optional argument "input", allowing you to 82s pass bytes or a string to the subprocess's stdin. If you use this argument 82s you may not also use the Popen constructor's "stdin" argument, as 82s it will be used internally. 82s 82s By default, all communication is in bytes, and therefore any "input" should 82s be bytes, and the stdout and stderr will be bytes. If in text mode, any 82s "input" should be a string, and stdout and stderr will be strings decoded 82s according to locale encoding, or by "encoding" if set. Text mode is 82s triggered by setting any of text, encoding, errors or universal_newlines. 82s 82s The other arguments are the same as for the Popen constructor. 82s """ 82s if input is not None: 82s if kwargs.get('stdin') is not None: 82s raise ValueError('stdin and input arguments may not both be used.') 82s kwargs['stdin'] = PIPE 82s 82s if capture_output: 82s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 82s raise ValueError('stdout and stderr arguments may not be used ' 82s 'with capture_output.') 82s kwargs['stdout'] = PIPE 82s kwargs['stderr'] = PIPE 82s 82s with Popen(*popenargs, **kwargs) as process: 82s try: 82s stdout, stderr = process.communicate(input, timeout=timeout) 82s except TimeoutExpired as exc: 82s process.kill() 82s if _mswindows: 82s # Windows accumulates the output in a single blocking 82s # read() call run on child threads, with the timeout 82s # being done in a join() on those threads. communicate() 82s # _after_ kill() is required to collect that and add it 82s # to the exception. 82s exc.stdout, exc.stderr = process.communicate() 82s else: 82s # POSIX _communicate already populated the output so 82s # far into the TimeoutExpired exception. 82s process.wait() 82s raise 82s except: # Including KeyboardInterrupt, communicate handled that. 82s process.kill() 82s # We don't call process.wait() as .__exit__ does that for us. 82s raise 82s retcode = process.poll() 82s if check and retcode: 82s > raise CalledProcessError(retcode, process.args, 82s output=stdout, stderr=stderr) 82s E subprocess.CalledProcessError: Command '['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_None_ecdsa_30/oskey1'), '-t', 'ecdsa', '-N', '', '-b', '384']' returned non-zero exit status 1. 82s 82s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 82s ----------------------------- Captured stdout call ----------------------------- 82s Generating public/private ecdsa key pair. 82s ----------------------------- Captured stderr call ----------------------------- 82s Saving key "/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_None_ecdsa_30/oskey1" failed: Permission denied 82s ______________________ test_from_openssh[None-ecdsa-521] _______________________ 82s 82s request = > 82s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_None_ecdsa_50') 82s keytype = 'ecdsa-521', keyformat = None 82s 82s @pytest.mark.parametrize("keytype", keytypes) 82s @pytest.mark.parametrize("keyformat", [None, "PEM"]) 82s def test_from_openssh(request, tmp_path, keytype, keyformat): 82s """ 82s Convert OpenSSH to Dropbear format, 82s PEM and OpenSSH internal 82s """ 82s opt = request.config.option 82s kt, keybits = parse_keytype(keytype) 82s 82s if kt == 'dss' and keyformat is None: 82s pytest.skip("dss doesn't support openssh format") 82s 82s os_kt = kt 82s if os_kt == 'dss': 82s # OpenSSH calls it 'dsa', Dropbear calls it 'dss' 82s os_kt = 'dsa' 82s 82s os_key = tmp_path / 'oskey1' 82s db_key = tmp_path / 'dbkey1' 82s 82s # Generate an OpenSSH key 82s args = [ 82s opt.ssh_keygen, 82s '-f', os_key, 82s '-t', os_kt, 82s '-N', '', # no password 82s ] 82s if keybits is not None: 82s args += ['-b', keybits] 82s if keyformat: 82s args += ['-m', keyformat] 82s > p = subprocess.run(args, check=True) 82s 82s test_dropbearconvert.py:50: 82s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 82s 82s input = None, capture_output = False, timeout = None, check = True 82s popenargs = (['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_None_ecdsa_50/oskey1'), '-t', 'ecdsa', '-N', ...],) 82s kwargs = {} 82s process = 82s stdout = None, stderr = None, retcode = 1 82s 82s def run(*popenargs, 82s input=None, capture_output=False, timeout=None, check=False, **kwargs): 82s """Run command with arguments and return a CompletedProcess instance. 82s 82s The returned instance will have attributes args, returncode, stdout and 82s stderr. By default, stdout and stderr are not captured, and those attributes 82s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 82s or pass capture_output=True to capture both. 82s 82s If check is True and the exit code was non-zero, it raises a 82s CalledProcessError. The CalledProcessError object will have the return code 82s in the returncode attribute, and output & stderr attributes if those streams 82s were captured. 82s 82s If timeout (seconds) is given and the process takes too long, 82s a TimeoutExpired exception will be raised. 82s 82s There is an optional argument "input", allowing you to 82s pass bytes or a string to the subprocess's stdin. If you use this argument 82s you may not also use the Popen constructor's "stdin" argument, as 82s it will be used internally. 82s 82s By default, all communication is in bytes, and therefore any "input" should 82s be bytes, and the stdout and stderr will be bytes. If in text mode, any 82s "input" should be a string, and stdout and stderr will be strings decoded 82s according to locale encoding, or by "encoding" if set. Text mode is 82s triggered by setting any of text, encoding, errors or universal_newlines. 82s 82s The other arguments are the same as for the Popen constructor. 82s """ 82s if input is not None: 82s if kwargs.get('stdin') is not None: 82s raise ValueError('stdin and input arguments may not both be used.') 82s kwargs['stdin'] = PIPE 82s 82s if capture_output: 82s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 82s raise ValueError('stdout and stderr arguments may not be used ' 82s 'with capture_output.') 82s kwargs['stdout'] = PIPE 82s kwargs['stderr'] = PIPE 82s 82s with Popen(*popenargs, **kwargs) as process: 82s try: 82s stdout, stderr = process.communicate(input, timeout=timeout) 82s except TimeoutExpired as exc: 82s process.kill() 82s if _mswindows: 82s # Windows accumulates the output in a single blocking 82s # read() call run on child threads, with the timeout 82s # being done in a join() on those threads. communicate() 82s # _after_ kill() is required to collect that and add it 82s # to the exception. 82s exc.stdout, exc.stderr = process.communicate() 82s else: 82s # POSIX _communicate already populated the output so 82s # far into the TimeoutExpired exception. 82s process.wait() 82s raise 82s except: # Including KeyboardInterrupt, communicate handled that. 82s process.kill() 82s # We don't call process.wait() as .__exit__ does that for us. 82s raise 82s retcode = process.poll() 82s if check and retcode: 82s > raise CalledProcessError(retcode, process.args, 82s output=stdout, stderr=stderr) 82s E subprocess.CalledProcessError: Command '['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_None_ecdsa_50/oskey1'), '-t', 'ecdsa', '-N', '', '-b', '521']' returned non-zero exit status 1. 82s 82s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 82s ----------------------------- Captured stdout call ----------------------------- 82s Generating public/private ecdsa key pair. 82s ----------------------------- Captured stderr call ----------------------------- 82s Saving key "/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_None_ecdsa_50/oskey1" failed: Permission denied 82s __________________________ test_from_openssh[PEM-rsa] __________________________ 82s 82s request = > 82s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_PEM_rsa_0') 82s keytype = 'rsa', keyformat = 'PEM' 82s 82s @pytest.mark.parametrize("keytype", keytypes) 82s @pytest.mark.parametrize("keyformat", [None, "PEM"]) 82s def test_from_openssh(request, tmp_path, keytype, keyformat): 82s """ 82s Convert OpenSSH to Dropbear format, 82s PEM and OpenSSH internal 82s """ 82s opt = request.config.option 82s kt, keybits = parse_keytype(keytype) 82s 82s if kt == 'dss' and keyformat is None: 82s pytest.skip("dss doesn't support openssh format") 82s 82s os_kt = kt 82s if os_kt == 'dss': 82s # OpenSSH calls it 'dsa', Dropbear calls it 'dss' 82s os_kt = 'dsa' 82s 82s os_key = tmp_path / 'oskey1' 82s db_key = tmp_path / 'dbkey1' 82s 82s # Generate an OpenSSH key 82s args = [ 82s opt.ssh_keygen, 82s '-f', os_key, 82s '-t', os_kt, 82s '-N', '', # no password 82s ] 82s if keybits is not None: 82s args += ['-b', keybits] 82s if keyformat: 82s args += ['-m', keyformat] 82s > p = subprocess.run(args, check=True) 82s 82s test_dropbearconvert.py:50: 82s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 82s 82s input = None, capture_output = False, timeout = None, check = True 82s popenargs = (['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_PEM_rsa_0/oskey1'), '-t', 'rsa', '-N', ...],) 82s kwargs = {} 82s process = 82s stdout = None, stderr = None, retcode = 1 82s 82s def run(*popenargs, 82s input=None, capture_output=False, timeout=None, check=False, **kwargs): 82s """Run command with arguments and return a CompletedProcess instance. 82s 82s The returned instance will have attributes args, returncode, stdout and 82s stderr. By default, stdout and stderr are not captured, and those attributes 82s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 82s or pass capture_output=True to capture both. 82s 82s If check is True and the exit code was non-zero, it raises a 82s CalledProcessError. The CalledProcessError object will have the return code 82s in the returncode attribute, and output & stderr attributes if those streams 82s were captured. 82s 82s If timeout (seconds) is given and the process takes too long, 82s a TimeoutExpired exception will be raised. 82s 82s There is an optional argument "input", allowing you to 82s pass bytes or a string to the subprocess's stdin. If you use this argument 82s you may not also use the Popen constructor's "stdin" argument, as 82s it will be used internally. 82s 82s By default, all communication is in bytes, and therefore any "input" should 82s be bytes, and the stdout and stderr will be bytes. If in text mode, any 82s "input" should be a string, and stdout and stderr will be strings decoded 82s according to locale encoding, or by "encoding" if set. Text mode is 82s triggered by setting any of text, encoding, errors or universal_newlines. 82s 82s The other arguments are the same as for the Popen constructor. 82s """ 82s if input is not None: 82s if kwargs.get('stdin') is not None: 82s raise ValueError('stdin and input arguments may not both be used.') 82s kwargs['stdin'] = PIPE 82s 82s if capture_output: 82s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 82s raise ValueError('stdout and stderr arguments may not be used ' 82s 'with capture_output.') 82s kwargs['stdout'] = PIPE 82s kwargs['stderr'] = PIPE 82s 82s with Popen(*popenargs, **kwargs) as process: 82s try: 82s stdout, stderr = process.communicate(input, timeout=timeout) 82s except TimeoutExpired as exc: 82s process.kill() 82s if _mswindows: 82s # Windows accumulates the output in a single blocking 82s # read() call run on child threads, with the timeout 82s # being done in a join() on those threads. communicate() 82s # _after_ kill() is required to collect that and add it 82s # to the exception. 82s exc.stdout, exc.stderr = process.communicate() 82s else: 82s # POSIX _communicate already populated the output so 82s # far into the TimeoutExpired exception. 82s process.wait() 82s raise 82s except: # Including KeyboardInterrupt, communicate handled that. 82s process.kill() 82s # We don't call process.wait() as .__exit__ does that for us. 82s raise 82s retcode = process.poll() 82s if check and retcode: 82s > raise CalledProcessError(retcode, process.args, 82s output=stdout, stderr=stderr) 82s E subprocess.CalledProcessError: Command '['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_PEM_rsa_0/oskey1'), '-t', 'rsa', '-N', '', '-m', 'PEM']' returned non-zero exit status 1. 82s 82s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 82s ----------------------------- Captured stdout call ----------------------------- 82s Generating public/private rsa key pair. 82s ----------------------------- Captured stderr call ----------------------------- 82s Saving key "/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_PEM_rsa_0/oskey1" failed: Permission denied 82s _______________________ test_from_openssh[PEM-rsa-4096] ________________________ 82s 82s request = > 82s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_PEM_rsa_40960') 82s keytype = 'rsa-4096', keyformat = 'PEM' 82s 82s @pytest.mark.parametrize("keytype", keytypes) 82s @pytest.mark.parametrize("keyformat", [None, "PEM"]) 82s def test_from_openssh(request, tmp_path, keytype, keyformat): 82s """ 82s Convert OpenSSH to Dropbear format, 82s PEM and OpenSSH internal 82s """ 82s opt = request.config.option 82s kt, keybits = parse_keytype(keytype) 82s 82s if kt == 'dss' and keyformat is None: 82s pytest.skip("dss doesn't support openssh format") 82s 82s os_kt = kt 82s if os_kt == 'dss': 82s # OpenSSH calls it 'dsa', Dropbear calls it 'dss' 82s os_kt = 'dsa' 82s 82s os_key = tmp_path / 'oskey1' 82s db_key = tmp_path / 'dbkey1' 82s 82s # Generate an OpenSSH key 82s args = [ 82s opt.ssh_keygen, 82s '-f', os_key, 82s '-t', os_kt, 82s '-N', '', # no password 82s ] 82s if keybits is not None: 82s args += ['-b', keybits] 82s if keyformat: 82s args += ['-m', keyformat] 82s > p = subprocess.run(args, check=True) 82s 82s test_dropbearconvert.py:50: 82s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 82s 82s input = None, capture_output = False, timeout = None, check = True 82s popenargs = (['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_PEM_rsa_40960/oskey1'), '-t', 'rsa', '-N', ...],) 82s kwargs = {} 82s process = 82s stdout = None, stderr = None, retcode = 1 82s 82s def run(*popenargs, 82s input=None, capture_output=False, timeout=None, check=False, **kwargs): 82s """Run command with arguments and return a CompletedProcess instance. 82s 82s The returned instance will have attributes args, returncode, stdout and 82s stderr. By default, stdout and stderr are not captured, and those attributes 82s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 82s or pass capture_output=True to capture both. 82s 82s If check is True and the exit code was non-zero, it raises a 82s CalledProcessError. The CalledProcessError object will have the return code 82s in the returncode attribute, and output & stderr attributes if those streams 82s were captured. 82s 82s If timeout (seconds) is given and the process takes too long, 82s a TimeoutExpired exception will be raised. 82s 82s There is an optional argument "input", allowing you to 82s pass bytes or a string to the subprocess's stdin. If you use this argument 82s you may not also use the Popen constructor's "stdin" argument, as 82s it will be used internally. 82s 82s By default, all communication is in bytes, and therefore any "input" should 82s be bytes, and the stdout and stderr will be bytes. If in text mode, any 82s "input" should be a string, and stdout and stderr will be strings decoded 82s according to locale encoding, or by "encoding" if set. Text mode is 82s triggered by setting any of text, encoding, errors or universal_newlines. 82s 82s The other arguments are the same as for the Popen constructor. 82s """ 82s if input is not None: 82s if kwargs.get('stdin') is not None: 82s raise ValueError('stdin and input arguments may not both be used.') 82s kwargs['stdin'] = PIPE 82s 82s if capture_output: 82s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 82s raise ValueError('stdout and stderr arguments may not be used ' 82s 'with capture_output.') 82s kwargs['stdout'] = PIPE 82s kwargs['stderr'] = PIPE 82s 82s with Popen(*popenargs, **kwargs) as process: 82s try: 82s stdout, stderr = process.communicate(input, timeout=timeout) 82s except TimeoutExpired as exc: 82s process.kill() 82s if _mswindows: 82s # Windows accumulates the output in a single blocking 82s # read() call run on child threads, with the timeout 82s # being done in a join() on those threads. communicate() 82s # _after_ kill() is required to collect that and add it 82s # to the exception. 82s exc.stdout, exc.stderr = process.communicate() 82s else: 82s # POSIX _communicate already populated the output so 82s # far into the TimeoutExpired exception. 82s process.wait() 82s raise 82s except: # Including KeyboardInterrupt, communicate handled that. 82s process.kill() 82s # We don't call process.wait() as .__exit__ does that for us. 82s raise 82s retcode = process.poll() 82s if check and retcode: 82s > raise CalledProcessError(retcode, process.args, 82s output=stdout, stderr=stderr) 82s E subprocess.CalledProcessError: Command '['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_PEM_rsa_40960/oskey1'), '-t', 'rsa', '-N', '', '-b', '4096', '-m', 'PEM']' returned non-zero exit status 1. 82s 82s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 82s ----------------------------- Captured stdout call ----------------------------- 82s Generating public/private rsa key pair. 82s ----------------------------- Captured stderr call ----------------------------- 82s Saving key "/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_PEM_rsa_40960/oskey1" failed: Permission denied 82s ________________________ test_from_openssh[PEM-ed25519] ________________________ 82s 82s request = > 82s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_PEM_ed25519_0') 82s keytype = 'ed25519', keyformat = 'PEM' 82s 82s @pytest.mark.parametrize("keytype", keytypes) 82s @pytest.mark.parametrize("keyformat", [None, "PEM"]) 82s def test_from_openssh(request, tmp_path, keytype, keyformat): 82s """ 82s Convert OpenSSH to Dropbear format, 82s PEM and OpenSSH internal 82s """ 82s opt = request.config.option 82s kt, keybits = parse_keytype(keytype) 82s 82s if kt == 'dss' and keyformat is None: 82s pytest.skip("dss doesn't support openssh format") 82s 82s os_kt = kt 82s if os_kt == 'dss': 82s # OpenSSH calls it 'dsa', Dropbear calls it 'dss' 82s os_kt = 'dsa' 82s 82s os_key = tmp_path / 'oskey1' 82s db_key = tmp_path / 'dbkey1' 82s 82s # Generate an OpenSSH key 82s args = [ 82s opt.ssh_keygen, 82s '-f', os_key, 82s '-t', os_kt, 82s '-N', '', # no password 82s ] 82s if keybits is not None: 82s args += ['-b', keybits] 82s if keyformat: 82s args += ['-m', keyformat] 82s > p = subprocess.run(args, check=True) 82s 82s test_dropbearconvert.py:50: 82s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 82s 82s input = None, capture_output = False, timeout = None, check = True 82s popenargs = (['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_PEM_ed25519_0/oskey1'), '-t', 'ed25519', '-N', ...],) 82s kwargs = {} 82s process = 82s stdout = None, stderr = None, retcode = 1 82s 82s def run(*popenargs, 82s input=None, capture_output=False, timeout=None, check=False, **kwargs): 82s """Run command with arguments and return a CompletedProcess instance. 82s 82s The returned instance will have attributes args, returncode, stdout and 82s stderr. By default, stdout and stderr are not captured, and those attributes 82s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 82s or pass capture_output=True to capture both. 82s 82s If check is True and the exit code was non-zero, it raises a 82s CalledProcessError. The CalledProcessError object will have the return code 82s in the returncode attribute, and output & stderr attributes if those streams 82s were captured. 82s 82s If timeout (seconds) is given and the process takes too long, 82s a TimeoutExpired exception will be raised. 82s 82s There is an optional argument "input", allowing you to 82s pass bytes or a string to the subprocess's stdin. If you use this argument 82s you may not also use the Popen constructor's "stdin" argument, as 82s it will be used internally. 82s 82s By default, all communication is in bytes, and therefore any "input" should 82s be bytes, and the stdout and stderr will be bytes. If in text mode, any 82s "input" should be a string, and stdout and stderr will be strings decoded 82s according to locale encoding, or by "encoding" if set. Text mode is 82s triggered by setting any of text, encoding, errors or universal_newlines. 82s 82s The other arguments are the same as for the Popen constructor. 82s """ 82s if input is not None: 82s if kwargs.get('stdin') is not None: 82s raise ValueError('stdin and input arguments may not both be used.') 82s kwargs['stdin'] = PIPE 82s 82s if capture_output: 82s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 82s raise ValueError('stdout and stderr arguments may not be used ' 82s 'with capture_output.') 82s kwargs['stdout'] = PIPE 82s kwargs['stderr'] = PIPE 82s 82s with Popen(*popenargs, **kwargs) as process: 82s try: 82s stdout, stderr = process.communicate(input, timeout=timeout) 82s except TimeoutExpired as exc: 82s process.kill() 82s if _mswindows: 82s # Windows accumulates the output in a single blocking 82s # read() call run on child threads, with the timeout 82s # being done in a join() on those threads. communicate() 82s # _after_ kill() is required to collect that and add it 82s # to the exception. 82s exc.stdout, exc.stderr = process.communicate() 82s else: 82s # POSIX _communicate already populated the output so 82s # far into the TimeoutExpired exception. 82s process.wait() 82s raise 82s except: # Including KeyboardInterrupt, communicate handled that. 82s process.kill() 82s # We don't call process.wait() as .__exit__ does that for us. 82s raise 82s retcode = process.poll() 82s if check and retcode: 82s > raise CalledProcessError(retcode, process.args, 82s output=stdout, stderr=stderr) 82s E subprocess.CalledProcessError: Command '['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_PEM_ed25519_0/oskey1'), '-t', 'ed25519', '-N', '', '-m', 'PEM']' returned non-zero exit status 1. 82s 82s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 82s ----------------------------- Captured stdout call ----------------------------- 82s Generating public/private ed25519 key pair. 82s ----------------------------- Captured stderr call ----------------------------- 82s Saving key "/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_PEM_ed25519_0/oskey1" failed: Permission denied 82s _________________________ test_from_openssh[PEM-ecdsa] _________________________ 82s 82s request = > 82s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_PEM_ecdsa_0') 82s keytype = 'ecdsa', keyformat = 'PEM' 82s 82s @pytest.mark.parametrize("keytype", keytypes) 82s @pytest.mark.parametrize("keyformat", [None, "PEM"]) 82s def test_from_openssh(request, tmp_path, keytype, keyformat): 82s """ 82s Convert OpenSSH to Dropbear format, 82s PEM and OpenSSH internal 82s """ 82s opt = request.config.option 82s kt, keybits = parse_keytype(keytype) 82s 82s if kt == 'dss' and keyformat is None: 82s pytest.skip("dss doesn't support openssh format") 82s 82s os_kt = kt 82s if os_kt == 'dss': 82s # OpenSSH calls it 'dsa', Dropbear calls it 'dss' 82s os_kt = 'dsa' 82s 82s os_key = tmp_path / 'oskey1' 82s db_key = tmp_path / 'dbkey1' 82s 82s # Generate an OpenSSH key 82s args = [ 82s opt.ssh_keygen, 82s '-f', os_key, 82s '-t', os_kt, 82s '-N', '', # no password 82s ] 82s if keybits is not None: 82s args += ['-b', keybits] 82s if keyformat: 82s args += ['-m', keyformat] 82s > p = subprocess.run(args, check=True) 82s 82s test_dropbearconvert.py:50: 82s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 82s 82s input = None, capture_output = False, timeout = None, check = True 82s popenargs = (['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_PEM_ecdsa_0/oskey1'), '-t', 'ecdsa', '-N', ...],) 82s kwargs = {} 82s process = 82s stdout = None, stderr = None, retcode = 1 82s 82s def run(*popenargs, 82s input=None, capture_output=False, timeout=None, check=False, **kwargs): 82s """Run command with arguments and return a CompletedProcess instance. 82s 82s The returned instance will have attributes args, returncode, stdout and 82s stderr. By default, stdout and stderr are not captured, and those attributes 82s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 82s or pass capture_output=True to capture both. 82s 82s If check is True and the exit code was non-zero, it raises a 82s CalledProcessError. The CalledProcessError object will have the return code 82s in the returncode attribute, and output & stderr attributes if those streams 82s were captured. 82s 82s If timeout (seconds) is given and the process takes too long, 82s a TimeoutExpired exception will be raised. 82s 82s There is an optional argument "input", allowing you to 82s pass bytes or a string to the subprocess's stdin. If you use this argument 82s you may not also use the Popen constructor's "stdin" argument, as 82s it will be used internally. 82s 82s By default, all communication is in bytes, and therefore any "input" should 82s be bytes, and the stdout and stderr will be bytes. If in text mode, any 82s "input" should be a string, and stdout and stderr will be strings decoded 82s according to locale encoding, or by "encoding" if set. Text mode is 82s triggered by setting any of text, encoding, errors or universal_newlines. 82s 82s The other arguments are the same as for the Popen constructor. 82s """ 82s if input is not None: 82s if kwargs.get('stdin') is not None: 82s raise ValueError('stdin and input arguments may not both be used.') 82s kwargs['stdin'] = PIPE 82s 82s if capture_output: 82s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 82s raise ValueError('stdout and stderr arguments may not be used ' 82s 'with capture_output.') 82s kwargs['stdout'] = PIPE 82s kwargs['stderr'] = PIPE 82s 82s with Popen(*popenargs, **kwargs) as process: 82s try: 82s stdout, stderr = process.communicate(input, timeout=timeout) 82s except TimeoutExpired as exc: 82s process.kill() 82s if _mswindows: 82s # Windows accumulates the output in a single blocking 82s # read() call run on child threads, with the timeout 82s # being done in a join() on those threads. communicate() 82s # _after_ kill() is required to collect that and add it 82s # to the exception. 82s exc.stdout, exc.stderr = process.communicate() 82s else: 82s # POSIX _communicate already populated the output so 82s # far into the TimeoutExpired exception. 82s process.wait() 82s raise 82s except: # Including KeyboardInterrupt, communicate handled that. 82s process.kill() 82s # We don't call process.wait() as .__exit__ does that for us. 82s raise 82s retcode = process.poll() 82s if check and retcode: 82s > raise CalledProcessError(retcode, process.args, 82s output=stdout, stderr=stderr) 82s E subprocess.CalledProcessError: Command '['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_PEM_ecdsa_0/oskey1'), '-t', 'ecdsa', '-N', '', '-m', 'PEM']' returned non-zero exit status 1. 82s 82s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 82s ----------------------------- Captured stdout call ----------------------------- 82s Generating public/private ecdsa key pair. 82s ----------------------------- Captured stderr call ----------------------------- 82s Saving key "/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_PEM_ecdsa_0/oskey1" failed: Permission denied 82s _______________________ test_from_openssh[PEM-ecdsa-256] _______________________ 82s 82s request = > 82s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_PEM_ecdsa_250') 82s keytype = 'ecdsa-256', keyformat = 'PEM' 82s 82s @pytest.mark.parametrize("keytype", keytypes) 82s @pytest.mark.parametrize("keyformat", [None, "PEM"]) 82s def test_from_openssh(request, tmp_path, keytype, keyformat): 82s """ 82s Convert OpenSSH to Dropbear format, 82s PEM and OpenSSH internal 82s """ 82s opt = request.config.option 82s kt, keybits = parse_keytype(keytype) 82s 82s if kt == 'dss' and keyformat is None: 82s pytest.skip("dss doesn't support openssh format") 82s 82s os_kt = kt 82s if os_kt == 'dss': 82s # OpenSSH calls it 'dsa', Dropbear calls it 'dss' 82s os_kt = 'dsa' 82s 82s os_key = tmp_path / 'oskey1' 82s db_key = tmp_path / 'dbkey1' 82s 82s # Generate an OpenSSH key 82s args = [ 82s opt.ssh_keygen, 82s '-f', os_key, 82s '-t', os_kt, 82s '-N', '', # no password 82s ] 82s if keybits is not None: 82s args += ['-b', keybits] 82s if keyformat: 82s args += ['-m', keyformat] 82s > p = subprocess.run(args, check=True) 82s 82s test_dropbearconvert.py:50: 82s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 82s 82s input = None, capture_output = False, timeout = None, check = True 82s popenargs = (['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_PEM_ecdsa_250/oskey1'), '-t', 'ecdsa', '-N', ...],) 82s kwargs = {} 82s process = 82s stdout = None, stderr = None, retcode = 1 82s 82s def run(*popenargs, 82s input=None, capture_output=False, timeout=None, check=False, **kwargs): 82s """Run command with arguments and return a CompletedProcess instance. 82s 82s The returned instance will have attributes args, returncode, stdout and 82s stderr. By default, stdout and stderr are not captured, and those attributes 82s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 82s or pass capture_output=True to capture both. 82s 82s If check is True and the exit code was non-zero, it raises a 82s CalledProcessError. The CalledProcessError object will have the return code 82s in the returncode attribute, and output & stderr attributes if those streams 82s were captured. 82s 82s If timeout (seconds) is given and the process takes too long, 82s a TimeoutExpired exception will be raised. 82s 82s There is an optional argument "input", allowing you to 82s pass bytes or a string to the subprocess's stdin. If you use this argument 82s you may not also use the Popen constructor's "stdin" argument, as 82s it will be used internally. 82s 82s By default, all communication is in bytes, and therefore any "input" should 82s be bytes, and the stdout and stderr will be bytes. If in text mode, any 82s "input" should be a string, and stdout and stderr will be strings decoded 82s according to locale encoding, or by "encoding" if set. Text mode is 82s triggered by setting any of text, encoding, errors or universal_newlines. 82s 82s The other arguments are the same as for the Popen constructor. 82s """ 82s if input is not None: 82s if kwargs.get('stdin') is not None: 82s raise ValueError('stdin and input arguments may not both be used.') 82s kwargs['stdin'] = PIPE 82s 82s if capture_output: 82s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 82s raise ValueError('stdout and stderr arguments may not be used ' 82s 'with capture_output.') 82s kwargs['stdout'] = PIPE 82s kwargs['stderr'] = PIPE 82s 82s with Popen(*popenargs, **kwargs) as process: 82s try: 82s stdout, stderr = process.communicate(input, timeout=timeout) 82s except TimeoutExpired as exc: 82s process.kill() 82s if _mswindows: 82s # Windows accumulates the output in a single blocking 82s # read() call run on child threads, with the timeout 82s # being done in a join() on those threads. communicate() 82s # _after_ kill() is required to collect that and add it 82s # to the exception. 82s exc.stdout, exc.stderr = process.communicate() 82s else: 82s # POSIX _communicate already populated the output so 82s # far into the TimeoutExpired exception. 82s process.wait() 82s raise 82s except: # Including KeyboardInterrupt, communicate handled that. 82s process.kill() 82s # We don't call process.wait() as .__exit__ does that for us. 82s raise 82s retcode = process.poll() 82s if check and retcode: 82s > raise CalledProcessError(retcode, process.args, 82s output=stdout, stderr=stderr) 82s E subprocess.CalledProcessError: Command '['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_PEM_ecdsa_250/oskey1'), '-t', 'ecdsa', '-N', '', '-b', '256', '-m', 'PEM']' returned non-zero exit status 1. 82s 82s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 82s ----------------------------- Captured stdout call ----------------------------- 82s Generating public/private ecdsa key pair. 82s ----------------------------- Captured stderr call ----------------------------- 82s Saving key "/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_PEM_ecdsa_250/oskey1" failed: Permission denied 82s _______________________ test_from_openssh[PEM-ecdsa-384] _______________________ 82s 82s request = > 82s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_PEM_ecdsa_380') 82s keytype = 'ecdsa-384', keyformat = 'PEM' 82s 82s @pytest.mark.parametrize("keytype", keytypes) 82s @pytest.mark.parametrize("keyformat", [None, "PEM"]) 82s def test_from_openssh(request, tmp_path, keytype, keyformat): 82s """ 82s Convert OpenSSH to Dropbear format, 82s PEM and OpenSSH internal 82s """ 82s opt = request.config.option 82s kt, keybits = parse_keytype(keytype) 82s 82s if kt == 'dss' and keyformat is None: 82s pytest.skip("dss doesn't support openssh format") 82s 82s os_kt = kt 82s if os_kt == 'dss': 82s # OpenSSH calls it 'dsa', Dropbear calls it 'dss' 82s os_kt = 'dsa' 82s 82s os_key = tmp_path / 'oskey1' 82s db_key = tmp_path / 'dbkey1' 82s 82s # Generate an OpenSSH key 82s args = [ 82s opt.ssh_keygen, 82s '-f', os_key, 82s '-t', os_kt, 82s '-N', '', # no password 82s ] 82s if keybits is not None: 82s args += ['-b', keybits] 82s if keyformat: 82s args += ['-m', keyformat] 82s > p = subprocess.run(args, check=True) 82s 82s test_dropbearconvert.py:50: 82s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 82s 82s input = None, capture_output = False, timeout = None, check = True 82s popenargs = (['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_PEM_ecdsa_380/oskey1'), '-t', 'ecdsa', '-N', ...],) 82s kwargs = {} 82s process = 82s stdout = None, stderr = None, retcode = 1 82s 82s def run(*popenargs, 82s input=None, capture_output=False, timeout=None, check=False, **kwargs): 82s """Run command with arguments and return a CompletedProcess instance. 82s 82s The returned instance will have attributes args, returncode, stdout and 82s stderr. By default, stdout and stderr are not captured, and those attributes 82s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 82s or pass capture_output=True to capture both. 82s 82s If check is True and the exit code was non-zero, it raises a 82s CalledProcessError. The CalledProcessError object will have the return code 82s in the returncode attribute, and output & stderr attributes if those streams 82s were captured. 82s 82s If timeout (seconds) is given and the process takes too long, 82s a TimeoutExpired exception will be raised. 82s 82s There is an optional argument "input", allowing you to 82s pass bytes or a string to the subprocess's stdin. If you use this argument 82s you may not also use the Popen constructor's "stdin" argument, as 82s it will be used internally. 82s 82s By default, all communication is in bytes, and therefore any "input" should 82s be bytes, and the stdout and stderr will be bytes. If in text mode, any 82s "input" should be a string, and stdout and stderr will be strings decoded 82s according to locale encoding, or by "encoding" if set. Text mode is 82s triggered by setting any of text, encoding, errors or universal_newlines. 82s 82s The other arguments are the same as for the Popen constructor. 82s """ 82s if input is not None: 82s if kwargs.get('stdin') is not None: 82s raise ValueError('stdin and input arguments may not both be used.') 82s kwargs['stdin'] = PIPE 82s 82s if capture_output: 82s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 82s raise ValueError('stdout and stderr arguments may not be used ' 82s 'with capture_output.') 82s kwargs['stdout'] = PIPE 82s kwargs['stderr'] = PIPE 82s 82s with Popen(*popenargs, **kwargs) as process: 82s try: 82s stdout, stderr = process.communicate(input, timeout=timeout) 82s except TimeoutExpired as exc: 82s process.kill() 82s if _mswindows: 82s # Windows accumulates the output in a single blocking 82s # read() call run on child threads, with the timeout 82s # being done in a join() on those threads. communicate() 82s # _after_ kill() is required to collect that and add it 82s # to the exception. 82s exc.stdout, exc.stderr = process.communicate() 82s else: 82s # POSIX _communicate already populated the output so 82s # far into the TimeoutExpired exception. 82s process.wait() 82s raise 82s except: # Including KeyboardInterrupt, communicate handled that. 82s process.kill() 82s # We don't call process.wait() as .__exit__ does that for us. 82s raise 82s retcode = process.poll() 82s if check and retcode: 82s > raise CalledProcessError(retcode, process.args, 82s output=stdout, stderr=stderr) 82s E subprocess.CalledProcessError: Command '['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_PEM_ecdsa_380/oskey1'), '-t', 'ecdsa', '-N', '', '-b', '384', '-m', 'PEM']' returned non-zero exit status 1. 82s 82s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 82s ----------------------------- Captured stdout call ----------------------------- 82s Generating public/private ecdsa key pair. 82s ----------------------------- Captured stderr call ----------------------------- 82s Saving key "/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_PEM_ecdsa_380/oskey1" failed: Permission denied 82s _______________________ test_from_openssh[PEM-ecdsa-521] _______________________ 82s 82s request = > 82s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_PEM_ecdsa_520') 82s keytype = 'ecdsa-521', keyformat = 'PEM' 82s 82s @pytest.mark.parametrize("keytype", keytypes) 82s @pytest.mark.parametrize("keyformat", [None, "PEM"]) 82s def test_from_openssh(request, tmp_path, keytype, keyformat): 82s """ 82s Convert OpenSSH to Dropbear format, 82s PEM and OpenSSH internal 82s """ 82s opt = request.config.option 82s kt, keybits = parse_keytype(keytype) 82s 82s if kt == 'dss' and keyformat is None: 82s pytest.skip("dss doesn't support openssh format") 82s 82s os_kt = kt 82s if os_kt == 'dss': 82s # OpenSSH calls it 'dsa', Dropbear calls it 'dss' 82s os_kt = 'dsa' 82s 82s os_key = tmp_path / 'oskey1' 82s db_key = tmp_path / 'dbkey1' 82s 82s # Generate an OpenSSH key 82s args = [ 82s opt.ssh_keygen, 82s '-f', os_key, 82s '-t', os_kt, 82s '-N', '', # no password 82s ] 82s if keybits is not None: 82s args += ['-b', keybits] 82s if keyformat: 82s args += ['-m', keyformat] 82s > p = subprocess.run(args, check=True) 82s 82s test_dropbearconvert.py:50: 82s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 82s 82s input = None, capture_output = False, timeout = None, check = True 82s popenargs = (['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_PEM_ecdsa_520/oskey1'), '-t', 'ecdsa', '-N', ...],) 82s kwargs = {} 82s process = 82s stdout = None, stderr = None, retcode = 1 82s 82s def run(*popenargs, 82s input=None, capture_output=False, timeout=None, check=False, **kwargs): 82s """Run command with arguments and return a CompletedProcess instance. 82s 82s The returned instance will have attributes args, returncode, stdout and 82s stderr. By default, stdout and stderr are not captured, and those attributes 82s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 82s or pass capture_output=True to capture both. 82s 82s If check is True and the exit code was non-zero, it raises a 82s CalledProcessError. The CalledProcessError object will have the return code 82s in the returncode attribute, and output & stderr attributes if those streams 82s were captured. 82s 82s If timeout (seconds) is given and the process takes too long, 82s a TimeoutExpired exception will be raised. 82s 82s There is an optional argument "input", allowing you to 82s pass bytes or a string to the subprocess's stdin. If you use this argument 82s you may not also use the Popen constructor's "stdin" argument, as 82s it will be used internally. 82s 82s By default, all communication is in bytes, and therefore any "input" should 82s be bytes, and the stdout and stderr will be bytes. If in text mode, any 82s "input" should be a string, and stdout and stderr will be strings decoded 82s according to locale encoding, or by "encoding" if set. Text mode is 82s triggered by setting any of text, encoding, errors or universal_newlines. 82s 82s The other arguments are the same as for the Popen constructor. 82s """ 82s if input is not None: 82s if kwargs.get('stdin') is not None: 82s raise ValueError('stdin and input arguments may not both be used.') 82s kwargs['stdin'] = PIPE 82s 82s if capture_output: 82s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 82s raise ValueError('stdout and stderr arguments may not be used ' 82s 'with capture_output.') 82s kwargs['stdout'] = PIPE 82s kwargs['stderr'] = PIPE 82s 82s with Popen(*popenargs, **kwargs) as process: 82s try: 82s stdout, stderr = process.communicate(input, timeout=timeout) 82s except TimeoutExpired as exc: 82s process.kill() 82s if _mswindows: 82s # Windows accumulates the output in a single blocking 82s # read() call run on child threads, with the timeout 82s # being done in a join() on those threads. communicate() 82s # _after_ kill() is required to collect that and add it 82s # to the exception. 82s exc.stdout, exc.stderr = process.communicate() 82s else: 82s # POSIX _communicate already populated the output so 82s # far into the TimeoutExpired exception. 82s process.wait() 82s raise 82s except: # Including KeyboardInterrupt, communicate handled that. 82s process.kill() 82s # We don't call process.wait() as .__exit__ does that for us. 82s raise 82s retcode = process.poll() 82s if check and retcode: 82s > raise CalledProcessError(retcode, process.args, 82s output=stdout, stderr=stderr) 82s E subprocess.CalledProcessError: Command '['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_PEM_ecdsa_520/oskey1'), '-t', 'ecdsa', '-N', '', '-b', '521', '-m', 'PEM']' returned non-zero exit status 1. 82s 82s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 82s ----------------------------- Captured stdout call ----------------------------- 82s Generating public/private ecdsa key pair. 82s ----------------------------- Captured stderr call ----------------------------- 82s Saving key "/tmp/pytest-of-ubuntu/pytest-0/test_from_openssh_PEM_ecdsa_520/oskey1" failed: Permission denied 82s _____________________________ test_roundtrip[rsa] ______________________________ 82s 82s request = > 82s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_rsa_0') 82s keytype = 'rsa' 82s 82s @pytest.mark.parametrize("keytype", keytypes) 82s def test_roundtrip(request, tmp_path, keytype): 82s """ 82s Dropbear's private key format is deterministic so 82s we can compare round trip conversion. (OpenSSH's 82s format has more variable comments and other fields). 82s """ 82s opt = request.config.option 82s kt, keybits = parse_keytype(keytype) 82s 82s os_key = tmp_path / 'oskey1' 82s db_key1 = tmp_path / 'dbkey1' 82s db_key2 = tmp_path / 'dbkey2' 82s 82s # generate a key 82s args = [ 82s opt.dropbearkey, 82s '-t', kt, 82s '-f', db_key1, 82s ] 82s if keybits is not None: 82s args += ['-s', keybits] 82s p = subprocess.run(args, check=True) 82s 82s # convert to openssh 82s args = [ 82s opt.dropbearconvert, 82s 'dropbear', 'openssh', 82s db_key1, os_key, 82s ] 82s p = subprocess.run(args, check=True) 82s 82s # Check ssh-keygen can read it 82s args = [ 82s opt.ssh_keygen, 82s '-f', os_key, 82s '-y', 82s ] 82s > p = subprocess.run(args, check=True, text=True, stdout=subprocess.PIPE) 82s 82s test_dropbearconvert.py:110: 82s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 82s 82s input = None, capture_output = False, timeout = None, check = True 82s popenargs = (['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_rsa_0/oskey1'), '-y'],) 82s kwargs = {'stdout': -1, 'text': True} 82s process = 82s stdout = '', stderr = None, retcode = 255 82s 82s def run(*popenargs, 82s input=None, capture_output=False, timeout=None, check=False, **kwargs): 82s """Run command with arguments and return a CompletedProcess instance. 82s 82s The returned instance will have attributes args, returncode, stdout and 82s stderr. By default, stdout and stderr are not captured, and those attributes 82s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 82s or pass capture_output=True to capture both. 82s 82s If check is True and the exit code was non-zero, it raises a 82s CalledProcessError. The CalledProcessError object will have the return code 82s in the returncode attribute, and output & stderr attributes if those streams 82s were captured. 82s 82s If timeout (seconds) is given and the process takes too long, 82s a TimeoutExpired exception will be raised. 82s 82s There is an optional argument "input", allowing you to 82s pass bytes or a string to the subprocess's stdin. If you use this argument 82s you may not also use the Popen constructor's "stdin" argument, as 82s it will be used internally. 82s 82s By default, all communication is in bytes, and therefore any "input" should 82s be bytes, and the stdout and stderr will be bytes. If in text mode, any 82s "input" should be a string, and stdout and stderr will be strings decoded 82s according to locale encoding, or by "encoding" if set. Text mode is 82s triggered by setting any of text, encoding, errors or universal_newlines. 82s 82s The other arguments are the same as for the Popen constructor. 82s """ 82s if input is not None: 82s if kwargs.get('stdin') is not None: 82s raise ValueError('stdin and input arguments may not both be used.') 82s kwargs['stdin'] = PIPE 82s 82s if capture_output: 82s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 82s raise ValueError('stdout and stderr arguments may not be used ' 82s 'with capture_output.') 82s kwargs['stdout'] = PIPE 82s kwargs['stderr'] = PIPE 82s 82s with Popen(*popenargs, **kwargs) as process: 82s try: 82s stdout, stderr = process.communicate(input, timeout=timeout) 82s except TimeoutExpired as exc: 82s process.kill() 82s if _mswindows: 82s # Windows accumulates the output in a single blocking 82s # read() call run on child threads, with the timeout 82s # being done in a join() on those threads. communicate() 82s # _after_ kill() is required to collect that and add it 82s # to the exception. 82s exc.stdout, exc.stderr = process.communicate() 82s else: 82s # POSIX _communicate already populated the output so 82s # far into the TimeoutExpired exception. 82s process.wait() 82s raise 82s except: # Including KeyboardInterrupt, communicate handled that. 82s process.kill() 82s # We don't call process.wait() as .__exit__ does that for us. 82s raise 82s retcode = process.poll() 82s if check and retcode: 82s > raise CalledProcessError(retcode, process.args, 82s output=stdout, stderr=stderr) 82s E subprocess.CalledProcessError: Command '['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_rsa_0/oskey1'), '-y']' returned non-zero exit status 255. 82s 82s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 82s ----------------------------- Captured stdout call ----------------------------- 82s Public key portion is: 82s ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCzmz5bh21dVMOq3F7r2IF79B1XKs6Aovup8VdExmB/fJn5RUk11mppWNDXyFJUGQhbPGRi3afBptCoDzTThz3mfU40KUIugID2E+2N5jWOJowrlOcQeZnbPLEH1atBlsgqyQ9hGFZW1OodPBvt8jCGUyouVbaXQdKb8hU8zGCU/VIFmKKTGfI3Rsd4wzZBCr/TJIT4/X988C8R5Axnt9ZXNfgY2ek2JCg9EOTclK1esN8U6CVpku5ZuTLVIgoedGacKeWxrH/fKZHsRquWmUb8GOe+DK6WJgCYiHSwl1+a5BxarjWnhaKBGZ5nXN394R7glr6mqmhHNef1Pl8YwQuV ubuntu@autopkgtest 82s Fingerprint: SHA256:ZJUTb1xTG0pCSeaP+t14L5sE4/9DrI/8qvJHfLeZeT0 82s ----------------------------- Captured stderr call ----------------------------- 82s Generating 2048 bit rsa key, this may take a while... 82s Key is a ssh-rsa key 82s Wrote key to '/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_rsa_0/oskey1' 82s Load key "/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_rsa_0/oskey1": Permission denied 82s ___________________________ test_roundtrip[rsa-4096] ___________________________ 82s 82s request = > 82s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_rsa_4096_0') 82s keytype = 'rsa-4096' 82s 82s @pytest.mark.parametrize("keytype", keytypes) 82s def test_roundtrip(request, tmp_path, keytype): 82s """ 82s Dropbear's private key format is deterministic so 82s we can compare round trip conversion. (OpenSSH's 82s format has more variable comments and other fields). 82s """ 82s opt = request.config.option 82s kt, keybits = parse_keytype(keytype) 82s 82s os_key = tmp_path / 'oskey1' 82s db_key1 = tmp_path / 'dbkey1' 82s db_key2 = tmp_path / 'dbkey2' 82s 82s # generate a key 82s args = [ 82s opt.dropbearkey, 82s '-t', kt, 82s '-f', db_key1, 82s ] 82s if keybits is not None: 82s args += ['-s', keybits] 82s p = subprocess.run(args, check=True) 82s 82s # convert to openssh 82s args = [ 82s opt.dropbearconvert, 82s 'dropbear', 'openssh', 82s db_key1, os_key, 82s ] 82s p = subprocess.run(args, check=True) 82s 82s # Check ssh-keygen can read it 82s args = [ 82s opt.ssh_keygen, 82s '-f', os_key, 82s '-y', 82s ] 82s > p = subprocess.run(args, check=True, text=True, stdout=subprocess.PIPE) 82s 82s test_dropbearconvert.py:110: 82s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 82s 82s input = None, capture_output = False, timeout = None, check = True 82s popenargs = (['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_rsa_4096_0/oskey1'), '-y'],) 82s kwargs = {'stdout': -1, 'text': True} 82s process = 82s stdout = '', stderr = None, retcode = 255 82s 82s def run(*popenargs, 82s input=None, capture_output=False, timeout=None, check=False, **kwargs): 82s """Run command with arguments and return a CompletedProcess instance. 82s 82s The returned instance will have attributes args, returncode, stdout and 82s stderr. By default, stdout and stderr are not captured, and those attributes 82s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 82s or pass capture_output=True to capture both. 82s 82s If check is True and the exit code was non-zero, it raises a 82s CalledProcessError. The CalledProcessError object will have the return code 82s in the returncode attribute, and output & stderr attributes if those streams 82s were captured. 82s 82s If timeout (seconds) is given and the process takes too long, 82s a TimeoutExpired exception will be raised. 82s 82s There is an optional argument "input", allowing you to 82s pass bytes or a string to the subprocess's stdin. If you use this argument 82s you may not also use the Popen constructor's "stdin" argument, as 82s it will be used internally. 82s 82s By default, all communication is in bytes, and therefore any "input" should 82s be bytes, and the stdout and stderr will be bytes. If in text mode, any 82s "input" should be a string, and stdout and stderr will be strings decoded 82s according to locale encoding, or by "encoding" if set. Text mode is 82s triggered by setting any of text, encoding, errors or universal_newlines. 82s 82s The other arguments are the same as for the Popen constructor. 82s """ 82s if input is not None: 82s if kwargs.get('stdin') is not None: 82s raise ValueError('stdin and input arguments may not both be used.') 82s kwargs['stdin'] = PIPE 82s 82s if capture_output: 82s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 82s raise ValueError('stdout and stderr arguments may not be used ' 82s 'with capture_output.') 82s kwargs['stdout'] = PIPE 82s kwargs['stderr'] = PIPE 82s 82s with Popen(*popenargs, **kwargs) as process: 82s try: 82s stdout, stderr = process.communicate(input, timeout=timeout) 82s except TimeoutExpired as exc: 82s process.kill() 82s if _mswindows: 82s # Windows accumulates the output in a single blocking 82s # read() call run on child threads, with the timeout 82s # being done in a join() on those threads. communicate() 82s # _after_ kill() is required to collect that and add it 82s # to the exception. 82s exc.stdout, exc.stderr = process.communicate() 82s else: 82s # POSIX _communicate already populated the output so 82s # far into the TimeoutExpired exception. 82s process.wait() 82s raise 82s except: # Including KeyboardInterrupt, communicate handled that. 82s process.kill() 82s # We don't call process.wait() as .__exit__ does that for us. 82s raise 82s retcode = process.poll() 82s if check and retcode: 82s > raise CalledProcessError(retcode, process.args, 82s output=stdout, stderr=stderr) 82s E subprocess.CalledProcessError: Command '['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_rsa_4096_0/oskey1'), '-y']' returned non-zero exit status 255. 82s 82s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 82s ----------------------------- Captured stdout call ----------------------------- 82s Public key portion is: 82s ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCENZT4RWMhaKKzdLky6gu1VrUlF4QbVuZY8hEWRV2NmYUa2vM09YFO9boT/VM45mTDAlB6Y3aXMabXNH1IIINsYkNQX99avHsT7DH+MFa5qGFkWKrK49MHdJHNQBl/08SoUVSb9EOGcLj3v93muff1teylD5RgkYgcVqipW9AlEjyrbe1ZCyNOT52g9DCUMxS5Suwh9p6pp0OLYMPAgjHynlj4jhjwl5zSjwpchMcQiSJ/sTnOYDLi1Qpge6P+NRpDoIvNhEknGE75qMIqJ2G8NOjzeX1rIOjYgn7eCCMGpDMJtClxYvLO6Z8L3cYaW2l+9474xyGxDIt4QyMnHk0WQ02N5BDj+PVLwhD/J+3E72/Xabg1yepVtytafPSu7ugMGeK94cAmTzgg4pVhJcCWVrsbIuBRJP28VxpVEodT/tERhOi2HkNUY0KA+iOh4qZ3QUoOyNxZzV5G4wEYQKRVM9Aqkq2mD/0Hpx2XVSgy52Xg0B0lOpbwPieq2ml/mUxnYiSRHxOhn5ASVOlom9pcpRttfF99ZoBL6uxYycSyVxqrg4G7IW+cRbZUHkoW41GRLclnwuss+3mn6GrvsuMyw8QZT2uaHGistiMDTnlDk4ka03SS92c7ZbB4AntQigVAe6KMyx2/eMf2Gc04geaYen4gTp+2h3rcZyF03/2q9w== ubuntu@autopkgtest 82s Fingerprint: SHA256:B53BJKALAoz3h4HMyapEdsaX+mxW1Jk2GFCPFR1eR88 82s ----------------------------- Captured stderr call ----------------------------- 82s Generating 4096 bit rsa key, this may take a while... 82s Key is a ssh-rsa key 82s Wrote key to '/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_rsa_4096_0/oskey1' 82s Load key "/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_rsa_4096_0/oskey1": Permission denied 82s ___________________________ test_roundtrip[ed25519] ____________________________ 82s 82s request = > 82s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_ed25519_0') 82s keytype = 'ed25519' 82s 82s @pytest.mark.parametrize("keytype", keytypes) 82s def test_roundtrip(request, tmp_path, keytype): 82s """ 82s Dropbear's private key format is deterministic so 82s we can compare round trip conversion. (OpenSSH's 82s format has more variable comments and other fields). 82s """ 82s opt = request.config.option 82s kt, keybits = parse_keytype(keytype) 82s 82s os_key = tmp_path / 'oskey1' 82s db_key1 = tmp_path / 'dbkey1' 82s db_key2 = tmp_path / 'dbkey2' 82s 82s # generate a key 82s args = [ 82s opt.dropbearkey, 82s '-t', kt, 82s '-f', db_key1, 82s ] 82s if keybits is not None: 82s args += ['-s', keybits] 82s p = subprocess.run(args, check=True) 82s 82s # convert to openssh 82s args = [ 82s opt.dropbearconvert, 82s 'dropbear', 'openssh', 82s db_key1, os_key, 82s ] 82s p = subprocess.run(args, check=True) 82s 82s # Check ssh-keygen can read it 82s args = [ 82s opt.ssh_keygen, 82s '-f', os_key, 82s '-y', 82s ] 82s > p = subprocess.run(args, check=True, text=True, stdout=subprocess.PIPE) 82s 82s test_dropbearconvert.py:110: 82s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 82s 82s input = None, capture_output = False, timeout = None, check = True 82s popenargs = (['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_ed25519_0/oskey1'), '-y'],) 82s kwargs = {'stdout': -1, 'text': True} 82s process = 82s stdout = '', stderr = None, retcode = 255 82s 82s def run(*popenargs, 82s input=None, capture_output=False, timeout=None, check=False, **kwargs): 82s """Run command with arguments and return a CompletedProcess instance. 82s 82s The returned instance will have attributes args, returncode, stdout and 82s stderr. By default, stdout and stderr are not captured, and those attributes 82s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 82s or pass capture_output=True to capture both. 82s 82s If check is True and the exit code was non-zero, it raises a 82s CalledProcessError. The CalledProcessError object will have the return code 82s in the returncode attribute, and output & stderr attributes if those streams 82s were captured. 82s 82s If timeout (seconds) is given and the process takes too long, 82s a TimeoutExpired exception will be raised. 82s 82s There is an optional argument "input", allowing you to 82s pass bytes or a string to the subprocess's stdin. If you use this argument 82s you may not also use the Popen constructor's "stdin" argument, as 82s it will be used internally. 82s 82s By default, all communication is in bytes, and therefore any "input" should 82s be bytes, and the stdout and stderr will be bytes. If in text mode, any 82s "input" should be a string, and stdout and stderr will be strings decoded 82s according to locale encoding, or by "encoding" if set. Text mode is 82s triggered by setting any of text, encoding, errors or universal_newlines. 82s 82s The other arguments are the same as for the Popen constructor. 82s """ 82s if input is not None: 82s if kwargs.get('stdin') is not None: 82s raise ValueError('stdin and input arguments may not both be used.') 82s kwargs['stdin'] = PIPE 82s 82s if capture_output: 82s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 82s raise ValueError('stdout and stderr arguments may not be used ' 82s 'with capture_output.') 82s kwargs['stdout'] = PIPE 82s kwargs['stderr'] = PIPE 82s 82s with Popen(*popenargs, **kwargs) as process: 82s try: 82s stdout, stderr = process.communicate(input, timeout=timeout) 82s except TimeoutExpired as exc: 82s process.kill() 82s if _mswindows: 82s # Windows accumulates the output in a single blocking 82s # read() call run on child threads, with the timeout 82s # being done in a join() on those threads. communicate() 82s # _after_ kill() is required to collect that and add it 82s # to the exception. 82s exc.stdout, exc.stderr = process.communicate() 82s else: 82s # POSIX _communicate already populated the output so 82s # far into the TimeoutExpired exception. 82s process.wait() 82s raise 82s except: # Including KeyboardInterrupt, communicate handled that. 82s process.kill() 82s # We don't call process.wait() as .__exit__ does that for us. 82s raise 82s retcode = process.poll() 82s if check and retcode: 82s > raise CalledProcessError(retcode, process.args, 82s output=stdout, stderr=stderr) 82s E subprocess.CalledProcessError: Command '['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_ed25519_0/oskey1'), '-y']' returned non-zero exit status 255. 82s 82s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 82s ----------------------------- Captured stdout call ----------------------------- 82s Public key portion is: 82s ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHYD+dkNhPC5JGzc/fNd9c/pLa0VQJkTTOrnL1QO0nYZ ubuntu@autopkgtest 82s Fingerprint: SHA256:1mlWjtbFosl/X8ToRw/S35QcvGWlCT73gxdjT/2KZ3E 82s ----------------------------- Captured stderr call ----------------------------- 82s Generating 256 bit ed25519 key, this may take a while... 82s Key is a ssh-ed25519 key 82s Wrote key to '/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_ed25519_0/oskey1' 82s Load key "/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_ed25519_0/oskey1": Permission denied 82s ____________________________ test_roundtrip[ecdsa] _____________________________ 82s 82s request = > 82s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_ecdsa_0') 82s keytype = 'ecdsa' 82s 82s @pytest.mark.parametrize("keytype", keytypes) 82s def test_roundtrip(request, tmp_path, keytype): 82s """ 82s Dropbear's private key format is deterministic so 82s we can compare round trip conversion. (OpenSSH's 82s format has more variable comments and other fields). 82s """ 82s opt = request.config.option 82s kt, keybits = parse_keytype(keytype) 82s 82s os_key = tmp_path / 'oskey1' 82s db_key1 = tmp_path / 'dbkey1' 82s db_key2 = tmp_path / 'dbkey2' 82s 82s # generate a key 82s args = [ 82s opt.dropbearkey, 82s '-t', kt, 82s '-f', db_key1, 82s ] 82s if keybits is not None: 82s args += ['-s', keybits] 82s p = subprocess.run(args, check=True) 82s 82s # convert to openssh 82s args = [ 82s opt.dropbearconvert, 82s 'dropbear', 'openssh', 82s db_key1, os_key, 82s ] 82s p = subprocess.run(args, check=True) 82s 82s # Check ssh-keygen can read it 82s args = [ 82s opt.ssh_keygen, 82s '-f', os_key, 82s '-y', 82s ] 82s > p = subprocess.run(args, check=True, text=True, stdout=subprocess.PIPE) 82s 82s test_dropbearconvert.py:110: 82s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 82s 82s input = None, capture_output = False, timeout = None, check = True 82s popenargs = (['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_ecdsa_0/oskey1'), '-y'],) 82s kwargs = {'stdout': -1, 'text': True} 82s process = 82s stdout = '', stderr = None, retcode = 255 82s 82s def run(*popenargs, 82s input=None, capture_output=False, timeout=None, check=False, **kwargs): 82s """Run command with arguments and return a CompletedProcess instance. 82s 82s The returned instance will have attributes args, returncode, stdout and 82s stderr. By default, stdout and stderr are not captured, and those attributes 82s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 82s or pass capture_output=True to capture both. 82s 82s If check is True and the exit code was non-zero, it raises a 82s CalledProcessError. The CalledProcessError object will have the return code 82s in the returncode attribute, and output & stderr attributes if those streams 82s were captured. 82s 82s If timeout (seconds) is given and the process takes too long, 82s a TimeoutExpired exception will be raised. 82s 82s There is an optional argument "input", allowing you to 82s pass bytes or a string to the subprocess's stdin. If you use this argument 82s you may not also use the Popen constructor's "stdin" argument, as 82s it will be used internally. 82s 82s By default, all communication is in bytes, and therefore any "input" should 82s be bytes, and the stdout and stderr will be bytes. If in text mode, any 82s "input" should be a string, and stdout and stderr will be strings decoded 82s according to locale encoding, or by "encoding" if set. Text mode is 82s triggered by setting any of text, encoding, errors or universal_newlines. 82s 82s The other arguments are the same as for the Popen constructor. 82s """ 82s if input is not None: 82s if kwargs.get('stdin') is not None: 82s raise ValueError('stdin and input arguments may not both be used.') 82s kwargs['stdin'] = PIPE 82s 82s if capture_output: 82s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 82s raise ValueError('stdout and stderr arguments may not be used ' 82s 'with capture_output.') 82s kwargs['stdout'] = PIPE 82s kwargs['stderr'] = PIPE 82s 82s with Popen(*popenargs, **kwargs) as process: 82s try: 82s stdout, stderr = process.communicate(input, timeout=timeout) 82s except TimeoutExpired as exc: 82s process.kill() 82s if _mswindows: 82s # Windows accumulates the output in a single blocking 82s # read() call run on child threads, with the timeout 82s # being done in a join() on those threads. communicate() 82s # _after_ kill() is required to collect that and add it 82s # to the exception. 82s exc.stdout, exc.stderr = process.communicate() 82s else: 82s # POSIX _communicate already populated the output so 82s # far into the TimeoutExpired exception. 82s process.wait() 82s raise 82s except: # Including KeyboardInterrupt, communicate handled that. 82s process.kill() 82s # We don't call process.wait() as .__exit__ does that for us. 82s raise 82s retcode = process.poll() 82s if check and retcode: 82s > raise CalledProcessError(retcode, process.args, 82s output=stdout, stderr=stderr) 82s E subprocess.CalledProcessError: Command '['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_ecdsa_0/oskey1'), '-y']' returned non-zero exit status 255. 82s 82s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 82s ----------------------------- Captured stdout call ----------------------------- 82s Public key portion is: 82s ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBAh1dArIKWe8WVucTGK7r6X9EBmp41YW6SPZh21bgMORvl01vJuFxLRzXtYdfxomxbTwNGCbTGraV4djEsLNYmQ= ubuntu@autopkgtest 82s Fingerprint: SHA256:K7L2wRzbiLuUHj81mkMoXTtfnf+Q+XpMXarWMQ5Obvs 82s ----------------------------- Captured stderr call ----------------------------- 82s Generating 256 bit ecdsa key, this may take a while... 82s Key is a ecdsa-sha2-nistp256 key 82s Wrote key to '/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_ecdsa_0/oskey1' 82s Load key "/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_ecdsa_0/oskey1": Permission denied 82s __________________________ test_roundtrip[ecdsa-256] ___________________________ 82s 82s request = > 82s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_ecdsa_256_0') 82s keytype = 'ecdsa-256' 82s 82s @pytest.mark.parametrize("keytype", keytypes) 82s def test_roundtrip(request, tmp_path, keytype): 82s """ 82s Dropbear's private key format is deterministic so 82s we can compare round trip conversion. (OpenSSH's 82s format has more variable comments and other fields). 82s """ 82s opt = request.config.option 82s kt, keybits = parse_keytype(keytype) 82s 82s os_key = tmp_path / 'oskey1' 82s db_key1 = tmp_path / 'dbkey1' 82s db_key2 = tmp_path / 'dbkey2' 82s 82s # generate a key 82s args = [ 82s opt.dropbearkey, 82s '-t', kt, 82s '-f', db_key1, 82s ] 82s if keybits is not None: 82s args += ['-s', keybits] 82s p = subprocess.run(args, check=True) 82s 82s # convert to openssh 82s args = [ 82s opt.dropbearconvert, 82s 'dropbear', 'openssh', 82s db_key1, os_key, 82s ] 82s p = subprocess.run(args, check=True) 82s 82s # Check ssh-keygen can read it 82s args = [ 82s opt.ssh_keygen, 82s '-f', os_key, 82s '-y', 82s ] 82s > p = subprocess.run(args, check=True, text=True, stdout=subprocess.PIPE) 82s 82s test_dropbearconvert.py:110: 82s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 82s 82s input = None, capture_output = False, timeout = None, check = True 82s popenargs = (['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_ecdsa_256_0/oskey1'), '-y'],) 82s kwargs = {'stdout': -1, 'text': True} 82s process = 82s stdout = '', stderr = None, retcode = 255 82s 82s def run(*popenargs, 82s input=None, capture_output=False, timeout=None, check=False, **kwargs): 82s """Run command with arguments and return a CompletedProcess instance. 82s 82s The returned instance will have attributes args, returncode, stdout and 82s stderr. By default, stdout and stderr are not captured, and those attributes 82s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 82s or pass capture_output=True to capture both. 82s 82s If check is True and the exit code was non-zero, it raises a 82s CalledProcessError. The CalledProcessError object will have the return code 82s in the returncode attribute, and output & stderr attributes if those streams 82s were captured. 82s 82s If timeout (seconds) is given and the process takes too long, 82s a TimeoutExpired exception will be raised. 82s 82s There is an optional argument "input", allowing you to 82s pass bytes or a string to the subprocess's stdin. If you use this argument 82s you may not also use the Popen constructor's "stdin" argument, as 82s it will be used internally. 82s 82s By default, all communication is in bytes, and therefore any "input" should 82s be bytes, and the stdout and stderr will be bytes. If in text mode, any 82s "input" should be a string, and stdout and stderr will be strings decoded 82s according to locale encoding, or by "encoding" if set. Text mode is 82s triggered by setting any of text, encoding, errors or universal_newlines. 82s 82s The other arguments are the same as for the Popen constructor. 82s """ 82s if input is not None: 82s if kwargs.get('stdin') is not None: 82s raise ValueError('stdin and input arguments may not both be used.') 82s kwargs['stdin'] = PIPE 82s 82s if capture_output: 82s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 82s raise ValueError('stdout and stderr arguments may not be used ' 82s 'with capture_output.') 82s kwargs['stdout'] = PIPE 82s kwargs['stderr'] = PIPE 82s 82s with Popen(*popenargs, **kwargs) as process: 82s try: 82s stdout, stderr = process.communicate(input, timeout=timeout) 82s except TimeoutExpired as exc: 82s process.kill() 82s if _mswindows: 82s # Windows accumulates the output in a single blocking 82s # read() call run on child threads, with the timeout 82s # being done in a join() on those threads. communicate() 82s # _after_ kill() is required to collect that and add it 82s # to the exception. 82s exc.stdout, exc.stderr = process.communicate() 82s else: 82s # POSIX _communicate already populated the output so 82s # far into the TimeoutExpired exception. 82s process.wait() 82s raise 82s except: # Including KeyboardInterrupt, communicate handled that. 82s process.kill() 82s # We don't call process.wait() as .__exit__ does that for us. 82s raise 82s retcode = process.poll() 82s if check and retcode: 82s > raise CalledProcessError(retcode, process.args, 82s output=stdout, stderr=stderr) 82s E subprocess.CalledProcessError: Command '['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_ecdsa_256_0/oskey1'), '-y']' returned non-zero exit status 255. 82s 82s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 82s ----------------------------- Captured stdout call ----------------------------- 82s Public key portion is: 82s ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBOyCTctd/sLULlwhdkoQS46PYNPwDXdkrO+RlQCFr7uerVzNcSBHNNKklRYtTCQ7zRYVEX0hJbKjvi0OIHG4jls= ubuntu@autopkgtest 82s Fingerprint: SHA256:bgWBeVgT3zhlh0DnHKBsYgOH7Q5gzA+StEAHRrxGo3U 82s ----------------------------- Captured stderr call ----------------------------- 82s Generating 256 bit ecdsa key, this may take a while... 82s Key is a ecdsa-sha2-nistp256 key 82s Wrote key to '/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_ecdsa_256_0/oskey1' 82s Load key "/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_ecdsa_256_0/oskey1": Permission denied 82s __________________________ test_roundtrip[ecdsa-384] ___________________________ 82s 82s request = > 82s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_ecdsa_384_0') 82s keytype = 'ecdsa-384' 82s 82s @pytest.mark.parametrize("keytype", keytypes) 82s def test_roundtrip(request, tmp_path, keytype): 82s """ 82s Dropbear's private key format is deterministic so 82s we can compare round trip conversion. (OpenSSH's 82s format has more variable comments and other fields). 82s """ 82s opt = request.config.option 82s kt, keybits = parse_keytype(keytype) 82s 82s os_key = tmp_path / 'oskey1' 82s db_key1 = tmp_path / 'dbkey1' 82s db_key2 = tmp_path / 'dbkey2' 82s 82s # generate a key 82s args = [ 82s opt.dropbearkey, 82s '-t', kt, 82s '-f', db_key1, 82s ] 82s if keybits is not None: 82s args += ['-s', keybits] 82s p = subprocess.run(args, check=True) 82s 82s # convert to openssh 82s args = [ 82s opt.dropbearconvert, 82s 'dropbear', 'openssh', 82s db_key1, os_key, 82s ] 82s p = subprocess.run(args, check=True) 82s 82s # Check ssh-keygen can read it 82s args = [ 82s opt.ssh_keygen, 82s '-f', os_key, 82s '-y', 82s ] 82s > p = subprocess.run(args, check=True, text=True, stdout=subprocess.PIPE) 82s 82s test_dropbearconvert.py:110: 82s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 82s 82s input = None, capture_output = False, timeout = None, check = True 82s popenargs = (['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_ecdsa_384_0/oskey1'), '-y'],) 82s kwargs = {'stdout': -1, 'text': True} 82s process = 82s stdout = '', stderr = None, retcode = 255 82s 82s def run(*popenargs, 82s input=None, capture_output=False, timeout=None, check=False, **kwargs): 82s """Run command with arguments and return a CompletedProcess instance. 82s 82s The returned instance will have attributes args, returncode, stdout and 82s stderr. By default, stdout and stderr are not captured, and those attributes 82s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 82s or pass capture_output=True to capture both. 82s 82s If check is True and the exit code was non-zero, it raises a 82s CalledProcessError. The CalledProcessError object will have the return code 82s in the returncode attribute, and output & stderr attributes if those streams 82s were captured. 82s 82s If timeout (seconds) is given and the process takes too long, 82s a TimeoutExpired exception will be raised. 82s 82s There is an optional argument "input", allowing you to 82s pass bytes or a string to the subprocess's stdin. If you use this argument 82s you may not also use the Popen constructor's "stdin" argument, as 82s it will be used internally. 82s 82s By default, all communication is in bytes, and therefore any "input" should 82s be bytes, and the stdout and stderr will be bytes. If in text mode, any 82s "input" should be a string, and stdout and stderr will be strings decoded 82s according to locale encoding, or by "encoding" if set. Text mode is 82s triggered by setting any of text, encoding, errors or universal_newlines. 82s 82s The other arguments are the same as for the Popen constructor. 82s """ 82s if input is not None: 82s if kwargs.get('stdin') is not None: 82s raise ValueError('stdin and input arguments may not both be used.') 82s kwargs['stdin'] = PIPE 82s 82s if capture_output: 82s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 82s raise ValueError('stdout and stderr arguments may not be used ' 82s 'with capture_output.') 82s kwargs['stdout'] = PIPE 82s kwargs['stderr'] = PIPE 82s 82s with Popen(*popenargs, **kwargs) as process: 82s try: 82s stdout, stderr = process.communicate(input, timeout=timeout) 82s except TimeoutExpired as exc: 82s process.kill() 82s if _mswindows: 82s # Windows accumulates the output in a single blocking 82s # read() call run on child threads, with the timeout 82s # being done in a join() on those threads. communicate() 82s # _after_ kill() is required to collect that and add it 82s # to the exception. 82s exc.stdout, exc.stderr = process.communicate() 82s else: 82s # POSIX _communicate already populated the output so 82s # far into the TimeoutExpired exception. 82s process.wait() 82s raise 82s except: # Including KeyboardInterrupt, communicate handled that. 82s process.kill() 82s # We don't call process.wait() as .__exit__ does that for us. 82s raise 82s retcode = process.poll() 82s if check and retcode: 82s > raise CalledProcessError(retcode, process.args, 82s output=stdout, stderr=stderr) 82s E subprocess.CalledProcessError: Command '['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_ecdsa_384_0/oskey1'), '-y']' returned non-zero exit status 255. 82s 82s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 82s ----------------------------- Captured stdout call ----------------------------- 82s Public key portion is: 82s ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBJinSMHBagu4jde/eP1nDP+BXIGy9pgAKwOl4zpazPah42aozqbEEtvT7h3DXS4r4Z4j4ZIXt6mFsV20VRQa9aCoJdiQexjyhnVHI9M5FPcpbRrotTP3GvA+7b892+nKYQ== ubuntu@autopkgtest 82s Fingerprint: SHA256:iRU/IR20TRGiv2T/q91xO+rFphPJNts06VsLiS/ALN0 82s ----------------------------- Captured stderr call ----------------------------- 82s Generating 384 bit ecdsa key, this may take a while... 82s Key is a ecdsa-sha2-nistp384 key 82s Wrote key to '/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_ecdsa_384_0/oskey1' 82s Load key "/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_ecdsa_384_0/oskey1": Permission denied 82s __________________________ test_roundtrip[ecdsa-521] ___________________________ 82s 82s request = > 82s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_ecdsa_521_0') 82s keytype = 'ecdsa-521' 82s 82s @pytest.mark.parametrize("keytype", keytypes) 82s def test_roundtrip(request, tmp_path, keytype): 82s """ 82s Dropbear's private key format is deterministic so 82s we can compare round trip conversion. (OpenSSH's 82s format has more variable comments and other fields). 82s """ 82s opt = request.config.option 82s kt, keybits = parse_keytype(keytype) 82s 82s os_key = tmp_path / 'oskey1' 82s db_key1 = tmp_path / 'dbkey1' 82s db_key2 = tmp_path / 'dbkey2' 82s 82s # generate a key 82s args = [ 82s opt.dropbearkey, 82s '-t', kt, 82s '-f', db_key1, 82s ] 82s if keybits is not None: 82s args += ['-s', keybits] 82s p = subprocess.run(args, check=True) 82s 82s # convert to openssh 82s args = [ 82s opt.dropbearconvert, 82s 'dropbear', 'openssh', 82s db_key1, os_key, 82s ] 82s p = subprocess.run(args, check=True) 82s 82s # Check ssh-keygen can read it 82s args = [ 82s opt.ssh_keygen, 82s '-f', os_key, 82s '-y', 82s ] 82s > p = subprocess.run(args, check=True, text=True, stdout=subprocess.PIPE) 82s 82s test_dropbearconvert.py:110: 82s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 82s 82s input = None, capture_output = False, timeout = None, check = True 82s popenargs = (['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_ecdsa_521_0/oskey1'), '-y'],) 82s kwargs = {'stdout': -1, 'text': True} 82s process = 82s stdout = '', stderr = None, retcode = 255 82s 82s def run(*popenargs, 82s input=None, capture_output=False, timeout=None, check=False, **kwargs): 82s """Run command with arguments and return a CompletedProcess instance. 82s 82s The returned instance will have attributes args, returncode, stdout and 82s stderr. By default, stdout and stderr are not captured, and those attributes 82s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 82s or pass capture_output=True to capture both. 82s 82s If check is True and the exit code was non-zero, it raises a 82s CalledProcessError. The CalledProcessError object will have the return code 82s in the returncode attribute, and output & stderr attributes if those streams 82s were captured. 82s 82s If timeout (seconds) is given and the process takes too long, 82s a TimeoutExpired exception will be raised. 82s 82s There is an optional argument "input", allowing you to 82s pass bytes or a string to the subprocess's stdin. If you use this argument 82s you may not also use the Popen constructor's "stdin" argument, as 82s it will be used internally. 82s 82s By default, all communication is in bytes, and therefore any "input" should 82s be bytes, and the stdout and stderr will be bytes. If in text mode, any 82s "input" should be a string, and stdout and stderr will be strings decoded 82s according to locale encoding, or by "encoding" if set. Text mode is 82s triggered by setting any of text, encoding, errors or universal_newlines. 82s 82s The other arguments are the same as for the Popen constructor. 82s """ 82s if input is not None: 82s if kwargs.get('stdin') is not None: 82s raise ValueError('stdin and input arguments may not both be used.') 82s kwargs['stdin'] = PIPE 82s 82s if capture_output: 82s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 82s raise ValueError('stdout and stderr arguments may not be used ' 82s 'with capture_output.') 82s kwargs['stdout'] = PIPE 82s kwargs['stderr'] = PIPE 82s 82s with Popen(*popenargs, **kwargs) as process: 82s try: 82s stdout, stderr = process.communicate(input, timeout=timeout) 82s except TimeoutExpired as exc: 82s process.kill() 82s if _mswindows: 82s # Windows accumulates the output in a single blocking 82s # read() call run on child threads, with the timeout 82s # being done in a join() on those threads. communicate() 82s # _after_ kill() is required to collect that and add it 82s # to the exception. 82s exc.stdout, exc.stderr = process.communicate() 82s else: 82s # POSIX _communicate already populated the output so 82s # far into the TimeoutExpired exception. 82s process.wait() 82s raise 82s except: # Including KeyboardInterrupt, communicate handled that. 82s process.kill() 82s # We don't call process.wait() as .__exit__ does that for us. 82s raise 82s retcode = process.poll() 82s if check and retcode: 82s > raise CalledProcessError(retcode, process.args, 82s output=stdout, stderr=stderr) 82s E subprocess.CalledProcessError: Command '['ssh-keygen', '-f', PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_ecdsa_521_0/oskey1'), '-y']' returned non-zero exit status 255. 82s 82s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 82s ----------------------------- Captured stdout call ----------------------------- 82s Public key portion is: 82s ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAD//CZgdIStTCCUqF6adi6x4D5jwPCnxLr2OFYZYUxfiDfotZBS9bPQWB8IOclgMNLdiGLV0STUKqLcyACOGhFyLwA75mhf/FIggY4uDnRWnrdE0+jPPjaFUs+1XGtdOit+/kUX0Jfyj1s6Hte4d7dU9iHcuIEcUfBpYRcYOliwSMdQ5Q== ubuntu@autopkgtest 82s Fingerprint: SHA256:ydAuMK1/eoBrPTOVkMrP2tHvJAE7ifsFy7NsvP22a58 82s ----------------------------- Captured stderr call ----------------------------- 82s Generating 521 bit ecdsa key, this may take a while... 82s Key is a ecdsa-sha2-nistp521 key 82s Wrote key to '/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_ecdsa_521_0/oskey1' 82s Load key "/tmp/pytest-of-ubuntu/pytest-0/test_roundtrip_ecdsa_521_0/oskey1": Permission denied 82s =========================== short test summary info ============================ 82s FAILED test_dropbearconvert.py::test_from_openssh[None-rsa] - subprocess.Call... 82s FAILED test_dropbearconvert.py::test_from_openssh[None-rsa-4096] - subprocess... 82s FAILED test_dropbearconvert.py::test_from_openssh[None-ed25519] - subprocess.... 82s FAILED test_dropbearconvert.py::test_from_openssh[None-ecdsa] - subprocess.Ca... 82s FAILED test_dropbearconvert.py::test_from_openssh[None-ecdsa-256] - subproces... 82s FAILED test_dropbearconvert.py::test_from_openssh[None-ecdsa-384] - subproces... 82s FAILED test_dropbearconvert.py::test_from_openssh[None-ecdsa-521] - subproces... 82s FAILED test_dropbearconvert.py::test_from_openssh[PEM-rsa] - subprocess.Calle... 82s FAILED test_dropbearconvert.py::test_from_openssh[PEM-rsa-4096] - subprocess.... 82s FAILED test_dropbearconvert.py::test_from_openssh[PEM-ed25519] - subprocess.C... 82s FAILED test_dropbearconvert.py::test_from_openssh[PEM-ecdsa] - subprocess.Cal... 82s FAILED test_dropbearconvert.py::test_from_openssh[PEM-ecdsa-256] - subprocess... 82s FAILED test_dropbearconvert.py::test_from_openssh[PEM-ecdsa-384] - subprocess... 82s FAILED test_dropbearconvert.py::test_from_openssh[PEM-ecdsa-521] - subprocess... 82s FAILED test_dropbearconvert.py::test_roundtrip[rsa] - subprocess.CalledProces... 82s FAILED test_dropbearconvert.py::test_roundtrip[rsa-4096] - subprocess.CalledP... 82s FAILED test_dropbearconvert.py::test_roundtrip[ed25519] - subprocess.CalledPr... 82s FAILED test_dropbearconvert.py::test_roundtrip[ecdsa] - subprocess.CalledProc... 82s FAILED test_dropbearconvert.py::test_roundtrip[ecdsa-256] - subprocess.Called... 82s FAILED test_dropbearconvert.py::test_roundtrip[ecdsa-384] - subprocess.Called... 82s FAILED test_dropbearconvert.py::test_roundtrip[ecdsa-521] - subprocess.Called... 82s ================== 21 failed, 30 passed, 1 xfailed in 20.59s =================== 82s autopkgtest [12:40:29]: test upstream-tests: -----------------------] 82s upstream-tests FLAKY non-zero exit status 1 82s autopkgtest [12:40:29]: test upstream-tests: - - - - - - - - - - results - - - - - - - - - - 83s autopkgtest [12:40:30]: test remote-unlocking: preparing testbed 101s Creating nova instance adt-questing-amd64-dropbear-20250709-123907-juju-7f2275-prod-proposed-migration-environment-20-cdbf142a-73c2-4e8e-8535-f5db850cc4a0 from image adt/ubuntu-questing-amd64-server-20250709.img (UUID c3471638-2fe4-4a2d-8d40-ce75045b9112)... 445s autopkgtest [12:46:32]: testbed dpkg architecture: amd64 446s autopkgtest [12:46:33]: testbed apt version: 3.1.3 446s autopkgtest [12:46:33]: @@@@@@@@@@@@@@@@@@@@ test bed setup 446s autopkgtest [12:46:33]: testbed release detected to be: questing 447s autopkgtest [12:46:34]: updating testbed package index (apt update) 447s Get:1 http://ftpmaster.internal/ubuntu questing-proposed InRelease [249 kB] 447s Hit:2 http://ftpmaster.internal/ubuntu questing InRelease 447s Hit:3 http://ftpmaster.internal/ubuntu questing-updates InRelease 447s Hit:4 http://ftpmaster.internal/ubuntu questing-security InRelease 447s Get:5 http://ftpmaster.internal/ubuntu questing-proposed/main Sources [38.1 kB] 447s Get:6 http://ftpmaster.internal/ubuntu questing-proposed/universe Sources [176 kB] 447s Get:7 http://ftpmaster.internal/ubuntu questing-proposed/multiverse Sources [15.4 kB] 447s Get:8 http://ftpmaster.internal/ubuntu questing-proposed/main amd64 Packages [62.6 kB] 448s Get:9 http://ftpmaster.internal/ubuntu questing-proposed/main i386 Packages [41.4 kB] 448s Get:10 http://ftpmaster.internal/ubuntu questing-proposed/universe amd64 Packages [182 kB] 448s Get:11 http://ftpmaster.internal/ubuntu questing-proposed/universe i386 Packages [103 kB] 448s Get:12 http://ftpmaster.internal/ubuntu questing-proposed/multiverse amd64 Packages [16.6 kB] 448s Get:13 http://ftpmaster.internal/ubuntu questing-proposed/multiverse i386 Packages [8592 B] 448s Fetched 893 kB in 1s (1464 kB/s) 448s Reading package lists... 449s autopkgtest [12:46:36]: upgrading testbed (apt dist-upgrade and autopurge) 449s Reading package lists... 449s Building dependency tree... 449s Reading state information... 449s Calculating upgrade... 450s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 450s Reading package lists... 450s Building dependency tree... 450s Reading state information... 450s Solving dependencies... 450s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 453s Reading package lists... 453s Building dependency tree... 453s Reading state information... 453s Solving dependencies... 453s The following NEW packages will be installed: 453s acl cryptsetup cryptsetup-initramfs ipxe-qemu libasound2-data libasound2t64 453s libbrlapi0.8 libcacard0 libdaxctl1 libfdt1 libjpeg-turbo8 libjpeg8 libndctl6 453s libpcsclite1 libpixman-1-0 libpmem1 librdmacm1t64 libslirp0 liburing2 453s libusbredirparser1t64 mmdebstrap qemu-system-common qemu-system-data 453s qemu-system-x86 seabios 453s 0 upgraded, 25 newly installed, 0 to remove and 0 not upgraded. 453s Need to get 18.6 MB of archives. 453s After this operation, 101 MB of additional disk space will be used. 453s Get:1 http://ftpmaster.internal/ubuntu questing/main amd64 acl amd64 2.3.2-2 [39.4 kB] 453s Get:2 http://ftpmaster.internal/ubuntu questing/main amd64 cryptsetup amd64 2:2.7.5-1ubuntu2 [217 kB] 453s Get:3 http://ftpmaster.internal/ubuntu questing/main amd64 cryptsetup-initramfs all 2:2.7.5-1ubuntu2 [45.5 kB] 454s Get:4 http://ftpmaster.internal/ubuntu questing/main amd64 ipxe-qemu all 1.21.1+git-20220113.fbbdc3926-0ubuntu2 [1565 kB] 454s Get:5 http://ftpmaster.internal/ubuntu questing/main amd64 libasound2-data all 1.2.14-1ubuntu1 [21.2 kB] 454s Get:6 http://ftpmaster.internal/ubuntu questing/main amd64 libasound2t64 amd64 1.2.14-1ubuntu1 [407 kB] 454s Get:7 http://ftpmaster.internal/ubuntu questing/main amd64 libbrlapi0.8 amd64 6.7-1ubuntu3 [33.4 kB] 454s Get:8 http://ftpmaster.internal/ubuntu questing/main amd64 libpcsclite1 amd64 2.3.3-1 [24.0 kB] 454s Get:9 http://ftpmaster.internal/ubuntu questing/main amd64 libcacard0 amd64 1:2.8.0-3build4 [36.5 kB] 454s Get:10 http://ftpmaster.internal/ubuntu questing/main amd64 libdaxctl1 amd64 77-2.2ubuntu2 [21.9 kB] 454s Get:11 http://ftpmaster.internal/ubuntu questing/main amd64 libjpeg-turbo8 amd64 2.1.5-3ubuntu2 [179 kB] 454s Get:12 http://ftpmaster.internal/ubuntu questing/main amd64 libjpeg8 amd64 8c-2ubuntu11 [2148 B] 454s Get:13 http://ftpmaster.internal/ubuntu questing/main amd64 libndctl6 amd64 77-2.2ubuntu2 [67.3 kB] 454s Get:14 http://ftpmaster.internal/ubuntu questing/main amd64 libpixman-1-0 amd64 0.44.0-3 [427 kB] 454s Get:15 http://ftpmaster.internal/ubuntu questing/main amd64 libpmem1 amd64 1.13.1-1.1ubuntu2 [84.8 kB] 454s Get:16 http://ftpmaster.internal/ubuntu questing/main amd64 librdmacm1t64 amd64 56.1-1ubuntu1 [71.4 kB] 454s Get:17 http://ftpmaster.internal/ubuntu questing/main amd64 libslirp0 amd64 4.8.0-1ubuntu1 [65.7 kB] 454s Get:18 http://ftpmaster.internal/ubuntu questing/main amd64 liburing2 amd64 2.9-1 [24.9 kB] 454s Get:19 http://ftpmaster.internal/ubuntu questing/main amd64 libusbredirparser1t64 amd64 0.15.0-1 [16.9 kB] 454s Get:20 http://ftpmaster.internal/ubuntu questing/universe amd64 mmdebstrap all 1.5.7-1 [130 kB] 454s Get:21 http://ftpmaster.internal/ubuntu questing-proposed/main amd64 qemu-system-common amd64 1:10.0.2+ds-1ubuntu2 [1082 kB] 454s Get:22 http://ftpmaster.internal/ubuntu questing-proposed/main amd64 qemu-system-data all 1:10.0.2+ds-1ubuntu2 [2340 kB] 454s Get:23 http://ftpmaster.internal/ubuntu questing/main amd64 libfdt1 amd64 1.7.2-2build1 [22.6 kB] 454s Get:24 http://ftpmaster.internal/ubuntu questing/main amd64 seabios all 1.16.3-2 [175 kB] 454s Get:25 http://ftpmaster.internal/ubuntu questing-proposed/main amd64 qemu-system-x86 amd64 1:10.0.2+ds-1ubuntu2 [11.5 MB] 455s Preconfiguring packages ... 455s Fetched 18.6 MB in 2s (11.6 MB/s) 455s Selecting previously unselected package acl. 455s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 121132 files and directories currently installed.) 455s Preparing to unpack .../00-acl_2.3.2-2_amd64.deb ... 455s Unpacking acl (2.3.2-2) ... 455s Selecting previously unselected package cryptsetup. 455s Preparing to unpack .../01-cryptsetup_2%3a2.7.5-1ubuntu2_amd64.deb ... 456s Unpacking cryptsetup (2:2.7.5-1ubuntu2) ... 456s Selecting previously unselected package cryptsetup-initramfs. 456s Preparing to unpack .../02-cryptsetup-initramfs_2%3a2.7.5-1ubuntu2_all.deb ... 456s Unpacking cryptsetup-initramfs (2:2.7.5-1ubuntu2) ... 456s Selecting previously unselected package ipxe-qemu. 456s Preparing to unpack .../03-ipxe-qemu_1.21.1+git-20220113.fbbdc3926-0ubuntu2_all.deb ... 456s Unpacking ipxe-qemu (1.21.1+git-20220113.fbbdc3926-0ubuntu2) ... 456s Selecting previously unselected package libasound2-data. 456s Preparing to unpack .../04-libasound2-data_1.2.14-1ubuntu1_all.deb ... 456s Unpacking libasound2-data (1.2.14-1ubuntu1) ... 456s Selecting previously unselected package libasound2t64:amd64. 456s Preparing to unpack .../05-libasound2t64_1.2.14-1ubuntu1_amd64.deb ... 456s Unpacking libasound2t64:amd64 (1.2.14-1ubuntu1) ... 456s Selecting previously unselected package libbrlapi0.8:amd64. 456s Preparing to unpack .../06-libbrlapi0.8_6.7-1ubuntu3_amd64.deb ... 456s Unpacking libbrlapi0.8:amd64 (6.7-1ubuntu3) ... 456s Selecting previously unselected package libpcsclite1:amd64. 456s Preparing to unpack .../07-libpcsclite1_2.3.3-1_amd64.deb ... 456s Unpacking libpcsclite1:amd64 (2.3.3-1) ... 456s Selecting previously unselected package libcacard0:amd64. 456s Preparing to unpack .../08-libcacard0_1%3a2.8.0-3build4_amd64.deb ... 456s Unpacking libcacard0:amd64 (1:2.8.0-3build4) ... 456s Selecting previously unselected package libdaxctl1:amd64. 456s Preparing to unpack .../09-libdaxctl1_77-2.2ubuntu2_amd64.deb ... 456s Unpacking libdaxctl1:amd64 (77-2.2ubuntu2) ... 456s Selecting previously unselected package libjpeg-turbo8:amd64. 456s Preparing to unpack .../10-libjpeg-turbo8_2.1.5-3ubuntu2_amd64.deb ... 456s Unpacking libjpeg-turbo8:amd64 (2.1.5-3ubuntu2) ... 456s Selecting previously unselected package libjpeg8:amd64. 456s Preparing to unpack .../11-libjpeg8_8c-2ubuntu11_amd64.deb ... 456s Unpacking libjpeg8:amd64 (8c-2ubuntu11) ... 456s Selecting previously unselected package libndctl6:amd64. 456s Preparing to unpack .../12-libndctl6_77-2.2ubuntu2_amd64.deb ... 456s Unpacking libndctl6:amd64 (77-2.2ubuntu2) ... 456s Selecting previously unselected package libpixman-1-0:amd64. 456s Preparing to unpack .../13-libpixman-1-0_0.44.0-3_amd64.deb ... 456s Unpacking libpixman-1-0:amd64 (0.44.0-3) ... 456s Selecting previously unselected package libpmem1:amd64. 456s Preparing to unpack .../14-libpmem1_1.13.1-1.1ubuntu2_amd64.deb ... 456s Unpacking libpmem1:amd64 (1.13.1-1.1ubuntu2) ... 456s Selecting previously unselected package librdmacm1t64:amd64. 456s Preparing to unpack .../15-librdmacm1t64_56.1-1ubuntu1_amd64.deb ... 456s Unpacking librdmacm1t64:amd64 (56.1-1ubuntu1) ... 456s Selecting previously unselected package libslirp0:amd64. 456s Preparing to unpack .../16-libslirp0_4.8.0-1ubuntu1_amd64.deb ... 456s Unpacking libslirp0:amd64 (4.8.0-1ubuntu1) ... 456s Selecting previously unselected package liburing2:amd64. 456s Preparing to unpack .../17-liburing2_2.9-1_amd64.deb ... 456s Unpacking liburing2:amd64 (2.9-1) ... 456s Selecting previously unselected package libusbredirparser1t64:amd64. 456s Preparing to unpack .../18-libusbredirparser1t64_0.15.0-1_amd64.deb ... 456s Unpacking libusbredirparser1t64:amd64 (0.15.0-1) ... 456s Selecting previously unselected package mmdebstrap. 456s Preparing to unpack .../19-mmdebstrap_1.5.7-1_all.deb ... 456s Unpacking mmdebstrap (1.5.7-1) ... 456s Selecting previously unselected package qemu-system-common. 456s Preparing to unpack .../20-qemu-system-common_1%3a10.0.2+ds-1ubuntu2_amd64.deb ... 456s Unpacking qemu-system-common (1:10.0.2+ds-1ubuntu2) ... 456s Selecting previously unselected package qemu-system-data. 456s Preparing to unpack .../21-qemu-system-data_1%3a10.0.2+ds-1ubuntu2_all.deb ... 456s Unpacking qemu-system-data (1:10.0.2+ds-1ubuntu2) ... 456s Selecting previously unselected package libfdt1:amd64. 456s Preparing to unpack .../22-libfdt1_1.7.2-2build1_amd64.deb ... 456s Unpacking libfdt1:amd64 (1.7.2-2build1) ... 456s Selecting previously unselected package seabios. 456s Preparing to unpack .../23-seabios_1.16.3-2_all.deb ... 456s Unpacking seabios (1.16.3-2) ... 456s Selecting previously unselected package qemu-system-x86. 456s Preparing to unpack .../24-qemu-system-x86_1%3a10.0.2+ds-1ubuntu2_amd64.deb ... 456s Unpacking qemu-system-x86 (1:10.0.2+ds-1ubuntu2) ... 456s Setting up libpixman-1-0:amd64 (0.44.0-3) ... 456s Setting up cryptsetup (2:2.7.5-1ubuntu2) ... 457s Setting up libfdt1:amd64 (1.7.2-2build1) ... 457s Setting up acl (2.3.2-2) ... 457s Setting up libasound2-data (1.2.14-1ubuntu1) ... 457s Setting up libasound2t64:amd64 (1.2.14-1ubuntu1) ... 457s Setting up mmdebstrap (1.5.7-1) ... 457s Setting up libpcsclite1:amd64 (2.3.3-1) ... 457s Setting up libjpeg-turbo8:amd64 (2.1.5-3ubuntu2) ... 457s Setting up libdaxctl1:amd64 (77-2.2ubuntu2) ... 457s Setting up qemu-system-data (1:10.0.2+ds-1ubuntu2) ... 457s Setting up seabios (1.16.3-2) ... 457s Setting up libslirp0:amd64 (4.8.0-1ubuntu1) ... 457s Setting up libusbredirparser1t64:amd64 (0.15.0-1) ... 457s Setting up ipxe-qemu (1.21.1+git-20220113.fbbdc3926-0ubuntu2) ... 457s Setting up libndctl6:amd64 (77-2.2ubuntu2) ... 457s Setting up librdmacm1t64:amd64 (56.1-1ubuntu1) ... 457s Setting up libbrlapi0.8:amd64 (6.7-1ubuntu3) ... 457s Setting up liburing2:amd64 (2.9-1) ... 457s Setting up libpmem1:amd64 (1.13.1-1.1ubuntu2) ... 457s Setting up cryptsetup-initramfs (2:2.7.5-1ubuntu2) ... 457s update-initramfs: deferring update (trigger activated) 457s Setting up libjpeg8:amd64 (8c-2ubuntu11) ... 457s Setting up libcacard0:amd64 (1:2.8.0-3build4) ... 457s Setting up qemu-system-common (1:10.0.2+ds-1ubuntu2) ... 457s Created symlink '/etc/systemd/system/multi-user.target.wants/qemu-kvm.service' → '/usr/lib/systemd/system/qemu-kvm.service'. 457s Setting up qemu-system-x86 (1:10.0.2+ds-1ubuntu2) ... 457s Processing triggers for initramfs-tools (0.149ubuntu1) ... 457s update-initramfs: Generating /boot/initrd.img-6.15.0-4-generic 457s W: No lz4 in /usr/bin:/sbin:/bin, using gzip 466s Processing triggers for libc-bin (2.41-6ubuntu2) ... 466s Processing triggers for man-db (2.13.1-1) ... 471s autopkgtest [12:46:58]: test remote-unlocking: [----------------------- 472s + PATH=/usr/bin:/bin 472s + export PATH 472s + basename -- /tmp/autopkgtest.izCbV0/build.p2K/src/debian/tests/remote-unlocking 472s + TESTNAME=remote-unlocking 472s + dpkg-parsechangelog -SVersion 472s + VERSION=2025.88-1 472s + apt-cache show dropbear=2025.88-1 472s + [ ! -c /dev/kvm ] 472s + [ -c /dev/kvm ] 472s + dd if=/dev/kvm count=0 status=none 472s + CPU_MODEL=host 472s + dpkg-architecture -qDEB_HOST_ARCH 472s dpkg-architecture: warning: cannot determine CC system type, falling back to default (native compilation) 472s + DEB_HOST_ARCH=amd64 472s + find /lib/modules -mindepth 1 -maxdepth 1 -name+ *-amd64 -type d -printfsort -V %P\n 472s 472s + tail -n1 472s + KERNEL_VERSION= 472s + KERNEL=/boot/vmlinuz- 472s + [ -z ] 472s + echo ERROR: Could not determine kernel to use, aborting 472s ERROR: Could not determine kernel to use, aborting 472s + exit 1 472s autopkgtest [12:46:59]: test remote-unlocking: -----------------------] 472s remote-unlocking FLAKY non-zero exit status 1 472s autopkgtest [12:46:59]: test remote-unlocking: - - - - - - - - - - results - - - - - - - - - - 473s autopkgtest [12:47:00]: @@@@@@@@@@@@@@@@@@@@ summary 473s upstream-tests FLAKY non-zero exit status 1 473s remote-unlocking FLAKY non-zero exit status 1