From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 20 20:01:40 2017 Received: (at 26173) by debbugs.gnu.org; 21 Mar 2017 00:01:40 +0000 Received: from localhost ([127.0.0.1]:36943 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cq7F5-0006L9-S2 for submit@debbugs.gnu.org; Mon, 20 Mar 2017 20:01:40 -0400 Received: from mail.lassieur.org ([83.152.10.219]:49776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cq7F3-0006L0-PU for 26173@debbugs.gnu.org; Mon, 20 Mar 2017 20:01:38 -0400 Received: from rodion (88.191.118.83 [88.191.118.83]) by mail.lassieur.org (OpenSMTPD) with ESMTPSA id 03f96e29 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Tue, 21 Mar 2017 00:01:35 +0000 (UTC) References: <20170319163507.3583-1-clement@lassieur.org> <20170319163507.3583-3-clement@lassieur.org> <87mvcfu2ay.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: =?utf-8?Q?Cl=C3=A9ment?= Lassieur To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#26173: [PATCH 3/4] tests: ssh: Abstract session connection and authentication. In-reply-to: <87mvcfu2ay.fsf@gnu.org> Date: Tue, 21 Mar 2017 01:01:35 +0100 Message-ID: <87r31r7b1c.fsf@lassieur.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26173 Cc: 26173@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Ludovic Courtès writes: > Clément Lassieur skribis: > >> * gnu/tests/ssh.scm (run-ssh-test): Introduce make-session-for-test, >> call-with-connected-session and call-with-connected-session/auth. >> (run-ssh-test)["connect"]: Rename to "shell command". Abstract its session >> connection and authentication work into the above three functions. > > It looks nicer with this change, cool! > >> - (match (connect! session) >> - ('ok >> - ;; Try the simple authentication methods. Dropbear >> - ;; requires 'none' when there are no passwords, whereas >> - ;; OpenSSH accepts 'password' with an empty password. >> - (let loop ((methods (list (cut userauth-password! <> "") >> - (cut userauth-none! <>)))) > > This comment vanished in the refactoring but it might be worth keeping. Oh! Sorry, that wasn't intentional. > Otherwise LGTM, thanks! > > Ludo’.