From patchwork Wed Feb 21 17:17:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcos Paulo de Souza X-Patchwork-Id: 204332 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp1178277dyc; Wed, 21 Feb 2024 09:19:11 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUxarEDw61Qa2U5sk3Zz5tRHdbkZXTGe1U9+1s7UVcjaPxg3RPGdklUrlHJOwxsYBRdLkohQndVt0xTZEDGz7cDAQn/ww== X-Google-Smtp-Source: AGHT+IEsMEgKoFz/NGwkzgOGDzdKAyXhQyIVXYKsFIXBlKQC21wHxgU68eobZxbSGbYqcZMLY4dB X-Received: by 2002:ac8:5a84:0:b0:42a:a6bf:a88e with SMTP id c4-20020ac85a84000000b0042aa6bfa88emr23646242qtc.49.1708535951231; Wed, 21 Feb 2024 09:19:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708535951; cv=pass; d=google.com; s=arc-20160816; b=l5W1fSZQdz9ozxtUh+w1ANAuBjkzmNN4Tw1y3R0xO/I3FD+QVKAV4HxRj9uzRZv+9d niUljG2KQqDcY3nTOsdcraR4bRIib7rnV5b2NKepwQsON7vrK8ip7ABGmx+WZLjazyOu zed4Y6AA/3aHNYhjaXQBvWCRbECqWflUoxAvSTEEN/11Rm3lw2Q/ie9sQHw4zYlQmCLa w5r7LxV6KJF1LxWCBNDMxBuwO5NoYF/HD8se8titBWPtO2PUMkGPKQuAXgAVVvLLVb3s ADksc8eookjyIKL58l3IXyS5AjkbQpvLKekyTlhk3UQ4AEEaCIGOoiH7mhBMKVDTpOqO QgcA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from; bh=D9P8j5qWhDJz4Oep9mbgqw672iDvJafFPD4oyhUBddI=; fh=oGTeheTGtJi/O2KL90xHksAdkswU33tM/8rayu80xMU=; b=ZWtN3duTCCjPyKbPKcaeyWA2VY9n7RdLGhzUiVWyJpmVAfQG+mUWt/cUcXiAswl0sE o/VfWHqBE5BmAdd8PlsSPUj5ZVknSooE5ml3ilUidhblgCQQani5tc1p8DmYODM+R+X9 NTmH0wQ9wL8RCQT6meEP5f59WQZr7klnJ4Haj1f1IU1CcqSnzVaX45dLfLOphoVcG0/p tBq8BcMdlgHUuh3B5ms1KE93mVBq6QqsvHDuaoyhoR6m2AulJv0bbeh6wRbYMKye2JcQ fb6ojngBs0ytL/rPyyLUs47lEEuwTUp+PjJaJD60HO53MG7mKN8GJTjauO/BeGjFi5sA istw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-75185-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75185-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id v14-20020ac8578e000000b0042db67c4ee3si1022422qta.504.2024.02.21.09.19.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 09:19:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-75185-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-75185-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75185-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 0BA111C22EE0 for ; Wed, 21 Feb 2024 17:19:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 83CDA85C61; Wed, 21 Feb 2024 17:17:31 +0000 (UTC) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 361E282D7B; Wed, 21 Feb 2024 17:17:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708535849; cv=none; b=KPcE+bU3b4ulW791Swx4+iBUAlPBf+SCOclVYwW26xUtD1hHnzXEqsUHgBp5JcdtGtfXmU2iFjEDoonG9oGOcBS9JPciD8UObPYVGg+wYfFikVcydrwM9SoIxUpIxBhWs/CHWFMG+6G5rMBJ+c8gzcV6bJ3pEV66ApUUosV/HIU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708535849; c=relaxed/simple; bh=4sRYEFsMr0x8AvEq/m65uPROo9JRLFixj6hIrz82inQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=D4ldHZ9PRQQACiZBOcxVZGOSa4Pu8dLQR2A86bjQNrCr07t2opDsXfo5sCDwASRAketz/vX6TXEx8zXX1e4h6+Bz+T2ShSR6W2A1coyz/aMdy2oMA70Cl3P9WGLD20sCHF36EBLw36FxWDebRoltzB/VRCQTZzpCHd8rYTmxe2s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:98]) (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 7D1DD22102; Wed, 21 Feb 2024 17:17:26 +0000 (UTC) Received: from imap2.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 imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id 0480813A25; Wed, 21 Feb 2024 17:17:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap2.dmz-prg2.suse.org with ESMTPSA id NDH0LiUw1mUfcQAAn2gu4w (envelope-from ); Wed, 21 Feb 2024 17:17:25 +0000 From: Marcos Paulo de Souza Date: Wed, 21 Feb 2024 14:17:06 -0300 Subject: [PATCH v2 4/4] selftests: lib.mk: Simplify TEST_GEN_MODS_DIR handling Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240221-lp-selftests-fixes-v2-4-a19be1e029a7@suse.com> References: <20240221-lp-selftests-fixes-v2-0-a19be1e029a7@suse.com> In-Reply-To: <20240221-lp-selftests-fixes-v2-0-a19be1e029a7@suse.com> To: Shuah Khan , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, Marcos Paulo de Souza X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1708535830; l=1959; i=mpdesouza@suse.com; s=20231031; h=from:subject:message-id; bh=4sRYEFsMr0x8AvEq/m65uPROo9JRLFixj6hIrz82inQ=; b=k6aiuIGTtALvQQFLvW+j9toVR32WNNHnB+49PPw7VA8Piw3BViCkI+7gk2tvRfCvK8nNHpNmf +GfzkX3mrywBQDOhYhJOj0Oc6/3/ZgsNF/dVbog8Tek694UPM3odrvF X-Developer-Key: i=mpdesouza@suse.com; a=ed25519; pk=/Ni/TsKkr69EOmdZXkp1Q/BlzDonbOBRsfPa18ySIwU= X-Spam-Level: Authentication-Results: smtp-out1.suse.de; none X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: 7D1DD22102 X-Spam-Flag: NO X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791529793209444962 X-GMAIL-MSGID: 1791529793209444962 We don't need new targets only to run two make modules and make clean. We can test if TEST_GEN_MODS_DIR is specified, and then run the commands. Signed-off-by: Marcos Paulo de Souza --- tools/testing/selftests/lib.mk | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk index 286ce0ee102b..eddcd4a849dc 100644 --- a/tools/testing/selftests/lib.mk +++ b/tools/testing/selftests/lib.mk @@ -58,8 +58,9 @@ TEST_GEN_PROGS := $(patsubst %,$(OUTPUT)/%,$(TEST_GEN_PROGS)) TEST_GEN_PROGS_EXTENDED := $(patsubst %,$(OUTPUT)/%,$(TEST_GEN_PROGS_EXTENDED)) TEST_GEN_FILES := $(patsubst %,$(OUTPUT)/%,$(TEST_GEN_FILES)) -all: $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) \ - $(if $(TEST_GEN_MODS_DIR),gen_mods_dir) +all: $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) + $(if $(TEST_GEN_MODS_DIR), \ + $(Q)$(MAKE) -C $(TEST_GEN_MODS_DIR)) define RUN_TESTS BASE_DIR="$(selfdir)"; \ @@ -85,11 +86,6 @@ else @$(call RUN_TESTS, $(TEST_GEN_PROGS) $(TEST_CUSTOM_PROGS) $(TEST_PROGS)) endif -gen_mods_dir: - $(Q)$(MAKE) -C $(TEST_GEN_MODS_DIR) - -clean_mods_dir: - $(Q)$(MAKE) -C $(TEST_GEN_MODS_DIR) clean define INSTALL_SINGLE_RULE $(if $(INSTALL_LIST),@mkdir -p $(INSTALL_PATH)) @@ -133,9 +129,11 @@ endif define CLEAN $(RM) -r $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) $(EXTRA_CLEAN) + $(if $(TEST_GEN_MODS_DIR), \ + $(Q)$(MAKE) -C $(TEST_GEN_MODS_DIR) clean) endef -clean: $(if $(TEST_GEN_MODS_DIR),clean_mods_dir) +clean: $(CLEAN) # Enables to extend CFLAGS and LDFLAGS from command line, e.g. @@ -166,4 +164,4 @@ $(OUTPUT)/%:%.S $(LINK.S) $^ $(LDLIBS) -o $@ endif -.PHONY: run_tests all clean install emit_tests gen_mods_dir clean_mods_dir +.PHONY: run_tests all clean install emit_tests