From patchwork Tue Jul 4 09:19:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1803124 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=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) 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=UvQX5oll; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=57nW5i7B; dkim-atps=neutral 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 (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QwHMK1nYgz20b1 for ; Tue, 4 Jul 2023 19:20:29 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 006243CF02D for ; Tue, 4 Jul 2023 11:20:26 +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 (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 2C40F3CC155 for ; Tue, 4 Jul 2023 11:19:49 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (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 6391D1400458 for ; Tue, 4 Jul 2023 11:19:48 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 9B2E92045B; Tue, 4 Jul 2023 09:19:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1688462387; 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=Ce+PfJ8QwCM9KQEB3M8UC52AQSMrB06UCmoFX+If9wY=; b=UvQX5ollB5jg5GT9E9VyNAq7Mz/EmRyWrhgEzr7vqmW9vq8fvYijeYl1ccQV7c0VN+FodB 57Z38tBebNLX5Vf54uLQYremhi584gpmicN5JBxpOrDT3vJKjdM6JFYZ1v8bZdftI5QA3N bCN5UdG7NiO4p78thLtGuoVHUzcV0Y8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1688462387; 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=Ce+PfJ8QwCM9KQEB3M8UC52AQSMrB06UCmoFX+If9wY=; b=57nW5i7BVXQnttH7yPiJP2nV6p2nms60+TTFvRf8VYkfuyWWjkFr3QXexzr9pBOTggeDX4 xChWaw5q+8SSHGBA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 798A1133F7; Tue, 4 Jul 2023 09:19:47 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id mO+cHDPko2SLSQAAMHmgww (envelope-from ); Tue, 04 Jul 2023 09:19:47 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Tue, 4 Jul 2023 11:19:31 +0200 Message-Id: <20230704091933.496989-2-pvorel@suse.cz> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230704091933.496989-1-pvorel@suse.cz> References: <20230704091933.496989-1-pvorel@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 1.0.1 at in-6.smtp.seeweb.it X-Virus-Status: Clean 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, T_SCC_BODY_TEXT_LINE 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 Subject: [LTP] [RFC PATCH 1/3] Makefile: Add C header with generated LTP version 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" It will be used for printing LTP version in C API. Signed-off-by: Petr Vorel --- .gitignore | 1 + lib/Makefile | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 915d22104..49e42bb9e 100644 --- a/.gitignore +++ b/.gitignore @@ -41,6 +41,7 @@ autom4te.cache /include/mk/config-openposix.mk /include/mk/features.mk /m4/ltp-version.m4 +/lib/ltp-version.h /lib/ltp.pc /pan/ltp-bump /pan/ltp-pan diff --git a/lib/Makefile b/lib/Makefile index 9b9906f25..1cac43cde 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -24,5 +24,9 @@ $(pc_file): test -d "$(@D)" || mkdir -p "$(@D)" install -m $(INSTALL_MODE) "$(builddir)/$(@F)" "$@" +.PHONY: ltp-version.h +ltp-version.h: $(top_srcdir)/Version + echo "#define LTP_VERSION \"LTP version: $$(cat $(top_srcdir)/Version)\"" > "$(top_builddir)/lib/$(@F)" + include $(top_srcdir)/include/mk/lib.mk include $(top_srcdir)/include/mk/generic_trunk_target.mk From patchwork Tue Jul 4 09:19:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1803122 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=) 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=KGpGocia; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=QLtAWZeX; dkim-atps=neutral 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 (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QwHLr2sTRz20b5 for ; Tue, 4 Jul 2023 19:20:03 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 97D513CC060 for ; Tue, 4 Jul 2023 11:20:01 +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 (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 3F2133CC033 for ; Tue, 4 Jul 2023 11:19:49 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) (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 C74E7200766 for ; Tue, 4 Jul 2023 11:19:48 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id CC6FE22654; Tue, 4 Jul 2023 09:19:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1688462387; 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=Wl3vcpgaI4WL+fxusDNLh6d5fW0yvGW5YkFPEKgX7Gw=; b=KGpGocia0K3yzsmfAVAYy2LxMGEOKcWpGoh0CxuUBiAP1Dxi71WAvORwjq0gSsKk4AzC5G Ra2sPZcNVqCDgckNhpr7LU8A9PrNO7Vr5S5b5xH19vyYqnUAsAlOqMpsjj53o8Xf75krML 9/WDe04WdFZUMYi7BFf5Lm5W/d+mYrM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1688462387; 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=Wl3vcpgaI4WL+fxusDNLh6d5fW0yvGW5YkFPEKgX7Gw=; b=QLtAWZeXiuBntKpIx6FnCpszXPTDdABbRk17IYEj2yoGEI+RMXzk4a87wWTkPCdEAcCS4z 2vlaVBSmGlprwsCw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id A2C8D133F7; Tue, 4 Jul 2023 09:19:47 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 0H2pJjPko2SLSQAAMHmgww (envelope-from ); Tue, 04 Jul 2023 09:19:47 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Tue, 4 Jul 2023 11:19:32 +0200 Message-Id: <20230704091933.496989-3-pvorel@suse.cz> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230704091933.496989-1-pvorel@suse.cz> References: <20230704091933.496989-1-pvorel@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 1.0.1 at in-7.smtp.seeweb.it X-Virus-Status: Clean 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_SOFTFAIL, T_SCC_BODY_TEXT_LINE 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 Subject: [LTP] [RFC PATCH 2/3] lib/C-API: Add option -V to print LTP version 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" It can be useful for troubleshooting reported issues. Signed-off-by: Petr Vorel --- lib/tst_test.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/tst_test.c b/lib/tst_test.c index 04da456c6..e81a3d036 100644 --- a/lib/tst_test.c +++ b/lib/tst_test.c @@ -34,6 +34,7 @@ #include "old_resource.h" #include "old_device.h" #include "old_tmpdir.h" +#include "ltp-version.h" /* * Hack to get TCID defined in newlib tests @@ -509,6 +510,7 @@ static struct option { {"h", "-h Prints this help"}, {"i:", "-i n Execute test n times"}, {"I:", "-I x Execute test for n seconds"}, + {"V", "-V Prints LTP version"}, {"C:", "-C ARG Run child process with ARG arguments (used internally)"}, }; @@ -686,6 +688,10 @@ static void parse_opts(int argc, char *argv[]) else duration = SAFE_STRTOF(optarg, 0.1, HUGE_VALF); break; + case 'V': + fprintf(stderr, LTP_VERSION "\n"); + exit(0); + break; case 'C': #ifdef UCLINUX child_args = optarg; From patchwork Tue Jul 4 09:19:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1803118 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=) 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=OmiVa5rz; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=Q++ZncTQ; dkim-atps=neutral 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 (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QwHLd3xl7z20b5 for ; Tue, 4 Jul 2023 19:19:53 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 41DAF3CE06B for ; Tue, 4 Jul 2023 11:19:51 +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 [217.194.8.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 2DF6A3C9983 for ; Tue, 4 Jul 2023 11:19:48 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (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 66D5B1A00814 for ; Tue, 4 Jul 2023 11:19:48 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 080DB2045D; Tue, 4 Jul 2023 09:19:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1688462388; 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=apVsjnglWU6Ma0XklSV+/ZrryEU9YtLoq7seiWm31Wo=; b=OmiVa5rza9VYRFT8uzSAyMtbhZip1nEoDsVyIa7Uos4q02t8MdAIejXpaiLdVa1z6DL+E/ nfE4a9BJR17Hl92EANwdlYLe13vgwiKUiwnQSlbgp39bb+T/CqCTfkTIQUX4TKj+O6UCRp sAVwIUVtduyb3gC3LaXb4rp28w9weio= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1688462388; 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=apVsjnglWU6Ma0XklSV+/ZrryEU9YtLoq7seiWm31Wo=; b=Q++ZncTQ/eJ7iiHJhQZg6tdh69wpSpYx37cvHF4q213mDX/adlkskdBIiYoUTBNKcEpDgV sGrVAJUBhlGqZ1Bw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id D2D1D133F7; Tue, 4 Jul 2023 09:19:47 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id QF9qMjPko2SLSQAAMHmgww (envelope-from ); Tue, 04 Jul 2023 09:19:47 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Tue, 4 Jul 2023 11:19:33 +0200 Message-Id: <20230704091933.496989-4-pvorel@suse.cz> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230704091933.496989-1-pvorel@suse.cz> References: <20230704091933.496989-1-pvorel@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 1.0.1 at in-3.smtp.seeweb.it X-Virus-Status: Clean 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, T_SCC_BODY_TEXT_LINE 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 Subject: [LTP] [RFC PATCH 3/3] lib/C-API: Print LTP version at test start 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" Although -V option for printing version was added in previous commit, having a way to always print LTP version at the beginning of the test (makes debugging of troubleshooting reported issues even easier). Signed-off-by: Petr Vorel --- lib/tst_test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/tst_test.c b/lib/tst_test.c index e81a3d036..c93ef6aac 100644 --- a/lib/tst_test.c +++ b/lib/tst_test.c @@ -1677,6 +1677,8 @@ void tst_run_tcases(int argc, char *argv[], struct tst_test *self) SAFE_SIGNAL(SIGALRM, alarm_handler); SAFE_SIGNAL(SIGUSR1, heartbeat_handler); + tst_res(TINFO, LTP_VERSION); + if (tst_test->max_runtime) results->max_runtime = multiply_runtime(tst_test->max_runtime);