From patchwork Thu Jun 27 13:34:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1953269 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=Nwuwjcqs; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=JUoY/cGE; 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=Nwuwjcqs; dkim=neutral header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=JUoY/cGE; 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) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W901Z3QdJz20Xg for ; Thu, 27 Jun 2024 23:35:14 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 3DDB93D122E for ; Thu, 27 Jun 2024 15:35:12 +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 9BF403D1166 for ; Thu, 27 Jun 2024 15:35:09 +0200 (CEST) Authentication-Results: in-6.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=chrubis@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-6.smtp.seeweb.it (Postfix) with ESMTPS id E48F81400767 for ; Thu, 27 Jun 2024 15:35:08 +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 1D4EA21B86; Thu, 27 Jun 2024 13:35:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1719495307; 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; bh=xvk2LLBcoAPM+IC5BbdhDbjGgElvoXsh4ozzL8VGmd0=; b=NwuwjcqsavU7gE3w7qysFJmSh4RYViS45mBcvh3HA3vjvy3dkgU5zt3Zlnk04BQExuTULu 7KOls56qcmrhpjnDEKLFGg2RW8UCwvWTb5z7FSDtuQhx86HmQXuNBr5OfF73T/+t5QyXNr qVCg6n6VpL3awpZOSGzCKfIPzJ+a8Fk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1719495307; 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; bh=xvk2LLBcoAPM+IC5BbdhDbjGgElvoXsh4ozzL8VGmd0=; b=JUoY/cGEwphGZ8k9ntHGBjcIFKsbC1UdCmlEewAXSPNEkHvLiAh7wf15uK2YoAywy8Un3t DcAei6R7bnVy+KBA== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=Nwuwjcqs; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b="JUoY/cGE" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1719495307; 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; bh=xvk2LLBcoAPM+IC5BbdhDbjGgElvoXsh4ozzL8VGmd0=; b=NwuwjcqsavU7gE3w7qysFJmSh4RYViS45mBcvh3HA3vjvy3dkgU5zt3Zlnk04BQExuTULu 7KOls56qcmrhpjnDEKLFGg2RW8UCwvWTb5z7FSDtuQhx86HmQXuNBr5OfF73T/+t5QyXNr qVCg6n6VpL3awpZOSGzCKfIPzJ+a8Fk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1719495307; 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; bh=xvk2LLBcoAPM+IC5BbdhDbjGgElvoXsh4ozzL8VGmd0=; b=JUoY/cGEwphGZ8k9ntHGBjcIFKsbC1UdCmlEewAXSPNEkHvLiAh7wf15uK2YoAywy8Un3t DcAei6R7bnVy+KBA== 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 019941384C; Thu, 27 Jun 2024 13:35:06 +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 HXdxOopqfWYOZAAAD6G6ig (envelope-from ); Thu, 27 Jun 2024 13:35:06 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Thu, 27 Jun 2024 15:34:56 +0200 Message-ID: <20240627133456.11327-1-chrubis@suse.cz> X-Mailer: git-send-email 2.44.2 MIME-Version: 1.0 X-Rspamd-Queue-Id: 1D4EA21B86 X-Spam-Score: -3.01 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:+]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; ARC_NA(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.cz:+]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_VIA_SMTP_AUTH(0.00)[]; DNSWL_BLOCKED(0.00)[2a07:de40:b281:106:10:150:64:167:received]; RCPT_COUNT_THREE(0.00)[4]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.cz:email, suse.cz:dkim, imap1.dmz-prg2.suse.org:helo, imap1.dmz-prg2.suse.org:rdns] X-Rspamd-Action: no action X-Rspamd-Server: rspamd1.dmz-prg2.suse.org 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] include/tst_timer: Add TST_NO_LIBLTP 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: , Cc: John Stultz , kernel-team@android.com, Darren Hart Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Older compilers (gcc-4.8) are not smart enough to eliminate the impossible branch with tst_brk() early enough and the sched_football compilation fails due to the unresolved function. Add TST_NO_LIBLTP macro that adds tst_brk_() inline implementaiont that prints the message and calls abort() and make use of it in sched_football. Cc: kernel-team@android.com Cc: Darren Hart Cc: John Stultz Signed-off-by: Cyril Hrubis --- include/tst_test.h | 23 +++++++++++++++++++ .../func/sched_football/sched_football.c | 1 + 2 files changed, 24 insertions(+) diff --git a/include/tst_test.h b/include/tst_test.h index 8dc20d110..9bd1b363d 100644 --- a/include/tst_test.h +++ b/include/tst_test.h @@ -648,4 +648,27 @@ int main(int argc, char *argv[]) #define TST_TEST_TCONF(message) \ static struct tst_test test = { .tconf_msg = message } \ +/* + * Fallback for cases where we do not want to link against ltp library. + * + * This allows us for instance to use tst_timer.h without LTP library. + */ +#ifdef TST_NO_LIBLTP +__attribute__ ((format (printf, 4, 5))) +inline void tst_brk_(const char *file, const int lineno, int ttype, + const char *fmt, ...) +{ + va_list va; + + (void) ttype; + + fprintf(stderr, "%s: %i: ", file, lineno); + va_start(va, fmt); + vfprintf(stderr, fmt, va); + va_end(va); + + abort(); +} +#endif + #endif /* TST_TEST_H__ */ diff --git a/testcases/realtime/func/sched_football/sched_football.c b/testcases/realtime/func/sched_football/sched_football.c index b6ae692af..6846978f4 100644 --- a/testcases/realtime/func/sched_football/sched_football.c +++ b/testcases/realtime/func/sched_football/sched_football.c @@ -74,6 +74,7 @@ #include #include #define TST_NO_DEFAULT_MAIN +#define TST_NO_LIBLTP #include