From patchwork Mon Feb 19 13:30:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Aktemur, Tankut Baris" X-Patchwork-Id: 85967 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1B9B53865490 for ; Mon, 19 Feb 2024 13:31:21 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by sourceware.org (Postfix) with ESMTPS id 8237F384DEF8 for ; Mon, 19 Feb 2024 13:30:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8237F384DEF8 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8237F384DEF8 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=198.175.65.14 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708349455; cv=none; b=DDm92qp8oezMEsnw6BgB6SKwEJb4inuT3glaOWdsaR0yb/kEzsvpM0Uh2WFt1lf5cEIG1farEVXmOg+4TnY8ou3KmDvNDFC78jDOxoIVFaqEmEwq2NzqrV3W/eHCtnZ0sp16eChClWq07ypWYNaJz0Jrtsl8iQNNcrq9Lu3Frlg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708349455; c=relaxed/simple; bh=8RZbK8Fq/hHafdsPAoHBk0CvNCyEuhfL3uIGSkqRwX4=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=XqipfsHJLLzwUln9LgVMGOVh/odVT4kyQuKj9hi4Grl88ulli3mmS6aeeFvHkPqfGpileTuZyG1Zy4YHyALmCkeJgBv0yMjEbhexNMksu/1rxe32A5JKcyrY4GutgCSA7/2YOKP9abAa843KUUPI8xL96BURRGDyU78j1tTacEw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708349453; x=1739885453; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=8RZbK8Fq/hHafdsPAoHBk0CvNCyEuhfL3uIGSkqRwX4=; b=mJVRuLctonardxCataX084dwEQaNDQFSZN16C6BLVA4T+xhrjW9h/nna UcLD4ZBFS79jEyjFskIWvW4UIbnGh5BUtfFpUXoby17QhKA8TXq+sA8C1 Eea/oMyj6zY56lswHCNr0nDoNkajo5yeoxqObYOL03ypGN3xhJCz2D0ql AYPxM+YdkPfHyY96ccYDsmyCA0G7c3CCNFewiEmiDzZsTseQGk0t9lAsj 3gn397zc3OxywNb9nRodcf0EWiRT76WWSKHZxr61EF19IshPQs5t7Rml7 c0YxqGiDGabnctBONKIdk9/N3nneZXdqIkbkSJDAvKVb+z6N4e4vnGK0C g==; X-IronPort-AV: E=McAfee;i="6600,9927,10988"; a="6240003" X-IronPort-AV: E=Sophos;i="6.06,170,1705392000"; d="scan'208";a="6240003" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2024 05:30:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10988"; a="827005133" X-IronPort-AV: E=Sophos;i="6.06,170,1705392000"; d="scan'208";a="827005133" Received: from gkldtt-dev-004.igk.intel.com (HELO localhost) ([10.123.221.202]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2024 05:30:51 -0800 From: Tankut Baris Aktemur To: gdb-patches@sourceware.org Subject: [Obvious][PATCH] testsuite, python: reformat python files using black Date: Mon, 19 Feb 2024 14:30:41 +0100 Message-Id: <20240219133041.1290138-1-tankut.baris.aktemur@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-9.4 required=5.0 tests=AC_FROM_MANY_DOTS, BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_NONE, TXREP, 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 server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org I received a report from the buildbot that there are Python format problems in a commit I pushed today. This patch fixes those problems. I already pushed as obvious. Sorry for this oversight. Regards Baris ========================================= In the recent patch titled "gdb, python: selectively omit enabling stdin in gdb.execute", the black tool found formatting issues. Fix them. --- gdb/testsuite/gdb.python/py-cmd-exception.py | 6 ++++-- gdb/testsuite/gdb.python/py-cmd-prompt.py | 12 +++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/gdb/testsuite/gdb.python/py-cmd-exception.py b/gdb/testsuite/gdb.python/py-cmd-exception.py index e44b184ebd5..d37257d15c0 100644 --- a/gdb/testsuite/gdb.python/py-cmd-exception.py +++ b/gdb/testsuite/gdb.python/py-cmd-exception.py @@ -15,6 +15,7 @@ import gdb + class MyListener: def __init__(self): gdb.events.new_objfile.connect(self.handle_new_objfile_event) @@ -24,10 +25,11 @@ class MyListener: if self.processed_objfile: return - print('loading ' + event.new_objfile.filename) + print("loading " + event.new_objfile.filename) self.processed_objfile = True # There is no variable 'a'. The command raises an exception. - gdb.execute('print a') + gdb.execute("print a") + the_listener = MyListener() diff --git a/gdb/testsuite/gdb.python/py-cmd-prompt.py b/gdb/testsuite/gdb.python/py-cmd-prompt.py index ac1fdece046..b80a0c93fa4 100644 --- a/gdb/testsuite/gdb.python/py-cmd-prompt.py +++ b/gdb/testsuite/gdb.python/py-cmd-prompt.py @@ -15,6 +15,7 @@ import gdb + class MyListener: def __init__(self): gdb.events.new_objfile.connect(self.handle_new_objfile_event) @@ -25,12 +26,13 @@ class MyListener: if self.processed_objfile: return - print('loading ' + event.new_objfile.filename) + print("loading " + event.new_objfile.filename) self.processed_objfile = True - gdb.execute('add-inferior -no-connection') - gdb.execute('inferior 2') - gdb.execute('target remote ' + self.port) - gdb.execute('inferior 1') + gdb.execute("add-inferior -no-connection") + gdb.execute("inferior 2") + gdb.execute("target remote " + self.port) + gdb.execute("inferior 1") + the_listener = MyListener()