From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 94EDF42942; Fri, 14 Apr 2023 14:53:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8BD2A42D0E; Fri, 14 Apr 2023 14:53:19 +0200 (CEST) Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by mails.dpdk.org (Postfix) with ESMTP id 85822400D5 for ; Fri, 14 Apr 2023 14:53:18 +0200 (CEST) Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-1a6715ee82fso7839785ad.1 for ; Fri, 14 Apr 2023 05:53:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20221208.gappssmtp.com; s=20221208; t=1681476797; x=1684068797; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+j4P1t+7N9L4AIMo5zHmk3kiR1LDBvTtHmcbp0NDQLw=; b=SIDt3rKLnPIdm+oXa+5hVBUP8eGu1sS1R4asj6jkcRLcI4vnMOZV7TutRj8L9Z+ltW 7m+HbipNfU7cSS9koljjWWKWk/XfkdrlPRW2oknGfu1+sKB7favl1sipXXvjiLGl7udo pyktmT7pb8jl/Ly92vryHWIhs1ejWCPbskYlMZcwqIuXznJfURHTtAA/c1thSkXV0Dp4 +cXDCGTFGeVNdvHzBbqCDkYwChLXQCpas1DAXfxgial3ZTkLS97Jt0cQ90bUgs5rZtfi /hLAJN+MUsV/hJP3DKJkrCgRVRw8U75ZMeaungfmjhIM6czMEH0u7XPlLG4QhKN5RcAf wIww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681476797; x=1684068797; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+j4P1t+7N9L4AIMo5zHmk3kiR1LDBvTtHmcbp0NDQLw=; b=ValZ8+NtbWKyVYsBWutMMu9J9InaIgwF7567/GZ/8954v5AE0sYGahd33ftNCZQxXH bFTCoDWnaLeY/KNMLwUrCiwABs7wk5h2EIBp9ShZ66Jkelu4mCIUuqi/zIBu0L+7HXyF sV4IfkQxAbCF9C6MT57xw6P1q7QRrTweq5i9E/lwhh9MhnkGk7RJHbErAd1nlfhSrqpZ MHwBt9MTQ+QDOZybvSQ4GnzCcffWQAAnjU++NST482VAr9iaVOKIaP+uXhjvLwKANtbY 9715Pvq3SNheymSiKScvtTDbnVw2RucxCi2vx+PJusyse12SzQNFb8WzbsWOgHbNpIDL AIoQ== X-Gm-Message-State: AAQBX9ewZ3wfhtrB3NndXTlaROZAxzw1NlgtQ/tSPhvVU6jp+dhmEFPI g87HvE3aegAThcnBcBCjF14Huc/9G+vyzw1oy60= X-Google-Smtp-Source: AKy350b5Yhb9CTAsCK7UgmrQVz0g8/k6pSytiBuTHETpsY6L8eJVqDrmBL6M+Fgv3NPevExj7mgyxw== X-Received: by 2002:a05:6a00:2e8d:b0:636:f5f4:5308 with SMTP id fd13-20020a056a002e8d00b00636f5f45308mr8821297pfb.7.1681476797698; Fri, 14 Apr 2023 05:53:17 -0700 (PDT) Received: from alarm.flets-east.jp ([2400:4050:a840:1e00:4457:c267:5e09:481b]) by smtp.gmail.com with ESMTPSA id u21-20020a62ed15000000b00627df85cd72sm2961787pfh.199.2023.04.14.05.53.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Apr 2023 05:53:17 -0700 (PDT) From: Akihiko Odaki To: Cc: dts@dpdk.org, Akihiko Odaki Subject: [PATCH 6/7] framework/packet: Fix tcpdump help parse Date: Fri, 14 Apr 2023 21:52:54 +0900 Message-Id: <20230414125255.67812-7-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230414125255.67812-1-akihiko.odaki@daynix.com> References: <20230414125255.67812-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org tcpdump version 4.99.3 puts several options in one line as follows: > $ tcpdump --help > tcpdump version 4.99.3 > libpcap version 1.10.3 (with TPACKET_V3) > OpenSSL 3.0.5 5 Jul 2022 > Usage: tcpdump [-AbdDefhHIJKlLnNOpqStuUvxX#] [ -B size ] [ -c count ] [--count] > [ -C file_size ] [ -E algo:secret ] [ -F file ] [ -G seconds ] > [ -i interface ] [ --immediate-mode ] [ -j tstamptype ] > [ -M secret ] [ --number ] [ --print ] [ -Q in|out|inout ] > [ -r file ] [ -s snaplen ] [ -T type ] [ --version ] > [ -V file ] [ -w file ] [ -W filecount ] [ -y datalinktype ] > [ --time-stamp-precision precision ] [ --micro ] [ --nano ] > [ -z postrotate-command ] [ -Z user ] [ expression ] This change allows to match a substring representing an option. Signed-off-by: Akihiko Odaki --- framework/packet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/packet.py b/framework/packet.py index f56bf178..9603ec7b 100644 --- a/framework/packet.py +++ b/framework/packet.py @@ -1099,7 +1099,7 @@ def start_tcpdump(crb, intf, count=0, filters=None, lldp_forbid=True): tcpdump_help = tcpdump_session.send_command("tcpdump -h") for line in tcpdump_help.split("\n"): - m = re.match(direct_param, line) + m = re.search(direct_param, line) if m: opt = re.search("-Q", m.group(2)) if opt: -- 2.40.0