From patchwork Tue May 21 10:53:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1937343 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=adnUCv+O; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=U6KNyiia; dkim=fail reason="signature verification failed" (1024-bit key) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=IVKaoASg; dkim=neutral header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=lmZOS2IQ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=patchwork.ozlabs.org) Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VkBDH4CJ1z1ynR for ; Tue, 21 May 2024 20:55:27 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 195EB3D0061 for ; Tue, 21 May 2024 12:55:25 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [217.194.8.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 6843D3D006A for ; Tue, 21 May 2024 12:53:55 +0200 (CEST) Authentication-Results: in-7.smtp.seeweb.it; spf=pass (sender SPF authorized) smtp.mailfrom=suse.cz (client-ip=2a07:de40:b251:101:10:150:64:1; helo=smtp-out1.suse.de; envelope-from=pvorel@suse.cz; receiver=lists.linux.it) Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2a07:de40:b251:101:10:150:64:1]) (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-7.smtp.seeweb.it (Postfix) with ESMTPS id AD4DE200C0B for ; Tue, 21 May 2024 12:53:54 +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-out1.suse.de (Postfix) with ESMTPS id 5CF6021EFF; Tue, 21 May 2024 10:53:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1716288832; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tya/DSqDMmN5eC0X3ZKXefnx7ufrA+dpsxRxpRsNf6o=; b=adnUCv+OU0JaLTXdqUqoQzeC+iAnOJL7kPF9vXNYdOBXXGRqSEdZDtwqvEsOLvHoj7rkW4 PKhukz6Qju4GzwYYGpkG7BSwuhD04ofbtxrYqzFoy5tlUGHwMZ0znptcN5rFvPNjckSuQt nw+gsSi9UaUJlZq+ybU7Mm6ZZzrvt2o= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1716288832; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tya/DSqDMmN5eC0X3ZKXefnx7ufrA+dpsxRxpRsNf6o=; b=U6KNyiiasebke+7XojUE+IeNTsFcQycViq+TjKKS7edTd4FfFxqT6ebw+PgeAOvV4mpW17 9FnWwiUQ07BAE6Bg== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=IVKaoASg; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=lmZOS2IQ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1716288831; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tya/DSqDMmN5eC0X3ZKXefnx7ufrA+dpsxRxpRsNf6o=; b=IVKaoASgWNyWl++r5RgBCFbDXnsfolwwVoYaeaZyqBfmo/w/9mAV7jSw5XUXj+U4BjoeOE +gVgwnwmG+YvBwYqWlFCxhiHIG9mKpYLEQRSQeYIheYgOJ7w2JjJnyB9MRqaebPoKcKg+H zUdyMB0rRhrxKbY54HWhhiLedEtrGwA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1716288831; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tya/DSqDMmN5eC0X3ZKXefnx7ufrA+dpsxRxpRsNf6o=; b=lmZOS2IQAdKKelw2uaY7Q4s7rpR48652RBF8LyrBRuNDI16FY86tew6iMwoMypPXngdots Vp5G2TYI+fyzCcBw== 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 32C7613A75; Tue, 21 May 2024 10:53:51 +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 2AecCz99TGYMPwAAD6G6ig (envelope-from ); Tue, 21 May 2024 10:53:51 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Tue, 21 May 2024 12:53:44 +0200 Message-ID: <20240521105348.126316-2-pvorel@suse.cz> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240521105348.126316-1-pvorel@suse.cz> References: <20240521105348.126316-1-pvorel@suse.cz> MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; 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)[]; MIME_TRACE(0.00)[0:+]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; TO_DN_SOME(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; DWL_DNSWL_BLOCKED(0.00)[suse.cz:dkim]; FROM_EQ_ENVFROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.cz:+]; RCPT_COUNT_FIVE(0.00)[6]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo, imap1.dmz-prg2.suse.org:rdns, suse.cz:dkim, suse.cz:email] X-Rspamd-Action: no action X-Rspamd-Queue-Id: 5CF6021EFF X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Score: -3.01 X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=disabled version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on in-7.smtp.seeweb.it X-Virus-Scanned: clamav-milter 1.0.3 at in-7.smtp.seeweb.it X-Virus-Status: Clean Subject: [LTP] [PATCH v2 1/5] tst_kernel.h: Convert docs to sphinx 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: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Petr Vorel Reviewed-by: Andrea Cervesato --- The same as in v1 doc/developers/api_c_tests.rst | 2 ++ include/tst_kernel.h | 43 +++++++++++++++++++++------------- 2 files changed, 29 insertions(+), 16 deletions(-) diff --git a/doc/developers/api_c_tests.rst b/doc/developers/api_c_tests.rst index ec53ab33c..2a9f3e7b9 100644 --- a/doc/developers/api_c_tests.rst +++ b/doc/developers/api_c_tests.rst @@ -1,4 +1,5 @@ .. SPDX-License-Identifier: GPL-2.0-or-later +.. Copyright (c) Linux Test Project, 2024 .. Include headers in this file with: .. .. kernel-doc:: ../../include/tst_test.h @@ -11,6 +12,7 @@ Core LTP API .. kernel-doc:: ../../include/tst_res_flags.h .. kernel-doc:: ../../include/tst_test.h +.. kernel-doc:: ../../include/tst_kernel.h Option parsing -------------- diff --git a/include/tst_kernel.h b/include/tst_kernel.h index 89de79928..e0ce7ce46 100644 --- a/include/tst_kernel.h +++ b/include/tst_kernel.h @@ -5,33 +5,44 @@ #ifndef TST_KERNEL_H__ #define TST_KERNEL_H__ -/* - * Returns 32 if we are running on 32bit kernel and 64 if on 64bit kernel. +/** + * tst_kernel_bits() - Detect if running on 32bit or 64bit kernel. + * + * Return: 32 if the test process is running on 32bit kernel and 64 if on 64bit + * kernel. */ int tst_kernel_bits(void); -/* - * Returns non-zero if the test process is running in compat mode. +/** + * tst_is_compat_mode() - Detect if running in compat mode. + * + * Detect if the test is 32bit binary executed on a 64bit kernel, + * i.e. we are testing the kernel compat layer. + * + * Return: non-zero if the test process is running in compat mode. */ int tst_is_compat_mode(void); -/* - * Checks if the kernel module is built-in. +/** + * tst_check_builtin_driver() - Check if the kernel module is built-in. * - * @param driver The name of the driver. - * @return Returns 0 if builtin driver - * -1 when driver is missing or config file not available. - * On Android *always* 0 (always expect the driver is available). + * @driver: the name of the driver. + * + * Return: 0 if builtin driver or -1 when driver is missing or config file not + * available. On Android *always* 0 (always expect the driver is available). */ int tst_check_builtin_driver(const char *driver); -/* - * Checks support for the kernel module (both built-in and loadable). +/** + * tst_check_driver() - Check support for the kernel module. + * + * Check support for the kernel module (both built-in and loadable). + * + * @driver: the name of the driver. * - * @param driver The name of the driver. - * @return Returns 0 if the kernel has the driver, - * -1 when driver is missing or config file not available. - * On Android *always* 0 (always expect the driver is available). + * Return: 0 if the kernel has the driver, -1 when driver is missing or config + * file not available. On Android *always* 0 (always expect the driver is + * available). */ int tst_check_driver(const char *driver); From patchwork Tue May 21 10:53:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1937342 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=ahyMI9x1; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=fNHbCMJn; dkim=fail reason="signature verification failed" (1024-bit key) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=Sm4uF3cf; dkim=neutral header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=llDCgUTN; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=patchwork.ozlabs.org) Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VkBCr37RCz1ydW for ; Tue, 21 May 2024 20:55:04 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 0753D3D0090 for ; Tue, 21 May 2024 12:55:02 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-4.smtp.seeweb.it (in-4.smtp.seeweb.it [217.194.8.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 2364F3D0064 for ; Tue, 21 May 2024 12:53:55 +0200 (CEST) Authentication-Results: in-4.smtp.seeweb.it; spf=pass (sender SPF authorized) smtp.mailfrom=suse.cz (client-ip=195.135.223.130; helo=smtp-out1.suse.de; envelope-from=pvorel@suse.cz; receiver=lists.linux.it) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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-4.smtp.seeweb.it (Postfix) with ESMTPS id 47C281000A4A for ; Tue, 21 May 2024 12:53:52 +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-out1.suse.de (Postfix) with ESMTPS id 9A61E21F00; Tue, 21 May 2024 10:53:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1716288832; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LrwB4rpZgTICb1gaO/t+9BaA8GkYWcYPlqTWAKX3byQ=; b=ahyMI9x19bs6F9gOUIh2hQh3aQjJhG4olIHDmXKkSHFDOMGK1+TxhUSmtGiVAWUHht+D37 PFyzwv4P+IP0gTDEo7u7HTvHSD0mnX4MvTgTzWzOzbhMqZf+jYOhZickAVZqDgXi3QNe2Y a5A4cY2wumxavyXaWMq/M8ktKSa8Bvw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1716288832; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LrwB4rpZgTICb1gaO/t+9BaA8GkYWcYPlqTWAKX3byQ=; b=fNHbCMJnx/uDMdBf8JGnGhJPh0qGG8aMCIYqAxDozeIXrA98YfqRKPqOv+tvch5GJgtIDZ 737rPCF09tAdydBA== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=Sm4uF3cf; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=llDCgUTN DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1716288831; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LrwB4rpZgTICb1gaO/t+9BaA8GkYWcYPlqTWAKX3byQ=; b=Sm4uF3cf6ilOi4xDHYsbBtrBaehAQQU7jRDtvZYRva03pYV403HnHgn1lErw5GOLImGxw5 zN9s3lqzFsyqBA7lRfsUHfUb2QLePM2oDvgc37AB8w/1+dutcO41ltWJsCPRaI13usNsla K100nU/Bk/9LtTIpYDgIdayIeqpxois= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1716288831; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LrwB4rpZgTICb1gaO/t+9BaA8GkYWcYPlqTWAKX3byQ=; b=llDCgUTNOtMOUdtm//rrbpCmJs4vP1PUhjcXPfvSTdF0fY/7NOg6AnW1jz3nUxGZhcUxiH 4pWMV8+CatP8cHDw== 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 629D813A79; Tue, 21 May 2024 10:53:51 +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 WEIrFz99TGYMPwAAD6G6ig (envelope-from ); Tue, 21 May 2024 10:53:51 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Tue, 21 May 2024 12:53:45 +0200 Message-ID: <20240521105348.126316-3-pvorel@suse.cz> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240521105348.126316-1-pvorel@suse.cz> References: <20240521105348.126316-1-pvorel@suse.cz> MIME-Version: 1.0 X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Rspamd-Queue-Id: 9A61E21F00 X-Spam-Level: X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; 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)[]; MIME_TRACE(0.00)[0:+]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; TO_DN_SOME(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; DWL_DNSWL_BLOCKED(0.00)[suse.cz:dkim]; FROM_EQ_ENVFROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.cz:+]; RCPT_COUNT_FIVE(0.00)[6]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo, imap1.dmz-prg2.suse.org:rdns, suse.cz:dkim, suse.cz:email] X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=disabled version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on in-4.smtp.seeweb.it X-Virus-Scanned: clamav-milter 1.0.3 at in-4.smtp.seeweb.it X-Virus-Status: Clean Subject: [LTP] [PATCH v2 2/5] lib: Add .needs_abi_bits 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: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" This allows to force kernel ABI. Signed-off-by: Petr Vorel Reviewed-by: Cyril Hrubis --- Changes v1->v2: * Change from .skip_in_32bit to .needs_abi_bits include/tst_kernel.h | 12 ++++++++++++ include/tst_test.h | 7 ++++++- lib/tst_kernel.c | 10 ++++++++++ lib/tst_test.c | 5 ++++- 4 files changed, 32 insertions(+), 2 deletions(-) diff --git a/include/tst_kernel.h b/include/tst_kernel.h index e0ce7ce46..5f49952b7 100644 --- a/include/tst_kernel.h +++ b/include/tst_kernel.h @@ -1,10 +1,13 @@ /* SPDX-License-Identifier: GPL-2.0-or-later * Copyright (c) 2017 Cyril Hrubis + * Copyright (c) Linux Test Project, 2018-2024 */ #ifndef TST_KERNEL_H__ #define TST_KERNEL_H__ +#include + /** * tst_kernel_bits() - Detect if running on 32bit or 64bit kernel. * @@ -23,6 +26,15 @@ int tst_kernel_bits(void); */ int tst_is_compat_mode(void); +/** + * tst_abi_bits() - Detect if compiled for required kernel ABI. + * + * @abi: kernel ABI bits (32 or 64). + * + * Return: true if compiled for required ABI or false otherwise. + */ +bool tst_abi_bits(int abi); + /** * tst_check_builtin_driver() - Check if the kernel module is built-in. * diff --git a/include/tst_test.h b/include/tst_test.h index 69587917f..8dc20d110 100644 --- a/include/tst_test.h +++ b/include/tst_test.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ /* * Copyright (c) 2015-2016 Cyril Hrubis - * Copyright (c) Linux Test Project, 2016-2019 + * Copyright (c) Linux Test Project, 2016-2024 */ #ifndef TST_TEST_H__ @@ -328,6 +328,10 @@ struct tst_ulimit_val { * @skip_in_compat: Skip the test if we are executing 32bit binary on a 64bit * kernel, i.e. we are testing the kernel compat layer. * + * @needs_abi_bits: Skip the test if runs on a different kernel ABI than + * requested (on 32bit instead of 64bit or vice versa). + * Possible values: 32, 64. + * * @needs_hugetlbfs: If set hugetlbfs is mounted at tst_test.mntpoint. * * @skip_filesystems: A NULL terminated array of unsupported file systems. The @@ -494,6 +498,7 @@ struct tst_ulimit_val { unsigned int skip_in_lockdown:1; unsigned int skip_in_secureboot:1; unsigned int skip_in_compat:1; + int needs_abi_bits; unsigned int needs_hugetlbfs:1; diff --git a/lib/tst_kernel.c b/lib/tst_kernel.c index 7fd1af871..8dabfeba2 100644 --- a/lib/tst_kernel.c +++ b/lib/tst_kernel.c @@ -1,6 +1,7 @@ /* * Copyright (c) 2017 Cyril Hrubis * Copyright (c) 2020-2021 Petr Vorel + * Copyright (c) Linux Test Project, 2017-2024 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,6 +19,7 @@ #include #include +#include #include #include "test.h" @@ -96,6 +98,14 @@ int tst_is_compat_mode(void) return TST_ABI != tst_kernel_bits(); } +bool tst_abi_bits(int abi) +{ + if (abi != 32 && abi != 64) + tst_brkm(TBROK | TERRNO, NULL, "abi parameter can be only 32 or 64"); + + return abi == TST_ABI; +} + static int tst_search_driver_(const char *driver, const char *file) { struct stat st; diff --git a/lib/tst_test.c b/lib/tst_test.c index 686ee428d..190e8da2a 100644 --- a/lib/tst_test.c +++ b/lib/tst_test.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (c) 2015-2016 Cyril Hrubis - * Copyright (c) Linux Test Project, 2016-2021 + * Copyright (c) Linux Test Project, 2016-2024 */ #include @@ -1209,6 +1209,9 @@ static void do_setup(int argc, char *argv[]) if (tst_test->skip_in_compat && tst_is_compat_mode()) tst_brk(TCONF, "Not supported in 32-bit compat mode"); + if (tst_test->needs_abi_bits && !tst_abi_bits(tst_test->needs_abi_bits)) + tst_brk(TCONF, "%dbit ABI is not supported", tst_test->needs_abi_bits); + if (tst_test->needs_cmds) { const char *cmd; int i; From patchwork Tue May 21 10:53:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1937339 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=usIDALmK; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=TMWW5BAa; dkim=fail reason="signature verification failed" (1024-bit key) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=WLG9NUv9; dkim=neutral header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=5a0IG3U2; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=patchwork.ozlabs.org) Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VkBCF26sCz1ydW for ; Tue, 21 May 2024 20:54:33 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 284F43D0098 for ; Tue, 21 May 2024 12:54:30 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it 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)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 5BE493C0562 for ; Tue, 21 May 2024 12:53:54 +0200 (CEST) Authentication-Results: in-6.smtp.seeweb.it; spf=pass (sender SPF authorized) smtp.mailfrom=suse.cz (client-ip=195.135.223.130; helo=smtp-out1.suse.de; envelope-from=pvorel@suse.cz; receiver=lists.linux.it) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 738ED1400BED for ; Tue, 21 May 2024 12:53:53 +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-out1.suse.de (Postfix) with ESMTPS id C171621F04; Tue, 21 May 2024 10:53:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1716288833; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AjxI1X+r1h4ei7+xP1hmWJMiplKNEUIPL4A37cf9YhY=; b=usIDALmKwGrAwcvJViPrfFjdAJpkeGziQhB7it1xs6z8OV+Rey3NNYtuSzcd7SuXUO3jj0 m5SrVX6zusn5ThGLZ8GhVYQmNKrTOaRIU/OPOYi2Irm46Imp5EAPGOsKDSw9zy5pZxWtBt 6CsN1Sbgr+rB3YG99ZrctQwQAjCWoqQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1716288833; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AjxI1X+r1h4ei7+xP1hmWJMiplKNEUIPL4A37cf9YhY=; b=TMWW5BAavTwSFr+Z5I6vqxIpF+um8gzNo4fcsoyMwxBZI8jB/JMJINYK7xKxtwbMRLg5jx 212M3vYQOhpCl3Dg== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=WLG9NUv9; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=5a0IG3U2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1716288831; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AjxI1X+r1h4ei7+xP1hmWJMiplKNEUIPL4A37cf9YhY=; b=WLG9NUv9jB6yV3i3POANjGcrMYW25tWXfbuu+2ROZpZqtouidFPrQpV8xDFodRjWKHq7MY 23jiK0L9pnvVhjLvu5/bWNX7veDELAXBH34T31je2/bXbCiPQ9eMhxBCVLhjPzxZebZEba eyLkk5eSGnk9BJqr+IzQX3V6fN/x3so= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1716288831; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AjxI1X+r1h4ei7+xP1hmWJMiplKNEUIPL4A37cf9YhY=; b=5a0IG3U26NEyBe60Aiaem3EkBZR2nDE4ABme/Vyf450++Yq2pUjrZnwazj5lzrZUh7Ss+H GyiGhr0npg+mxDBA== 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 912A313A7A; Tue, 21 May 2024 10:53:51 +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 QPJzIj99TGYMPwAAD6G6ig (envelope-from ); Tue, 21 May 2024 10:53:51 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Tue, 21 May 2024 12:53:46 +0200 Message-ID: <20240521105348.126316-4-pvorel@suse.cz> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240521105348.126316-1-pvorel@suse.cz> References: <20240521105348.126316-1-pvorel@suse.cz> MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; 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)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FUZZY_BLOCKED(0.00)[rspamd.com]; 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]; DWL_DNSWL_BLOCKED(0.00)[suse.cz:dkim]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; RCPT_COUNT_SEVEN(0.00)[7]; RCVD_VIA_SMTP_AUTH(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[lkml.org:url, imap1.dmz-prg2.suse.org:helo, imap1.dmz-prg2.suse.org:rdns, suse.cz:dkim, suse.cz:email, suse.com:email] X-Rspamd-Action: no action X-Rspamd-Queue-Id: C171621F04 X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Score: -3.01 X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=disabled version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on in-6.smtp.seeweb.it X-Virus-Scanned: clamav-milter 1.0.3 at in-6.smtp.seeweb.it X-Virus-Status: Clean Subject: [LTP] [PATCH v2 3/5] Refactor fork14 using new LTP API 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: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" From: Andrea Cervesato Reviewed-by: Martin Doucha Reviewed-by: Petr Vorel Signed-off-by: Andrea Cervesato [ pvorel: replace .skip_in_compat = 1 with .needs_abi_bits = 64 ] Signed-off-by: Petr Vorel Acked-by: Andrea Cervesato --- Changes v1->v2: * Change from .skip_in_32bit = 1 to .needs_abi_bits = 64 testcases/kernel/syscalls/fork/fork14.c | 209 +++++++++++------------- 1 file changed, 95 insertions(+), 114 deletions(-) diff --git a/testcases/kernel/syscalls/fork/fork14.c b/testcases/kernel/syscalls/fork/fork14.c index 93af2ebac..d61864b52 100644 --- a/testcases/kernel/syscalls/fork/fork14.c +++ b/testcases/kernel/syscalls/fork/fork14.c @@ -1,143 +1,124 @@ -/********************************************************************* +// SPDX-License-Identifier: GPL-2.0-only +/* * Copyright (C) 2014 Red Hat, Inc. + * Copyright (C) 2024 SUSE LLC Andrea Cervesato + */ + +/*\ + * [Description] * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it would be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * Further, this software is distributed without any warranty that it - * is free of the rightful claim of any third person regarding - * infringement or the like. Any license provided herein, whether - * implied or otherwise, applies only to this software file. Patent - * licenses, if any, provided herein do not apply to combinations of - * this program with other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. + * This test is a reproducer for kernel 3.5: + * 7edc8b0ac16c ("mm/fork: fix overflow in vma length when copying mmap on clone") * - * This test is a reporducer for this patch: - * https://lkml.org/lkml/2012/4/24/328 - * Since vma length in dup_mmap is calculated and stored in a unsigned + * Since VMA length in dup_mmap() is calculated and stored in a unsigned * int, it will overflow when length of mmaped memory > 16 TB. When - * overflow occur, fork will incorrectly succeed. The patch above - * fixed it. - ********************************************************************/ + * overflow occurs, fork will incorrectly succeed. The patch above fixed it. + */ -#include +#include "tst_test.h" +#include #include -#include -#include -#include "test.h" -#include "safe_macros.h" -#include "lapi/abisize.h" - -char *TCID = "fork14"; -int TST_TOTAL = 1; - -#define GB (1024 * 1024 * 1024L) -/* set mmap threshold to 16TB */ #define LARGE (16 * 1024) #define EXTENT (16 * 1024 + 10) -static char **pointer_vec; +static char **memvec; -static void setup(void); -static void cleanup(void); -static int fork_test(void); - -int main(int ac, char **av) +static void run(void) { - int lc, reproduced; - - tst_parse_opts(ac, av, NULL, NULL); -/* - * Tested on ppc64/x86_64/i386/s390x. And only 64bit has this issue. - * Since a 32bit program can't mmap so many memory. - */ -#ifdef TST_ABI32 - tst_brkm(TCONF, NULL, "This test is only for 64bit."); -#endif - setup(); - for (lc = 0; TEST_LOOPING(lc); lc++) { - tst_count = 0; - - reproduced = fork_test(); - if (reproduced == 0) - tst_resm(TPASS, "fork failed as expected."); - } - cleanup(); - tst_exit(); -} + int i, j, ret; + pid_t pid; + void *mem; + int prev_failed = 0; + int passed = 1; + int failures = 0; -static void setup(void) -{ - tst_sig(FORK, DEF_HANDLER, cleanup); - TEST_PAUSE; + memset(memvec, 0, EXTENT); - pointer_vec = SAFE_MALLOC(cleanup, EXTENT * sizeof(char *)); -} + for (i = 0; i < EXTENT; i++) { + mem = mmap(NULL, 1 * TST_GB, + PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANONYMOUS, + 0, 0); -static void cleanup(void) -{ - free(pointer_vec); -} + if (mem == MAP_FAILED) { + failures++; -static int fork_test(void) -{ - int i, j, prev_failed = 0, fails = 0, cnt = 0; - int reproduced = 0; - void *addr; + tst_res(TINFO, "mmap() failed"); - for (i = 0; i < EXTENT; i++) { - addr = mmap(NULL, 1 * GB, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANONYMOUS, 0, 0); - if (addr == MAP_FAILED) { - pointer_vec[i] = NULL; - fails++; - /* - * EXTENT is "16*1024+10", if fails count exceeds 10, - * we are almost impossible to get an vm_area_struct - * sized 16TB - */ - if (fails == 11) { - tst_brkm(TCONF, cleanup, "mmap() fails too many" - "times, so we are almost impossible to" - " get an vm_area_struct sized 16TB."); + if (failures > 10) { + tst_brk(TCONF, "mmap() fails too many " + "times, so it's almost impossible to " + "get a vm_area_struct sized 16TB"); } - } else { - pointer_vec[i] = addr; + + continue; } - cnt++; - switch (tst_fork()) { - case -1: + memvec[i] = mem; + + pid = fork(); + + if (pid == -1) { + /* keep track of the failed fork() and verify that next one + * is failing as well. + */ prev_failed = 1; - break; - case 0: + continue; + } + + if (!pid) exit(0); - default: - SAFE_WAITPID(cleanup, -1, NULL, 0); - if (prev_failed > 0 && i >= LARGE) { - tst_resm(TFAIL, "Fork succeeds incorrectly"); - reproduced = 1; - goto clear_memory_map; - } + ret = waitpid(pid, NULL, 0); + if (ret == -1 && errno != ECHILD) + tst_brk(TBROK | TERRNO, "waitpid() error"); + + if (prev_failed && i >= LARGE) { + passed = 0; + break; } + + prev_failed = 0; + + tst_res(TDEBUG, "fork() passed at %d attempt", i); } -clear_memory_map: - for (j = 0; j < cnt; j++) { - if (pointer_vec[j]) - SAFE_MUNMAP(cleanup, pointer_vec[j], 1 * GB); + for (j = 0; j < i; j++) { + if (memvec[j]) + SAFE_MUNMAP(memvec[j], 1 * TST_GB); } - return reproduced; + if (passed) + tst_res(TPASS, "fork() failed as expected"); + else + tst_res(TFAIL, "fork() succeeded incorrectly"); } + +static void setup(void) +{ + memvec = SAFE_MALLOC(EXTENT * sizeof(char *)); +} + +static void cleanup(void) +{ + for (long i = 0; i < EXTENT; i++) { + if (memvec && memvec[i]) + SAFE_MUNMAP(memvec[i], 1 * TST_GB); + } + + if (memvec) + free(memvec); +} + +static struct tst_test test = { + .test_all = run, + .setup = setup, + .cleanup = cleanup, + .forks_child = 1, + .needs_abi_bits = 64, + .tags = (const struct tst_tag[]) { + {"linux-git", "7edc8b0ac16c"}, + {} + } +}; From patchwork Tue May 21 10:53:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1937336 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=w52p3mUk; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=zxZdz+gK; dkim=fail reason="signature verification failed" (1024-bit key) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=u74046D4; dkim=neutral header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=MyefTHR2; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=patchwork.ozlabs.org) Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (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 legolas.ozlabs.org (Postfix) with ESMTPS id 4VkBBb5c5gz1ydW for ; Tue, 21 May 2024 20:53:59 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id EDC363D006A for ; Tue, 21 May 2024 12:53:55 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [IPv6:2001:4b78:1:20::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id D01473C0562 for ; Tue, 21 May 2024 12:53:53 +0200 (CEST) Authentication-Results: in-7.smtp.seeweb.it; spf=pass (sender SPF authorized) smtp.mailfrom=suse.cz (client-ip=195.135.223.131; helo=smtp-out2.suse.de; envelope-from=pvorel@suse.cz; receiver=lists.linux.it) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (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-7.smtp.seeweb.it (Postfix) with ESMTPS id 46333200C0F for ; Tue, 21 May 2024 12:53:52 +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 E6E995C07F; Tue, 21 May 2024 10:53:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1716288832; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=a5wMYWucAqkYnhVtwB4Gn2jZRJ40yZxM2mJSTFH1FXc=; b=w52p3mUkdcfl8KnnBk+zLv4oE1fdctdHMdXNO4hMKqX/nrwRvmCs9VRQAcUBcZy6g8zW3y PDtlPeyz8BtDz+OYr6TesQuTgELNYjpAV5b9sketJD7iCuR4ld69qffUwmFpmhQNfMF7la f0ODwuOxth5we45Eqsaze+DgLQGfiKs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1716288832; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=a5wMYWucAqkYnhVtwB4Gn2jZRJ40yZxM2mJSTFH1FXc=; b=zxZdz+gKYFTYXr7Y6Bkejrgkb9RfnzB1VKhwToef4x89wZgMzXaM0oTGi48l2swRzkkxd4 P39KwfbQbAP4L9AQ== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=u74046D4; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=MyefTHR2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1716288831; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=a5wMYWucAqkYnhVtwB4Gn2jZRJ40yZxM2mJSTFH1FXc=; b=u74046D4CStiJiWcVV849/AHwv06ByzctR0/LLmmoUk7hA/iv91v8X3xxG0fK8279kps/9 NxaueBOxbmJMy0NMdjb7CqSzI1ARGT0IAtGaQuNCFzrA2L8rr3KzPU45xV4MY/YzT5RU7s X+hbJcpjDomw6oroRc/Y2mOegzDOhl4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1716288831; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=a5wMYWucAqkYnhVtwB4Gn2jZRJ40yZxM2mJSTFH1FXc=; b=MyefTHR27H6ATZduiaq7xmD1+CPbLKkdk6z3+o3bV4HIO9H6qNARvxIBjTIisu794Lz/3G o6Uc7+GhRHhWYxCg== 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 C1D1613A7B; Tue, 21 May 2024 10:53:51 +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 KFhvLj99TGYMPwAAD6G6ig (envelope-from ); Tue, 21 May 2024 10:53:51 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Tue, 21 May 2024 12:53:47 +0200 Message-ID: <20240521105348.126316-5-pvorel@suse.cz> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240521105348.126316-1-pvorel@suse.cz> References: <20240521105348.126316-1-pvorel@suse.cz> MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; 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)[]; MIME_TRACE(0.00)[0:+]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; TO_DN_SOME(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; DWL_DNSWL_BLOCKED(0.00)[suse.cz:dkim]; FROM_EQ_ENVFROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.cz:+]; RCPT_COUNT_FIVE(0.00)[6]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo, imap1.dmz-prg2.suse.org:rdns, suse.cz:dkim, suse.cz:email] X-Rspamd-Action: no action X-Rspamd-Queue-Id: E6E995C07F X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Score: -3.01 X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=disabled version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on in-7.smtp.seeweb.it X-Virus-Scanned: clamav-milter 1.0.3 at in-7.smtp.seeweb.it X-Virus-Status: Clean Subject: [LTP] [PATCH v2 4/5] sbrk03: Convert to detect support with flags 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: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" .needs_abi_bits and .supported_archs are doc friendly. Also, it does tst_brk() (in case of more run with -i). Signed-off-by: Petr Vorel Reviewed-by: Cyril Hrubis --- New in v2 testcases/kernel/syscalls/sbrk/sbrk03.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/testcases/kernel/syscalls/sbrk/sbrk03.c b/testcases/kernel/syscalls/sbrk/sbrk03.c index 80d2020ff..875815629 100644 --- a/testcases/kernel/syscalls/sbrk/sbrk03.c +++ b/testcases/kernel/syscalls/sbrk/sbrk03.c @@ -39,7 +39,6 @@ static void sbrk_test(void) { -#if defined(__s390__) && defined(TST_ABI32) void *ret1, *ret2; /* set bkr to 0x10000000 */ @@ -59,13 +58,15 @@ static void sbrk_test(void) } tst_res(TPASS, "sbrk verify: %p", ret2); -#else - tst_res(TCONF, "Only works in 32bit on s390 series system"); -#endif } static struct tst_test test = { .test_all = sbrk_test, + .supported_archs = (const char *const []) { + "s390", + NULL + }, + .needs_abi_bits = 32, .tags = (const struct tst_tag[]) { {"linux-git", "473a06572fcd"}, {} From patchwork Tue May 21 10:53:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1937341 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=vIMQytft; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=Zu5gT0Qx; dkim=fail reason="signature verification failed" (1024-bit key) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=thnny6pR; dkim=neutral header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=oWBJxJvg; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=patchwork.ozlabs.org) Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VkBCX4nSnz1ydW for ; Tue, 21 May 2024 20:54:48 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 5DAAD3D0061 for ; Tue, 21 May 2024 12:54:46 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-3.smtp.seeweb.it (in-3.smtp.seeweb.it [IPv6:2001:4b78:1:20::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 7EE6C3CFFE2 for ; Tue, 21 May 2024 12:53:54 +0200 (CEST) Authentication-Results: in-3.smtp.seeweb.it; spf=pass (sender SPF authorized) smtp.mailfrom=suse.cz (client-ip=195.135.223.130; helo=smtp-out1.suse.de; envelope-from=pvorel@suse.cz; receiver=lists.linux.it) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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-3.smtp.seeweb.it (Postfix) with ESMTPS id F11F51A00E74 for ; Tue, 21 May 2024 12:53:53 +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-out1.suse.de (Postfix) with ESMTPS id A40A521F2C; Tue, 21 May 2024 10:53:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1716288833; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fNo/Q1mnrh6b+HECc5sYN4AmVqaIHpeqlrM+Q4eUgYc=; b=vIMQytftz9jxjg1Z+Pd4uU7b9r1asAjX+ieQfSCxXY05tt2XUin3+lOGAF99ukrU8FdiDR G5CbZ+ZVe0YQvoaZ1cj32fnTtCizbUUDUfyADnPTOF5FFNIZIhOllZMk6Q9gSlIt5tKhe+ oHH2U+BlWqsMu/gEkyQZx+p9kApFpMU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1716288833; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fNo/Q1mnrh6b+HECc5sYN4AmVqaIHpeqlrM+Q4eUgYc=; b=Zu5gT0QxIGe3IP0S3+r8Tx8bzEBzJkMGG86DNAvFlOSDl5J83ZfrGY/3FHYb0stf2gKeeT xpOO0ZPOP2rsbqAw== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=thnny6pR; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=oWBJxJvg DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1716288832; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fNo/Q1mnrh6b+HECc5sYN4AmVqaIHpeqlrM+Q4eUgYc=; b=thnny6pR4LC6f9lIPOM52rKzLV7sEZ8Eo7Em03UVdhJ++Zy4ZMbv0/+7lUkIDI+4nf+1SM zYjSi0UZ/wRBGMVJs40pFaXhY6y/ox3lvcRujmtjwg0bFFmv9bYVBnYWylZVCnxy3SzMSN TpbHD+1ewF73bCF+vXhSCWpHOKLZDvs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1716288832; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fNo/Q1mnrh6b+HECc5sYN4AmVqaIHpeqlrM+Q4eUgYc=; b=oWBJxJvgOf2Pvo1xB4YNO7M/+bw/5oyHO4cVkDgZLxXt4I2BHHcKDnr+G5Vs4JBrQI/BHv o+Vdvsw0E5l+iEAQ== 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 E88EA13A7C; Tue, 21 May 2024 10:53:51 +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 sJEDOD99TGYMPwAAD6G6ig (envelope-from ); Tue, 21 May 2024 10:53:51 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Tue, 21 May 2024 12:53:48 +0200 Message-ID: <20240521105348.126316-6-pvorel@suse.cz> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240521105348.126316-1-pvorel@suse.cz> References: <20240521105348.126316-1-pvorel@suse.cz> MIME-Version: 1.0 X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Rspamd-Queue-Id: A40A521F2C X-Spam-Level: X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; 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)[]; MIME_TRACE(0.00)[0:+]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; TO_DN_SOME(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; DWL_DNSWL_BLOCKED(0.00)[suse.cz:dkim]; FROM_EQ_ENVFROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.cz:+]; RCPT_COUNT_FIVE(0.00)[6]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.cz:dkim, suse.cz:email, imap1.dmz-prg2.suse.org:helo, imap1.dmz-prg2.suse.org:rdns] X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=disabled version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on in-3.smtp.seeweb.it X-Virus-Scanned: clamav-milter 1.0.3 at in-3.smtp.seeweb.it X-Virus-Status: Clean Subject: [LTP] [PATCH v2 5/5] setsockopt0[38]: Use tst_is_compat_mode() 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: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Petr Vorel --- New in v2 I wonder if both shouldn't be TCONF or TINFO. Kind regards, Petr testcases/kernel/syscalls/setsockopt/setsockopt03.c | 5 ++--- testcases/kernel/syscalls/setsockopt/setsockopt08.c | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/testcases/kernel/syscalls/setsockopt/setsockopt03.c b/testcases/kernel/syscalls/setsockopt/setsockopt03.c index 7a1458277..d910280c8 100644 --- a/testcases/kernel/syscalls/setsockopt/setsockopt03.c +++ b/testcases/kernel/syscalls/setsockopt/setsockopt03.c @@ -48,9 +48,8 @@ struct payload { static void setup(void) { - if (tst_kernel_bits() == 32 || sizeof(long) > 4) - tst_res(TCONF, - "The vulnerability was only present in 32-bit compat mode"); + if (!tst_is_compat_mode()) + tst_res(TCONF, "The vulnerability was only present in 32-bit compat mode"); } static void run(void) diff --git a/testcases/kernel/syscalls/setsockopt/setsockopt08.c b/testcases/kernel/syscalls/setsockopt/setsockopt08.c index 7f8243de1..3b7bd8482 100644 --- a/testcases/kernel/syscalls/setsockopt/setsockopt08.c +++ b/testcases/kernel/syscalls/setsockopt/setsockopt08.c @@ -95,10 +95,8 @@ static void *buffer; void setup(void) { - if (tst_kernel_bits() == 32 || sizeof(long) > 4) { - tst_res(TINFO, - "The vulnerability was only present in 32-bit compat mode"); - } + if (!tst_is_compat_mode()) + tst_res(TINFO, "The vulnerability was only present in 32-bit compat mode"); tst_setup_netns(); }