From: Ian Jackson Subject: [OSSTEST PATCH 01/12] Osstest.pm: Provide new db_prepare helper with built-in debugging Date: Mon, 15 Jun 2015 18:13:02 +0100 Message-ID: <1434388394-26099-2-git-send-email-ian.jackson@eu.citrix.com> References: <1434388394-26099-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z4Ybr-0002nX-Bp for xen-devel@lists.xenproject.org; Mon, 15 Jun 2015 17:55:47 +0000 In-Reply-To: <1434388394-26099-1-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org No callers, so no functional change, as yet. Signed-off-by: Ian Jackson --- Osstest.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Osstest.pm b/Osstest.pm index e8bd77b..7d6949f 100644 --- a/Osstest.pm +++ b/Osstest.pm @@ -35,7 +35,7 @@ BEGIN { getmethod postfork $dbh_tests db_retry db_retry_retry db_retry_abort - db_begin_work + db_begin_work db_prepare ensuredir get_filecontents_core_quiet system_checked nonempty visible_undef show_abs_time ); @@ -268,6 +268,13 @@ sub db_retry ($$$;$$) { return $r; } +sub db_prepare ($) { + # caller must ensure global filehandle DEBUG is open + my ($stmt) = @_; + print ::DEBUG "DB PREPARING:\n$stmt\n"; + return $dbh_tests->prepare($stmt); +} + sub postfork () { $mjobdb->jobdb_postfork(); } -- 1.7.10.4