From patchwork Mon Feb 12 19:26:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasyl Vavrychuk X-Patchwork-Id: 872354 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1236::1; helo=casper.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="pSsxPZc3"; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="OIlHC85e"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="hNpz7Hup"; dkim-atps=neutral Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zgGBn0vNYz9s7f for ; Tue, 13 Feb 2018 06:36:49 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject: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=FGxZrQ+obSsEuVa+PIGgxaMsAwP+vF4tqSKUw+jQiBI=; b=pSsxPZc3cFRbnz+xab58ROp4VH OhbZ7CfW9xX9aUY/BMp/VNoz69P0FbZNSc3sfUYv2UO85LZjENg0dT7Db19l3lEe19lnCyxlMIaeG W3q3EMr+/xRhSdJSmpF1+uhEkaGil+VNkr4vO6mMi2wnpzBGnCAKiFPIsmBPtO9Qob/upslfUGvKz 66HsSMRNXCWfF68VqH+utJ+7CYHD2H0gq1HrGhf5szaSLem2JNcqbCaXOp3R8uWaC3NwlHKUC81pt mVJcDetnn2IBbknzBPq4+4qlpPCHr22Q8TQHR9gDo0pbAgc1sXuQbls1qIBf0vhEcGLNpHKi/5F4v 58E7cJGQ==; Received: from [198.137.202.133] (helo=bombadil.infradead.org) by casper.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1elJu2-0002zP-8r for incoming@patchwork.ozlabs.org; Mon, 12 Feb 2018 19:36:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject: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=FGxZrQ+obSsEuVa+PIGgxaMsAwP+vF4tqSKUw+jQiBI=; b=OIl HC85erISX2wyZVyRdXvWzxU1a4mfXbnUOFIsboEq3+FXmjvKOuf/cvsK31WED3oOcNLhdqJVt01rm RBodL0C9Kt7oBtkvHcftQUP3FPtDHhDUU2ysweBFfAf3cqOaK7ShMbQGbYAcyRzPgsq8fYcLz61RQ TuOn/H9emUa6Fa0ZbDZP349nrRn1LMcp1yMNeGBOeRkz2t1+3bPfsORD4xitA+qfgBvuDY/RJ61NN 93QZwTG3byjJVd/Zb+dof049Hp8S/6VN3+4FQkY99gggcf+QAHCkETW4niBQThB1TyY0QmfGI6R6y 85Cjs4bmPml40MIDn22uwTFB/8gvTCQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1elJkM-0001o0-ST; Mon, 12 Feb 2018 19:26:38 +0000 Received: from mail-lf0-x231.google.com ([2a00:1450:4010:c07::231]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1elJkH-0001Jt-4f for hostap@lists.infradead.org; Mon, 12 Feb 2018 19:26:34 +0000 Received: by mail-lf0-x231.google.com with SMTP id g72so21912919lfg.5 for ; Mon, 12 Feb 2018 11:26:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=KVGqOLI2MWSCYerX0vBxSJ7bc7ojX3Fquo9/qHnYqoc=; b=hNpz7HupiWaNN4xoyrII5zGzExlxwLh5AohzmiAyLWgZgEE9JU9TyhZgV9+N92CE+C MQAomyXZNts39o6DJsNcqk1ZbYgru1TU+ulFupugfHpSctSeZTd2WOo/tvW5lTlcSHs4 L92tAyWKe6UBnSXWzk1A3HiByFY35mXReNLCIgJU0qmvEBqK86suE0rN3l8rMctVBb4C TSbotJPuTmWEpjX9d1/zTwpLbZJoxOcVKkyWfkyL1/JvmRDFNzViGx/owcdoZoprVfRm Sf7Rn22810j8YGb9r03fpDNlMCJZdD3qpN6tD1Gbewcw9C8ZJ/DqYOm1hWDOokUsKEAT gdaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=KVGqOLI2MWSCYerX0vBxSJ7bc7ojX3Fquo9/qHnYqoc=; b=t+3bViKGHUB4qskprbVuEl4aFWnAUe09edIXsaVhfsX0SZGfsy2kBbNuhyOOUpAUsD dVl/TYTlWsalF9HFLvjLj5EIzx+43Q+qN2gvhMUq6FTYXeW5yfxMUwG21gJOio6ULP8g YPxl5WfaXqFAvo+l4srpINEpU1JIRA7ckx6mPiGAJlGxq4LWlPjhw7d+DQtPqy6sU1Kv zvHA8/qn56378DfU/fzQW+n8HHah6EfhyaSo3bniWrQB6C8hm513vBWnRdDzf9Li2z5D IYN1OmDl4u0vOO6ouTKuZNOEPtHh1id0I3My/IQdXp8IcJL1KzE06zLi/ThEgW2g3/DX OEzg== X-Gm-Message-State: APf1xPAdZrQbCAIYDijgFqdFUO2JYErTYCQC6PXTmFfrbs0mLfdTFND2 s70dZV06u/2P1jssGYiPMT9Pqg== X-Google-Smtp-Source: AH8x226EGlh52vKICsx0NtFN+sgf3Ke8FON5SFkkhj1QlBIA4qilnjAvrVgqEO9jzgbHFYpZ8AxFqA== X-Received: by 10.46.67.147 with SMTP id z19mr8120601lje.28.1518463580227; Mon, 12 Feb 2018 11:26:20 -0800 (PST) Received: from zbook.synapse.com ([185.145.181.165]) by smtp.gmail.com with ESMTPSA id l193sm1827141lfg.50.2018.02.12.11.26.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Feb 2018 11:26:19 -0800 (PST) From: Vasyl Vavrychuk To: hostap@lists.infradead.org Subject: [PATCH] tests hwsim: implemented option --dbus for logging D-Bus messages Date: Mon, 12 Feb 2018 21:26:10 +0200 Message-Id: <20180212192610.14140-1-vvavrychuk@gmail.com> X-Mailer: git-send-email 2.11.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:4010:c07:0:0:0:231 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (vvavrychuk[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -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 X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vasyl Vavrychuk MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Signed-off-by: Vasyl Vavrychuk --- tests/hwsim/run-tests.py | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/tests/hwsim/run-tests.py b/tests/hwsim/run-tests.py index fb33a37f1..d514d2ef5 100755 --- a/tests/hwsim/run-tests.py +++ b/tests/hwsim/run-tests.py @@ -123,11 +123,12 @@ def report(conn, prefill, build, commit, run, test, result, duration, logdir, logdir + "/" + test + "." + log) class DataCollector(object): - def __init__(self, logdir, testname, tracing, dmesg): + def __init__(self, logdir, testname, args): self._logdir = logdir self._testname = testname - self._tracing = tracing - self._dmesg = dmesg + self._tracing = args.tracing + self._dmesg = args.dmesg + self._dbus = args.dbus def __enter__(self): if self._tracing: output = os.path.abspath(os.path.join(self._logdir, '%s.dat' % (self._testname, ))) @@ -143,6 +144,16 @@ class DataCollector(object): if res: print "Failed calling trace-cmd: returned exit status %d" % res sys.exit(1) + if self._dbus: + output = os.path.abspath(os.path.join(self._logdir, '%s.dbus' % (self._testname, ))) + self._dbus_cmd = subprocess.Popen(['dbus-monitor', '--system'], + stdout=open(output, 'w'), + stderr=open('/dev/null', 'w'), + cwd=self._logdir) + res = self._dbus_cmd.returncode + if res: + print "Failed calling dbus-monitor: returned exit status %d" % res + sys.exit(1) def __exit__(self, type, value, traceback): if self._tracing: self._trace_cmd.stdin.write('DONE\n') @@ -214,6 +225,8 @@ def main(): help='collect tracing per test case (in log directory)') parser.add_argument('-D', action='store_true', dest='dmesg', help='collect dmesg per test case (in log directory)') + parser.add_argument('--dbus', action='store_true', dest='dbus', + help='collect dbus per test case (in log directory)') parser.add_argument('--shuffle-tests', action='store_true', dest='shuffle_tests', help='Shuffle test cases to randomize order') @@ -414,7 +427,7 @@ def main(): logger.addHandler(log_handler) reset_ok = True - with DataCollector(args.logdir, name, args.tracing, args.dmesg): + with DataCollector(args.logdir, name, args): count = count + 1 msg = "START {} {}/{}".format(name, count, num_tests) logger.info(msg)