From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id B1B47A0032;
	Tue, 13 Sep 2022 16:59:15 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 5DE094021D;
	Tue, 13 Sep 2022 16:59:15 +0200 (CEST)
Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com
 [209.85.167.49]) by mails.dpdk.org (Postfix) with ESMTP id 11A1040151
 for <dev@dpdk.org>; Tue, 13 Sep 2022 16:59:14 +0200 (CEST)
Received: by mail-lf1-f49.google.com with SMTP id i26so20534998lfp.11
 for <dev@dpdk.org>; Tue, 13 Sep 2022 07:59:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf.com; s=google;
 h=in-reply-to:content-transfer-encoding:content-disposition
 :mime-version:references:message-id:subject:cc:to:from:date:from:to
 :cc:subject:date;
 bh=AaP38ApDgvQAmeK3iEi8aXq0MwVxX+ZLiys8GJ/9NAc=;
 b=M9bIqUhKiUaxiYhiKP7YsVYQ34MyiwGC1z5L8TcnS0wGfCbGX2cQqWJ1cZahzPwFn0
 ruDWzo2qHyXb4x2DGe3fQf2v2Ka0wFhEiYR5dBMH3sk3mLGAy3388azOgvlWrAVne4a1
 trNybZRLVGuNvbxwtps/+j1mJHvYHLcDoSpt8CriT8/in49Zr7lai88h4g8fTj50F6vX
 r0l/t4Pe0XMlEvZEPYZCaUGqtE153fFdRuRVnrStdzy9SjMrw1j9pTM0gqQWrwsmprrN
 paZ4PgyLbOEEreOUturVN63XRWj413pugX7vbj5z8GpOMc0Gz6iGbBHQdF9rCobIaEMt
 Ye9w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=in-reply-to:content-transfer-encoding:content-disposition
 :mime-version:references:message-id:subject:cc:to:from:date
 :x-gm-message-state:from:to:cc:subject:date;
 bh=AaP38ApDgvQAmeK3iEi8aXq0MwVxX+ZLiys8GJ/9NAc=;
 b=GoSgmow2wH/MGVr6DELCy8saAhoyDdl2Qhhl6a2cEKeG0KlUU+6cuX/PgJsEoDiIL9
 0OsoJKVdEQF5QXcPLw7T4rER7wPJywwTqGwhWu2gCSzLhOnwjqK9Qf4c/rbHp1A1k/uc
 ++expTiPL00e9HYPJQwvOpxSAX1zXvq1GNBkBUXDkeu6H5fSJhiPorDjEqRYzdD2Z6Rg
 lWcXqiN69L0h0P2vVfSwKhuXRiw8Z0MFIsJxVNFgrEYGrE6IRoMMAYP+Dv+jlFlVcVJj
 M7zdwlaaWBwkJgDnO9Gfnvl0vebtgwVV6EGBo9Gqc6olAn2Vcli17lM4qhX6Zw/lHOnt
 7qSA==
X-Gm-Message-State: ACgBeo1I4QLtYz3VYwf6oMAWOFf/LdJicBjLwPEMNNAJe6jE5Mipnaqu
 90UM8CWEmX7rP4bWQjlO26kItQ==
X-Google-Smtp-Source: AA6agR5gJS6e0AKvwDGziachBXX2+Z/wbsHguAbKJSwb+3FOI4FAeBLGgIP6uuDVhuzyvXU1JrVRKQ==
X-Received: by 2002:ac2:5f98:0:b0:49a:d9ad:f9c5 with SMTP id
 r24-20020ac25f98000000b0049ad9adf9c5mr2860093lfe.14.1663081153421; 
 Tue, 13 Sep 2022 07:59:13 -0700 (PDT)
Received: from toster ([83.142.187.84]) by smtp.gmail.com with ESMTPSA id
 g9-20020a19ac09000000b004979989028bsm1766533lfc.147.2022.09.13.07.59.12
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 13 Sep 2022 07:59:12 -0700 (PDT)
Date: Tue, 13 Sep 2022 16:59:09 +0200
From: Stanislaw Kardach <kda@semihalf.com>
To: Juraj =?utf-8?Q?Linke=C5=A1?= <juraj.linkes@pantheon.tech>
Cc: thomas@monjalon.net, david.marchand@redhat.com, ronan.randles@intel.com,
 Honnappa.Nagarahalli@arm.com, ohilyard@iol.unh.edu,
 lijuan.tu@intel.com, dev@dpdk.org
Subject: Re: [PATCH v4 4/9] dts: add ssh pexpect library
Message-ID: <20220913144149.xbtomt2pzwywnodn@toster>
References: <20220728100044.1318484-1-juraj.linkes@pantheon.tech>
 <20220729105550.1382664-1-juraj.linkes@pantheon.tech>
 <20220729105550.1382664-5-juraj.linkes@pantheon.tech>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <20220729105550.1382664-5-juraj.linkes@pantheon.tech>
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On Fri, Jul 29, 2022 at 10:55:45AM +0000, Juraj Linkeš wrote:
<snip>
> +                self.session = pxssh.pxssh(encoding="utf-8")
> +                self.session.login(
> +                    self.node,
> +                    self.username,
> +                    self.password,
> +                    original_prompt="[$#>]",
> +                    password_regex=r"(?i)(?:password:)|(?:passphrase for key)|(?i)(password for .+:)",
> +                )
> +                self.logger.info(f"Connection to {self.node} succeeded")
> +            self.send_expect("stty -echo", "#")
> +            self.send_expect("stty columns 1000", "#")
First of all, thanks for those changes! Having DTS inside DPDK makes
test synchronization a lot easier. I'm happy to say (unsurprisingly)
that it works with my RISC-V HiFive Unmatched board like a charm.

Though there is a small issue with the lines above. They assume "#" as
the prompt sign, even though original_prompt was set to "[$#>]". This
touches on two problems:
1. # is usually a root prompt - is DTS assumed to be run with root
   privileges? DPDK may (in theory) run without them with some permission
   adjustment (hugetlb, VFIO container, etc.). If we assume DTS needs
   root access, this has to be both documented and validated before
   running the whole suite. Otherwise it'll be hard to debug.
2. Different shells use different prompts on different distros. Hence
   perhaps there should be a regex here (same as with original_prompt)
   and there could be a conf.yaml option to modify it on a per-host
   basis?

-- 
Best Regards,
Stanislaw Kardach