From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x34.google.com (mail-oa1-x34.google.com [IPv6:2001:4860:4864:20::34]) by sourceware.org (Postfix) with ESMTPS id 25BE0385828E for ; Tue, 13 Feb 2024 12:00:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 25BE0385828E 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 25BE0385828E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:4860:4864:20::34 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707825602; cv=none; b=KYJFykkWM/9QZqVHFi4Z+Z7A5VRGSjQxC/0t4YvTCRZsp49vziHW1wQzh7IIHXgwLOAos6KU+vK6RZpJmTKjiFSquhTrtnLhuBHawocP/va46bc9Xz5Nv2tB3AbMCyiOSxbOoMVyL74xYRG36LthZQ9LBd02vUhwuO/mXfwiriY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707825602; c=relaxed/simple; bh=/b8gxU+O7hCQMwGp4hSoJLkSQ2C1hBFElWAmYXpjRqg=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=Pj96BHS2Fe9J3EGBd7BSlrTcRPZYjfyzgdN4HJHmTTL5yCbysYihdNMImVzqpyGpXU0xQVsMwXIRIFRTq3O9jiFk5dccUV+7dpGjP/OyZzAdBMtmFz6rxyiX6sQOebwEEOIIChqSMaqEwNnklHumJgjkhV9vn6YZjmI46oia/9A= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-214ca209184so2863851fac.1 for ; Tue, 13 Feb 2024 04:00:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707825600; x=1708430400; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=veq3wRT6oP3C3MBXCafz/85BGo6N0d9ILJ0WKml6L4w=; b=taUcuiZk1NsqTT3rOztvqKBh1ITwG5dJRZKT4feCT9VVMKtpN40Vy4/D7ozRamIsst mDfaNVMoiqYDfJ8avcIDB2zAaA9ho39a4AmRM0ltoHJrnlqClFBK2/p3Wt3EKL7ma+xa ZW7Yj+11lijemQrSZKVz5tZ//BDKx4ytJrDTZggnFMd6pbNSHJuflHF+UbiONTSWd9Ph 6fzFbNN1NdGOZ99q/Yc7Vio0JCMTjZ5R65i766KjmtLa8Ysg8qIh4D2pSMVbSWKSH5Ld hzNj2bqn41bInOnrVLvJgw0+dfky/7bHIiIKTxap6MbGRrRzlGdnfzfwIxVlDZ3vy2TB 76IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707825600; x=1708430400; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=veq3wRT6oP3C3MBXCafz/85BGo6N0d9ILJ0WKml6L4w=; b=BsGr9ZCM/rBuOcO5jBK0ATvqFBnX7FvbXJS2+sfWO/2uLhyXoJvq8yfsDtDH6xhSfC rWF/ZTDugSAlOu+lOd3Hw8wp4peuhtmNQk/snCOV83nYNg4jrpgi7nhkiBAAN2bcJbGl v+n1hTdrbgfuiheUDYxZbqGPzwzKYBG1+iJIqWPgk8iVSGSLMYJOktOEuQPxLqGtTYIR W4DajBW/euE3X7TfhY57kuN8U618jnwLsILUVziWS7w2aRw8X4Yp2cpXvQd0XSDMz8v9 ezDn6+6ZPKvH1ToeppBGPZQ2Mo8Tl/Exg4UVRtLHGueZeudVjN+eQhA2WDGJBs/pBmI6 6PUA== X-Gm-Message-State: AOJu0YxSlt5Egh6GFGxa6YRGe7t9H9KFMcAyRouZqeC3NXjVus/4E/5N QY3j6W1qN9Jsmp+Iyihka1AshrQadF/HTLccNM2/Heiuso+lSUbA/FDX7aaFMFSMLndlQc/ba3p S X-Google-Smtp-Source: AGHT+IHpYmEIhvU2HFR+hXWWmzIgfnGl7lYHeHeCuhEKWOmu1KpCy1MnOBnDtaTr+Rz6Oa9QOMGMig== X-Received: by 2002:a05:6870:56ab:b0:21a:46a6:b069 with SMTP id p43-20020a05687056ab00b0021a46a6b069mr9907232oao.14.1707825600193; Tue, 13 Feb 2024 04:00:00 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXu66s3JSwhrmYKsUus1t38GuOmhzhNb7zIvQrec7Bd5bU4fDTF9gOg0MoCVlwceYeK3MU4M+wSBonwTQil/9EJJ/MtF+aD8ahX Received: from ?IPV6:2804:1b3:a7c0:378:a95e:7d43:370e:1d4c? ([2804:1b3:a7c0:378:a95e:7d43:370e:1d4c]) by smtp.gmail.com with ESMTPSA id b13-20020a65668d000000b005c6e8fa9f24sm1924431pgw.49.2024.02.13.03.59.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Feb 2024 03:59:59 -0800 (PST) Message-ID: <1c4291b4-b48c-4177-a889-9e569b96567f@linaro.org> Date: Tue, 13 Feb 2024 08:59:57 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 04/11] syslog: Update misc/tst-syslog to check reported %n value Content-Language: en-US To: Florian Weimer , libc-alpha@sourceware.org References: <8502804480ab69e7ae48dfe43552e9a6be596711.1707491940.git.fweimer@redhat.com> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <8502804480ab69e7ae48dfe43552e9a6be596711.1707491940.git.fweimer@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 List-Id: The change LGTM, just that it does not follow current file indentation (tabs instead of whitespace). On 09/02/24 12:25, Florian Weimer wrote: > --- > misc/tst-syslog.c | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > > diff --git a/misc/tst-syslog.c b/misc/tst-syslog.c > index ced9ae8467..741693a7ff 100644 > --- a/misc/tst-syslog.c > +++ b/misc/tst-syslog.c > @@ -102,8 +102,10 @@ send_vsyslog (int options) > { > int facility = facilities[i]; > int priority = priorities[j]; > - call_vsyslog (facility | priority, "%s %d %d", SYSLOG_MSG_BASE, > - facility, priority); > + int pos = -1; > + call_vsyslog (facility | priority, "%n%s %d %d", > + &pos, SYSLOG_MSG_BASE, facility, priority); > + TEST_COMPARE (pos, 0); > } > } > } > @@ -117,8 +119,10 @@ send_syslog (int options) > { > int facility = facilities[i]; > int priority = priorities[j]; > - syslog (facility | priority, "%s %d %d", SYSLOG_MSG_BASE, facility, > - priority); > + int pos = -1; > + syslog (facility | priority, "%n%s %d %d", > + &pos, SYSLOG_MSG_BASE, facility, priority); > + TEST_COMPARE (pos, 0); > } > } > }