Hi Matt,

Congrats for the new release! :-)  The compile-time tests are especially
welcome, even though unfortunately we can't enable them for Debian
packages since writing into ~/.ssh within build environments is
forbidden by Policy.  But instead we can run the pytest command as an
autopkgtest with the adequate Restriction field.

Since these tests are self contained we can't use virtualenv, and
without it pytest fails due a shell parsing error similar to

    $ ; echo nay
    bash: syntax error near unexpected token `;'

The fix is trivial.  Please consider applying
https://salsa.debian.org/debian/dropbear/-/blob/debian/latest/debian/patches/support-running-test_aslr-without-venv.patch
which I'm also attaching to this mail for convenience.

Thanks,
cheers
-- 
Guilhem.
From: Guilhem Moulin <guil...@debian.org>
Date: Fri, 1 Apr 2022 23:27:50 +0200
Subject: Support running test_aslr without venv.

Without this patch the test fails because the remote shell can't parse
the command:

    $ ; echo nay
    bash: syntax error near unexpected token `;'
---
 test/test_aslr.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/test/test_aslr.py b/test/test_aslr.py
index ec38844..b2fa272 100644
--- a/test/test_aslr.py
+++ b/test/test_aslr.py
@@ -9,9 +9,12 @@ def test_reexec(request, dropbear):
 	This indicates that re-exec makes ASLR work
 	"""
 	map_script = (Path(request.node.fspath).parent / "parent_dropbear_map.py").resolve()
-	# run within the same venv, for python deps
 	activate = own_venv_command()
-	cmd = f"{activate}; {map_script}"
+	if activate == "":
+		cmd = map_script
+	else:
+		# run within the same venv, for python deps
+		cmd = f"{activate}; {map_script}"
 	print(cmd)
 	r = dbclient(request, cmd, capture_output=True, text=True)
 	map1 = r.stdout.rstrip()

Attachment: signature.asc
Description: PGP signature

Reply via email to