From patchwork Tue May 21 07:49:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1937277 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=OZ2adk1w; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=gHBuhCWl; 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=FHW/DXNR; dkim=neutral header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=saB1RehT; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; 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 [IPv6:2001:1418:10:5::2]) (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 4Vk6755ftMz1ynR for ; Tue, 21 May 2024 17:50:41 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 356E23CFF4E for ; Tue, 21 May 2024 09:50:37 +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 8143D3CEFCB for ; Tue, 21 May 2024 09:50:04 +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 A57DB2009A5 for ; Tue, 21 May 2024 09:50:03 +0200 (CEST) Received: from imap1.dmz-prg2.suse.org (unknown [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 7C024345B5; Tue, 21 May 2024 07:50:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1716277801; 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=KNXi+tZLjeKTlS7NC1FdjCIE//Lx2hN9zQobodkwtDs=; b=OZ2adk1wppYkFO/rLaD4gAhyXd3WAdhMFnVrjR2sRS6xK5FH9FlyMjYq58ohoXuTjCygFZ qgHTYEchwdCJCVC8df+BglfscWfEN2m6FZiFG88CMaFYCtRac0L/T2KBixoTwDI8BXM6Ho lghBNOJOeXqUgYjX+edejK4FTSmjbco= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1716277801; 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=KNXi+tZLjeKTlS7NC1FdjCIE//Lx2hN9zQobodkwtDs=; b=gHBuhCWlcuVsJYBrHYhRWOuiDSIH1HFR1DWfpW613BbhXN3eKDu7tHnw9gVqhJNspeQoAe WuY0iJfGclG9tDDw== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1716277800; 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=KNXi+tZLjeKTlS7NC1FdjCIE//Lx2hN9zQobodkwtDs=; b=FHW/DXNRAMM8Ag7UkLouZvUdP85kqSXFIm82+nc3uoGbxmf+KqNPp6beZ1hK8uKDkZteqP y9oBcElJ4QLIhMS0O2QhjF3il4AR4yVZUT4UujS0TeQdpQ76YE+mADQ8BSGFa5eag7mv9G URuOmcUQannShm1RD0qpgu8Rgs57JHs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1716277800; 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=KNXi+tZLjeKTlS7NC1FdjCIE//Lx2hN9zQobodkwtDs=; b=saB1RehTcvOYtvUhfe6/l/fCfO7PwxyReK1wEoqVzEw7uzqRyErPkFVsjmf6Ip5Oq52Duv PF9a13kBBGmpTlBA== 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 5548013A75; Tue, 21 May 2024 07:50:00 +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 cMe+EyhSTGYMFwAAD6G6ig (envelope-from ); Tue, 21 May 2024 07:50:00 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Tue, 21 May 2024 09:49:53 +0200 Message-ID: <20240521074955.78675-2-pvorel@suse.cz> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240521074955.78675-1-pvorel@suse.cz> References: <20240521074955.78675-1-pvorel@suse.cz> MIME-Version: 1.0 X-Spam-Score: -6.80 X-Spam-Level: X-Spamd-Result: default: False [-6.80 / 50.00]; REPLY(-4.00)[]; BAYES_HAM(-3.00)[99.99%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[6]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.cz:email]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[] 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/3] libswap: Split long lines (readability) 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: Li Wang --- Changes v1->v2: * Separated from the next commit libs/libltpswap/libswap.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libs/libltpswap/libswap.c b/libs/libltpswap/libswap.c index eb066df71..0066ca734 100644 --- a/libs/libltpswap/libswap.c +++ b/libs/libltpswap/libswap.c @@ -93,7 +93,9 @@ static int file_is_contiguous(const char *filename) fd = SAFE_OPEN(filename, O_RDONLY); - fiemap = (struct fiemap *)SAFE_MALLOC(sizeof(struct fiemap) + sizeof(struct fiemap_extent)); + fiemap = (struct fiemap *)SAFE_MALLOC(sizeof(struct fiemap) + + sizeof(struct fiemap_extent)); + memset(fiemap, 0, sizeof(struct fiemap) + sizeof(struct fiemap_extent)); fiemap->fm_start = 0; @@ -243,7 +245,8 @@ bool is_swap_supported(const char *filename) */ int tst_max_swapfiles(void) { - unsigned int swp_migration_num = 0, swp_hwpoison_num = 0, swp_device_num = 0, swp_pte_marker_num = 0; + unsigned int swp_migration_num = 0, swp_hwpoison_num = 0, + swp_device_num = 0, swp_pte_marker_num = 0; struct tst_kconfig_var migration = TST_KCONFIG_INIT("CONFIG_MIGRATION"); struct tst_kconfig_var memory = TST_KCONFIG_INIT("CONFIG_MEMORY_FAILURE"); struct tst_kconfig_var device = TST_KCONFIG_INIT("CONFIG_DEVICE_PRIVATE"); @@ -281,7 +284,8 @@ int tst_max_swapfiles(void) swp_pte_marker_num = 1; } - return DEFAULT_MAX_SWAPFILE - swp_migration_num - swp_hwpoison_num - swp_device_num - swp_pte_marker_num; + return DEFAULT_MAX_SWAPFILE - swp_migration_num - swp_hwpoison_num + - swp_device_num - swp_pte_marker_num; } /* From patchwork Tue May 21 07:49:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1937278 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=ovgi2XVh; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=J/s9ialX; 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=Jb9JmI2g; dkim=neutral header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=eAlOMrph; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; 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 [IPv6:2001:1418:10:5::2]) (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 4Vk67N3TZkz1ynR for ; Tue, 21 May 2024 17:50:56 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 90C5B3CFF56 for ; Tue, 21 May 2024 09:50:53 +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) server-digest SHA384) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 5491F3CFF60 for ; Tue, 21 May 2024 09:50:04 +0200 (CEST) Authentication-Results: in-3.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-3.smtp.seeweb.it (Postfix) with ESMTPS id 9F9A01A00984 for ; Tue, 21 May 2024 09:50:03 +0200 (CEST) Received: from imap1.dmz-prg2.suse.org (unknown [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 B647A345B6; Tue, 21 May 2024 07:50:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1716277801; 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=JCrlhbiuPPL3XCdDDhMwn8D4n01XFj7bq2qybMIihw0=; b=ovgi2XVhGrWii/9xYEPKBlwYYz7k4fMmi7u3vjds0P8+JHjNEylFQihHuHmhXcjdR9RGTA IOdcG2DMBQUMLVb/rYCdydcaEdKjItpEuaQd2S5ZdUfw2ucJYoEAKBOt/kZacNYZ9aOGi7 mhop+E/mEwQg/tVdke8gP7nxOW1e7kw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1716277801; 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=JCrlhbiuPPL3XCdDDhMwn8D4n01XFj7bq2qybMIihw0=; b=J/s9ialX8Digv8MZCn8ASmiq3pEb6gNnnOUTOvnYWigI4/UAQUtOjQAsLVZO9qfE9oMDqf 6RQ/B8OzkU5mh5Cg== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1716277800; 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=JCrlhbiuPPL3XCdDDhMwn8D4n01XFj7bq2qybMIihw0=; b=Jb9JmI2gDPTIzjM1KlMa4tp8NgFARSEAZwNS9dKw9CYom/gOWfoFhvYEM031Z1Y6F6Mp0+ v3YZ9P/GqkPBjEHbkeL16d+sc3mLDzSqRFK67iuYM1h7/Ups4aeBTegXGv+5XIm5vN6vL8 HSe5lvbzDcscuE2Lusj9E8jNVe11Zqc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1716277800; 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=JCrlhbiuPPL3XCdDDhMwn8D4n01XFj7bq2qybMIihw0=; b=eAlOMrphfcM6sJEcvbXMsXEwbexhZ8w0yOTSKWLmM5MG3GdNW0wVgBRiI3DJ2Vt5pmJO8G ZAnMfesHRzboSwDw== 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 83BB513A21; Tue, 21 May 2024 07:50:00 +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 qFPvHihSTGYMFwAAD6G6ig (envelope-from ); Tue, 21 May 2024 07:50:00 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Tue, 21 May 2024 09:49:54 +0200 Message-ID: <20240521074955.78675-3-pvorel@suse.cz> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240521074955.78675-1-pvorel@suse.cz> References: <20240521074955.78675-1-pvorel@suse.cz> MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-6.80 / 50.00]; REPLY(-4.00)[]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[6]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.cz:email,oracle.com:email,imap1.dmz-prg2.suse.org:helo]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -6.80 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 2/3] libswap: Fix tst_max_swapfiles() for SLE12-SP5 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" SLE12-SP4 backported kernel commit 5042db43cc26. It's now EOL, but SLE12-SP5 is still supported, this fixes swapon03 on it. Signed-off-by: Petr Vorel --- Changes v1->v2: * Don't swap 5.19 and 6.2 conditions (Cyril) * Separate whitelist changes to "libswap: Split long lines (readability)" libs/libltpswap/libswap.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/libs/libltpswap/libswap.c b/libs/libltpswap/libswap.c index 0066ca734..e587f315e 100644 --- a/libs/libltpswap/libswap.c +++ b/libs/libltpswap/libswap.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (c) 2013 Oracle and/or its affiliates. All Rights Reserved. + * Copyright (c) Linux Test Project, 2014-2024 * Author: Stanislav Kholmanskikh */ @@ -251,19 +252,25 @@ int tst_max_swapfiles(void) struct tst_kconfig_var memory = TST_KCONFIG_INIT("CONFIG_MEMORY_FAILURE"); struct tst_kconfig_var device = TST_KCONFIG_INIT("CONFIG_DEVICE_PRIVATE"); struct tst_kconfig_var marker = TST_KCONFIG_INIT("CONFIG_PTE_MARKER"); - struct tst_kern_exv kvers[] = { + struct tst_kern_exv kvers_marker_migration[] = { /* RHEL9 kernel has patch 6c287605f and 679d10331 since 5.14.0-179 */ { "RHEL9", "5.14.0-179" }, { NULL, NULL}, }; + struct tst_kern_exv kvers_device[] = { + /* SLES12-SP4 has patch 5042db43cc26 since 4.12.14-5.5 */ + { "SLES", "4.12.14-5.5" }, + { NULL, NULL}, + }; + tst_kconfig_read(&migration, 1); tst_kconfig_read(&memory, 1); tst_kconfig_read(&device, 1); tst_kconfig_read(&marker, 1); if (migration.choice == 'y') { - if (tst_kvercmp2(5, 19, 0, kvers) < 0) + if (tst_kvercmp2(5, 19, 0, kvers_marker_migration) < 0) swp_migration_num = 2; else swp_migration_num = 3; @@ -273,14 +280,15 @@ int tst_max_swapfiles(void) swp_hwpoison_num = 1; if (device.choice == 'y') { - if (tst_kvercmp(4, 14, 0) >= 0) + if (tst_kvercmp2(4, 14, 0, kvers_device) >= 0) swp_device_num = 2; if (tst_kvercmp(5, 14, 0) >= 0) swp_device_num = 4; } - if ((marker.choice == 'y' && tst_kvercmp2(5, 19, 0, kvers) >= 0) || - tst_kvercmp(6, 2, 0) >= 0) { + if ((marker.choice == 'y' && + tst_kvercmp2(5, 19, 0, kvers_marker_migration) >= 0) + || tst_kvercmp(6, 2, 0) >= 0) { swp_pte_marker_num = 1; } From patchwork Tue May 21 07:49:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1937276 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; 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 [IPv6:2001:1418:10:5::2]) (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 4Vk66q060lz1ynR for ; Tue, 21 May 2024 17:50:26 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 7479A3CFF60 for ; Tue, 21 May 2024 09:50:22 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [IPv6:2001:4b78:1:20::2]) (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 8DB383C02C0 for ; Tue, 21 May 2024 09:50:02 +0200 (CEST) Authentication-Results: in-2.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-2.smtp.seeweb.it (Postfix) with ESMTPS id 809756002F9 for ; Tue, 21 May 2024 09:50:01 +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 0739D345B7; Tue, 21 May 2024 07:50:01 +0000 (UTC) Authentication-Results: smtp-out1.suse.de; none 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 BFE0313A79; Tue, 21 May 2024 07:50:00 +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 AGzULShSTGYMFwAAD6G6ig (envelope-from ); Tue, 21 May 2024 07:50:00 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Tue, 21 May 2024 09:49:55 +0200 Message-ID: <20240521074955.78675-4-pvorel@suse.cz> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240521074955.78675-1-pvorel@suse.cz> References: <20240521074955.78675-1-pvorel@suse.cz> MIME-Version: 1.0 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Level: X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: 0739D345B7 X-Spam-Status: No, score=0.0 required=7.0 tests=DMARC_MISSING,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-2.smtp.seeweb.it X-Virus-Scanned: clamav-milter 1.0.3 at in-2.smtp.seeweb.it X-Virus-Status: Clean Subject: [LTP] [PATCH v2 3/3] libswap: Remove function description 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" We have docs in libswap.h, better not duplicate the description. Fixes: 703406ba4 ("doc: libltpswap: Add kerneldoc") Signed-off-by: Petr Vorel --- New in v2 libs/libltpswap/libswap.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/libs/libltpswap/libswap.c b/libs/libltpswap/libswap.c index e587f315e..ce419a76e 100644 --- a/libs/libltpswap/libswap.c +++ b/libs/libltpswap/libswap.c @@ -241,9 +241,6 @@ bool is_swap_supported(const char *filename) return true; } -/* - * Get kernel constant MAX_SWAPFILES value. - */ int tst_max_swapfiles(void) { unsigned int swp_migration_num = 0, swp_hwpoison_num = 0, @@ -296,9 +293,6 @@ int tst_max_swapfiles(void) - swp_device_num - swp_pte_marker_num; } -/* - * Get the used swapfiles number. - */ int tst_count_swaps(void) { FILE *fp;