From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=hlCEeOb/; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTPS id 262565A0271 for ; Tue, 30 Sep 2025 13:13:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1759230838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BoG16+fkKs/XGZ/4n8c/gtJwqz7wcTf6VnKpBJ8Vl2w=; b=hlCEeOb/qdoT4f/Ke+C1LhD1IWPIusu1Z+aKP3fBPEDbSmGPSVOD5zCEwGF0a90A8eI1X0 lw2hReWwwwSNz3T7Q0HBDmTdXjcRdyAF3n6qeEnOqJrmpZf6A3ZUmkUNMZtzo3KA0j5Rb1 2pPR3SBtlwfa9B2VT4o26iy32Zt+NKI= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-589-am_8MS_ROwCRX9UAkBdckg-1; Tue, 30 Sep 2025 07:13:56 -0400 X-MC-Unique: am_8MS_ROwCRX9UAkBdckg-1 X-Mimecast-MFC-AGG-ID: am_8MS_ROwCRX9UAkBdckg_1759230835 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-3ef9218daf5so5486571f8f.1 for ; Tue, 30 Sep 2025 04:13:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759230835; x=1759835635; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=BoG16+fkKs/XGZ/4n8c/gtJwqz7wcTf6VnKpBJ8Vl2w=; b=em1u8t2m01p9fYYpRreyRvxc4Mb3VKyVTF8ALSnaE8ZV/nBKYyZjR4TN55w4Cu6/oX /9JMjApYbjKhvmlJlJDhbM5DYjbnWDhRi6c1tT+4gAx2c+Yj7HZsYLrukEYMZb0Nmn6B dUI+ppM+ZqmkI14snCVa6znFTO3P+6JzLUQpxCqaU5UR4kCg8TVe+HXVIQwwxYQjCTbS w82wUzsTeEcU+1W2O4Lt4m3A6HYuDU+96hAP9GV1sDi6yeREit9LQjIehxxggNW1ZhQ+ msshb+MrYpjh84zUtmgxw6tttiGNlKMa5vQ/v9CSODa+bo9US3+ux9Ld9AWhctDyJqmt RWzw== X-Gm-Message-State: AOJu0YxoubgLWPLwxGm7e4NskgDzQtykQqdIfQluAJqIopQUuIfitrTN e2+fHYaARREh/FwVERQXg113EgPHnHreOqLxO5BgAZXYf6TqCDPH+f1a7GQrPS+O3ST6O35YkEh j8wa+r0+CshWAv8WMAXQs9Fn1eEW/mB2mK/+8E9kFI8puRopZteDZcQ== X-Gm-Gg: ASbGncsN9UC9ksGZJeMyoK68ralMvA6nol14c+4siSz3hkXdmn7gyx3457WdTMj+p2C rW402gYWQJj8/YTz3TTBi/9fUXLV4coj3DIgBEnJ6DfoQzkiDpkoGbbcLtW7rqU0HeC85uJdevR yr0a53NrgJGtHYFuM7xAfoWDEKQ/exo4HLQASZnGH616B1WkObH85qZnKCxBciL/WlLp4O4TuRw RLRTM3zBF6pf+dYb5EEqcMUkUGbJhHXlBIxUEezRgQQ3WdZpES37+AQF6VYHaOdZm7rAT009X8L JioZm0w1o27eVf6sykZVFJ12ECsmgVR+JZrLeKxOWxlXJowDTSjuLsyivqC8ReiE/wn71H23eQ= = X-Received: by 2002:a05:6000:2681:b0:3ee:1461:1654 with SMTP id ffacd0b85a97d-40e4cb6e234mr15417323f8f.50.1759230835248; Tue, 30 Sep 2025 04:13:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEJq4GXheMopShewidPQJsOSRDOHb7AfjsOkyEeZdlClQNMtfGUAPGessyVZjoj3/pe1At/iQ== X-Received: by 2002:a05:6000:2681:b0:3ee:1461:1654 with SMTP id ffacd0b85a97d-40e4cb6e234mr15417311f8f.50.1759230834901; Tue, 30 Sep 2025 04:13:54 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-40fb72face8sm22437538f8f.5.2025.09.30.04.13.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Sep 2025 04:13:54 -0700 (PDT) Date: Tue, 30 Sep 2025 13:13:53 +0200 From: Stefano Brivio To: Yumei Huang Subject: Re: [PATCH v2] test: Fix printf error when debug is enabled Message-ID: <20250930131353.5b9d75fa@elisabeth> In-Reply-To: <20250930014158.6949-1-yuhuang@redhat.com> References: <20250930014158.6949-1-yuhuang@redhat.com> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: JqxzOrKH6t2OVYrAMGZwLMReo01Qbzu3aUBdtINrtoc_1759230835 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: 3YJOPJEAXTHNZUTVI524QNPP5IYPY5SZ X-Message-ID-Hash: 3YJOPJEAXTHNZUTVI524QNPP5IYPY5SZ X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top, david@gibson.dropbear.id.au X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Tue, 30 Sep 2025 09:41:58 +0800 Yumei Huang wrote: > Running test pasta/tcp with debug enabled would get stuck with > below error: > > + printf 'DEBUG: ns socat -u OPEN:__BASEPATH__/big.bin TCP6:[__GW6__%__IFNAME__]:10003\n' > lib/term: line 38: printf: `_': invalid format character > > The error occurs because printf interprets the % character as the > start of a format specifier, and the following '_' isn't one of > them. > > Fix it by replacing 'printf "${*}"' with 'printf "%b" "${*}"'. > Also update the docstring. > > Link: https://bugs.passt.top/show_bug.cgi?id=154 > Fixes: de28c20d8051 ("test: Update lib/term for clearer output when DEBUG is enabled") > Signed-off-by: Yumei Huang Applied. -- Stefano