From patchwork Fri Feb 8 19:02:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: DJ Delorie X-Patchwork-Id: 1038918 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-99891-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="B83zaCh2"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43x4Jm2qrpz9sDr for ; Sat, 9 Feb 2019 06:00:56 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:message-id:from:to:subject; q=dns; s= default; b=TF18Q1FOnpZGQvfVzJeFgW46dbVgMJ3b/CG6c3TGRtG2N/LlN5IWD RZpJmPfMOqeukH6vnRP2WvokShqMxyjjbP+nRNELqTHUvaoorh37KEWT4S6KZ3GO pDEeuuEDeHsTyMl2a23PD6KetbWNHMc+ik4hQMv6wI7OSMzk6RmDT8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:message-id:from:to:subject; s=default; bh=8Oi1FKSW94hRLmxn9qvJQp3L2KE=; b=B83zaCh2u3bibq8z+xbWI3aI6mmV 4bYV4AcNyKgvNw14CsP6bUkqTM5DU5xzakAvagC9B734gApAHnbt+K4VaoJ4+won LIH6f2xhv8fqZSU3cbM+LIJT/CGUxPbd8UeBiOq/DUxRpZ4ac5ZmcAhZhZyKnyQj U9yGpGwFBIzJ5ek= Received: (qmail 77104 invoked by alias); 8 Feb 2019 19:00:44 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 76938 invoked by uid 89); 8 Feb 2019 19:00:33 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=dumb, escape X-HELO: mx1.redhat.com Date: Fri, 08 Feb 2019 14:02:54 -0500 Message-Id: From: DJ Delorie To: libc-alpha@sourceware.org Subject: [patch] Avoid readline conflicts in pexpect In some cases, sensitive to readline version and the user's environment, gdb might emit escape codes while run under python's pexpect (i.e. testing pretty printers). This patch, suggested by Jan, helps isolate the test from the user's environment. Tested on RHEL 7 x86_64 with DTS 7 and EPEL, which is one magic combination of components that triggers this bug. 2019-02-08 Jan Kratochvil * scripts/test_printers_common.py: Set TERM to a known harmless value. Reviewed-by: Carlos O'Donell diff --git a/scripts/test_printers_common.py b/scripts/test_printers_common.py index dada6aadde..b2bd4ba1cc 100644 --- a/scripts/test_printers_common.py +++ b/scripts/test_printers_common.py @@ -60,6 +60,10 @@ TIMEOUTFACTOR = os.environ.get('TIMEOUTFACTOR') if TIMEOUTFACTOR: timeout = int(TIMEOUTFACTOR) +# Otherwise GDB is run in interactive mode and readline may send escape +# sequences confusing output for pexpect. +os.environ["TERM"]="dumb" + try: # Check the gdb version. version_cmd = '{0} --version'.format(gdb_invocation, timeout=timeout)