From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id B04BE3858D20 for ; Thu, 11 Apr 2024 16:17:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B04BE3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B04BE3858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::429 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712852271; cv=none; b=GdNwFVs1jGYMxXcSbfvWI+SSpWHNQYfadMSXEIj+jewCqc4Fp0+/Gww6JfIHYQ/2M1JrX+p50xbWrH/PvbV+2gqPQdvBeucRkBLghD52QfzfGefcLc4/oXhNLJ3ybxpvPamywIl8lN3p3cqVV5GuJwiJoKsSC8eIimecd+xEYeE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712852271; c=relaxed/simple; bh=yszuarBFrHU6xCIO6JTj53Feuh4BWUHCpG2p8l4lU+I=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=CWZjMkvF1xGmIKBqXUEIGnIXn/n982Z2Z5s2jxIHnBpPMvAI52Y4bY+moctJa6VIrEoCkoVfUYUrtw6NjkQ3o/UUtOil7bc2yNRmUXTLlUEtch+xtFIiH1g26Ebe4snBntUYV66fAjKuSGjrHhVdzrCIvQTgPZn8DPHrcaghWlk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-6ee12766586so14537b3a.0 for ; Thu, 11 Apr 2024 09:17:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712852269; x=1713457069; darn=sourceware.org; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=yszuarBFrHU6xCIO6JTj53Feuh4BWUHCpG2p8l4lU+I=; b=lDrMoQET2GZl8f1kf5eRs8Oa50YEZP8gLX9abLT8awi6TvcK9lGZPs+DUSiN/QYPi6 U0EoUtP3rd67DySaJFX4+rpqsleqhuyAkYsbapXWNexBQ8WE1SGuUaLQwrNFf7JNsfLx IcKcVzOAvxEDjs9yKrauOkkdrXjh4AqpqygcJh+OA+wrCOxDpuCZiyBWLiIBUhVsBtCN /cdNDEQ9rx358gI93+4iv9IK6u2Xh0wnNUwYVuYQ0ZGQiIIbrJxHjvN5H1ykCimG7REQ IFX+1O5OAc4ODJCndv+DblgCP5T1VGvXgERdX1hT2sexdxnD+mQMNZ/eju8KoZyRb3bK x/KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712852269; x=1713457069; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=yszuarBFrHU6xCIO6JTj53Feuh4BWUHCpG2p8l4lU+I=; b=fgfWNw2s+e+33dz5Ry4X9FcDfMYuT1CygeQNZDegr55LD++L9nzvgMWyOsodK3Sxe0 tCeC2P5tp6iQgFzaaXsfFNVZJWN+kgTJ+fBzu++PNNqsm8gRNPP7AHi+CVXkphbrXCRA YFXVigZq7W4ww9SnGrm/7YYZu8uZQft/qKlRBHhmQ9kZ4v7yDgrAlv8D8KxTSQH0Evwj VsMfYGgCaqyxoNkoxQooHcI0idmIQMU5+B6SAxXuAXC2+zEupbtj5czs1cilIaI8yJTH SpH8mKKWi8fZ6v2tqNH8KCLuYOWaWHEHKQhBWEPSmDj6AUlyJq6K4WLj/jZn3QGpEUTD kSMw== X-Forwarded-Encrypted: i=1; AJvYcCVvN5j4Xc1xAUOVjSDWr+c+XwJsxeHKS73qrNoIAVHlIJGrzpBb+YySQxxZ+VSiPEf8vTuPqn+jIlAm/Jl5aIk/I2RIl1DdMuRuqA== X-Gm-Message-State: AOJu0YxwuTiyRwoZcEkNeSeTJoDzaBwZsoonD/PVt2dKLtku5GKHYOs1 wVgtwotJP3yhb/soVjK2scnKPMm8z/JZ7DwZ+sch94ShdVW44X1bvTMahAtwNF+/UGHLnMsFno1 blsQ= X-Google-Smtp-Source: AGHT+IHkqImpopMaEbFIJ+vmGp/2Xtr66jnbznbNXCEqlKqfl2VUfcaDgIU3bw27IltaSkShNhbJfw== X-Received: by 2002:a05:6a21:788e:b0:1a7:48de:b2a4 with SMTP id bf14-20020a056a21788e00b001a748deb2a4mr190320pzc.6.1712852268521; Thu, 11 Apr 2024 09:17:48 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8470:92f2:2393:12c4:8d63]) by smtp.gmail.com with ESMTPSA id r10-20020a056a00216a00b006eae3aac040sm1353977pff.31.2024.04.11.09.17.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 09:17:48 -0700 (PDT) From: Thiago Jung Bauermann To: Luis Machado Cc: Tom Tromey , gdb-patches@sourceware.org, =?utf-8?Q?K=C3=A9vin?= Le Gouguec Subject: Re: [PATCH] Strip trailing newlines from input string In-Reply-To: <3bccdd10-eab7-4e73-acc3-2f160f62eaaf@arm.com> (Luis Machado's message of "Thu, 11 Apr 2024 15:45:02 +0100") References: <20240408171818.1856529-1-tromey@adacore.com> <87a5m03tek.fsf@tromey.com> <3bccdd10-eab7-4e73-acc3-2f160f62eaaf@arm.com> User-Agent: mu4e 1.12.2; emacs 29.3 Date: Thu, 11 Apr 2024 13:17:44 -0300 Message-ID: <87a5lzoouv.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Luis Machado writes: > On 4/11/24 14:45, Tom Tromey wrote: >> Luis> Looks good to me. >> >> Luis> Approved-By: Luis Machado >> Luis> Tested-By: Luis Machado >> >> Thanks. >> >> Unfortunately the CI didn't like it, but I have no idea why. >> In the gdb.log the echo output doesn't appear at all. >> >> ^[[?2004h(gdb) ^[[7mecho hello^[[m^M >> ^M^[[A(gdb) FAIL: gdb.base/paste-newline.exp: newline removed from paste >> >> I don't know why this would happen or how to debug it. >> >> Tom > > What particular builder was this? I ran a few checks on my end and the test passed OK. This is with the Linaro CI: https://patchwork.sourceware.org/project/gdb/patch/20240408171818.1856529-1-tromey@adacore.com/ > Maybe a different terminal setup or timing issue? The Linaro CI uses the read1 tool which makes Expect read the GDB output one byte at a time. We do that to make the testsuite results more deterministic since otherwise Expect will read variable amounts of output from GDB, which can trigger flaky failures in testcases that aren't strict enough in their match patterns. I can reproduce the problem when I do the same: $ make -C gdb check-read1 TESTS=gdb.base/paste-newline.exp It looks like reading output one byte at a time breaks ANSI sequences. -- Thiago