From patchwork Fri Oct 8 12:25:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 515567 Delivered-To: patch@linaro.org Received: by 2002:adf:fbc8:0:0:0:0:0 with SMTP id d8csp2866126wrs; Fri, 8 Oct 2021 05:33:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpR97rUbGeMsV4zhPwu9GcpmPnq8q7+LCGuPeEK5nfXlnV4+5Un447hz38UCp+INzffyRW X-Received: by 2002:a67:e090:: with SMTP id f16mr9165079vsl.17.1633696414051; Fri, 08 Oct 2021 05:33:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633696414; cv=none; d=google.com; s=arc-20160816; b=rjAIK9X39R2sfcRSk37kJqJjlCMt5nLIWOknPsTTKG4ZksmI3HIKev3egkS5qsMxiH 9n03nYopLBci3Fxq42r0l2D+jXQbu0SdBwsBp9DMs0QiqPT1jWfiQXSlDdCmOfkFyYUF EOsoR9Gl+a/BCeJUWfpGGG8HeyoYJ7rOXDHqZcNb8GzBn98e+l96zt5eoksXpCSKGhoA c1hsUlKBgGtq3qRf3euRi9urVjH2r/EXqsF6ucFuXacw/CybhSvU41mbmB9AtzIr4xLp yJwR52agnnuRIYfxMeENKdeqv0awWM12wORAgAhcRh3OiD0aziNwPy5khjrp8qhizdKI cpUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=5rte+4aR3/Vd75ajXIv4otNTx3jNTOeHVc3H5M5GOsw=; b=NVwMb+IUieapoThgMU6S0H8Dq3oeKCguiXXDtSWjcTknjPc/Yz+cDYKse1pceqD313 tBwSq4mCUme309A5b+OSLSynAgfZ7LlYR1phIN+Mq0ES+sfHDejsV3qm0LkTAx8FdX4K +AxKDfQHRKNdZoYzJpQZ/yl91y13IW24lgi9YhA/M0TSMlcoJBCS+7UkOH1QAzVBzc5u AsONBzM6RZQTFFNS61xAN8A1kXYmvxwMo5PwLjf6lgkw1Wf5nDD2HIfOJ+duZ1qVeBO5 Dar4eR9n0reRzt3qK5HKrUEUjH3ZmoB/HOM9aTO+uY88bw0lA506442/kKGNBTiES5Y8 NleQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=gMePPYgG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n4si2324970vsh.363.2021.10.08.05.33.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Oct 2021 05:33:34 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=gMePPYgG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:53140 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYp49-00015d-8M for patch@linaro.org; Fri, 08 Oct 2021 08:33:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60528) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYowv-0002yK-KL for qemu-devel@nongnu.org; Fri, 08 Oct 2021 08:26:05 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:33562) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYowt-0006to-RU for qemu-devel@nongnu.org; Fri, 08 Oct 2021 08:26:05 -0400 Received: by mail-wr1-x434.google.com with SMTP id m22so29410987wrb.0 for ; Fri, 08 Oct 2021 05:26:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5rte+4aR3/Vd75ajXIv4otNTx3jNTOeHVc3H5M5GOsw=; b=gMePPYgGei8PddWDNSqZKIhwt4Lry5ceOib9g7QyMJrtF9uPDkJcEpF9oLyA9G2Bl9 JJqvZT/FfXdn9qme85XizD/85VjNwXyX7NZ30WNE3ZdHdnq2sR8WHwB+8Mb6xcTkZ14I Q4bim2IzrBKXKkiZIKYn6yR9mSCp6yjstytA1m0xhuob2Cj/rBR+nNdpaRB8MYFO4TQD py8POP80Ugsmz8NcYFtwe7q6rxTAbpUSQ8EWnEhElnnio+HKHtHdIj/uPAYcJXh+dVD+ CY1XBAsfz2KycY17Nc0mtArWH6ln2isfI8fOaLqta67Rm8SXag31wNnCYdYWRrK+U83C xywQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5rte+4aR3/Vd75ajXIv4otNTx3jNTOeHVc3H5M5GOsw=; b=K5xTUIGdeSK96eEHhIDJ3IIpfY3RlSc4IIpbuKlGgnbJ5NpFUCPC+c8plcH4XEUO3a Xz43XfiLy5gNEVK3vWP2CrG+bDfmIYEjQszSet5mPEEOEL8ofEosNAbTPolacvl2/DU/ k21SP5Gb44QOCQDdffwwPWzExCuqT4cBXM6EbiKeHtwBv875o5qsHDlmCZzgRhwJcd9g L+ePl14qXHK00wViay1wNTEU4KQoIp0WsQOUMvS/3mPgnFZGB0dkKlEi9+gBQJPOZ1RK rT73tEV4toCjeh4Ugv4uuwpbq3n+U64jJN5s6LX87kUGPFxdYsAGmhRm6+fbMG24nCME VtBw== X-Gm-Message-State: AOAM532mWq5uXaPp4FQ/Qd0KKB1RTaxYesCtzsWsTjYQ2zKcbH40ApMC QynYmYgcpJLJ0No+z3VVzWt4aA== X-Received: by 2002:adf:e0c1:: with SMTP id m1mr3728979wri.241.1633695962512; Fri, 08 Oct 2021 05:26:02 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id o6sm3501954wri.49.2021.10.08.05.25.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 05:26:00 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 73FFC1FF9A; Fri, 8 Oct 2021 13:25:56 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: richard.henderson@linaro.org Subject: [PULL 03/12] tests/tcg: move some multiarch files and make conditional Date: Fri, 8 Oct 2021 13:25:47 +0100 Message-Id: <20211008122556.757252-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211008122556.757252-1-alex.bennee@linaro.org> References: <20211008122556.757252-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Eduardo Habkost , qemu-devel@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= , Warner Losh Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We had some messy code to filter out stuff we can't build. Lets junk that and simplify the logic by pushing some stuff into subdirs. In particular we move: float_helpers into libs - not a standalone test linux-test into linux - so we only build on Linux hosts This allows for at least some of the tests to be nominally usable by *BSD user builds. Signed-off-by: Alex Bennée Cc: Warner Losh Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Warner Losh Message-Id: <20210917162332.3511179-4-alex.bennee@linaro.org> -- 2.30.2 diff --git a/tests/tcg/multiarch/float_helpers.c b/tests/tcg/multiarch/libs/float_helpers.c similarity index 99% rename from tests/tcg/multiarch/float_helpers.c rename to tests/tcg/multiarch/libs/float_helpers.c index bc530e5732..4e68d2b659 100644 --- a/tests/tcg/multiarch/float_helpers.c +++ b/tests/tcg/multiarch/libs/float_helpers.c @@ -22,7 +22,7 @@ #include #include -#include "float_helpers.h" +#include "../float_helpers.h" #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) diff --git a/tests/tcg/multiarch/linux-test.c b/tests/tcg/multiarch/linux/linux-test.c similarity index 100% rename from tests/tcg/multiarch/linux-test.c rename to tests/tcg/multiarch/linux/linux-test.c diff --git a/tests/tcg/multiarch/Makefile.target b/tests/tcg/multiarch/Makefile.target index 3f283eabe6..6ccb592aac 100644 --- a/tests/tcg/multiarch/Makefile.target +++ b/tests/tcg/multiarch/Makefile.target @@ -8,18 +8,23 @@ MULTIARCH_SRC=$(SRC_PATH)/tests/tcg/multiarch # Set search path for all sources -VPATH += $(MULTIARCH_SRC) -MULTIARCH_SRCS =$(notdir $(wildcard $(MULTIARCH_SRC)/*.c)) -MULTIARCH_TESTS =$(filter-out float_helpers, $(MULTIARCH_SRCS:.c=)) +VPATH += $(MULTIARCH_SRC) +MULTIARCH_SRCS = $(notdir $(wildcard $(MULTIARCH_SRC)/*.c)) +ifneq ($(CONFIG_LINUX),) +VPATH += $(MULTIARCH_SRC)/linux +MULTIARCH_SRCS += $(notdir $(wildcard $(MULTIARCH_SRC)/linux/*.c)) +endif +MULTIARCH_TESTS = $(MULTIARCH_SRCS:.c=) +$(info SRCS=${MULTIARCH_SRCS} and ${MULTIARCH_TESTS}) # # The following are any additional rules needed to build things # float_%: LDFLAGS+=-lm -float_%: float_%.c float_helpers.c - $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< $(MULTIARCH_SRC)/float_helpers.c -o $@ $(LDFLAGS) +float_%: float_%.c libs/float_helpers.c + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< $(MULTIARCH_SRC)/libs/float_helpers.c -o $@ $(LDFLAGS) run-float_%: float_% $(call run-test,$<, $(QEMU) $(QEMU_OPTS) $<,"$< on $(TARGET_NAME)") diff --git a/tests/tcg/x86_64/Makefile.target b/tests/tcg/x86_64/Makefile.target index 2151ea6302..d7a7385583 100644 --- a/tests/tcg/x86_64/Makefile.target +++ b/tests/tcg/x86_64/Makefile.target @@ -8,8 +8,12 @@ include $(SRC_PATH)/tests/tcg/i386/Makefile.target +ifneq ($(CONFIG_LINUX),) X86_64_TESTS += vsyscall TESTS=$(MULTIARCH_TESTS) $(X86_64_TESTS) test-x86_64 +else +TESTS=$(MULTIARCH_TESTS) +endif QEMU_OPTS += -cpu max test-x86_64: LDFLAGS+=-lm -lc