From patchwork Sun Oct 24 19:47:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz Dziedzic X-Patchwork-Id: 1545443 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=sqGIaZWm; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=P+a2N/kh; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HcpZ16qpNz9s1l for ; Mon, 25 Oct 2021 06:49:13 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=2WpvmX811tV5tE+ypyYyZHj50kwXfriGGqsOxEJ8wa0=; b=sqGIaZWmKPLjG0 vvVYaupeZ0fecVMchbFci6AbG8Akiv1N+bCFTyX5UnYg41LpAOFURuPsZaZO2rX/l8rMj6rTN5sZs pxwiHRliw6tt1orEv7v0MuRJkEjXykZ2On3IAGh7BAzlV+y/X18qtrUH3n1QKXa9+6T9uBHyd9UfK BbjYv9fvJbbjgStKrs1mmiyGC3y+qFhuWdxkQB1Ig/t8/rfK1VMhnmeEvEdQs1vEJTSZMkR3r0zyy 5wRe96A6/p/I550krXS5jfnNMu4iNHtJRtUaJpbFs7FEBci3Xu3RRwxHiHT20UuFoXMf4QlxsivDz nqZ7g/K9tMH6meqqwXxg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mejTS-00EWpU-AR; Sun, 24 Oct 2021 19:48:06 +0000 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mejTN-00EWnv-OZ for hostap@lists.infradead.org; Sun, 24 Oct 2021 19:48:03 +0000 Received: by mail-lj1-x22a.google.com with SMTP id g8so6277901ljn.4 for ; Sun, 24 Oct 2021 12:47:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=k9mq1X2UpWJHt1n4WvwRcyedqUtbahqmTK0YF5Bj4y4=; b=P+a2N/khcITqCBb5lhX9aTaSmfxTT9I5wkQjhr7MvnpgW4VsNlOqRmDyQI3wzav1jw TXkL3S6oyXtvDUIMF75OplN3AFZ2uVAKJoPHTDVZkbp3jAzTs96lWwn6TzZVaArrbpIz RiRE25CXIALLqzXrw+u5Lh33TjATz6uRG0k+LQ8gH9Suy3Kb20c2h3f1ISOaKlLVShUW 4Kqvqk3afxp2Uq4qIEDLNMr4CfVFqiC5pdyhXJPw+wJamJ1CX86rd9hzOmp061fBlu8C rhSmlBLbSOV2ceJj7CvQVW5QAlVh570K9JK+j0dfSycO/xOd1G2JRw6aQKqS1YWDKPTR eBDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=k9mq1X2UpWJHt1n4WvwRcyedqUtbahqmTK0YF5Bj4y4=; b=a4FUPA1yuzVBvj8EQ2dot9O8ca/p4sSw+II7/sEvanXPMFsNIuT316Xw4smBNDpqa+ zNYMbIJmxoIiGjCVN8MnnAb2ICzdQgPLdBVlUVP4Cwn5gfWUTT6DPgblHepJO2/DEEeq AIcwLH6MM/lOWsS2cSduiwKYAiVEQS37KCaQoDEJUIP0PJ6/0cXcrhWM+/sPrBICG1pL AjJgKVbPLZyZHDeY227GRr/QUjqJSLOvOPk99qhi4mFxf4SwUOw4/JXCW5PJDasF5mhJ +bQ3ny+YV/JqI43BE+jiIbwUcwIAYe+wpjva4mAa7xtpw0pYIOpn7KhkTgL0oxQUbkQW rA7A== X-Gm-Message-State: AOAM532RCMoNc032MZOvmQg72BNX9oaRVO90GuLf4I39mnJzVg2DEBOi Og2e5sQF5VYS6LcZKsFXb5f3YHVMijU= X-Google-Smtp-Source: ABdhPJwKVdBanhG2A4EKXOhbmkvqCJUOtKRdys185JCpEDHn6ZhMqnkt1bNrpiC28tXR3B51Dghigg== X-Received: by 2002:a2e:4b0a:: with SMTP id y10mr14741070lja.334.1635104877498; Sun, 24 Oct 2021 12:47:57 -0700 (PDT) Received: from localhost.localdomain ([62.141.192.106]) by smtp.gmail.com with ESMTPSA id w17sm1406107lfu.251.2021.10.24.12.47.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Oct 2021 12:47:57 -0700 (PDT) From: Janusz Dziedzic To: hostap@lists.infradead.org Cc: j@w1.fi, Janusz Dziedzic Subject: [PATCH] tests: remotehost: disable pipe buffering Date: Sun, 24 Oct 2021 21:47:49 +0200 Message-Id: <20211024194749.521690-1-janusz.dziedzic@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211024_124801_852356_CB9C8DC2 X-CRM114-Status: GOOD ( 11.19 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Before, we could loose some events because of pipe buffering. I saw this problem when run "ubus listen" or "logread -f" waiting some specific events. After disable buffering works much better. Signed-off-by: Janusz Dziedzic --- tests/hwsim/remotehost.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:22a listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [janusz.dziedzic[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Before, we could loose some events because of pipe buffering. I saw this problem when run "ubus listen" or "logread -f" waiting some specific events. After disable buffering works much better. Signed-off-by: Janusz Dziedzic --- tests/hwsim/remotehost.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/hwsim/remotehost.py b/tests/hwsim/remotehost.py index 0799b951f..14c3559ff 100644 --- a/tests/hwsim/remotehost.py +++ b/tests/hwsim/remotehost.py @@ -24,7 +24,7 @@ def execute_thread(command, reply): err = tempfile.TemporaryFile() try: status = 0 - buf = subprocess.check_output(command, stderr=err).decode() + buf = subprocess.check_output(command, stderr=err, bufsize=0).decode() except subprocess.CalledProcessError as e: status = e.returncode err.seek(0) @@ -181,7 +181,7 @@ class Host(): _cmd = self.name + " proc_run: " + ' '.join(cmd) logger.debug(_cmd) err = tempfile.TemporaryFile() - proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=err) + proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=err, bufsize=0) proc.reaper_file = filename return proc