public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH] test/passt.mbuto: Don't fail on missing guest public key
@ 2022-09-23 15:56 Stefano Brivio
  0 siblings, 0 replies; only message in thread
From: Stefano Brivio @ 2022-09-23 15:56 UTC (permalink / raw)
  To: passt-dev

[-- Attachment #1: Type: text/plain, Size: 774 bytes --]

We won't necessarily run mbuto as part of regular tests: it can also
be used for demos or out-of-tree tests.

To keep the profile simple, leave the whole sshd setup there, which
is otherwise harmless, but don't fail if guest-key.pub is missing in
the current directory.

Signed-off-by: Stefano Brivio <sbrivio(a)redhat.com>
---
 test/passt.mbuto | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/passt.mbuto b/test/passt.mbuto
index d29f456..51c9ada 100755
--- a/test/passt.mbuto
+++ b/test/passt.mbuto
@@ -68,7 +68,7 @@ EOF
 	ln -s /run/sshd /usr/share/empty.sshd
 
 	cat > /root/.ssh/authorized_keys <<EOF
-'"$(cat guest-key.pub)"'
+'"$(cat guest-key.pub 2>/dev/null || :)"'
 EOF
 	chmod 600 /root/.ssh/authorized_keys
 	chmod 700 /root
-- 
@@ -68,7 +68,7 @@ EOF
 	ln -s /run/sshd /usr/share/empty.sshd
 
 	cat > /root/.ssh/authorized_keys <<EOF
-'"$(cat guest-key.pub)"'
+'"$(cat guest-key.pub 2>/dev/null || :)"'
 EOF
 	chmod 600 /root/.ssh/authorized_keys
 	chmod 700 /root
-- 
2.35.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-09-23 15:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-23 15:56 [PATCH] test/passt.mbuto: Don't fail on missing guest public key Stefano Brivio

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).