Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3C3A1CD3442 for ; Thu, 7 May 2026 07:50:43 +0000 (UTC) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id F28E23E2875 for ; Thu, 7 May 2026 09:50:41 +0200 (CEST) Received: from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [217.194.8.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 75C3B3E2C5B for ; Thu, 7 May 2026 09:50:11 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2a07:de40:b251:101:10:150:64:2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-6.smtp.seeweb.it (Postfix) with ESMTPS id BC3A7140042C for ; Thu, 7 May 2026 09:50:10 +0200 (CEST) Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 1FCD05D41C for ; Thu, 7 May 2026 07:50:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1778140204; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=H4pBAVTPOpVanU/9NiiWF8Q7aI/pZJLMR2BE/SBmKDw=; b=DGJDZy7sytb2lNeelGXtkOnKycFCzHzuLfGMLdQG06YAe6lJsqPUAOgtU2oQ1Fkw9t76lX nr5ruTwLrlb0/SETD5wXqlqxJguAtkvlJKeFPdW+p3ujp4oxfCbL5HIgK1Bno5ltQxO/qS kZGLBFqOZeLWwcZExnHklfIghlfQo0s= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1778140204; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=H4pBAVTPOpVanU/9NiiWF8Q7aI/pZJLMR2BE/SBmKDw=; b=sqd0DboA+kXBqr9bNgUww2EIOysaixUPAnoJNM1c5W+poJaOU1Gebqw1ro7cJkZcKHSHLK OkF+sshzrbOgagAg== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=DGJDZy7s; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=sqd0DboA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1778140204; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=H4pBAVTPOpVanU/9NiiWF8Q7aI/pZJLMR2BE/SBmKDw=; b=DGJDZy7sytb2lNeelGXtkOnKycFCzHzuLfGMLdQG06YAe6lJsqPUAOgtU2oQ1Fkw9t76lX nr5ruTwLrlb0/SETD5wXqlqxJguAtkvlJKeFPdW+p3ujp4oxfCbL5HIgK1Bno5ltQxO/qS kZGLBFqOZeLWwcZExnHklfIghlfQo0s= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1778140204; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=H4pBAVTPOpVanU/9NiiWF8Q7aI/pZJLMR2BE/SBmKDw=; b=sqd0DboA+kXBqr9bNgUww2EIOysaixUPAnoJNM1c5W+poJaOU1Gebqw1ro7cJkZcKHSHLK OkF+sshzrbOgagAg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 0B017593A7 for ; Thu, 7 May 2026 07:50:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id d2x5ASxE/Gn8HQAAD6G6ig (envelope-from ) for ; Thu, 07 May 2026 07:50:04 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Thu, 7 May 2026 09:50:04 +0200 Message-ID: <20260507075006.8690-1-chrubis@suse.cz> X-Mailer: git-send-email 2.53.0 MIME-Version: 1.0 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_ONE(0.00)[1]; FUZZY_RATELIMITED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.cz:+]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[ltp@lists.linux.it]; DNSWL_BLOCKED(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RCVD_VIA_SMTP_AUTH(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns, imap1.dmz-prg2.suse.org:helo, suse.cz:mid, suse.cz:dkim] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Rspamd-Queue-Id: 1FCD05D41C X-Virus-Scanned: clamav-milter 1.0.9 at in-6.smtp.seeweb.it X-Virus-Status: Clean Subject: [LTP] [PATCH v2 0/2] Fix proc parsing in newuname01 X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ltp-bounces+ltp=archiver.kernel.org@lists.linux.it Sender: "ltp" Turns out some of the strings in procfs can be empty (file with just a newline) and in such case scanf("%s", ...) fails to read the file while what we needed instead is a function that would produce an empty string. This patchset addds such function and makes use of it in the newuname01 test. v2: - added returns to safe_file_read_str() - fixed typo in doc comment Cyril Hrubis (2): lib: safe_file_ops: Add SAFE_FILE_READ_STR() syscalls: newuname01: Fix fail on empty domainname include/tst_safe_file_ops.h | 21 +++++++++++++++ lib/safe_file_ops.c | 26 +++++++++++++++++++ .../kernel/syscalls/newuname/newuname01.c | 8 +++--- 3 files changed, 51 insertions(+), 4 deletions(-) -- 2.53.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp