Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp367750rwp; Wed, 12 Jul 2023 14:52:07 -0700 (PDT) X-Google-Smtp-Source: APBJJlGofIjSxb/43bH+0YODH5eoUCV8LBqAoI+EgtHZAoTxMnMz6lKz5/RRizGYgkjrRfoBgUHw X-Received: by 2002:a17:902:d4c4:b0:1b3:f5c7:4e75 with SMTP id o4-20020a170902d4c400b001b3f5c74e75mr18353893plg.58.1689198727017; Wed, 12 Jul 2023 14:52:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689198726; cv=pass; d=google.com; s=arc-20160816; b=qh7JvPtSoINwAYuywdwru4VcqEZ/k2r/bNV9hSDW2UTRW5huJodXMbDrndh/Y6prHG H8kQAIMCBhR3L64Czw71X1yn7gOu8gZ3qzKvowqK+/ggcXPqp1QT9VDRWoEAzCPwnGTq Nw4gCTCT1OvxPxr3cVbaiW8v/T35N199L5pacasQoPO45v1GqhH03fvf5OUK6LmsUqAP eRY/4K1zF4uUSQAq4LQOmtqt8PZX+khvSgD0HRCoqKE6mzZrgJCWUAtJqa8VtOhhrh3y CBd79/j+ZMR/m7IBy2+/9xV/ozLE0+xMvUsyW50PUgQmTgitZkbpfuPvzXknc2jF/ogm g/5g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=8J1uWxzx/ELfQFx/YteDdaNQIKHhGHrBRX+CeNMLqUc=; fh=raBgKoRsHCwQLc6ReOhmOoEQ+DtSaNc74fugaHBwryI=; b=Zjq8EHYrSxustgcsiFhN6ofj4XQCw8Z3eGkcZ4S3iLso4cgazup+2UtoVhfhntq3bI 2sBdUyIg/pxgv9eeqfZLXmpxrt4kJ0kh30wGHfZvR9uOKaeCitL99zLjB47rbuZ/psUK qzl9BaXMgdluzzIb8Rv/ycR8j32295gYg4iHP2eSUZwv8fy6aVTR7cV6RQMXMiUPBbRa xq2d+15/EchVnxG1P2mFD/aIrk8goPWxr6PxL2luUNjUWXrettgadM+pZsZ5GbVJoJzc BaWWcBUSDiNoYmohDz89VxpEWSiADeQGFcRdP5YWX1qvk0Z0vSGAIiCSeGrlVkUD0VhS hlIQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@iki.fi header.s=meesny header.b=D4cODmMa; arc=pass (i=1); spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h8-20020a170902f54800b001b89b7aea8fsi4132347plf.493.2023.07.12.14.51.54; Wed, 12 Jul 2023 14:52:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@iki.fi header.s=meesny header.b=D4cODmMa; arc=pass (i=1); spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229880AbjGLVW5 (ORCPT + 99 others); Wed, 12 Jul 2023 17:22:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229610AbjGLVW5 (ORCPT ); Wed, 12 Jul 2023 17:22:57 -0400 Received: from meesny.iki.fi (meesny.iki.fi [IPv6:2001:67c:2b0:1c1::201]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD4611BF3 for ; Wed, 12 Jul 2023 14:22:54 -0700 (PDT) Received: from monolith.lan (91-152-120-101.elisa-laajakaista.fi [91.152.120.101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pav) by meesny.iki.fi (Postfix) with ESMTPSA id 4R1W164lS4zyWs; Thu, 13 Jul 2023 00:22:50 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1689196970; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=8J1uWxzx/ELfQFx/YteDdaNQIKHhGHrBRX+CeNMLqUc=; b=D4cODmMauT6ULkWNeKf5GXd9+4zwVtK8oDqgS3qGO5SEzLMN1/nVoAVlcHP0vIMz5knMTR HryaSEMeHLRv4sDXMzDdRxEHAgDokmNV9mktkjExnzk99E8FqLVlTqeSitj8YblNd2qR2k 2jcJiCR5csmR59I2IHlbCMVbT1F3l2s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1689196970; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=8J1uWxzx/ELfQFx/YteDdaNQIKHhGHrBRX+CeNMLqUc=; b=w8447uBSWRl/d/IpDmcst4WT9e3Qs3oJAcqFKTgH45ZK6wJkjWi57VChj7OdjVY0u+W/xA Srhb2jlk0K65GXpNCwDdAUUIzWme7ZZtoQlbOTWhmLOpEX1ewI8RR+U/VqvVvnglu3p6RS oS0XT4ALnlV3xvXvJcY9vEf/3i44nls= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=pav smtp.mailfrom=pav@iki.fi ARC-Seal: i=1; s=meesny; d=iki.fi; t=1689196970; a=rsa-sha256; cv=none; b=yCHSLZTtBle/+sUSdnMt1i+NIWCmwBooi4q80g9+q419qxcw4DX35DPj3pBGzHCsfkG22A 47ZcqTqbn7jWONmbdQiqazaAykvGT3rWLRvWR1EV5sNJLC5Of6Y5dEwDEyuGOrd2yeqTUR aF3b87JefExlTvsPalrOWf8l9Qz9Jcw= From: Pauli Virtanen To: linux-bluetooth@vger.kernel.org Cc: Pauli Virtanen Subject: [PATCH BlueZ v2 1/2] test-runner: set non-quiet printk before running tests Date: Thu, 13 Jul 2023 00:22:48 +0300 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org It is useful to see WARN_ON etc. messages when running the tests. The 'quiet' in cmdline suppresses levels >= WARN, so re-enable them explicitly after boot, so that it is on by default and doesn't need to be handled in local test scripts. --- Notes: v2: add comment. Suppress level>=INFO, to hide "Bluetooth: MGMT ver" etc. It could be useful to also check for BUG/WARNING in the bluez test bot. tools/test-runner.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tools/test-runner.c b/tools/test-runner.c index d74bb1087..119e1cfbc 100644 --- a/tools/test-runner.c +++ b/tools/test-runner.c @@ -136,6 +136,24 @@ static const char *config_table[] = { NULL }; +static void enable_printk(void) +{ + FILE *f; + + f = fopen("/proc/sys/kernel/printk", "w"); + if (!f) { + perror("Failed to set printk"); + return; + } + + /* Restore printk loglevel, undoing 'quiet' in cmdline (suppress early + * on-boot messages), to show WARN_ON etc. Suppress level>=6(INFO), set + * default_msg:4(WARN) & min:1, default:7. See man 2 syslog. + */ + fprintf(f, "6 4 1 7"); + fclose(f); +} + static void prepare_sandbox(void) { int i; @@ -181,6 +199,8 @@ static void prepare_sandbox(void) "mode=0755") < 0) perror("Failed to create filesystem"); } + + enable_printk(); } static char *const qemu_argv[] = { -- 2.41.0