From nobody Sun Apr 28 23:24:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523389312170589.917570240419; Tue, 10 Apr 2018 12:41:52 -0700 (PDT) Received: from localhost ([::1]:39693 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5z98-0001mE-ED for importer@patchew.org; Tue, 10 Apr 2018 15:41:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46506) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5z6z-000056-A8 for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5z6w-0006F5-MA for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:25 -0400 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:38559) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5z6w-0006EK-Fb for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:22 -0400 Received: by mail-wr0-x244.google.com with SMTP id m13so13941980wrj.5 for ; Tue, 10 Apr 2018 12:39:22 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id b40sm6040219wrb.88.2018.04.10.12.39.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 12:39:20 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 75CE43E0250; Tue, 10 Apr 2018 20:39:19 +0100 (BST) 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=HnnH/B3e+/eyblACYMxhSUMzH5FCKtfu6tFgUyIuT4A=; b=AScs8/tnKDVgYpUqmjjpkBi2VnadwhXIJFqog2ylbS9JUt0OzHPXV7IT3JynaNRXmo 77SX5GX7gASobB75tUJ2l4AjtYCwMu+Ez36vcj7/KCnxqfDm4tEXys2QJDl2fpwFlocx W8ppWOrXgXZY3rAXhnXX4kFv+9OrivjcIBfGE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HnnH/B3e+/eyblACYMxhSUMzH5FCKtfu6tFgUyIuT4A=; b=Ll6nrjppN+wMQcaGaSBx7vZNMrzBqHZyECIY7Y5iu4xSee82qyZ/gUt1nT6izbMsKM 2x2/EALQoDtByAMr5VPjmmWI930hK8sde2/Xz09zAVKI1s+w6lCZfAW4g79ry2TLC70m CZTxUp7b8BegS6QbfOHTdLyZWTW+pMo0bdZS/vwlK2qMKPSV1L7M/dEkuIRiLIbdXxka cVZbG6n0jnCV3o8Z7dnWMs+RdlXZksamIbPXAXQ3vCSAuU1O7kTIYItBES4ZJ6hQua2L 2Ci6OcJWcWN3eh4eJSPlxUvqxU/kwLxJweuKZGIKVOco4sVTbvsalflCUwc0XfuIzaMH lGnA== X-Gm-Message-State: ALQs6tDRvaG8xhlmb54F2riWS8Ry+RJq7DvdDAoQQRti4Obw/mTyjT2r 7t1NNkcWmPq09RQ2RVvLNbXLSg== X-Google-Smtp-Source: AIpwx4+F4MC9IdlkRfZghf2JbQB33dA4nx2PLSZmukBhhxEQHuKb3l0ieOuHTQSmrR4t1HartncBvg== X-Received: by 10.223.195.205 with SMTP id d13mr1435182wrg.0.1523389161332; Tue, 10 Apr 2018 12:39:21 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 10 Apr 2018 20:38:56 +0100 Message-Id: <20180410193919.28026-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180410193919.28026-1-alex.bennee@linaro.org> References: <20180410193919.28026-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::244 Subject: [Qemu-devel] [PATCH v1 01/24] configure: add test for docker availability X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , famz@redhat.com, cota@braap.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 This tests for a working docker installation without sudo and sets up config-host.mak accordingly. This will be useful from cross compiling things in the future. Signed-off-by: Alex Benn=C3=A9e --- configure | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/configure b/configure index 4d0e92c96c..b402befe94 100755 --- a/configure +++ b/configure @@ -451,6 +451,7 @@ jemalloc=3D"no" replication=3D"yes" vxhs=3D"" libxml2=3D"" +docker=3D"no" =20 supported_cpu=3D"no" supported_os=3D"no" @@ -5396,6 +5397,23 @@ EOF fi fi =20 +########################################## +# Docker and cross-compiler support +# +# This is specifically for building test +# cases for foreign architectures, not +# cross-compiling QEMU itself. + +if has "docker"; then + if docker images >/dev/null 2>&1 ; then + docker=3D"yes" + else + # docker may be available but using sudo + # so we won't use it for cross-building + docker=3D"maybe" + fi +fi + ########################################## # End of CC checks # After here, no more $cc or $ld runs @@ -5857,6 +5875,7 @@ echo "avx2 optimization $avx2_opt" echo "replication support $replication" echo "VxHS block device $vxhs" echo "capstone $capstone" +echo "docker $docker" =20 if test "$sdl_too_old" =3D "yes"; then echo "-> Your SDL version is too old - please upgrade to have SDL support" @@ -6680,6 +6699,10 @@ if test "$gcov" =3D "yes" ; then echo "GCOV=3D$gcov_tool" >> $config_host_mak fi =20 +if test "$docker" =3D "yes"; then + echo "HAVE_USER_DOCKER=3Dy" >> $config_host_mak +fi + # use included Linux headers if test "$linux" =3D "yes" ; then mkdir -p linux-headers --=20 2.16.2 From nobody Sun Apr 28 23:24:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523389312170842.8287989112946; Tue, 10 Apr 2018 12:41:52 -0700 (PDT) Received: from localhost ([::1]:39695 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5z9F-0001qk-Gl for importer@patchew.org; Tue, 10 Apr 2018 15:41:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46508) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5z6z-000057-AL for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5z6x-0006Fv-Md for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:25 -0400 Received: from mail-wr0-x22b.google.com ([2a00:1450:400c:c0c::22b]:44429) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5z6x-0006FB-Fs for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:23 -0400 Received: by mail-wr0-x22b.google.com with SMTP id u46so13917259wrc.11 for ; Tue, 10 Apr 2018 12:39:23 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id t142sm2405474wmt.12.2018.04.10.12.39.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 12:39:20 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 87A943E06C8; Tue, 10 Apr 2018 20:39:19 +0100 (BST) 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=q5tHR9W1VGlVHRbwWx5NGHMfhuyYinJGu9UTmTekjmg=; b=KvURY5Al2QjKiHqYYTXvkCMH3OfbBNsLy+H62HKkZWZROw92AM6GyvT/hdR2b06qpp FHmWlif19i1kQXSeoTNwOXAW8tlIcN5X+oGNd9d1MJTGPa8kiZKL7Pl5OpHncdSMJY7t kAHCkzkRrrFA8IyEuGUud55hAuWhj+2YXr93g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=q5tHR9W1VGlVHRbwWx5NGHMfhuyYinJGu9UTmTekjmg=; b=SJRW4o0w7KwR0NtS9C1UrE0ykCzyBj2A4ENiqIzSRdB5zweklMwI7B9iH0Ozb+yyEr WnOvFwoza/VpyKsQNdBqrqwZV2uWAeBE/xlq99FhB1MmLv9yffM0liWcB0589j8HGmNS Av739t0uThwLQF4LGYero7yprnVYFHqntd8LFckK70LcS+/qqyVv09qlY41ONdgTBnI9 dwjWFS6mSq1w7371lPSu3R52BT5Ze28KODx45a6Q1J0RBI4i+Wam9N3BQ3F8t4J8DQo+ C7lEPohF8tYY7LNKLhifR0Gz0gYPIoBWPJVfgt/m+WAM83WcY1rz9GIChhpgyKOFoxiS zNWQ== X-Gm-Message-State: ALQs6tAOOENKQFy/fyuRUP+hqHQ1LQO2lbodbkI8+770+FI+Vv21U3Un cgxQqZVprEVxH5tw/WNJNH7fyQ== X-Google-Smtp-Source: AIpwx48ic3d47ZK7ZfMNQnAJGgY+IWhD1UHBQW7lfa8vCfeKvMS5rQZGM8ItVkDWyN/Af95SWG0PXg== X-Received: by 10.223.160.91 with SMTP id l27mr1250135wrl.114.1523389162342; Tue, 10 Apr 2018 12:39:22 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 10 Apr 2018 20:38:57 +0100 Message-Id: <20180410193919.28026-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180410193919.28026-1-alex.bennee@linaro.org> References: <20180410193919.28026-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::22b Subject: [Qemu-devel] [PATCH v1 02/24] configure: add support for --cross-cc-FOO X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , famz@redhat.com, cota@braap.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 This allows us to specify cross compilers for our guests. This is useful for building test images/programs. Currently we re-run the compile test for each target. I couldn't think of a way to cache the value for a given arch without getting messier configure code. The cross compiler for the guest is visible to each target as CROSS_CC_GUEST in config-target.mak. Signed-off-by: Alex Benn=C3=A9e --- configure | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/configure b/configure index b402befe94..b5f3b3fe29 100755 --- a/configure +++ b/configure @@ -453,6 +453,13 @@ vxhs=3D"" libxml2=3D"" docker=3D"no" =20 +# cross compilers defaults, can be overridden with --cross-cc-ARCH +cross_cc_aarch64=3D"aarch64-linux-gnu-gcc" +cross_cc_arm=3D"arm-linux-gnueabihf-gcc" +cross_cc_powerpc=3D"powerpc-linux-gnu-gcc" + +enabled_cross_compilers=3D"" + supported_cpu=3D"no" supported_os=3D"no" bogus_os=3D"no" @@ -483,6 +490,11 @@ for opt do ;; --disable-debug-info) debug_info=3D"no" ;; + --cross-cc-*[!a-zA-Z0-9_0]=3D*) error_exit "Passed bad --cross-cc-FOO op= tion" + ;; + --cross-cc-*) cc_arch=3D${opt#--cross-cc-} + eval "cross_cc_${cc_arch}=3D\$optarg" + ;; esac done # OS specific @@ -675,10 +687,12 @@ case "$cpu" in i386|i486|i586|i686|i86pc|BePC) cpu=3D"i386" supported_cpu=3D"yes" + cross_cc_i386=3Dgcc ;; x86_64|amd64) cpu=3D"x86_64" supported_cpu=3D"yes" + cross_cc_x86_64=3Dgcc ;; armv*b|armv*l|arm) cpu=3D"arm" @@ -912,6 +926,8 @@ for opt do ;; --disable-debug-info) ;; + --cross-cc-*) + ;; --enable-modules) modules=3D"yes" ;; @@ -6766,6 +6782,8 @@ case "$target" in ;; esac =20 +target_compiler=3D"" + mkdir -p $target_dir echo "# Automatically generated by configure - do not modify" > $config_ta= rget_mak =20 @@ -6794,6 +6812,7 @@ case "$target_name" in bflt=3D"yes" mttcg=3D"yes" gdb_xml_files=3D"arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml" + target_compiler=3D$cross_cc_arm ;; aarch64|aarch64_be) TARGET_ARCH=3Daarch64 @@ -6801,6 +6820,7 @@ case "$target_name" in bflt=3D"yes" mttcg=3D"yes" gdb_xml_files=3D"aarch64-core.xml aarch64-fpu.xml arm-core.xml arm-vfp= .xml arm-vfp3.xml arm-neon.xml" + target_compiler=3D$cross_cc_aarch64 ;; cris) ;; @@ -6842,6 +6862,7 @@ case "$target_name" in ;; ppc) gdb_xml_files=3D"power-core.xml power-fpu.xml power-altivec.xml power-= spe.xml" + target_compiler=3D$cross_cc_powerpc ;; ppcemb) TARGET_BASE_ARCH=3Dppc @@ -6916,6 +6937,25 @@ if [ "$TARGET_BASE_ARCH" =3D "" ]; then TARGET_BASE_ARCH=3D$TARGET_ARCH fi =20 +# Do we have a cross compiler for this target? +if has $target_compiler; then + + cat > $TMPC << EOF +#include +int main(void) { + printf("Hello World!\n"); +} +EOF + + if ! do_compiler $target_compiler -o $TMPE $TMPC -static ; then + target_compiler=3D"" + else + enabled_cross_compilers=3D"${enabled_cross_compilers} ${target_com= piler}" + fi +else + target_compiler=3D"" +fi + symlink "$source_path/Makefile.target" "$target_dir/Makefile" =20 upper() { @@ -6989,6 +7029,10 @@ if test "$target_bsd_user" =3D "yes" ; then echo "CONFIG_BSD_USER=3Dy" >> $config_target_mak fi =20 +if test -n "$target_compiler"; then + echo "CROSS_CC_GUEST=3D$target_compiler" >> $config_target_mak +fi + # generate QEMU_CFLAGS/LDFLAGS for targets =20 cflags=3D"" @@ -7111,6 +7155,12 @@ echo "QEMU_CFLAGS+=3D$cflags" >> $config_target_mak =20 done # for target in $targets =20 +if test -n "$enabled_cross_compilers"; then + echo + echo "NOTE: cross-compilers enabled:" + printf '%s\n' $enabled_cross_compilers | sort -u +fi + if [ "$dtc_internal" =3D "yes" ]; then echo "config-host.h: subdir-dtc" >> $config_host_mak fi --=20 2.16.2 From nobody Sun Apr 28 23:24:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523389489860609.5526364262616; Tue, 10 Apr 2018 12:44:49 -0700 (PDT) Received: from localhost ([::1]:39711 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zC8-0004Nd-4R for importer@patchew.org; Tue, 10 Apr 2018 15:44:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46553) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5z70-00006R-K6 for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5z6z-0006Ha-HU for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:26 -0400 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]:44349) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5z6z-0006Gg-Ar for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:25 -0400 Received: by mail-wr0-x242.google.com with SMTP id u46so13917358wrc.11 for ; Tue, 10 Apr 2018 12:39:25 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id w18sm3875932wra.25.2018.04.10.12.39.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 12:39:20 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 990D23E08F9; Tue, 10 Apr 2018 20:39:19 +0100 (BST) 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=Uzy047/gY1EqQGqYbLI/hhYon801wleqkK8xCwcLyMg=; b=QK2V12Enti1VkzXz1jGC6xYS4p+EYZHU5UfcQOv5gG/fd/PoOQx5+K4ne8adGAPe97 KJw+5ylK4mVlofUDp2yIRWWVKP/1N6hewEFspZQhr7l8aEwxvlTRqZZL14ofpvqImG+c 9uZi+GnRxncTW7wU5nhOltf43XRt0pFRmr06A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Uzy047/gY1EqQGqYbLI/hhYon801wleqkK8xCwcLyMg=; b=KdhK7Z6TOtUTZEC24qw/jN4fgU8o1kc8vmKTN8Qbff9yZfhf3F34fxgqBuzmj+wnkW n1xns8V2WkZhQoVfHzrQ2A80MJD3OkM+tgCFeq9xoS1RiQ+gtXD84f4t0DKFM0FQYHLx 3el4L3VGgwxovmmn5KYwd4aXEFGb2SnMfX3FERDqpEaUo+65NJR3J10uqYPIH7gSIyzt +i3n8g2+xxuQ7exHhqFWvvNaUngS38mLMyEQ/kPp/7ULPloQcgZ7HbXtW6V3VaOyYJpL dtOy0hLboUHiSnqnLeSQXCmiM0mirOvkRXzvC84yIcBRkjW7h+y8aN/cwp7p9rrHd1q2 kIWA== X-Gm-Message-State: ALQs6tAU63Wb8UWb/0MSitIKMLrpDN6RQFdqX9aQ8Wm8geisp6gQHP/G Ih7vI76SwmdTpgoyI7jmVaFu2G9ay3o= X-Google-Smtp-Source: AIpwx4/Nm+IEVw1WbDnHcp1f6cu+U+b/Dr1R/GFZRcAqKNDAxkni+MIpToCec5qZlp9sLHoYUv8/KA== X-Received: by 10.223.226.66 with SMTP id n2mr1382028wri.228.1523389164168; Tue, 10 Apr 2018 12:39:24 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 10 Apr 2018 20:38:58 +0100 Message-Id: <20180410193919.28026-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180410193919.28026-1-alex.bennee@linaro.org> References: <20180410193919.28026-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::242 Subject: [Qemu-devel] [PATCH v1 03/24] configure: move i386_cc to cross_cc_i386 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , famz@redhat.com, cota@braap.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 We should still be able to use the system cross compiler with the appropriate flags on x86_64 hosts. Signed-off-by: Alex Benn=C3=A9e Tested-by: Philippe Mathieu-Daud=C3=A9 --- configure | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/configure b/configure index b5f3b3fe29..add87ff4d4 100755 --- a/configure +++ b/configure @@ -284,7 +284,6 @@ libs_softmmu=3D"" libs_tools=3D"" audio_pt_int=3D"" audio_win_int=3D"" -cc_i386=3Di386-pc-linux-gnu-gcc libs_qga=3D"" debug_info=3D"yes" stack_protector=3D"" @@ -457,6 +456,8 @@ docker=3D"no" cross_cc_aarch64=3D"aarch64-linux-gnu-gcc" cross_cc_arm=3D"arm-linux-gnueabihf-gcc" cross_cc_powerpc=3D"powerpc-linux-gnu-gcc" +cross_cc_i386=3D"i386-pc-linux-gnu-gcc" +cross_cc_i386_cflags=3D"" =20 enabled_cross_compilers=3D"" =20 @@ -687,12 +688,10 @@ case "$cpu" in i386|i486|i586|i686|i86pc|BePC) cpu=3D"i386" supported_cpu=3D"yes" - cross_cc_i386=3Dgcc ;; x86_64|amd64) cpu=3D"x86_64" supported_cpu=3D"yes" - cross_cc_x86_64=3Dgcc ;; armv*b|armv*l|arm) cpu=3D"arm" @@ -1435,7 +1434,6 @@ case "$cpu" in i386) CPU_CFLAGS=3D"-m32" LDFLAGS=3D"-m32 $LDFLAGS" - cc_i386=3D'$(CC) -m32' ;; x86_64) # ??? Only extremely old AMD cpus do not have cmpxchg16b. @@ -1443,12 +1441,14 @@ case "$cpu" in # runtime and generate the fallback to serial emulation. CPU_CFLAGS=3D"-m64 -mcx16" LDFLAGS=3D"-m64 $LDFLAGS" - cc_i386=3D'$(CC) -m32' + cross_cc_i386=3D$cc + cross_cc_i386_cflags=3D"-m32" ;; x32) CPU_CFLAGS=3D"-mx32" LDFLAGS=3D"-mx32 $LDFLAGS" - cc_i386=3D'$(CC) -m32' + cross_cc_i386=3D$cc + cross_cc_i386_cflags=3D"-m32" ;; # No special flags required for other host CPUs esac @@ -6664,7 +6664,6 @@ echo "CC=3D$cc" >> $config_host_mak if $iasl -h > /dev/null 2>&1; then echo "IASL=3D$iasl" >> $config_host_mak fi -echo "CC_I386=3D$cc_i386" >> $config_host_mak echo "HOST_CC=3D$host_cc" >> $config_host_mak echo "CXX=3D$cxx" >> $config_host_mak echo "OBJCC=3D$objcc" >> $config_host_mak @@ -6783,6 +6782,7 @@ case "$target" in esac =20 target_compiler=3D"" +target_compiler_cflags=3D"" =20 mkdir -p $target_dir echo "# Automatically generated by configure - do not modify" > $config_ta= rget_mak @@ -6799,10 +6799,13 @@ TARGET_ABI_DIR=3D"" case "$target_name" in i386) gdb_xml_files=3D"i386-32bit.xml i386-32bit-core.xml i386-32bit-sse.xml" + target_compiler=3D$cross_cc_i386 + target_compiler_cflags=3D$cross_cc_i386_cflags ;; x86_64) TARGET_BASE_ARCH=3Di386 gdb_xml_files=3D"i386-64bit.xml i386-64bit-core.xml i386-64bit-sse.xml" + target_compiler=3D$cross_cc_x86_64 ;; alpha) mttcg=3D"yes" @@ -6947,7 +6950,7 @@ int main(void) { } EOF =20 - if ! do_compiler $target_compiler -o $TMPE $TMPC -static ; then + if ! do_compiler $target_compiler $target_compiler_cflags -o $TMPE $TM= PC -static ; then target_compiler=3D"" else enabled_cross_compilers=3D"${enabled_cross_compilers} ${target_com= piler}" @@ -7033,6 +7036,10 @@ if test -n "$target_compiler"; then echo "CROSS_CC_GUEST=3D$target_compiler" >> $config_target_mak fi =20 +if test -n "$target_compiler_cflags"; then + echo "CROSS_CC_GUEST_CFLAGS=3D$target_compiler_cflags" >> $config_target= _mak +fi + # generate QEMU_CFLAGS/LDFLAGS for targets =20 cflags=3D"" --=20 2.16.2 From nobody Sun Apr 28 23:24:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523389303312998.655826690148; Tue, 10 Apr 2018 12:41:43 -0700 (PDT) Received: from localhost ([::1]:39694 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5z9C-0001oS-67 for importer@patchew.org; Tue, 10 Apr 2018 15:41:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46521) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5z6z-00005T-OO for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5z6y-0006GW-KD for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:25 -0400 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:44350) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5z6y-0006G0-BM for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:24 -0400 Received: by mail-wr0-x244.google.com with SMTP id u46so13917303wrc.11 for ; Tue, 10 Apr 2018 12:39:24 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id y144sm3081164wmd.47.2018.04.10.12.39.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 12:39:20 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id AE3843E0946; Tue, 10 Apr 2018 20:39:19 +0100 (BST) 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; bh=xgG5Axk5bsmPvhu34Y0a6pe0+Dghf64EuBfnzorJ7Kc=; b=P0ewuyPS8cRH4ZcRKA0H4R+SuLoUXiXKkP7MKKRKIMlhOhptpYr9HCF+rNXhm8gSJH v+CRqJFzJuAo8O/bNYtOB4jpBWREkWT6XVGCRZv9xwU2cmX/g1clmE4jJwu34rJymjOa vu1Ql1EyQ3p9pxfPxCBJHme4ke49S803xc/NE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=xgG5Axk5bsmPvhu34Y0a6pe0+Dghf64EuBfnzorJ7Kc=; b=RPXAXAKUlRAArdDi4HJkCtSyg0jIoGc3lxM+EXFnXwBgN0b5nnOekBaioikI353OKL adP/9l4OyoXyM2SVKa0GQzZ79N+TClKuNLInQmmOj+BU0LjCtR4brMoSS8D/m0SHJ2HQ X1PgV8CqTg+7h7uRsz7OIxhpkOpq408OF3tV2laWS51w+njtfi6AkLLspkL5X6czt5MG qWHl3dFTSVJNrxVC/eHJ+qVRxXTtQ7fu3OL+6RxiY8wTuHv1ugWS91X4orkNamjJnI9D WOR19RUyRO40nDglJxhF4ftCqjNaRYtoaBo/wxC16xvo24wUFiuYEYIj8qbT55VHGCZQ CF4A== X-Gm-Message-State: ALQs6tC5SRULKZrrglTg+6QrFCgNO+Yod/K4/9FrPeLbVlmUAypAGIUJ pUDZZWBw3vQhoBcchZ7xBtr0Mw== X-Google-Smtp-Source: AIpwx48vVU/lBL4UyFf6wUhd0y+ruGAz9xt0imACeMUbuMQneb7QXNisFrFUyv0705u8NWApLYvZiQ== X-Received: by 10.223.170.152 with SMTP id h24mr1224030wrc.193.1523389163234; Tue, 10 Apr 2018 12:39:23 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 10 Apr 2018 20:38:59 +0100 Message-Id: <20180410193919.28026-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180410193919.28026-1-alex.bennee@linaro.org> References: <20180410193919.28026-1-alex.bennee@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::244 Subject: [Qemu-devel] [PATCH v1 04/24] Makefile: Rename TARGET_DIRS to TARGET_LIST X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: famz@redhat.com, cota@braap.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Fam Zheng To be more accurate on its purpose and make code that looks for a certain target out of this variable more readable. Signed-off-by: Fam Zheng Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- Makefile | 20 ++++++++++---------- configure | 2 +- scripts/create_config | 2 +- tests/Makefile.include | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 727ef118f3..2c54cd8345 100644 --- a/Makefile +++ b/Makefile @@ -62,8 +62,8 @@ seems to have been used for an in-tree build. You can fix= this by running \ endif endif =20 -CONFIG_SOFTMMU :=3D $(if $(filter %-softmmu,$(TARGET_DIRS)),y) -CONFIG_USER_ONLY :=3D $(if $(filter %-user,$(TARGET_DIRS)),y) +CONFIG_SOFTMMU :=3D $(if $(filter %-softmmu,$(TARGET_LIST)),y) +CONFIG_USER_ONLY :=3D $(if $(filter %-user,$(TARGET_LIST)),y) CONFIG_XEN :=3D $(CONFIG_XEN_BACKEND) CONFIG_ALL=3Dy -include config-all-devices.mak @@ -362,8 +362,8 @@ DOCS=3D endif =20 SUBDIR_MAKEFLAGS=3D$(if $(V),,--no-print-directory --quiet) BUILD_DIR=3D$(= BUILD_DIR) -SUBDIR_DEVICES_MAK=3D$(patsubst %, %/config-devices.mak, $(TARGET_DIRS)) -SUBDIR_DEVICES_MAK_DEP=3D$(patsubst %, %-config-devices.mak.d, $(TARGET_DI= RS)) +SUBDIR_DEVICES_MAK=3D$(patsubst %, %/config-devices.mak, $(TARGET_LIST)) +SUBDIR_DEVICES_MAK_DEP=3D$(patsubst %, %-config-devices.mak.d, $(TARGET_LI= ST)) =20 ifeq ($(SUBDIR_DEVICES_MAK),) config-all-devices.mak: @@ -466,7 +466,7 @@ config-host.h-timestamp: config-host.mak qemu-options.def: $(SRC_PATH)/qemu-options.hx $(SRC_PATH)/scripts/hxtool $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"GEN","$@= ") =20 -SUBDIR_RULES=3D$(patsubst %,subdir-%, $(TARGET_DIRS)) +SUBDIR_RULES=3D$(patsubst %,subdir-%, $(TARGET_LIST)) SOFTMMU_SUBDIR_RULES=3D$(filter %-softmmu,$(SUBDIR_RULES)) =20 $(SOFTMMU_SUBDIR_RULES): $(block-obj-y) @@ -510,7 +510,7 @@ ROMSUBDIR_RULES=3D$(patsubst %,romsubdir-%, $(ROMS)) romsubdir-%: $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pc-bios/$* V=3D"$(V)"= TARGET_DIR=3D"$*/" CFLAGS=3D"$(filter -O% -g%,$(CFLAGS))",) =20 -ALL_SUBDIRS=3D$(TARGET_DIRS) $(patsubst %,pc-bios/%, $(ROMS)) +ALL_SUBDIRS=3D$(TARGET_LIST) $(patsubst %,pc-bios/%, $(ROMS)) =20 recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES) =20 @@ -763,7 +763,7 @@ distclean: clean rm -f docs/interop/qemu-qmp-ref.pdf docs/interop/qemu-ga-ref.pdf rm -f docs/interop/qemu-qmp-ref.html docs/interop/qemu-ga-ref.html rm -f docs/qemu-block-drivers.7 - for d in $(TARGET_DIRS); do \ + for d in $(TARGET_LIST); do \ rm -rf $$d || exit 1 ; \ done rm -Rf .sdk @@ -864,7 +864,7 @@ endif $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadi= r)/keymaps"; \ done $(INSTALL_DATA) $(BUILD_DIR)/trace-events-all "$(DESTDIR)$(qemu_datadir)/= trace-events-all" - for d in $(TARGET_DIRS); do \ + for d in $(TARGET_LIST); do \ $(MAKE) $(SUBDIR_MAKEFLAGS) TARGET_DIR=3D$$d/ -C $$d $@ || exit 1 ; \ done =20 @@ -1062,9 +1062,9 @@ endif @echo ' ctags/TAGS - Generate tags file for editors' @echo ' cscope - Generate cscope index' @echo '' - @$(if $(TARGET_DIRS), \ + @$(if $(TARGET_LIST), \ echo 'Architecture specific targets:'; \ - $(foreach t, $(TARGET_DIRS), \ + $(foreach t, $(TARGET_LIST), \ printf " %-30s - Build for %s\\n" $(patsubst %,subdir-%,$(t)) $(t);) \ echo '') @echo 'Cleaning targets:' diff --git a/configure b/configure index add87ff4d4..5a41c87cc3 100755 --- a/configure +++ b/configure @@ -6094,7 +6094,7 @@ qemu_version=3D$(head $source_path/VERSION) echo "VERSION=3D$qemu_version" >>$config_host_mak echo "PKGVERSION=3D$pkgversion" >>$config_host_mak echo "SRC_PATH=3D$source_path" >> $config_host_mak -echo "TARGET_DIRS=3D$target_list" >> $config_host_mak +echo "TARGET_LIST=3D$target_list" >> $config_host_mak if [ "$docs" =3D "yes" ] ; then echo "BUILD_DOCS=3Dyes" >> $config_host_mak fi diff --git a/scripts/create_config b/scripts/create_config index d727e5e36e..58948a67a4 100755 --- a/scripts/create_config +++ b/scripts/create_config @@ -107,7 +107,7 @@ case $line in target_name=3D${line#*=3D} echo "#define TARGET_NAME \"$target_name\"" ;; - TARGET_DIRS=3D*) + TARGET_LIST=3D*) # do nothing ;; TARGET_*=3Dy) # configuration diff --git a/tests/Makefile.include b/tests/Makefile.include index 3b9a5e31a2..3d2f0458ab 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -854,7 +854,7 @@ endif =20 # QTest rules =20 -TARGETS=3D$(patsubst %-softmmu,%, $(filter %-softmmu,$(TARGET_DIRS))) +TARGETS=3D$(patsubst %-softmmu,%, $(filter %-softmmu,$(TARGET_LIST))) ifeq ($(CONFIG_POSIX),y) QTEST_TARGETS =3D $(TARGETS) check-qtest-y=3D$(foreach TARGET,$(TARGETS), $(check-qtest-$(TARGET)-y)) --=20 2.16.2 From nobody Sun Apr 28 23:24:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523389486655866.2686909456284; Tue, 10 Apr 2018 12:44:46 -0700 (PDT) Received: from localhost ([::1]:39712 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zC9-0004Q7-Rq for importer@patchew.org; Tue, 10 Apr 2018 15:44:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46575) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5z71-00007A-Kl for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5z70-0006Iz-UZ for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:27 -0400 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:43278) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5z70-0006I4-Nq for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:26 -0400 Received: by mail-wr0-x244.google.com with SMTP id p53so13924591wrc.10 for ; Tue, 10 Apr 2018 12:39:26 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id l73sm5550024wma.10.2018.04.10.12.39.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 12:39:24 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id C03493E0968; Tue, 10 Apr 2018 20:39:19 +0100 (BST) 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; bh=zkZydNp+G2jPgk6EpXCE/NYU6/V5AGVg58PyL26SfZ4=; b=jTcGRh+wf7xsAK+VfPaNZ0SjwBNrjc1EZBwk3PrGXF+cWlcVK9EbT0PBV2x8meYdEA /jfoF5DGyVhuWxfYtuH7aeml7WX9H3QA8IHhQC9sFE8+36tn2+Yu++wnCl+Oo7/Yu5lH y2PNdKZFgWwyA47Dphgnv1V6249fGMirV6gOU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=zkZydNp+G2jPgk6EpXCE/NYU6/V5AGVg58PyL26SfZ4=; b=n8KO9xhIvRmMjT0qS5x4+e6Wj1zLCDmBhCnJ7P67HKMk9gPROj+RkJQcji9Ovh6qwL v2yxBzzng/yoa4/1mna50QtZQh6nT9JKf7ctsW6nmsybCOdO6JFSnwCA0E2tvdruH+5I vifl3pIMDoG5TfikO0KnJTQDpWpWgw16ShEuHq/GU9OXxPw8XOLmpLbPkzzYCZH0lnpl BtmN2Q8vslX2grFXrEkjTDj80Lck3V82hkDRkpbP2YnguljbKQYimoPZPZRzgCBXBnGD Blw3i2rtF7GZuRZ/ZnVxYOJfCdBwjzTw195XXKGEdmkoG7B3a4ESaJsmy57hPQu+dZUb ZMZg== X-Gm-Message-State: ALQs6tBEoBLBaH7tgU4Xh+LU7vEdtXv+4lNSvF0+Hr4NZTspLg0HahPb JyrxZjqVMIbIpLm/7m6XRQEbvA== X-Google-Smtp-Source: AIpwx48V/G1L2qgxvilgHnFyZ0FzFXPhuO1yzoqNq791+Y2EXwe9LOUscu0YzUojBcJoAHW+8AUz9w== X-Received: by 10.223.178.163 with SMTP id g32mr1340384wrd.204.1523389165572; Tue, 10 Apr 2018 12:39:25 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 10 Apr 2018 20:39:00 +0100 Message-Id: <20180410193919.28026-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180410193919.28026-1-alex.bennee@linaro.org> References: <20180410193919.28026-1-alex.bennee@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::244 Subject: [Qemu-devel] [PATCH v1 05/24] docker: Add "cc" subcommand X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , famz@redhat.com, cota@braap.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Fam Zheng Signed-off-by: Fam Zheng Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- tests/docker/docker.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 1246ba9578..8733266153 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -390,6 +390,29 @@ class ImagesCommand(SubCommand): def run(self, args, argv): return Docker().command("images", argv, args.quiet) =20 +class CcCommand(SubCommand): + """Compile sources with cc in images""" + name =3D "cc" + + def args(self, parser): + parser.add_argument("--image", "-i", required=3DTrue, + help=3D"The docker image in which to run cc") + parser.add_argument("--source-path", "-s", nargs=3D"*", dest=3D"pa= ths", + help=3D"""Extra paths to (ro) mount into conta= iner for + reading sources""") + + def run(self, args, argv): + if argv and argv[0] =3D=3D "--": + argv =3D argv[1:] + cwd =3D os.getcwd() + cmd =3D ["--rm", "-w", cwd, + "-v", "%s:%s:rw" % (cwd, cwd)] + for p in args.paths: + cmd +=3D ["-v", "%s:%s:ro,z" % (p, p)] + cmd +=3D [args.image, "cc"] + cmd +=3D argv + return Docker().command("run", cmd, True) + def main(): parser =3D argparse.ArgumentParser(description=3D"A Docker helper", usage=3D"%s ..." % os.path.basename(sys.argv[0])) --=20 2.16.2 From nobody Sun Apr 28 23:24:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523389484164643.7563243564726; Tue, 10 Apr 2018 12:44:44 -0700 (PDT) Received: from localhost ([::1]:39710 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zC2-0004M6-85 for importer@patchew.org; Tue, 10 Apr 2018 15:44:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46589) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5z72-00007z-Cm for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5z71-0006JT-I3 for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:28 -0400 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:41727) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5z71-0006Ip-C3 for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:27 -0400 Received: by mail-wr0-x243.google.com with SMTP id s12so13927716wrc.8 for ; Tue, 10 Apr 2018 12:39:27 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id k28sm5332902wrk.96.2018.04.10.12.39.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 12:39:24 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id D1A993E0971; Tue, 10 Apr 2018 20:39:19 +0100 (BST) 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=g88whosAybvhXVaC8+xtzN1sjWnni1rDs+t1txgPR1g=; b=MShHE+Gb4y7usokzltAYs475Ps+ebsp7Ivw89jeHZi2vzdfcg/qvrj75gCe9fgz6HG bEzO+82KU9zLgz6AVePUeMMUUIiDFOQXpdS6I9l0kcC9LrXC6wYjo6oeUvPrP2Ecwiuj /F95+qaVH087v+NM7ULwtgkYWGZc0MAjdYCAY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=g88whosAybvhXVaC8+xtzN1sjWnni1rDs+t1txgPR1g=; b=AQ3LBC5MM3mWEG47g7sFYRgus5VQXOtTLbbr84aeKELepSIzKEt4jpYI/fCxB6ixaI VjxRLcM6djDgsZKeARA18Y7mKl7BdqERuDDiSD5Gn6A1BfPA7B2+Ex1KVMBe2ZUcFagK Ic6gDkR7/K2VBoe5PwuwABgmCsa7KjwfLE+v4Wou9qquH5MlxRfcwexthAdYpfe7phJF TunqYreazlUL8lU3SJ3hvMurT2tBby6qg1XnhYUTAvDP2CunjYwaqBCDOGV9DHIAYyQD fJ7zgaeNFOwONSkpO3im27pbhd3XGfiPf/RqpDnX9l2tmo1eeMRC/GlnZFtAfngrbFxJ 9Rjg== X-Gm-Message-State: ALQs6tBDw8sTl+Lg1ieNaGEKW+NuX6IUoB0PlNxX3l+frUb9PVPaybl0 S8eYMVMbrAui/a+rLxMUDGRSzA== X-Google-Smtp-Source: AIpwx49ZGMvo9O4TQyZXyaG70J4SFdQKwsXPT0ybgrtZlKPanHgcuN9H3Fk3OYhVfR/nMPzVvb/44g== X-Received: by 10.223.196.141 with SMTP id m13mr1262741wrf.173.1523389166235; Tue, 10 Apr 2018 12:39:26 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 10 Apr 2018 20:39:01 +0100 Message-Id: <20180410193919.28026-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180410193919.28026-1-alex.bennee@linaro.org> References: <20180410193919.28026-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::243 Subject: [Qemu-devel] [PATCH v1 06/24] docker: extend "cc" command to accept compiler X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , famz@redhat.com, cota@braap.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 When calling our cross-compilation images we want to call something other than the default cc. Signed-off-by: Alex Benn=C3=A9e --- tests/docker/docker.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 8733266153..9444f4bea4 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -397,6 +397,8 @@ class CcCommand(SubCommand): def args(self, parser): parser.add_argument("--image", "-i", required=3DTrue, help=3D"The docker image in which to run cc") + parser.add_argument("--cc", + help=3D"The compiler executable to call") parser.add_argument("--source-path", "-s", nargs=3D"*", dest=3D"pa= ths", help=3D"""Extra paths to (ro) mount into conta= iner for reading sources""") @@ -407,9 +409,19 @@ class CcCommand(SubCommand): cwd =3D os.getcwd() cmd =3D ["--rm", "-w", cwd, "-v", "%s:%s:rw" % (cwd, cwd)] - for p in args.paths: - cmd +=3D ["-v", "%s:%s:ro,z" % (p, p)] - cmd +=3D [args.image, "cc"] + + if args.paths: + for p in args.paths: + cmd +=3D ["-v", "%s:%s:ro,z" % (p, p)] + + cmd +=3D [args.image] + + # The compile command we are running + if args.cc: + cmd +=3D [args.cc] + else: + cmd +=3D ["cc"] + cmd +=3D argv return Docker().command("run", cmd, True) =20 --=20 2.16.2 From nobody Sun Apr 28 23:24:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523389687552213.61452964772673; Tue, 10 Apr 2018 12:48:07 -0700 (PDT) Received: from localhost ([::1]:39822 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zFM-0007LP-J3 for importer@patchew.org; Tue, 10 Apr 2018 15:48:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5z73-00009g-An for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5z72-0006K9-Cr for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:29 -0400 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:36344) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5z72-0006JY-5Y for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:28 -0400 Received: by mail-wr0-x243.google.com with SMTP id y55so13941448wry.3 for ; Tue, 10 Apr 2018 12:39:28 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id n49sm5619919wrn.50.2018.04.10.12.39.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 12:39:24 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id E33233E0980; Tue, 10 Apr 2018 20:39:19 +0100 (BST) 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=Iw14EL8gDRYNwQzOxg4iHZWWM4zbBhJGAZoJ6ohcpmA=; b=UGkxSl452DI+qQaH7RacXkm4cqA1i0f03x2/CxTevj6u4igE3npW6QTP+oS+d82BIv vYfAFb/7x5oTykBzIuOGStVUp5QbwnWXFsJiIgdU8adj9oBF66ezoLseCqIUS9PPLNrV U88PqXEakBigNud7x9MgEfRmuksjHgnDUAWos= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Iw14EL8gDRYNwQzOxg4iHZWWM4zbBhJGAZoJ6ohcpmA=; b=IcEMl5bDFii1klNWSGhazezxcEevDOghBkKgJKmDc02FwDYsp9W7WBoRGMkZO9dBid rVrtlKxfq1Wx7a9p2d3EXjUL2auUeNsCiY33NHd2osDbtLsRAPOu3lWwEN8dCsdMa1sI nbsdcwELsGY6DhwtrLUfbF+NYb+LMA0Bw6lLoT6D2a0Bq/blkbIdbNJGPApCVnEXu4If DgIFv5he7dZXCdAm+boeBpVEBiohDf2JOwf8sg6mk5tT8Y+nWyR0ZTuwHsBWhHv6w3Nh vjmG830QBTfL73LcavmYqGh6t+ZOLe8BzNnG7oA4rvm+KT0FHOShbFzeGhNo2Ush2vQ6 RqPA== X-Gm-Message-State: ALQs6tBJgpLN9ZSveoik0iA3ZLWyfftVf6SnzVaDtKBNOsKU+DfpMqap phaZFB6BCOeQf2yB4NYFVIVk9w== X-Google-Smtp-Source: AIpwx4/WZst1MhFOYSEnhuoO6PUKPUQZnWmUqhVhUTQzXtvLx4NUev+kxY4pPzXYR/wuzZ73n1YqVw== X-Received: by 10.223.224.141 with SMTP id c13mr1370645wri.88.1523389167089; Tue, 10 Apr 2018 12:39:27 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 10 Apr 2018 20:39:02 +0100 Message-Id: <20180410193919.28026-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180410193919.28026-1-alex.bennee@linaro.org> References: <20180410193919.28026-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::243 Subject: [Qemu-devel] [PATCH v1 07/24] docker: allow "cc" command to run in user context X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , famz@redhat.com, cota@braap.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Fam Zheng Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- tests/docker/docker.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 9444f4bea4..f79213044d 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -399,6 +399,8 @@ class CcCommand(SubCommand): help=3D"The docker image in which to run cc") parser.add_argument("--cc", help=3D"The compiler executable to call") + parser.add_argument("--user", + help=3D"The user-id to run under") parser.add_argument("--source-path", "-s", nargs=3D"*", dest=3D"pa= ths", help=3D"""Extra paths to (ro) mount into conta= iner for reading sources""") @@ -414,6 +416,9 @@ class CcCommand(SubCommand): for p in args.paths: cmd +=3D ["-v", "%s:%s:ro,z" % (p, p)] =20 + if args.user: + cmd +=3D ["-u", args.user] + cmd +=3D [args.image] =20 # The compile command we are running --=20 2.16.2 From nobody Sun Apr 28 23:24:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523389692771573.0574973390355; Tue, 10 Apr 2018 12:48:12 -0700 (PDT) Received: from localhost ([::1]:39823 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zFQ-0007OM-I2 for importer@patchew.org; Tue, 10 Apr 2018 15:48:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46635) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5z74-0000Ao-CP for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5z73-0006L4-Cc for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:30 -0400 Received: from mail-wr0-x229.google.com ([2a00:1450:400c:c0c::229]:33787) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5z73-0006KR-6X for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:29 -0400 Received: by mail-wr0-x229.google.com with SMTP id z73so13954336wrb.0 for ; Tue, 10 Apr 2018 12:39:29 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id i141sm3671585wmd.6.2018.04.10.12.39.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 12:39:24 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 0114E3E0990; Tue, 10 Apr 2018 20:39:20 +0100 (BST) 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=NLNNcA1X2opHP8Wsqfkpu7l6GYpfICjh2uBBfBRh/ec=; b=gFS7f2LtT1gLzzCPU00EjGDNlQzb8CQm85aT3LvCsTxpy4TXvTyUx7bhlKDivhWljn vsHmO301nO8YtwiV/F+YS+jiUd4jX8h/K3ExQnmniEGtrGI+5Bek3oQPVREoyZ76WNck HaVotWJpENVDu9OwqprjHTg+rwXftZR3fQofU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NLNNcA1X2opHP8Wsqfkpu7l6GYpfICjh2uBBfBRh/ec=; b=IcV6EK09CDPPtmRZXsk6ORtRjIzPeRBDVkFebFBJYPyfIaDn+8F9Ann1zB1kPvmtIz /e/TG7BRv8YW2ITkel2GqgrFBAKnxjbagpNi/aw3HsCaNcaS+ADoiBNi5HqX0oEox0er kurYj28f0l9ulo31tR9MM1PQZNW0uvMzMNhIu6OnGIVixd2ciHxcqJMcvOlWQZQEO6G0 woGw/uuPunJLfZ3qBXbGIjNa7eq+y8xT/X7FDcX2UukXOgOUOuqNnpDCB6tSI35NfGbT fRUUq9GoX0G/G9bXWAGHT+Nx2wumPMhsn3SeJszX2Z6b8Z/fGrsXTNpj7S501yA4S5G6 UIfw== X-Gm-Message-State: ALQs6tBXQ+HldPqN+So0Qokc+zK2pY3mfD/egQh9F7SbpaWFd5EJJDMM Q4+HXxS3oJlBDw8pHiPy7dVYdg== X-Google-Smtp-Source: AIpwx486JZ9tsQre/BbQJ1ZP8fn9mhpVHFbWufIScly6dnpW2VaeCqwM5UX+gaIFrCJWnWD9axikeg== X-Received: by 10.223.142.164 with SMTP id q33mr1268555wrb.72.1523389168057; Tue, 10 Apr 2018 12:39:28 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 10 Apr 2018 20:39:03 +0100 Message-Id: <20180410193919.28026-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180410193919.28026-1-alex.bennee@linaro.org> References: <20180410193919.28026-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::229 Subject: [Qemu-devel] [PATCH v1 08/24] docker: Makefile.include introduce DOCKER_SCRIPT X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , famz@redhat.com, cota@braap.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Define this in one place to make it easy to re-use. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- tests/docker/Makefile.include | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index de87341528..6a5aa9ec71 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -14,6 +14,8 @@ DOCKER_TESTS :=3D $(notdir $(shell \ =20 DOCKER_TOOLS :=3D travis =20 +DOCKER_SCRIPT=3D$(SRC_PATH)/tests/docker/docker.py + TESTS ?=3D % IMAGES ?=3D % =20 @@ -37,7 +39,7 @@ docker-image-%: $(DOCKER_FILES_DIR)/%.docker echo WARNING: EXECUTABLE is not set, debootstrap may fail. 2>&1 ; \ fi $(call quiet-command,\ - $(SRC_PATH)/tests/docker/docker.py build qemu:$* $< \ + $(DOCKER_SCRIPT) build qemu:$* $< \ $(if $V,,--quiet) $(if $(NOCACHE),--no-cache) \ $(if $(NOUSER),,--add-current-user) \ $(if $(EXTRA_FILES),--extra-files $(EXTRA_FILES))\ @@ -129,11 +131,11 @@ docker-run: docker-qemu-src fi $(if $(EXECUTABLE), \ $(call quiet-command, \ - $(SRC_PATH)/tests/docker/docker.py update \ + $(DOCKER_SCRIPT) update \ $(IMAGE) $(EXECUTABLE), \ " COPYING $(EXECUTABLE) to $(IMAGE)")) $(call quiet-command, \ - $(SRC_PATH)/tests/docker/docker.py run \ + $(DOCKER_SCRIPT) run \ $(if $(NOUSER),,-u $(shell id -u)) \ --security-opt seccomp=3Dunconfined \ $(if $V,,--rm) \ @@ -163,4 +165,4 @@ docker-run-%: @$(MAKE) docker-run TEST=3D$(CMD) IMAGE=3Dqemu:$(IMAGE) =20 docker-clean: - $(call quiet-command, $(SRC_PATH)/tests/docker/docker.py clean) + $(call quiet-command, $(DOCKER_SCRIPT) clean) --=20 2.16.2 From nobody Sun Apr 28 23:24:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523390069950672.9118378151505; Tue, 10 Apr 2018 12:54:29 -0700 (PDT) Received: from localhost ([::1]:40112 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zLY-00057T-Qy for importer@patchew.org; Tue, 10 Apr 2018 15:54:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46723) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5z79-0000Hi-4O for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5z75-0006NA-UG for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:35 -0400 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:40626) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5z75-0006Ma-KV for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:31 -0400 Received: by mail-wm0-x241.google.com with SMTP id x4so25391391wmh.5 for ; Tue, 10 Apr 2018 12:39:31 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id l131sm3592186wmb.36.2018.04.10.12.39.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 12:39:24 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 15C5E3E0AA7; Tue, 10 Apr 2018 20:39:20 +0100 (BST) 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=s9gEv9FVl/7gojclkswpfoyj8kCb7eaxCe7a7yfDICE=; b=iTKr0eEJttQVJolVXp5Mn+aAr42In7OtfiVWY9aiNfXbgZ7xv1t/iYaE8UyTT4bVls YayYKNNoW7l68bxHC3gcK/OkBxhm/7krc0qTF+bAw+rBPPWGQ1ahqi/rYC4pHQrbtW8f FttEyY8np2JrSNsmvK9IxZHeQDk1kOalQSohU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=s9gEv9FVl/7gojclkswpfoyj8kCb7eaxCe7a7yfDICE=; b=iYKP9jH4UJVcUdZzrxoLX3cGdEU4L7+/zc9nlzbF29nitUPkj2fEFb7FxNPpFlSI8Q dKny/HtKJqeDUMN4m9ujKYSRQ8E4ioVl1IKRf6t5/TgTIokW9uXTIij7IcIJWgIInGYg cfZvbgxCoKAVdmK+Q0uj/KQVEnh5D2NwI8EX7+hxWVagVOPLZwzkKW76RHULivwpys3V ev3LTRSSQEMTdw70gY80Q3sCrESCaTNakO/uzL2QgEUp4BgHG4hYYZB9gOdXUerkPiEx /RlKOqOSTBOVYeVXTEW2HJjk/FJmvDo04vRFJh89y9Xq0mCvwGWco2F1Dv+3suo/EwoB jIiA== X-Gm-Message-State: ALQs6tBjbDRnyMZjQjJqrgfkWfvfSOv2LDs3FzM71nTgi+KQNnXYIdMz T/c1ZitfygSZjy1KeK8iTckuCQ== X-Google-Smtp-Source: AIpwx48eq6CnwWQCcTjBw7dgkD+hLURmezazrxjB3BkgJgImoY5t2hs+JS359BdZcinvN6P5i2NCcw== X-Received: by 10.28.91.203 with SMTP id p194mr588296wmb.52.1523389170382; Tue, 10 Apr 2018 12:39:30 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 10 Apr 2018 20:39:04 +0100 Message-Id: <20180410193919.28026-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180410193919.28026-1-alex.bennee@linaro.org> References: <20180410193919.28026-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::241 Subject: [Qemu-devel] [PATCH v1 09/24] tests/tcg: move architecture independent tests into subdir X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , famz@redhat.com, cota@braap.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 We will want to build these for all supported guest architectures so lets move them all into one place. We also drop test_path at this point because it needs qemu utils and glib bits which is hard to support for cross compiling. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Thomas Huth --- tests/tcg/README | 10 +-- tests/tcg/multiarch/README | 1 + tests/tcg/{ =3D> multiarch}/linux-test.c | 0 tests/tcg/{ =3D> multiarch}/sha1.c | 0 tests/tcg/{ =3D> multiarch}/test-mmap.c | 0 tests/tcg/{ =3D> multiarch}/testthread.c | 0 tests/tcg/test_path.c | 157 -----------------------------= ---- 7 files changed, 5 insertions(+), 163 deletions(-) create mode 100644 tests/tcg/multiarch/README rename tests/tcg/{ =3D> multiarch}/linux-test.c (100%) rename tests/tcg/{ =3D> multiarch}/sha1.c (100%) rename tests/tcg/{ =3D> multiarch}/test-mmap.c (100%) rename tests/tcg/{ =3D> multiarch}/testthread.c (100%) delete mode 100644 tests/tcg/test_path.c diff --git a/tests/tcg/README b/tests/tcg/README index 5dcfb4852b..0890044cf0 100644 --- a/tests/tcg/README +++ b/tests/tcg/README @@ -1,9 +1,7 @@ -This directory contains various interesting programs for -regression testing. - -The target "make test" runs the programs and, if applicable, -runs "diff" to detect mismatches between output on the host and -output on QEMU. +This directory contains various interesting guest programs for +regression testing. Tests are either multi-arch, meaning they can be +built for all guest architectures that support linux-user executable, +or they are architecture specific. =20 i386 =3D=3D=3D=3D diff --git a/tests/tcg/multiarch/README b/tests/tcg/multiarch/README new file mode 100644 index 0000000000..522c9d2ea3 --- /dev/null +++ b/tests/tcg/multiarch/README @@ -0,0 +1 @@ +Multi-architecture linux-user tests diff --git a/tests/tcg/linux-test.c b/tests/tcg/multiarch/linux-test.c similarity index 100% rename from tests/tcg/linux-test.c rename to tests/tcg/multiarch/linux-test.c diff --git a/tests/tcg/sha1.c b/tests/tcg/multiarch/sha1.c similarity index 100% rename from tests/tcg/sha1.c rename to tests/tcg/multiarch/sha1.c diff --git a/tests/tcg/test-mmap.c b/tests/tcg/multiarch/test-mmap.c similarity index 100% rename from tests/tcg/test-mmap.c rename to tests/tcg/multiarch/test-mmap.c diff --git a/tests/tcg/testthread.c b/tests/tcg/multiarch/testthread.c similarity index 100% rename from tests/tcg/testthread.c rename to tests/tcg/multiarch/testthread.c diff --git a/tests/tcg/test_path.c b/tests/tcg/test_path.c deleted file mode 100644 index 1c29bce263..0000000000 --- a/tests/tcg/test_path.c +++ /dev/null @@ -1,157 +0,0 @@ -/* Test path override code */ -#include "config-host.h" -#include "util/cutils.c" -#include "util/hexdump.c" -#include "util/iov.c" -#include "util/path.c" -#include "util/qemu-timer-common.c" -#include -#include -#include - -void qemu_log(const char *fmt, ...); - -/* Any log message kills the test. */ -void qemu_log(const char *fmt, ...) -{ - va_list ap; - - fprintf(stderr, "FATAL: "); - va_start(ap, fmt); - vfprintf(stderr, fmt, ap); - va_end(ap); - exit(1); -} - -#define NO_CHANGE(_path) \ - do { \ - if (strcmp(path(_path), _path) !=3D 0) return __LINE__; \ - } while(0) - -#define CHANGE_TO(_path, _newpath) \ - do { \ - if (strcmp(path(_path), _newpath) !=3D 0) return __LINE__; \ - } while(0) - -static void cleanup(void) -{ - unlink("/tmp/qemu-test_path/DIR1/DIR2/FILE"); - unlink("/tmp/qemu-test_path/DIR1/DIR2/FILE2"); - unlink("/tmp/qemu-test_path/DIR1/DIR2/FILE3"); - unlink("/tmp/qemu-test_path/DIR1/DIR2/FILE4"); - unlink("/tmp/qemu-test_path/DIR1/DIR2/FILE5"); - rmdir("/tmp/qemu-test_path/DIR1/DIR2"); - rmdir("/tmp/qemu-test_path/DIR1/DIR3"); - rmdir("/tmp/qemu-test_path/DIR1"); - rmdir("/tmp/qemu-test_path"); -} - -static unsigned int do_test(void) -{ - if (mkdir("/tmp/qemu-test_path", 0700) !=3D 0) - return __LINE__; - - if (mkdir("/tmp/qemu-test_path/DIR1", 0700) !=3D 0) - return __LINE__; - - if (mkdir("/tmp/qemu-test_path/DIR1/DIR2", 0700) !=3D 0) - return __LINE__; - - if (mkdir("/tmp/qemu-test_path/DIR1/DIR3", 0700) !=3D 0) - return __LINE__; - - if (close(creat("/tmp/qemu-test_path/DIR1/DIR2/FILE", 0600)) !=3D 0) - return __LINE__; - - if (close(creat("/tmp/qemu-test_path/DIR1/DIR2/FILE2", 0600)) !=3D 0) - return __LINE__; - - if (close(creat("/tmp/qemu-test_path/DIR1/DIR2/FILE3", 0600)) !=3D 0) - return __LINE__; - - if (close(creat("/tmp/qemu-test_path/DIR1/DIR2/FILE4", 0600)) !=3D 0) - return __LINE__; - - if (close(creat("/tmp/qemu-test_path/DIR1/DIR2/FILE5", 0600)) !=3D 0) - return __LINE__; - - init_paths("/tmp/qemu-test_path"); - - NO_CHANGE("/tmp"); - NO_CHANGE("/tmp/"); - NO_CHANGE("/tmp/qemu-test_path"); - NO_CHANGE("/tmp/qemu-test_path/"); - NO_CHANGE("/tmp/qemu-test_path/D"); - NO_CHANGE("/tmp/qemu-test_path/DI"); - NO_CHANGE("/tmp/qemu-test_path/DIR"); - NO_CHANGE("/tmp/qemu-test_path/DIR1"); - NO_CHANGE("/tmp/qemu-test_path/DIR1/"); - - NO_CHANGE("/D"); - NO_CHANGE("/DI"); - NO_CHANGE("/DIR"); - NO_CHANGE("/DIR2"); - NO_CHANGE("/DIR1."); - - CHANGE_TO("/DIR1", "/tmp/qemu-test_path/DIR1"); - CHANGE_TO("/DIR1/", "/tmp/qemu-test_path/DIR1"); - - NO_CHANGE("/DIR1/D"); - NO_CHANGE("/DIR1/DI"); - NO_CHANGE("/DIR1/DIR"); - NO_CHANGE("/DIR1/DIR1"); - - CHANGE_TO("/DIR1/DIR2", "/tmp/qemu-test_path/DIR1/DIR2"); - CHANGE_TO("/DIR1/DIR2/", "/tmp/qemu-test_path/DIR1/DIR2"); - - CHANGE_TO("/DIR1/DIR3", "/tmp/qemu-test_path/DIR1/DIR3"); - CHANGE_TO("/DIR1/DIR3/", "/tmp/qemu-test_path/DIR1/DIR3"); - - NO_CHANGE("/DIR1/DIR2/F"); - NO_CHANGE("/DIR1/DIR2/FI"); - NO_CHANGE("/DIR1/DIR2/FIL"); - NO_CHANGE("/DIR1/DIR2/FIL."); - - CHANGE_TO("/DIR1/DIR2/FILE", "/tmp/qemu-test_path/DIR1/DIR2/FILE"); - CHANGE_TO("/DIR1/DIR2/FILE2", "/tmp/qemu-test_path/DIR1/DIR2/FILE2"); - CHANGE_TO("/DIR1/DIR2/FILE3", "/tmp/qemu-test_path/DIR1/DIR2/FILE3"); - CHANGE_TO("/DIR1/DIR2/FILE4", "/tmp/qemu-test_path/DIR1/DIR2/FILE4"); - CHANGE_TO("/DIR1/DIR2/FILE5", "/tmp/qemu-test_path/DIR1/DIR2/FILE5"); - - NO_CHANGE("/DIR1/DIR2/FILE6"); - NO_CHANGE("/DIR1/DIR2/FILE/X"); - - CHANGE_TO("/DIR1/../DIR1", "/tmp/qemu-test_path/DIR1"); - CHANGE_TO("/DIR1/../DIR1/", "/tmp/qemu-test_path/DIR1"); - CHANGE_TO("/../DIR1", "/tmp/qemu-test_path/DIR1"); - CHANGE_TO("/../DIR1/", "/tmp/qemu-test_path/DIR1"); - CHANGE_TO("/DIR1/DIR2/../DIR2", "/tmp/qemu-test_path/DIR1/DIR2"); - CHANGE_TO("/DIR1/DIR2/../DIR2/../../DIR1/DIR2/FILE", "/tmp/qemu-test_p= ath/DIR1/DIR2/FILE"); - CHANGE_TO("/DIR1/DIR2/../DIR2/FILE", "/tmp/qemu-test_path/DIR1/DIR2/FI= LE"); - - NO_CHANGE("/DIR1/DIR2/../DIR1"); - NO_CHANGE("/DIR1/DIR2/../FILE"); - - CHANGE_TO("/./DIR1/DIR2/FILE", "/tmp/qemu-test_path/DIR1/DIR2/FILE"); - CHANGE_TO("/././DIR1/DIR2/FILE", "/tmp/qemu-test_path/DIR1/DIR2/FILE"); - CHANGE_TO("/DIR1/./DIR2/FILE", "/tmp/qemu-test_path/DIR1/DIR2/FILE"); - CHANGE_TO("/DIR1/././DIR2/FILE", "/tmp/qemu-test_path/DIR1/DIR2/FILE"); - CHANGE_TO("/DIR1/DIR2/./FILE", "/tmp/qemu-test_path/DIR1/DIR2/FILE"); - CHANGE_TO("/DIR1/DIR2/././FILE", "/tmp/qemu-test_path/DIR1/DIR2/FILE"); - CHANGE_TO("/./DIR1/./DIR2/./FILE", "/tmp/qemu-test_path/DIR1/DIR2/FILE= "); - - return 0; -} - -int main(int argc, char *argv[]) -{ - int ret; - - ret =3D do_test(); - cleanup(); - if (ret) { - fprintf(stderr, "test_path: failed on line %i\n", ret); - return 1; - } - return 0; -} --=20 2.16.2 From nobody Sun Apr 28 23:24:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523389897721140.29175620254694; Tue, 10 Apr 2018 12:51:37 -0700 (PDT) Received: from localhost ([::1]:39845 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zIm-00020v-So for importer@patchew.org; Tue, 10 Apr 2018 15:51:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5z79-0000Hc-47 for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5z76-0006NT-J1 for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:35 -0400 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:33660) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5z76-0006My-8R for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:32 -0400 Received: by mail-wr0-x241.google.com with SMTP id z73so13954459wrb.0 for ; Tue, 10 Apr 2018 12:39:32 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id d7sm1793085wrj.26.2018.04.10.12.39.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 12:39:24 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 271013E0AAE; Tue, 10 Apr 2018 20:39:20 +0100 (BST) 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=LxEi/2ysyPLekxD6Wk6CRble46QmAhFUVAEWvv6GZiE=; b=L3b9dlsRYmIoWDdqNRKEVcfcLiXMSyw4rEcYQdXFl4ljGGv8BTYx5tdoqUW3p1/Q9L l607/gS5akuI4X+yxZ9IywJG/qhs9nNqJeZsr4TGP1yvUfxjHIbBrx1JPq1uI+AoWJSP AqQCrggOlF7+6ZntMxht8nxrePgM5gh02zYMQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LxEi/2ysyPLekxD6Wk6CRble46QmAhFUVAEWvv6GZiE=; b=Zzx5fsbsLm+RRobdn9l5IyOnJbJiMmod9HBqhGdlSDUlnmYe3/7FG+o5SVf8ZL+RVz gUmHAFOqCv1eKojQ6g2TS7daNYUwDphpW91sgWjyjiraPBpld1G1fUymWi8sLSyJ6eHF vEI6BwKD3b1dMu2mqyZy9NIY9DYicReusPaSXLigehy8z0dqJef1ZNQZ6wHbYRtjyKF9 k1+B3PUH9eKYsXzkX5oRpfJoTZxk6YmRwtng0Oz1VUhjtJqEdl/ZJ9AXbWwKa1TVoK6J c+k23FMI4pf5giQ5Ryu7SEkZGVIk3k7v95jZUNKU0hkT8zsmCC0cCP+mgpRObsC/5e+B 9VtQ== X-Gm-Message-State: ALQs6tBesJszDzuK+dBcH1xbwx/RoPcA6uXGcOVzb8NE20ZIZyj+KSZY OBJX3gOmVFlC+1mOTwRJU8jRVg== X-Google-Smtp-Source: AIpwx4+OKqcLKDX8Gs4FTs/GMxeYAq2rTfvE6W5jSfmMreekOME6+Fj6Bztn4dOAALV/NGzgqkzllQ== X-Received: by 10.223.184.109 with SMTP id u42mr1229108wrf.3.1523389171126; Tue, 10 Apr 2018 12:39:31 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 10 Apr 2018 20:39:05 +0100 Message-Id: <20180410193919.28026-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180410193919.28026-1-alex.bennee@linaro.org> References: <20180410193919.28026-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::241 Subject: [Qemu-devel] [PATCH v1 10/24] tests/tcg/multiarch: Build fix for linux-test X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , famz@redhat.com, cota@braap.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 From: Fam Zheng To keep the compiler happy, and to fit in our buildsys flags: - Make local functions "static" - #ifdef out unused functions - drop cutils/osdep dependencies Signed-off-by: Fam Zheng [AJB: drop cutils/osdep dependencies] Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Thomas Huth --- tests/tcg/multiarch/linux-test.c | 68 +++++++++++++-----------------------= ---- 1 file changed, 21 insertions(+), 47 deletions(-) diff --git a/tests/tcg/multiarch/linux-test.c b/tests/tcg/multiarch/linux-t= est.c index 5070d31446..4457bd04ba 100644 --- a/tests/tcg/multiarch/linux-test.c +++ b/tests/tcg/multiarch/linux-test.c @@ -16,7 +16,6 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ -#define _GNU_SOURCE #include #include #include @@ -31,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -39,13 +39,12 @@ #include #include #include -#include "qemu/cutils.h" =20 #define TESTPATH "/tmp/linux-test.tmp" #define TESTPORT 7654 #define STACK_SIZE 16384 =20 -void error1(const char *filename, int line, const char *fmt, ...) +static void error1(const char *filename, int line, const char *fmt, ...) { va_list ap; va_start(ap, fmt); @@ -56,7 +55,7 @@ void error1(const char *filename, int line, const char *f= mt, ...) exit(1); } =20 -int __chk_error(const char *filename, int line, int ret) +static int __chk_error(const char *filename, int line, int ret) { if (ret < 0) { error1(filename, line, "%m (ret=3D%d, errno=3D%d)", @@ -73,7 +72,7 @@ int __chk_error(const char *filename, int line, int ret) =20 #define FILE_BUF_SIZE 300 =20 -void test_file(void) +static void test_file(void) { int fd, i, len, ret; uint8_t buf[FILE_BUF_SIZE]; @@ -210,7 +209,7 @@ void test_file(void) chk_error(rmdir(TESTPATH)); } =20 -void test_fork(void) +static void test_fork(void) { int pid, status; =20 @@ -224,7 +223,7 @@ void test_fork(void) error("waitpid status=3D0x%x", status); } =20 -void test_time(void) +static void test_time(void) { struct timeval tv, tv2; struct timespec ts, rem; @@ -251,34 +250,7 @@ void test_time(void) error("getrusage"); } =20 -void pstrcpy(char *buf, int buf_size, const char *str) -{ - int c; - char *q =3D buf; - - if (buf_size <=3D 0) - return; - - for(;;) { - c =3D *str++; - if (c =3D=3D 0 || q >=3D buf + buf_size - 1) - break; - *q++ =3D c; - } - *q =3D '\0'; -} - -/* strcat and truncate. */ -char *pstrcat(char *buf, int buf_size, const char *s) -{ - int len; - len =3D strlen(buf); - if (len < buf_size) - pstrcpy(buf + len, buf_size - len, s); - return buf; -} - -int server_socket(void) +static int server_socket(void) { int val, fd; struct sockaddr_in sockaddr; @@ -298,7 +270,7 @@ int server_socket(void) =20 } =20 -int client_socket(void) +static int client_socket(void) { int fd; struct sockaddr_in sockaddr; @@ -312,9 +284,9 @@ int client_socket(void) return fd; } =20 -const char socket_msg[] =3D "hello socket\n"; +static const char socket_msg[] =3D "hello socket\n"; =20 -void test_socket(void) +static void test_socket(void) { int server_fd, client_fd, fd, pid, ret, val; struct sockaddr_in sockaddr; @@ -348,9 +320,10 @@ void test_socket(void) chk_error(close(server_fd)); } =20 +#if 0 #define WCOUNT_MAX 512 =20 -void test_pipe(void) +static void test_pipe(void) { fd_set rfds, wfds; int fds[2], fd_max, ret; @@ -391,10 +364,10 @@ void test_pipe(void) chk_error(close(fds[1])); } =20 -int thread1_res; -int thread2_res; +static int thread1_res; +static int thread2_res; =20 -int thread1_func(void *arg) +static int thread1_func(void *arg) { int i; for(i=3D0;i<5;i++) { @@ -404,7 +377,7 @@ int thread1_func(void *arg) return 0; } =20 -int thread2_func(void *arg) +static int thread2_func(void *arg) { int i; for(i=3D0;i<6;i++) { @@ -435,27 +408,28 @@ void test_clone(void) thread2_res !=3D 6) error("clone"); } +#endif =20 /***********************************/ =20 volatile int alarm_count; jmp_buf jmp_env; =20 -void sig_alarm(int sig) +static void sig_alarm(int sig) { if (sig !=3D SIGALRM) error("signal"); alarm_count++; } =20 -void sig_segv(int sig, siginfo_t *info, void *puc) +static void sig_segv(int sig, siginfo_t *info, void *puc) { if (sig !=3D SIGSEGV) error("signal"); longjmp(jmp_env, 1); } =20 -void test_signal(void) +static void test_signal(void) { struct sigaction act; struct itimerval it, oit; @@ -510,7 +484,7 @@ void test_signal(void) =20 #define SHM_SIZE 32768 =20 -void test_shm(void) +static void test_shm(void) { void *ptr; int shmid; --=20 2.16.2 From nobody Sun Apr 28 23:24:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523390532896658.6239057975474; Tue, 10 Apr 2018 13:02:12 -0700 (PDT) Received: from localhost ([::1]:40957 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zSx-00047Q-BB for importer@patchew.org; Tue, 10 Apr 2018 16:02:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49660) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zC3-0004vS-L1 for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:44:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5zC1-00018m-Hq for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:44:39 -0400 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:44388) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5zC1-00017y-8i for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:44:37 -0400 Received: by mail-wr0-x243.google.com with SMTP id u46so13930215wrc.11 for ; Tue, 10 Apr 2018 12:44:37 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id 62sm86457wrg.34.2018.04.10.12.44.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 12:44:34 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 3A9593E0AC0; Tue, 10 Apr 2018 20:39:20 +0100 (BST) 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=7cndRg+euAJH3QhGxw3iBfQzpu/OF942itBH0XYVrh0=; b=DOFqQS4m2qemkKba520b0Qwc0twY5PMEvfKKBEWnKlk+6wjXURQ5KYrCSXiNRvGYRW 288UMIl6jF8Gt8Fg18ntzrNKFZj6msrDwwEZcbk72D7/urDqWac/5tm/CJUAbLwTEVri uH33i/cW937t3VYTXPDjLGdKCztRDDi+3uVcE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7cndRg+euAJH3QhGxw3iBfQzpu/OF942itBH0XYVrh0=; b=OFHJ6RFHBV7tyPn/SX56qyKcPINjhiu45T/ES1cV0riYq0nJw4i2Zn/5FMCfh1Fz/T j26qtaDFq12Kgh4eJetSJAedyeKLMDOVWOFO1nglGKUOmhh3Ux0oHxqlEPZG6+4vpEMr r7O2vkPYSYY7hwbQe7QZ6oVm64XmZCdGn/98K3WzGSGNrureBDgZ3RJvgERwqfbfQaqJ KOGLzQ03pXth2qxDRASZOBM5SqcvJK+DhMAyo7nCoPxqVdzMv6v8MysxzjoKcFxakNOQ qXIFICmDt7yXBCOPlOjxlA6klmDiuMxCo152B3NGg7RR3lfUd8kCd2zsblKEddn2vSta XvKg== X-Gm-Message-State: ALQs6tBM/fZiyWEjHKC+vCff0bLjDIsGfg3JpUeuV4z7r0vPVtBFMxoo aLNR4K5Rhne+h8gUXYVrRzyT8w== X-Google-Smtp-Source: AIpwx482RjbU7eZJDH3gqlTe5tKkuV5HfLV3430Q51yY5wtovcBaZIjZfBedjXAz/AV58Z1kFc+qpw== X-Received: by 10.223.142.164 with SMTP id q33mr1276926wrb.72.1523389476081; Tue, 10 Apr 2018 12:44:36 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 10 Apr 2018 20:39:06 +0100 Message-Id: <20180410193919.28026-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180410193919.28026-1-alex.bennee@linaro.org> References: <20180410193919.28026-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::243 Subject: [Qemu-devel] [PATCH v1 11/24] tests/tcg: move i386 specific tests into subdir X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , famz@redhat.com, cota@braap.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 These only need to be built for i386 guests. This includes a stub tests/tcg/i386/Makfile.target which absorbs some of what was in tests/tcg/Makefile. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth Tested-by: Philippe Mathieu-Daud=C3=A9 --- tests/tcg/README | 39 ----------------------------= ---- tests/tcg/i386/Makefile.target | 10 ++++++++ tests/tcg/i386/README | 38 ++++++++++++++++++++++++++++= +++ tests/tcg/{ =3D> i386}/hello-i386.c | 0 tests/tcg/{ =3D> i386}/pi_10.com | Bin tests/tcg/{ =3D> i386}/runcom.c | 0 tests/tcg/{ =3D> i386}/test-i386-code16.S | 0 tests/tcg/{ =3D> i386}/test-i386-fprem.c | 0 tests/tcg/{ =3D> i386}/test-i386-muldiv.h | 0 tests/tcg/{ =3D> i386}/test-i386-shift.h | 0 tests/tcg/{ =3D> i386}/test-i386-ssse3.c | 0 tests/tcg/{ =3D> i386}/test-i386-vm86.S | 0 tests/tcg/{ =3D> i386}/test-i386.c | 0 tests/tcg/{ =3D> i386}/test-i386.h | 0 14 files changed, 48 insertions(+), 39 deletions(-) create mode 100644 tests/tcg/i386/Makefile.target create mode 100644 tests/tcg/i386/README rename tests/tcg/{ =3D> i386}/hello-i386.c (100%) rename tests/tcg/{ =3D> i386}/pi_10.com (100%) rename tests/tcg/{ =3D> i386}/runcom.c (100%) rename tests/tcg/{ =3D> i386}/test-i386-code16.S (100%) rename tests/tcg/{ =3D> i386}/test-i386-fprem.c (100%) rename tests/tcg/{ =3D> i386}/test-i386-muldiv.h (100%) rename tests/tcg/{ =3D> i386}/test-i386-shift.h (100%) rename tests/tcg/{ =3D> i386}/test-i386-ssse3.c (100%) rename tests/tcg/{ =3D> i386}/test-i386-vm86.S (100%) rename tests/tcg/{ =3D> i386}/test-i386.c (100%) rename tests/tcg/{ =3D> i386}/test-i386.h (100%) diff --git a/tests/tcg/README b/tests/tcg/README index 0890044cf0..469504c4cb 100644 --- a/tests/tcg/README +++ b/tests/tcg/README @@ -3,45 +3,6 @@ regression testing. Tests are either multi-arch, meaning t= hey can be built for all guest architectures that support linux-user executable, or they are architecture specific. =20 -i386 -=3D=3D=3D=3D - -test-i386 ---------- - -This program executes most of the 16 bit and 32 bit x86 instructions and -generates a text output, for comparison with the output obtained with -a real CPU or another emulator. - -The Linux system call modify_ldt() is used to create x86 selectors -to test some 16 bit addressing and 32 bit with segmentation cases. - -The Linux system call vm86() is used to test vm86 emulation. - -Various exceptions are raised to test most of the x86 user space -exception reporting. - -linux-test ----------- - -This program tests various Linux system calls. It is used to verify -that the system call parameters are correctly converted between target -and host CPUs. - -test-i386-fprem ---------------- - -runcom ------- - -test-mmap ---------- - -sha1 ----- - -hello-i386 ----------- =20 =20 ARM diff --git a/tests/tcg/i386/Makefile.target b/tests/tcg/i386/Makefile.target new file mode 100644 index 0000000000..7dbb7992e7 --- /dev/null +++ b/tests/tcg/i386/Makefile.target @@ -0,0 +1,10 @@ +# i386 cross compile notes + +# If we are using a cross compiler config-target.mak may have also +# defined some CFLAGs to use. + +ifeq ($(CC), $(CROSS_CC_GUEST)) +ifdef CROSS_CC_GUEST_CFLAGS +CFLAGS+=3D$(CROSS_CC_GUEST_CFLAGS) +endif +endif diff --git a/tests/tcg/i386/README b/tests/tcg/i386/README new file mode 100644 index 0000000000..7a0a47bf27 --- /dev/null +++ b/tests/tcg/i386/README @@ -0,0 +1,38 @@ +These are i386 specific guest programs + +test-i386 +--------- + +This program executes most of the 16 bit and 32 bit x86 instructions and +generates a text output, for comparison with the output obtained with +a real CPU or another emulator. + +The Linux system call modify_ldt() is used to create x86 selectors +to test some 16 bit addressing and 32 bit with segmentation cases. + +The Linux system call vm86() is used to test vm86 emulation. + +Various exceptions are raised to test most of the x86 user space +exception reporting. + +linux-test +---------- + +This program tests various Linux system calls. It is used to verify +that the system call parameters are correctly converted between target +and host CPUs. + +test-i386-fprem +--------------- + +runcom +------ + +test-mmap +--------- + +sha1 +---- + +hello-i386 +---------- diff --git a/tests/tcg/hello-i386.c b/tests/tcg/i386/hello-i386.c similarity index 100% rename from tests/tcg/hello-i386.c rename to tests/tcg/i386/hello-i386.c diff --git a/tests/tcg/pi_10.com b/tests/tcg/i386/pi_10.com similarity index 100% rename from tests/tcg/pi_10.com rename to tests/tcg/i386/pi_10.com diff --git a/tests/tcg/runcom.c b/tests/tcg/i386/runcom.c similarity index 100% rename from tests/tcg/runcom.c rename to tests/tcg/i386/runcom.c diff --git a/tests/tcg/test-i386-code16.S b/tests/tcg/i386/test-i386-code16= .S similarity index 100% rename from tests/tcg/test-i386-code16.S rename to tests/tcg/i386/test-i386-code16.S diff --git a/tests/tcg/test-i386-fprem.c b/tests/tcg/i386/test-i386-fprem.c similarity index 100% rename from tests/tcg/test-i386-fprem.c rename to tests/tcg/i386/test-i386-fprem.c diff --git a/tests/tcg/test-i386-muldiv.h b/tests/tcg/i386/test-i386-muldiv= .h similarity index 100% rename from tests/tcg/test-i386-muldiv.h rename to tests/tcg/i386/test-i386-muldiv.h diff --git a/tests/tcg/test-i386-shift.h b/tests/tcg/i386/test-i386-shift.h similarity index 100% rename from tests/tcg/test-i386-shift.h rename to tests/tcg/i386/test-i386-shift.h diff --git a/tests/tcg/test-i386-ssse3.c b/tests/tcg/i386/test-i386-ssse3.c similarity index 100% rename from tests/tcg/test-i386-ssse3.c rename to tests/tcg/i386/test-i386-ssse3.c diff --git a/tests/tcg/test-i386-vm86.S b/tests/tcg/i386/test-i386-vm86.S similarity index 100% rename from tests/tcg/test-i386-vm86.S rename to tests/tcg/i386/test-i386-vm86.S diff --git a/tests/tcg/test-i386.c b/tests/tcg/i386/test-i386.c similarity index 100% rename from tests/tcg/test-i386.c rename to tests/tcg/i386/test-i386.c diff --git a/tests/tcg/test-i386.h b/tests/tcg/i386/test-i386.h similarity index 100% rename from tests/tcg/test-i386.h rename to tests/tcg/i386/test-i386.h --=20 2.16.2 From nobody Sun Apr 28 23:24:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523390737819979.8947468138467; Tue, 10 Apr 2018 13:05:37 -0700 (PDT) Received: from localhost ([::1]:41266 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zW9-0006fv-HF for importer@patchew.org; Tue, 10 Apr 2018 16:05:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zC6-0004xD-Tw for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:44:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5zC6-0001FR-03 for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:44:42 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:40705) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5zC5-0001EC-P1 for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:44:41 -0400 Received: by mail-wm0-x243.google.com with SMTP id x4so25414130wmh.5 for ; Tue, 10 Apr 2018 12:44:41 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id y68sm4414173wrb.73.2018.04.10.12.44.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 12:44:38 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 4B56D3E0AFE; Tue, 10 Apr 2018 20:39:20 +0100 (BST) 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; bh=d9iEarXvboQ25qmHaUVYTGpdleLAnASjYoYKLpTNTko=; b=V5RbIAG8LqIunlgIwv7tSgG3f6m+213fYbjDbnn9cuyeSOsnCgeH1vxR53Aayb7Gfi LVJg3eXk7xLnfTo1yPeIH7my5PgLJHirx7/ea32iglZemxrW0CMVlRuwFLUbKGDlOn9Y vB5H/dJ8btR8aeMFZ1GzxaG3awXQRCI0VCCuM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=d9iEarXvboQ25qmHaUVYTGpdleLAnASjYoYKLpTNTko=; b=Z77/xvRgtZzHBaAO/akzIA99sqWlcy7oA2oNe1fNFVSqeZhkVRzGkez1TbjunU15P6 WZHhpZXLqkbhbhMLZLXmRPS+X94YALPjYXkw/QWFn6hiCmcfZzW0jmq9B5MiBRBYzx0D PU5gju3zdqCohDBEcKTXlECn2dxuWOsmuUY66wMR3S8qRakXP6cssUt698tmu/D+K13D 6ql6lC1OiJASnZ/Pjfn/+tHrnbjcCuhTDFxkeRybTEXum1a0eg7z88/gAkoV3dzy+FW/ nQ+h0dBc+90nhLHJfr9IXXOLVhfl0sss7EbWG6EACSmpiUuDY+Gq1NeQUZ3AvkOz22mJ KR8A== X-Gm-Message-State: ALQs6tDO5u4p0WKdm1tK0voUw0RcpZFwGGd8EcpGxWY9JjU+vu/zh9sP aY65gebvsYMrj8Olgt9kDp79pQ== X-Google-Smtp-Source: AIpwx4/vcuFE46Q+vx9O+If/cvG10sXQXaabMOdThkPgonuOVbW7oorW0Ul+TzqLu3c3AxvUfneSFw== X-Received: by 10.28.197.205 with SMTP id v196mr527083wmf.37.1523389480691; Tue, 10 Apr 2018 12:44:40 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 10 Apr 2018 20:39:07 +0100 Message-Id: <20180410193919.28026-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180410193919.28026-1-alex.bennee@linaro.org> References: <20180410193919.28026-1-alex.bennee@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::243 Subject: [Qemu-devel] [PATCH v1 12/24] tests/tcg/i386: Build fix for hello-i386 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: famz@redhat.com, cota@braap.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Fam Zheng We have -Werror=3Dmissing-prototype, add a dummy prototype to avoid that warning. Signed-off-by: Fam Zheng Reviewed-by: Thomas Huth --- tests/tcg/i386/hello-i386.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/tcg/i386/hello-i386.c b/tests/tcg/i386/hello-i386.c index fa00380de2..cfeb24b2f5 100644 --- a/tests/tcg/i386/hello-i386.c +++ b/tests/tcg/i386/hello-i386.c @@ -20,6 +20,7 @@ static inline int write(int fd, const char * buf, int len) return status; } =20 +void _start(void); void _start(void) { write(1, "Hello World\n", 12); --=20 2.16.2 From nobody Sun Apr 28 23:24:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523389689195160.16598959748728; Tue, 10 Apr 2018 12:48:09 -0700 (PDT) Received: from localhost ([::1]:39824 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zFQ-0007Om-Bm for importer@patchew.org; Tue, 10 Apr 2018 15:48:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46722) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5z79-0000Hh-4P for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5z77-0006OB-CB for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:35 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:56051) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5z77-0006NN-2X for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:33 -0400 Received: by mail-wm0-x242.google.com with SMTP id b127so28589796wmf.5 for ; Tue, 10 Apr 2018 12:39:32 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id r28sm3419322wra.78.2018.04.10.12.39.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 12:39:28 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 5C1C13E0B7C; Tue, 10 Apr 2018 20:39:20 +0100 (BST) 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=Fvsf6AQMCBf/oxavipK7R9Eh5M1egm834bT9+DNxsSk=; b=J7MO9Xzg+caV2OnnIuyI3y6LuXbTdwmAfAi8Ppt8DTXUpuVPUAyybbQzx64PR1gqAA QfGwapean0ZNY5Aw5rfNHSFAsL1HQWz+B9RABuAXRHaWkWwX58bE6GSe9UICUE4qKD1q JwDJBVDfIf76NhJegLOf/MWAHSD/y6xxPkkNk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Fvsf6AQMCBf/oxavipK7R9Eh5M1egm834bT9+DNxsSk=; b=PfuZeu4mvFBMY9kd6JRHgL82pDei3tN79qp7EUdl7QjuJceDyFHZbCwO6pI1vVnD/q BgHCn8xYE2RZWBZj0kCMPj1Wfh6uFgyhH+HzrNsGZ/EVhWMV+eTQMhMfQWARCxvmJX2o 0MUQNqV9927fpQxqWW3HFxoX2VAp284LkGutj26V5zu1EsuHhUdHILrszW9EGJAI+MGO un4vNGDQZClLt6RYrndgkU4KD8wID/s0//lzzlMXzOur3REQn+aR8tnrytY/UdV437xW w5VsiJyzXwI0GMbes+dro3NCEvh8ZcmRw9cTo4vURReTEUvbbHTOsX6OqKaX3a+wHvLJ /T0g== X-Gm-Message-State: ALQs6tCsYMJlMbtUrPj/552Be56HawBT227eNcIt2wQ5IGPlvebGOvD1 yk41X4M+mVarP6vjyReghYXwcA== X-Google-Smtp-Source: AIpwx49jQTr2keTvrJxYVyCZ2FqnNTpcZQO8W6V5F0+EEfqQkNjVfrj1YBFWFiooRg2/Yp2xt8z2Hg== X-Received: by 10.28.40.4 with SMTP id o4mr585571wmo.44.1523389171955; Tue, 10 Apr 2018 12:39:31 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 10 Apr 2018 20:39:08 +0100 Message-Id: <20180410193919.28026-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180410193919.28026-1-alex.bennee@linaro.org> References: <20180410193919.28026-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::242 Subject: [Qemu-devel] [PATCH v1 13/24] tests/tcg/i386: move test-i386-sse.c to tests/tcg/x86_64/test-sse.c X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , famz@redhat.com, cota@braap.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 The test mixes up 32bit and 64 bit code. It should probably be split into two distinct test cases. However for now just move it out of the way of the i386 build. Signed-off-by: Alex Benn=C3=A9e --- tests/tcg/{i386/test-i386-ssse3.c =3D> x86_64/test-sse.c} | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) rename tests/tcg/{i386/test-i386-ssse3.c =3D> x86_64/test-sse.c} (93%) diff --git a/tests/tcg/i386/test-i386-ssse3.c b/tests/tcg/x86_64/test-sse.c similarity index 93% rename from tests/tcg/i386/test-i386-ssse3.c rename to tests/tcg/x86_64/test-sse.c index 0a42bd03e2..196ec7f32f 100644 --- a/tests/tcg/i386/test-i386-ssse3.c +++ b/tests/tcg/x86_64/test-sse.c @@ -1,4 +1,4 @@ -/* See if various MMX/SSE SSSE3 instructions give expected results */ +/* See if various MMX/SSE SSSE3/4 instructions give expected results */ #include #include #include @@ -41,8 +41,7 @@ int main(int argc, char *argv[]) { asm volatile ("movdqa %%xmm0, (%0)" : : "r" (hello)); printf("%5.5s\n", hello); =20 -#if 1 /* SSE4 */ - /* popcnt r64, r/m64 */ + /* SSE4 popcnt r64, r/m64 */ asm volatile ("movq $0x8421000010009c63, %%rax" : : : "rax"); asm volatile ("popcnt %%ax, %%dx" : : : "dx"); asm volatile ("popcnt %%eax, %%ecx" : : : "ecx"); @@ -51,7 +50,6 @@ int main(int argc, char *argv[]) { asm volatile ("movl %%ecx, %0" : "=3Dm" (c)); asm volatile ("movw %%dx, %0" : "=3Dm" (d)); printf("%i =3D %i\n%i =3D %i =3D %i\n", 13, (int) a, 9, c, d + 1); -#endif =20 return 0; } --=20 2.16.2 From nobody Sun Apr 28 23:24:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523390133927743.0692678566517; Tue, 10 Apr 2018 12:55:33 -0700 (PDT) Received: from localhost ([::1]:40134 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zMa-0006Cs-7L for importer@patchew.org; Tue, 10 Apr 2018 15:55:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46794) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5z7C-0000Kw-6j for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5z7B-0006RV-3K for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:38 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:56055) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5z7A-0006Qi-T7 for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:37 -0400 Received: by mail-wm0-x244.google.com with SMTP id b127so28590110wmf.5 for ; Tue, 10 Apr 2018 12:39:36 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id d28sm2894899wra.37.2018.04.10.12.39.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 12:39:28 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 6DBC43E0BBC; Tue, 10 Apr 2018 20:39:20 +0100 (BST) 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=VZHJFI2Z/kEHQnIs5xsn5HSO5K/+tvRWixcGwYN0iX8=; b=h8198SdvMoyGn4jzm4baGYZdW0blXusAGqd9Hy+luFxDPEN4OQDbaUnXEMJyV4cpQX eOHWhY4zLJev0kRJqIFD+41dwkF0AyLmspVfWhbxhzjUDOPKTDsX5C/F6qqz7RZSfMQj Qkl8me0pcSycOfloIsLWUQtzEYxPSV2d3+Fio= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VZHJFI2Z/kEHQnIs5xsn5HSO5K/+tvRWixcGwYN0iX8=; b=M+OeYVYB4jOWkfaY1AqEQ7CnWyFvbLMFfdeyk6Pzu0vDI6Z5hd/uBUm8c1RmayhsMH bfIIS08W+tl5SYrsXpbwPQ1xlNlH76KIoGanCEnkQr97//Cfh/riEBJg2ixPjD+tFE++ nceJEUuXf1RBml1BRT4DtCIO/xLyAeVjanf+peEznX5Bq4sznZrwOYGKP5zzzNbL5K+4 4r1iNjE+vcuC1ZOV9obKYtWR0GPKE6MhLfWGI+T3pruWpGjb6/nFZkGMe63hRlqyzHPb qIGlKH9GW9qBSekMaurjDo0vKEyi+13oDeZuxeQ/VnDHaPKJB24oxmxSadv5bkyDhcVH 7ovg== X-Gm-Message-State: ALQs6tBq++3flcYpfYbdANWyZx1IwOpLaU8EB2pJTrzbzYLaY7xz55qz j3J3gCr94zbvlCMqYiqrKsY+pg== X-Google-Smtp-Source: AIpwx4/TfkZ9OS7vPqXDs16SpxYLIpQLY3qXCfJWoEMePuejKwjBzA9f8OdxHqGbZn4U1JfxakVqXQ== X-Received: by 10.28.105.19 with SMTP id e19mr558350wmc.3.1523389172861; Tue, 10 Apr 2018 12:39:32 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 10 Apr 2018 20:39:09 +0100 Message-Id: <20180410193919.28026-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180410193919.28026-1-alex.bennee@linaro.org> References: <20180410193919.28026-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::244 Subject: [Qemu-devel] [PATCH v1 14/24] tests/tcg/i386: fix test-i386 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , famz@redhat.com, cota@braap.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 The test-i386 test case is a little special as it includes assembler files. Add the additional compile magic to assemble these bits and link them to the final binary. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth Tested-by: Philippe Mathieu-Daud=C3=A9 --- tests/tcg/i386/Makefile.target | 19 +++++++++++++++++++ tests/tcg/i386/test-i386.c | 1 - 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/tests/tcg/i386/Makefile.target b/tests/tcg/i386/Makefile.target index 7dbb7992e7..1df69e0dab 100644 --- a/tests/tcg/i386/Makefile.target +++ b/tests/tcg/i386/Makefile.target @@ -8,3 +8,22 @@ ifdef CROSS_CC_GUEST_CFLAGS CFLAGS+=3D$(CROSS_CC_GUEST_CFLAGS) endif endif + +# +# test-386 includes a couple of additional objects that need to be linked = together +# + +TEST_I386_DEPS=3Dtest-i386-code16.o test-i386-vm86.o + +# override the default compile and link in one go rule +test-i386.o: test-i386.c + $(CC) $(CFLAGS) -c $< -o $@ + +# and provide a rule to compile .S files +%.o: %.S + $(CC) $(CFLAGS) -c $< -o $@ + +test-i386: LDFLAGS+=3D-lm -lc +test-i386: test-i386.o $(TEST_I386_DEPS) + $(LD) -melf_i386 $(LDFLAGS) $< $(TEST_I386_DEPS) -o $@ + diff --git a/tests/tcg/i386/test-i386.c b/tests/tcg/i386/test-i386.c index 9599204895..cae6a7773a 100644 --- a/tests/tcg/i386/test-i386.c +++ b/tests/tcg/i386/test-i386.c @@ -17,7 +17,6 @@ * along with this program; if not, see . */ #define _GNU_SOURCE -#include "qemu/compiler.h" #include #include #include --=20 2.16.2 From nobody Sun Apr 28 23:24:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523389891371623.1024229834532; Tue, 10 Apr 2018 12:51:31 -0700 (PDT) Received: from localhost ([::1]:39842 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zIg-0001vH-Gp for importer@patchew.org; Tue, 10 Apr 2018 15:51:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46748) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5z79-0000Ia-Ul for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5z79-0006Pf-3w for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:35 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:39223) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5z78-0006Oz-TL for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:35 -0400 Received: by mail-wm0-x243.google.com with SMTP id b21so644465wme.4 for ; Tue, 10 Apr 2018 12:39:34 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id 185sm3450088wmj.46.2018.04.10.12.39.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 12:39:28 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 7F2003E0BD7; Tue, 10 Apr 2018 20:39:20 +0100 (BST) 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=MG/WVtA1JfUEIV6/jt18wgZ+2Dcu1GpCoKb1iglGZUs=; b=ToYIbCf4effGlsu+mBy9Jv87xugsTpaYgcK5zUuNYSGEj0L6qKOqV72orpuiEK2uR5 4GboRRyC13hh+j0MEomtQa1VPT0NRSA4I/LGKmQjsZghuEyjhI6fuuDRk9rpXD0x9Rs+ kaYlnrrJP2djAUVi/qD+7/qM36Eqjbtw6iMfM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MG/WVtA1JfUEIV6/jt18wgZ+2Dcu1GpCoKb1iglGZUs=; b=aEfuSuCs0fMYKhBtawmFCGjxkj4tiFOxKIMVAFRuyDfjZS05JiU7BK3EJ5gsXUEOtV XemeLZtua4RIZYp/GHpx2JTbjYdKlIO9Ih6hiN/yqhYzby3vMJbWm9zsqz7gik20xi48 t0OuhD70m801uJ7CtY3q1RAMttRTbYDXKX2gvtB54vi42LYcoakdz5QU1LptE6EYxxQf gdzutfgdBKOZYmmGU1RSySWQuFMviVY43gaGMH7dp89K44kKWDTxknFnTSETupsSW7CH AiWJauvK8ogCed1hTa+AndYMGAZ0YgsTwfcvxPcgU/DU7UZOC8+d5fA39j8ra/YrjS7U hakg== X-Gm-Message-State: ALQs6tBuBMYiO51SwrtRY8p2VzJDUT78J6/gcE+eSK+B+Vr05iu3ORo1 gmd9PWPLs6a61gXxxC+Uqn72kQ== X-Google-Smtp-Source: AIpwx48Mf28tTiZOtYdmtfqKYaXmhlwl1JDQljLat4Z0+71PSmFvFN5s7xronnlsjW23hAdTOx6T0w== X-Received: by 10.28.107.151 with SMTP id a23mr534568wmi.14.1523389173755; Tue, 10 Apr 2018 12:39:33 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 10 Apr 2018 20:39:10 +0100 Message-Id: <20180410193919.28026-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180410193919.28026-1-alex.bennee@linaro.org> References: <20180410193919.28026-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::243 Subject: [Qemu-devel] [PATCH v1 15/24] tests/tcg/i368: fix hello-i386 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , famz@redhat.com, cota@braap.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 This is a direct syscall test so needs additional CFLAGS and LDFLAGS. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth Tested-by: Philippe Mathieu-Daud=C3=A9 --- tests/tcg/i386/Makefile.target | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/tcg/i386/Makefile.target b/tests/tcg/i386/Makefile.target index 1df69e0dab..44803c0382 100644 --- a/tests/tcg/i386/Makefile.target +++ b/tests/tcg/i386/Makefile.target @@ -9,6 +9,12 @@ CFLAGS+=3D$(CROSS_CC_GUEST_CFLAGS) endif endif =20 +# +# hello-i386 is a barebones app +# +hello-i386: CFLAGS+=3D-ffreestanding +hello-i386: LDFLAGS+=3D-nostdlib + # # test-386 includes a couple of additional objects that need to be linked = together # --=20 2.16.2 From nobody Sun Apr 28 23:24:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523390251035409.5714011801057; Tue, 10 Apr 2018 12:57:31 -0700 (PDT) Received: from localhost ([::1]:40331 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zOJ-0007vx-4w for importer@patchew.org; Tue, 10 Apr 2018 15:57:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49806) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zC8-0004xj-10 for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:44:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5zC6-0001Gh-TC for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:44:44 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:37182) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5zC6-0001Fd-Me for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:44:42 -0400 Received: by mail-wm0-x242.google.com with SMTP id r131so25460259wmb.2 for ; Tue, 10 Apr 2018 12:44:42 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id t8sm2119016wmc.20.2018.04.10.12.44.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 12:44:38 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 901633E021D; Tue, 10 Apr 2018 20:39:20 +0100 (BST) 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=GwZAl7NvydkzsvTJf8QLZpERA2O9JiLxJ/KxnhhVL7Q=; b=IYB/XHtMxXopPA3K+BYueiHDB8mO146GdlUkGsxBeoycBiF+mQFPQolRNsQ1zvOdpu cRQm1kjyCktkXgn6B53B2hJnf7H0aJhgxyIPTr1F81ktFdpDyrF597EJRsVlLP0qcE9a CEj6cqKPR1knr9PezshFQaDU3sFrsiHDjCeE4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GwZAl7NvydkzsvTJf8QLZpERA2O9JiLxJ/KxnhhVL7Q=; b=KwhdEvoR/ZfYO4o4u005Q06ambO1ub6+hLnV0n13mCZjdf/4Lo0M7N8G0nHIbJqPM6 uSXzPJSkvb2L31PRezZZDE2VI+FQiNRntozVs+eEQYPBxj2l6xUtmS4NOEsHgkOyNucw hIPeX2yksxzb23O7eMq7vWZg7s4X34I3fmzMFdC7pZ8NQ27e/FFpidzq8YJW8sNQ9me3 Xg2+gI3Fe1abXU+zZE5V7ejVDvcqUDAaU1cwyZ6F1g6rnyuOecIUbFqc41iQR3lpDvu4 atxgix/YFi8c1oUe6CEBlvoLeXbQA56wDUFrTNzvR3slZrIko5DELMnhRjE++tIfQpdz kTbA== X-Gm-Message-State: ALQs6tBXelO07+S1WaQ3n1YXGQo82BhVxhdugcewXjMzol760ilfyoTb 09vzAm+tib61GmTQ1E3f8OXYLw== X-Google-Smtp-Source: AIpwx489znD6GWT62XHNIhEQCjn+/hV0wkeK8Do8KmHgipP0bT5V6FbVKVjHwcW1JnKFDAfnQGN/yw== X-Received: by 10.28.16.18 with SMTP id 18mr510473wmq.81.1523389481602; Tue, 10 Apr 2018 12:44:41 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 10 Apr 2018 20:39:11 +0100 Message-Id: <20180410193919.28026-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180410193919.28026-1-alex.bennee@linaro.org> References: <20180410193919.28026-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::242 Subject: [Qemu-devel] [PATCH v1 16/24] tests/tcg/i386: fix test-i386-fprem X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , famz@redhat.com, cota@braap.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Remove dependencies on QEMU's source tree and build directly. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- tests/tcg/i386/test-i386-fprem.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/tcg/i386/test-i386-fprem.c b/tests/tcg/i386/test-i386-fp= rem.c index 1a71623204..771dc07433 100644 --- a/tests/tcg/i386/test-i386-fprem.c +++ b/tests/tcg/i386/test-i386-fprem.c @@ -23,7 +23,10 @@ * along with this program; if not, see . */ =20 -#include "qemu/osdep.h" +#include +#include + +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) =20 /* * Inspired by 's union ieee854_long_double, but with single @@ -39,7 +42,7 @@ union float80u { unsigned int exponent:15; unsigned int negative:1; unsigned int empty:16; - } QEMU_PACKED ieee; + } __attribute__((packed)) ieee; =20 /* This is for NaNs in the IEEE 854 double-extended-precision format. = */ struct { @@ -49,7 +52,7 @@ union float80u { unsigned int exponent:15; unsigned int negative:1; unsigned int empty:16; - } QEMU_PACKED ieee_nan; + } __attribute__((packed)) ieee_nan; }; =20 #define IEEE854_LONG_DOUBLE_BIAS 0x3fff --=20 2.16.2 From nobody Sun Apr 28 23:24:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 15233900846331017.9789002310689; Tue, 10 Apr 2018 12:54:44 -0700 (PDT) Received: from localhost ([::1]:40117 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zLn-0005NH-PZ for importer@patchew.org; Tue, 10 Apr 2018 15:54:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49713) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zC4-0004wN-Jx for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:44:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5zC2-0001AV-Vl for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:44:40 -0400 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:34897) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5zC2-00019X-PF for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:44:38 -0400 Received: by mail-wr0-x241.google.com with SMTP id o3so1638094wri.2 for ; Tue, 10 Apr 2018 12:44:38 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id f10sm2898526wrg.0.2018.04.10.12.44.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 12:44:34 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id A291D3E0BDF; Tue, 10 Apr 2018 20:39:20 +0100 (BST) 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=GWWNOOQz3JwAD5dspqSBUhy+3xpcYMawH0tzuvfW2KI=; b=e72+3CcOdtszpx5NFPoObHwCIHb/S3mlx5fAuqmFuDHZr5RSEcJBna1BFWRpqdZAeA cZvyyUBRdeluxmVAkB5D77GdV43HU+06N/c8dgoV21DyPU0vU9lXKT4PmZY3Z+eFNwSv NXeQZhiWBC18/3pwpa4c84Qv+kDpzOh2PG2tg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GWWNOOQz3JwAD5dspqSBUhy+3xpcYMawH0tzuvfW2KI=; b=AAXQkuf+R09GmR8m3WXDBU7+1PSPEHE8Vu6/SRByn+QL6xCaEevRu1Mi8WFvXiMNPt HmbcXedJpuUT7DphOUQoCmbTvYTpVzPfS2IudRi962JJkarDap8H74TdrFNo1srKzWMA ZxVITOcF9/lf/58QLVuk1My13sDMLgFwddlh7bDpMn/Q8fi4OaTtfIFLNLZ0tIF+v3gH 6hyoosLhswXS4Y4R6ndCAAI3ITfmSPUFtvqfHslHplQA6b8U2sk4okxsJsXq1f7HJUFR pN9YQTkcdzArGz70CKIQ5ZKgxoQv+9XBgBuHa4gU4oHdNexi/Y+SFxRaIeqIrsncpEBa pLGA== X-Gm-Message-State: ALQs6tCq5htjpvzYFQUo1DChKQBUha89OAGT4U7U8EGy1fgKUryfYQaq 0nxs9KS/5hnrWAKShBVZ+q/ziESW3GU= X-Google-Smtp-Source: AIpwx49PPEowTNSlB35B8P8+t2/18EZ44RTLxYV+sYiLWLYFo1FLZTsDXM18Y3GCRPj1VkSlkm7lEQ== X-Received: by 10.223.208.204 with SMTP id z12mr1387379wrh.60.1523389477678; Tue, 10 Apr 2018 12:44:37 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 10 Apr 2018 20:39:12 +0100 Message-Id: <20180410193919.28026-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180410193919.28026-1-alex.bennee@linaro.org> References: <20180410193919.28026-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::241 Subject: [Qemu-devel] [PATCH v1 17/24] tests/tcg: move ARM specific tests into subdir X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , famz@redhat.com, cota@braap.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 These only need to be built for ARM guests. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth Tested-by: Philippe Mathieu-Daud=C3=A9 --- tests/tcg/README | 9 --------- tests/tcg/arm/README | 11 +++++++++++ tests/tcg/{ =3D> arm}/hello-arm.c | 0 tests/tcg/{ =3D> arm}/test-arm-iwmmxt.s | 0 4 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 tests/tcg/arm/README rename tests/tcg/{ =3D> arm}/hello-arm.c (100%) rename tests/tcg/{ =3D> arm}/test-arm-iwmmxt.s (100%) diff --git a/tests/tcg/README b/tests/tcg/README index 469504c4cb..625f2326e6 100644 --- a/tests/tcg/README +++ b/tests/tcg/README @@ -5,15 +5,6 @@ or they are architecture specific. =20 =20 =20 -ARM -=3D=3D=3D - -hello-arm ---------- - -test-arm-iwmmxt ---------------- - MIPS =3D=3D=3D=3D =20 diff --git a/tests/tcg/arm/README b/tests/tcg/arm/README new file mode 100644 index 0000000000..e6307116e2 --- /dev/null +++ b/tests/tcg/arm/README @@ -0,0 +1,11 @@ +These are ARM specific guest programs + +hello-arm +--------- + +A very simple inline assembly, write syscall based hello world + +test-arm-iwmmxt +--------------- + +A simple test case for older iwmmxt extended ARMs diff --git a/tests/tcg/hello-arm.c b/tests/tcg/arm/hello-arm.c similarity index 100% rename from tests/tcg/hello-arm.c rename to tests/tcg/arm/hello-arm.c diff --git a/tests/tcg/test-arm-iwmmxt.s b/tests/tcg/arm/test-arm-iwmmxt.s similarity index 100% rename from tests/tcg/test-arm-iwmmxt.s rename to tests/tcg/arm/test-arm-iwmmxt.s --=20 2.16.2 From nobody Sun Apr 28 23:24:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523389893082447.55223390607046; Tue, 10 Apr 2018 12:51:33 -0700 (PDT) Received: from localhost ([::1]:39844 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zIi-0001yG-AI for importer@patchew.org; Tue, 10 Apr 2018 15:51:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5z7A-0000JZ-Qo for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5z79-0006QP-V1 for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:36 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:52524) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5z79-0006Pl-Nv for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:35 -0400 Received: by mail-wm0-x243.google.com with SMTP id g8so28362596wmd.2 for ; Tue, 10 Apr 2018 12:39:35 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id c124sm2506748wmd.36.2018.04.10.12.39.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 12:39:28 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id B3FC73E0C29; Tue, 10 Apr 2018 20:39:20 +0100 (BST) 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=Yf+HsdGuH6JUlKQYxmPenTzEnq3vV3nQ47Hg4cWoOd4=; b=aYt2azjDM7nRXLwdhiK/mrw5cAlPyKkllJDCGvIf+TSIAuj4rJqx/r8cy9aT105VTM 2iLhbEfCo47U9VwJdZg4KkHcMd8OPkGmgaw5kh9co6btC3yazv6XXjfYetm1uBm5+3S/ eI/lq8gZBythhbvELcQBVSBIlO5QjzKbkYYyA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Yf+HsdGuH6JUlKQYxmPenTzEnq3vV3nQ47Hg4cWoOd4=; b=TcnJ9rzGnvbZOARwVjjri3s7lLWNQNNSUBX6mO5UYnk8vAZ89Q7rJBDkR5fvDRXQW/ KnQV+YwFVXTneY0Iy4pwxV7v5yP/2m+ydSbY4VbFaF7QzclxoPcEhXhpuEStoH7fpcKs k955zD+FFydg+3iM9CwNl4gRAMXuhdE0fwi1RvmJRrUlhA0z8IM3xD8mkqwTPsVHsPn+ h+Qiex9VF6HPCapGXaiS7jczLrI5gXLhLaWDPlnDqTCaNmyzHEbs0hCJi4xldQna1Bfn 5EoEYKK4HgJYVLRJo6Q1cL41yglzKG06WRPkA5ukF+esgQUDVUrhu3Ifh7FmkKlyH1B+ IEVQ== X-Gm-Message-State: ALQs6tA1xxNzl8riJIErB2edetS2eU/Ej0E03QdW6iBCzhcB8ReXwo9g TAUF7d12MaBTUdFAA0iAboR5+A== X-Google-Smtp-Source: AIpwx48CNcNlaIZWwesW/gPeztYlKyRVy+LneBxDLfDjORdcAxDy9fVEdhge0eLehyPW2LXZdH3qMQ== X-Received: by 10.28.91.79 with SMTP id p76mr597942wmb.3.1523389174666; Tue, 10 Apr 2018 12:39:34 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 10 Apr 2018 20:39:13 +0100 Message-Id: <20180410193919.28026-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180410193919.28026-1-alex.bennee@linaro.org> References: <20180410193919.28026-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::243 Subject: [Qemu-devel] [PATCH v1 18/24] tests/tcg/arm: fix hello-arm X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , famz@redhat.com, cota@braap.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 As hello-arm is a bare bones syscall test it needs specific compiler flags so it doesn't try and link against glibc. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth Tested-by: Philippe Mathieu-Daud=C3=A9 --- tests/tcg/arm/Makefile.target | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 tests/tcg/arm/Makefile.target diff --git a/tests/tcg/arm/Makefile.target b/tests/tcg/arm/Makefile.target new file mode 100644 index 0000000000..b7c146c88e --- /dev/null +++ b/tests/tcg/arm/Makefile.target @@ -0,0 +1,6 @@ +# -*- Mode: makefile -*- +# +# ARM specific tweaks + +hello-arm: CFLAGS+=3D-marm -ffreestanding +hello-arm: LDFLAGS+=3D-nostdlib --=20 2.16.2 From nobody Sun Apr 28 23:24:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523390315476452.95780399086584; Tue, 10 Apr 2018 12:58:35 -0700 (PDT) Received: from localhost ([::1]:40388 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zPW-0000W2-N5 for importer@patchew.org; Tue, 10 Apr 2018 15:58:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49816) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zC8-0004yZ-RZ for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:44:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5zC7-0001Hv-US for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:44:44 -0400 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:33859) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5zC7-0001H6-Nu for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:44:43 -0400 Received: by mail-wr0-x244.google.com with SMTP id d19so10043137wre.1 for ; Tue, 10 Apr 2018 12:44:43 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id c130sm3268751wmh.33.2018.04.10.12.44.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 12:44:38 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id C65AC3E0CFC; Tue, 10 Apr 2018 20:39:20 +0100 (BST) 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=DWxIOE0ZV+OM4bQNU4A7Bxjv43MBrLXC9BEHM2OMMBc=; b=A+s1Q6cC8tQCYy0CSv1E49ww/r5uCRToBvCFsH+me/qvbtVIh/VVJGgffoD25aqY8A A9KxML4Wig1jCD1Aq8SjMS6eKJHf6RcfuGwOxM1vMF6wZZ7nNL8Oki5wO2woIRHPxw6t uRk9XgYRCAZL4QV9zzEL+67ry9N3QOqcygFcw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DWxIOE0ZV+OM4bQNU4A7Bxjv43MBrLXC9BEHM2OMMBc=; b=TbrzlTChTOe3pVrEx8t382F3so+HIZi1QxhyhPvL+W2jgdRSCLwWm7DxicWBuNbIxN eWn1nI12XTAzS+ITxjiGSIZ13UPyHMe2ogrJUT5YG+KFMGUfyizZAZTTNwXWxwQTDKiq 87Q12Yw/7csBPpfJyLRawEmhg4dQWY9iiNTK//3NliOblk6ZV+Q+8kca5iTUFeWvhyOy hZuhxnn3RMRjNI+UiXOl3UWXNrXkj0+a3r8GFycOKCOvERmmkor8EKEw7KDz7o0FIBPc ZbXzJKakml3MKR7E77J3eh8m2cy5K8jgdhg4WynPtNhjoVagSxrjZ8awSARkG+V9vI47 DVBA== X-Gm-Message-State: ALQs6tBAQspIsktUEsDOrE0aqrcmnAANvvLoLcc4ZU62phvbM0RzAdoH CdWvp/k36iXABrwuJxjYRK8JJA== X-Google-Smtp-Source: AIpwx49wJH1LV/86AYrgwynLuKZvvBEpZypNVOL03xh1hALcTe7doV1S5uW7YXrUnlxzt05P8kAMvQ== X-Received: by 10.223.189.11 with SMTP id j11mr1369524wrh.49.1523389482569; Tue, 10 Apr 2018 12:44:42 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 10 Apr 2018 20:39:14 +0100 Message-Id: <20180410193919.28026-20-alex.bennee@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180410193919.28026-1-alex.bennee@linaro.org> References: <20180410193919.28026-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::244 Subject: [Qemu-devel] [PATCH v1 19/24] tests/tcg: move MIPS specific tests into subdir X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: famz@redhat.com, Yongbok Kim , cota@braap.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 These only need to be built for MIPS guests. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- tests/tcg/README | 11 ----------- tests/tcg/mips/README | 7 +++++++ tests/tcg/{ =3D> mips}/hello-mips.c | 0 3 files changed, 7 insertions(+), 11 deletions(-) create mode 100644 tests/tcg/mips/README rename tests/tcg/{ =3D> mips}/hello-mips.c (100%) diff --git a/tests/tcg/README b/tests/tcg/README index 625f2326e6..a5643d33e7 100644 --- a/tests/tcg/README +++ b/tests/tcg/README @@ -3,17 +3,6 @@ regression testing. Tests are either multi-arch, meaning t= hey can be built for all guest architectures that support linux-user executable, or they are architecture specific. =20 - - -MIPS -=3D=3D=3D=3D - -hello-mips ----------- - -hello-mipsel ------------- - CRIS =3D=3D=3D=3D The testsuite for CRIS is in tests/tcg/cris. You can run it diff --git a/tests/tcg/mips/README b/tests/tcg/mips/README new file mode 100644 index 0000000000..e5bbc58ec5 --- /dev/null +++ b/tests/tcg/mips/README @@ -0,0 +1,7 @@ +MIPS +=3D=3D=3D=3D + +hello-mips +---------- + +A very simple inline assembly, write syscall based hello world diff --git a/tests/tcg/hello-mips.c b/tests/tcg/mips/hello-mips.c similarity index 100% rename from tests/tcg/hello-mips.c rename to tests/tcg/mips/hello-mips.c --=20 2.16.2 From nobody Sun Apr 28 23:24:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523390399315803.4560684495258; Tue, 10 Apr 2018 12:59:59 -0700 (PDT) Received: from localhost ([::1]:40741 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zQo-00021v-Fw for importer@patchew.org; Tue, 10 Apr 2018 15:59:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49656) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zC3-0004vR-Ku for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:44:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5zC1-00019I-WE for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:44:39 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:56155) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5zC1-00018T-QV for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:44:37 -0400 Received: by mail-wm0-x242.google.com with SMTP id b127so28617760wmf.5 for ; Tue, 10 Apr 2018 12:44:37 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id 62sm86456wrg.34.2018.04.10.12.44.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 12:44:34 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id D79EA3E0D4E; Tue, 10 Apr 2018 20:39:20 +0100 (BST) 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=0ZTtnR3QdyMQgbN2ggl4Z9BQfthEnjo1a8gq2/cSbME=; b=KwowjH12MlvzmvxUruWfXAqiX5HbQG7PP6Vmhf1HWSix4gK2cdfA63yN2Zqw+tHVjA gU5YViX+MSf30ZEtw6Xauz0a/yEE2lVe1V4gdGVohes+xqD82sN3Cv2KRz2nirIqXj2K rPvEAlY4qpM2r6Dw3Klgbo8mklJjg2TQysSzA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0ZTtnR3QdyMQgbN2ggl4Z9BQfthEnjo1a8gq2/cSbME=; b=cyc/5zmLUxOpFKAEtWH8Fq7xD3I1oiyjU1YZUapfos+d165SwATXfhcLOpK77qDbGz 9gUjYRzBtGvEQNVgHbXHCbr6e4xgQqofolbsQUzvMedTc4osHIkTrOPPJ9BWw9EhPuX2 3mQBJR0aArXkXMc40G18zNcsokNv2ER1W7YgudlWswUbViYVZG7UBj6tMzV0j4B/Lwxo MqAV3f3IlFpR2nIO7odF8ZYIosL0QmzPwNRkpd2UkM7Hkpo5zVF141sXKVwEDuHhjefz l8qx7gTE8dcM0ilQSUYEZ9ffsFWWvfi5A5cz7q/Pp4EQ7Bta9YgjsllsHLJvCgPYV4le L2xQ== X-Gm-Message-State: ALQs6tDrvv9rVzLKHBKXYjU/Z/veOJLWZdnNjruvy87rXXol0BZQRezJ lEOCoHtDYRHspXU5pcKWson9JQ== X-Google-Smtp-Source: AIpwx48eU1Yc6ur/i68QpbSZ86SbrwioPrapIBleTVmwXSDsEByk5GiT8xKpBqWyJ/zZQ+rToZh2lA== X-Received: by 10.28.32.210 with SMTP id g201mr575224wmg.9.1523389476763; Tue, 10 Apr 2018 12:44:36 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 10 Apr 2018 20:39:15 +0100 Message-Id: <20180410193919.28026-21-alex.bennee@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180410193919.28026-1-alex.bennee@linaro.org> References: <20180410193919.28026-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::242 Subject: [Qemu-devel] [PATCH v1 20/24] tests/tcg: enable building for s390x X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: famz@redhat.com, Cornelia Huck , "open list:S390" , cota@braap.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 This doesn't add any additional tests but enables building the multiarch tests for s390x. Signed-off-by: Alex Benn=C3=A9e Acked-by: Cornelia Huck Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- tests/tcg/s390x/Makefile.include | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 tests/tcg/s390x/Makefile.include diff --git a/tests/tcg/s390x/Makefile.include b/tests/tcg/s390x/Makefile.in= clude new file mode 100644 index 0000000000..1f58115d96 --- /dev/null +++ b/tests/tcg/s390x/Makefile.include @@ -0,0 +1,2 @@ +DOCKER_IMAGE=3Ddebian-s390x-cross +DOCKER_CROSS_COMPILER=3Ds390x-linux-gnu-gcc --=20 2.16.2 From nobody Sun Apr 28 23:24:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523390613126625.433588790902; Tue, 10 Apr 2018 13:03:33 -0700 (PDT) Received: from localhost ([::1]:41191 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zUK-0005Go-Ao for importer@patchew.org; Tue, 10 Apr 2018 16:03:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49749) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zC6-0004x6-21 for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:44:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5zC5-0001EK-Ar for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:44:42 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:50672) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5zC5-0001Cw-3H for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:44:41 -0400 Received: by mail-wm0-x244.google.com with SMTP id t67so28651328wmt.0 for ; Tue, 10 Apr 2018 12:44:40 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id 24sm5128741wrt.60.2018.04.10.12.44.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 12:44:38 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id E8BEB3E0D84; Tue, 10 Apr 2018 20:39:20 +0100 (BST) 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=PQy3rFT68vowGCb32JpdPmqAPLU3AMpMJu3kqKv6ajY=; b=SGdWD3eR/u/SasSIPxWfCmDw8w+jJNP2/NOtFdJItFgw5ZmPsCqzOpMYYk9ACSPk+h 4gXxt7klgVP+CdWxAQk6ORVcuk1iEuFp8WYeh479k2b7cFiVeNvHdoz0MM6J8GM9MiaL BTYI5gHWBta+KMnsgbViq9LYYZeNbOYZIJ3lA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PQy3rFT68vowGCb32JpdPmqAPLU3AMpMJu3kqKv6ajY=; b=EHAd7PtD7C99830f5ZaIJsJFx/tP37AIT9hRYGb/Luo4gpi9/iceqvWazMIcX81GJK S3ErQ1X+p7QH7tLfWuUhjZAheUqIk1ou+vAGxYRHhcFRVWa5Jdiu6c2GhHF0wFwcL2K7 yxq2GxZW6hKV6yh+SsoEySFXELrC+be6MCH9XlNn+2spKDLuYCs7nxyMLftuversYR1H WIQByX0F2hl0qad7L+QFk8fV3lYeZXIY7ZiORYOUygOKxVWImb9N0QUsT8Pr6RAKY/TN 6wE0ssdip3jUPjO/E6UT3cXvZb+D1dLsFcyYt2qLU3qvFz0gQB9wPJ/MQLYZTde7yWYX w/Fg== X-Gm-Message-State: ALQs6tCXoIzgFKdGR/LmQvkgCh6ZRbm3HvXQJ49majIbL0lH0RWfxVXL DAyoEiQ9yGiEtR7cDELS6am6Iw== X-Google-Smtp-Source: AIpwx4/hhoD4XWfOi3Zpf9ThXZ21Mjg3eoR+FQLXa9+yUL7eXzr0jZEy4ysP1gQHe5uviOLMH/4YeQ== X-Received: by 10.28.220.193 with SMTP id t184mr570200wmg.138.1523389479986; Tue, 10 Apr 2018 12:44:39 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 10 Apr 2018 20:39:16 +0100 Message-Id: <20180410193919.28026-22-alex.bennee@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180410193919.28026-1-alex.bennee@linaro.org> References: <20180410193919.28026-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::244 Subject: [Qemu-devel] [PATCH v1 21/24] tests/tcg: enable building for ppc64 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , famz@redhat.com, cota@braap.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Currently this just enables building the multiarch tests. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- tests/tcg/ppc64/Makefile.include | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 tests/tcg/ppc64/Makefile.include diff --git a/tests/tcg/ppc64/Makefile.include b/tests/tcg/ppc64/Makefile.in= clude new file mode 100644 index 0000000000..d71cfc9aa7 --- /dev/null +++ b/tests/tcg/ppc64/Makefile.include @@ -0,0 +1,2 @@ +DOCKER_IMAGE=3Ddebian-ppc64el-cross +DOCKER_CROSS_COMPILER=3Dpowerpc64le-linux-gnu-gcc --=20 2.16.2 From nobody Sun Apr 28 23:24:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523389919653709.5910662037685; Tue, 10 Apr 2018 12:51:59 -0700 (PDT) Received: from localhost ([::1]:39846 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zJ8-0002HM-Qs for importer@patchew.org; Tue, 10 Apr 2018 15:51:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49753) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zC6-0004x7-9b for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:44:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5zC4-0001C8-52 for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:44:42 -0400 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:50668) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5zC3-0001Aw-PL for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:44:40 -0400 Received: by mail-wm0-x241.google.com with SMTP id t67so28651197wmt.0 for ; Tue, 10 Apr 2018 12:44:39 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id p19sm5099996wrb.75.2018.04.10.12.44.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 12:44:34 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 05A923E0F8D; Tue, 10 Apr 2018 20:39:21 +0100 (BST) 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=MEfP5dc1LUd1ZZ8O18Iuz0kBxNh67DiczMZEr/u7Pxw=; b=Clb0KnFYT0ktpPHZx+S2IDkH+tCm2n4uIjLwYcoTsdxiD+F1WPdx5Zj95+SR16Uatb AOxywqj6/Wgzy5P6MGJ7CQQAH05lE13teVCfmyfdLhM8t7t+UMI6nJIvPdTeryZfhAcu 3HAHFrUImPx9LIEW4g5z+cl3/TeD/rPLaINO0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MEfP5dc1LUd1ZZ8O18Iuz0kBxNh67DiczMZEr/u7Pxw=; b=qi9oy1y2U1NksImWeXdewbmT3dLWczs0BczV31A0v4+rXajo3b3wVRIag9b4qSwt4M XAYqhLFz5l9v8PDtJs4gVfl3gmAmJdzbjlf+sj9ZiAWhgXhSRP1A/XJ1M0+1NVGewLgo Ec9Qb5FHmG0imf5BDXbrpuEZuMWDkHwGGFpr3z2kY8m+xrd4epDFbuRm+0gKU0oTnpJ3 PWapXg8G6A+EzhAU3ishovO2w+5H2ioIBmFGa+5WlhWpAnQwHti72rVAfTxnRPTYW6uG bPlJjLNPjCnmfRzexbjgAAY+oIkYQj/NA9jd5BGx9RiyYMPqxW6dPpbQK02MVeFTD8+F m9gA== X-Gm-Message-State: ALQs6tBRFU3xrMVA1ZnK0C3cp7i8zOaBmNlf1mbT3t9NyhQ86VJCvbry +JcmTPd84fPe5r1FkxOg8hZunA== X-Google-Smtp-Source: AIpwx49RzqZRWB8aoIjb46QliMH/szuo9WwZlq+muvKobD2VM4ads0b4SuH4a9aeV+YcBjo5LKPADw== X-Received: by 10.28.217.7 with SMTP id q7mr514307wmg.61.1523389478618; Tue, 10 Apr 2018 12:44:38 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 10 Apr 2018 20:39:17 +0100 Message-Id: <20180410193919.28026-23-alex.bennee@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180410193919.28026-1-alex.bennee@linaro.org> References: <20180410193919.28026-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::241 Subject: [Qemu-devel] [PATCH v1 22/24] tests/tcg/Makefile: update to be called from Makefile.target X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , famz@redhat.com, cota@braap.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 This make is now invoked from each individual target make with the appropriate CC and ARCH set for each guest. It includes all the multiarch tests by default as well as any tests from tests/tcg/$(ARCH). As there may be subtle additional requirements for building some of the tests it also includes tests/tcg/$(ARCH)/Makefile.target if it is available. This is distinct from tests/tcg/$(ARCH)/Makefile.include which is used by the parent make machinery to determine potential docker targets. Signed-off-by: Alex Benn=C3=A9e --- tests/tcg/Makefile | 185 ++++++++++++-------------------------------------= ---- 1 file changed, 42 insertions(+), 143 deletions(-) diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile index 89e3342f3d..2bba0d2a32 100644 --- a/tests/tcg/Makefile +++ b/tests/tcg/Makefile @@ -1,156 +1,55 @@ --include ../../config-host.mak --include $(SRC_PATH)/rules.mak +# -*- Mode: makefile -*- +# +# TCG tests +# +# These are complicated by the fact we want to build them for guest +# systems. This requires knowing what guests we are building and which +# ones we have cross-compilers for or docker images with +# cross-compilers. +# +# The tests themselves should be as minimal as possible as +# cross-compilers don't always have a large amount of libraries +# available. +# +# We only include the host build system for SRC_PATH and we don't +# bother with the common rules.mk. We expect CC to have been set for +# us from the parent make. We also expect to be in the tests build dir +# for the FOO-linux-user. +# =20 -$(call set-vpath, $(SRC_PATH)/tests/tcg) +-include ../../config-host.mak +-include ../config-target.mak =20 -QEMU=3D../../i386-linux-user/qemu-i386 -QEMU_X86_64=3D../../x86_64-linux-user/qemu-x86_64 -CC_X86_64=3D$(CC_I386) -m64 +# Set search path for all sources +VPATH =3D $(SRC_PATH)/tests/tcg/multiarch +TEST_SRCS =3D $(wildcard $(SRC_PATH)/tests/tcg/multiarch/*.c) =20 -QEMU_INCLUDES +=3D -I../.. -CFLAGS=3D-Wall -O2 -g -fno-strict-aliasing -#CFLAGS+=3D-msse2 -LDFLAGS=3D +VPATH +=3D $(SRC_PATH)/tests/tcg/$(ARCH) +TEST_SRCS +=3D $(wildcard $(SRC_PATH)/tests/tcg/$(ARCH)/*.c) =20 -# TODO: automatically detect ARM and MIPS compilers, and run those too +SRCS=3D$(notdir ${TEST_SRCS}) +TESTS=3D$(SRCS:.c=3D) =20 -# runcom maps page 0, so it requires root privileges -# also, pi_10.com runs indefinitely +# We use what ever CC we have +CFLAGS=3D-Wall -O0 -g -fno-strict-aliasing -static +QEMU_CFLAGS=3D +LDFLAGS=3D =20 -I386_TESTS=3Dhello-i386 \ - linux-test \ - testthread \ - sha1-i386 \ - test-i386 \ - test-i386-fprem \ - test-mmap \ - # runcom +# The per ARCH target makefile which might add specific compiler flags +# for some compilation targets. =20 -# native i386 compilers sometimes are not biarch. assume cross-compilers = are -ifneq ($(ARCH),i386) -I386_TESTS+=3Drun-test-x86_64 -endif +EXTRA_MAKEFILE=3D$(SRC_PATH)/tests/tcg/$(ARCH)/Makefile.target +CHECK_INCLUDE=3D$(wildcard $(EXTRA_MAKEFILE)) =20 -TESTS =3D test_path -ifneq ($(call find-in-path, $(CC_I386)),) -TESTS +=3D $(I386_TESTS) +ifeq ($(EXTRA_MAKEFILE),$(CHECK_INCLUDE)) +include $(EXTRA_MAKEFILE) endif =20 -all: $(patsubst %,run-%,$(TESTS)) -test: all - -# rules to run tests - -.PHONY: $(patsubst %,run-%,$(TESTS)) - -run-%: % - -$(QEMU) ./$* - -run-hello-i386: hello-i386 -run-linux-test: linux-test -run-testthread: testthread -run-sha1-i386: sha1-i386 - -run-test-i386: test-i386 - ./test-i386 > test-i386.ref - -$(QEMU) test-i386 > test-i386.out - @if diff -u test-i386.ref test-i386.out ; then echo "Auto Test OK"; fi - -run-test-i386-fprem: test-i386-fprem - ./test-i386-fprem > test-i386-fprem.ref - -$(QEMU) test-i386-fprem > test-i386-fprem.out - @if diff -u test-i386-fprem.ref test-i386-fprem.out ; then echo "Auto Tes= t OK"; fi - -run-test-x86_64: test-x86_64 - ./test-x86_64 > test-x86_64.ref - -$(QEMU_X86_64) test-x86_64 > test-x86_64.out - @if diff -u test-x86_64.ref test-x86_64.out ; then echo "Auto Test OK"; fi - -run-test-mmap: test-mmap - -$(QEMU) ./test-mmap - -$(QEMU) -p 8192 ./test-mmap 8192 - -$(QEMU) -p 16384 ./test-mmap 16384 - -$(QEMU) -p 32768 ./test-mmap 32768 - -run-runcom: runcom - -$(QEMU) ./runcom $(SRC_PATH)/tests/pi_10.com - -run-test_path: test_path - ./test_path - -# rules to compile tests - -test_path: test_path.o - -test_path.o: test_path.c - -hello-i386: hello-i386.c - $(CC_I386) -nostdlib $(CFLAGS) -static $(LDFLAGS) -o $@ $< - strip $@ - -testthread: testthread.c - $(CC_I386) $(CFLAGS) $(LDFLAGS) -o $@ $< -lpthread - -# i386/x86_64 emulation test (test various opcodes) */ -test-i386: test-i386.c test-i386-code16.S test-i386-vm86.S \ - test-i386.h test-i386-shift.h test-i386-muldiv.h - $(CC_I386) $(QEMU_INCLUDES) $(CFLAGS) $(LDFLAGS) -o $@ \ - $( Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523389713433890.8704571859852; Tue, 10 Apr 2018 12:48:33 -0700 (PDT) Received: from localhost ([::1]:39826 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zFo-0007fq-KT for importer@patchew.org; Tue, 10 Apr 2018 15:48:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49655) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zC3-0004vO-55 for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:44:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5zC0-000186-Sv for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:44:39 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:38625) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5zC0-00017D-MS for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:44:36 -0400 Received: by mail-wm0-x243.google.com with SMTP id i3so25427281wmf.3 for ; Tue, 10 Apr 2018 12:44:36 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id q138sm3211872wmd.1.2018.04.10.12.44.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 12:44:34 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 186993E0FE8; Tue, 10 Apr 2018 20:39:21 +0100 (BST) 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=JXDZoHR3ADwuaecblqpEpAZf+knR99whKuiIxU+U4PQ=; b=Cr3ZpdPn9kKJY7gZWzhsNy/n5D4KrnvuUxKfIvYokBBeQ92HsYNXgQSCrAZjDnZtsw C0cAIaLPiPyEKx3uY1XGUteEKGA30N/tFfa8Pk49DYBppMStGyGrUrVt/zSBvVfA/6l3 0eVhMiE2S3HqI0+Zx2HCebcznVb7sLPh4EygU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JXDZoHR3ADwuaecblqpEpAZf+knR99whKuiIxU+U4PQ=; b=NhYio3dDwzirzmzihRstRLsKRkSS3j39/UWP8QUBc6oSWbZzIZRrGfslso+CMyTc+n 1bElEuTx+7YIjH6b0tDvRYfz0icE2wnNZCuETZ0/BLlzL3l/CYGxl2Q5O1KOSFsm1JSK e9Ko6nKLGJXKienAHALNu+Oqh7GXlGme/aVPLw4STDPb6s9ytHVM1WwOjsXA3MTTfx+F wl1AHjs3ySEYPBv6Qn8aOTQw6IwJeMed0oyt8FQSkrOtLHWRiV0SfT7s0KPnzQX5AvO2 6+DxXwYbVg1ZnbBKQsz2/y3ZYgwMxRuerGozhcroQLFh3GERVm72E+1ulLYjkYzS326d 313w== X-Gm-Message-State: ALQs6tBsvQ+DoTceKD5FK6cEuejO/D83Nbmh8MEPShGjc3TJdXQzXNcA u+MUhDhuuORPOvMAOgvqI2NAEg== X-Google-Smtp-Source: AIpwx48CFtxDtSQ7D+a+ZBP7G0RpY3bjBDYt58lzOFubYgkyz4pM1kNRAy4zjGE/uovT59vlehJ1PQ== X-Received: by 10.28.18.199 with SMTP id 190mr601028wms.50.1523389475441; Tue, 10 Apr 2018 12:44:35 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 10 Apr 2018 20:39:18 +0100 Message-Id: <20180410193919.28026-24-alex.bennee@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180410193919.28026-1-alex.bennee@linaro.org> References: <20180410193919.28026-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::243 Subject: [Qemu-devel] [PATCH v1 23/24] Makefile.target: add (clean-)guest-tests targets X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , famz@redhat.com, cota@braap.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Now all the build infrastructure is in place we can build tests for each guest that we support. That support mainly depends on having cross compilers installed or docker setup. To keep all the logic for that together we put the rules in tests/tcg/Makefile.include and include it from the main Makefile.target. Signed-off-by: Alex Benn=C3=A9e --- Makefile.target | 5 +++ tests/tcg/Makefile.include | 79 ++++++++++++++++++++++++++++++++++++++++++= ++++ 2 files changed, 84 insertions(+) create mode 100644 tests/tcg/Makefile.include diff --git a/Makefile.target b/Makefile.target index d0ec77a307..a30fd40257 100644 --- a/Makefile.target +++ b/Makefile.target @@ -36,6 +36,11 @@ endif PROGS=3D$(QEMU_PROG) $(QEMU_PROGW) STPFILES=3D =20 +# Makefile Tests +ifdef CONFIG_USER_ONLY +include $(SRC_PATH)/tests/tcg/Makefile.include +endif + config-target.h: config-target.h-timestamp config-target.h-timestamp: config-target.mak =20 diff --git a/tests/tcg/Makefile.include b/tests/tcg/Makefile.include new file mode 100644 index 0000000000..cb8bb36026 --- /dev/null +++ b/tests/tcg/Makefile.include @@ -0,0 +1,79 @@ +# -*- Mode: makefile -*- +# +# TCG tests (per-target rules) +# +# This Makefile fragement is included from the per-target +# Makefile.target so will be invoked for each linux-user program we +# build. We have two options for compiling, either using a configured +# guest compiler or calling one of our docker images to do it for us. +# + +# The per ARCH makefile, if it exists holds extra information about +# useful docker images or alternative compiler flags. Include it if it +# exists + +ARCH_MAKEFILE=3D$(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.include +CHECK_INCLUDE=3D$(wildcard $(ARCH_MAKEFILE)) + +ifeq ($(ARCH_MAKEFILE),$(CHECK_INCLUDE)) +include $(ARCH_MAKEFILE) +endif + +GUEST_BUILD=3D + +# Support installed Cross Compilers + +ifdef CROSS_CC_GUEST + +.PHONY: cross-build-guest-tests +cross-build-guest-tests: + $(call quiet-command, \ + (mkdir -p tests && cd tests && \ + make -f $(SRC_PATH)/tests/tcg/Makefile ARCH=3D$(TARGET_NAME) CC=3D$(CR= OSS_CC_GUEST)), \ + "CROSS-BUILD","$(TARGET_NAME) guest-tests with $(CROSS_CC_GUEST)") + + +GUEST_BUILD=3Dcross-build-guest-tests + +endif + +# Support building with Docker + +ifeq ($(HAVE_USER_DOCKER)$(GUEST_BUILD),y) +ifneq ($(DOCKER_IMAGE),) + +# We also need the Docker make rules to depend on +include $(SRC_PATH)/tests/docker/Makefile.include + +DOCKER_COMPILE_CMD=3D"$(DOCKER_SCRIPT) cc --user $(shell id -u) \ + --cc $(DOCKER_CROSS_COMPILER) \ + -i qemu:$(DOCKER_IMAGE) \ + -s $(SRC_PATH) -- " +DOCKER_PREREQ=3Ddocker-image-$(DOCKER_IMAGE) + +.PHONY: docker-build-guest-tests +docker-build-guest-tests: $(DOCKER_PREREQ) + $(call quiet-command, \ + (mkdir -p tests && cd tests && \ + make -f $(SRC_PATH)/tests/tcg/Makefile ARCH=3D$(TARGET_NAME) CC=3D$(DO= CKER_COMPILE_CMD)), \ + "CROSS-BUILD","$(TARGET_NAME) guest-tests with docker qemu:$(DOCKER_IMA= GE)") + +GUEST_BUILD=3Ddocker-build-guest-tests + +endif +endif + +# Final targets +.PHONY: guest-tests + +ifneq ($(GUEST_BUILD),) +guest-tests: $(GUEST_BUILD) +else +guest-tests: + $(call quiet-command, /bin/true, "CROSS-BUILD", "$(TARGET_NAME) guest-tes= ts SKIPPED") +endif + +# It doesn't mater if these don't exits +.PHONY: clean-guest-tests +clean-guest-tests: + rm -rf tests || echo "no $(TARGET_NAME) tests to remove" --=20 2.16.2 From nobody Sun Apr 28 23:24:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523389489869393.7802081884097; Tue, 10 Apr 2018 12:44:49 -0700 (PDT) Received: from localhost ([::1]:39713 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zCC-0004T0-EL for importer@patchew.org; Tue, 10 Apr 2018 15:44:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46797) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5z7C-0000Kz-EY for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5z7B-0006Rm-Ep for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:38 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:36114) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5z7B-0006R5-7M for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:37 -0400 Received: by mail-wm0-x243.google.com with SMTP id x82so25426771wmg.1 for ; Tue, 10 Apr 2018 12:39:37 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id b203sm1886769wmh.2.2018.04.10.12.39.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 12:39:34 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 2930C3E10B8; Tue, 10 Apr 2018 20:39:21 +0100 (BST) 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=y8zCWNlr/3bCibEJUw/1+uHiIddqYfXo6iyrFuOWTE0=; b=Ddb7oX2dsdxWdh1QOVWv0qPgdY0/jqI4lRnnN7gKF6ohqkDPYvjrwSUcqsMNRr7LoX OztBv9RPHhFq7TERKGyQ/7jWQs+S/vYujkesu55R5QBpBS0QDnnS9/Gvjfoy4mcClZzx +uWYKoiIuXD51oJxcAGAWFwu838/kofPbbAjY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=y8zCWNlr/3bCibEJUw/1+uHiIddqYfXo6iyrFuOWTE0=; b=jJOnCTcs0ud2tbloTHT6UKf3D7IO2Xh4YRU72LKhxsn1QkY9CIUFz9DXumwsenPzn/ lHvQ1lBXW4QB9W72OzhW0BxGTr3x+jlweYa34geLM9OSQ5FN1f5mEcLOUI5Iul5r9Awn 2AFAA53y5l0cP8N8/+WAnHOsZgb5JM1cwRnsOoLUSHL1WX2llTa1O8GLaQPTyWGJ0slD MgpGpxPh5HCjVDnAa9VEDN/RPvll2hd8PrFfjjiL9Nv0le5uECZz/gLH7eLCHoeRnrh1 bAwabgjLt7nfUYh8K3jrGhSJK8YVvrC/DRDmwiF9d46FAaAH//QCP9+yWXQMVaKuxNIo 1geA== X-Gm-Message-State: ALQs6tCZmbk3G7O8rFKuntKB+jCtoUS7uAJHCaLw5xD8/8oZVZa01kZE or1YwnPfDrUY1/Jldx7/1aUdGg== X-Google-Smtp-Source: AIpwx4++lle07ZaAw2xp/Q6EBIurHN4TGngNVzlUUYTIDUYhAYisU57K+bOItH87Of3Ji2m90X3+XQ== X-Received: by 10.28.14.204 with SMTP id 195mr568231wmo.27.1523389176133; Tue, 10 Apr 2018 12:39:36 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 10 Apr 2018 20:39:19 +0100 Message-Id: <20180410193919.28026-25-alex.bennee@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180410193919.28026-1-alex.bennee@linaro.org> References: <20180410193919.28026-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::243 Subject: [Qemu-devel] [PATCH v1 24/24] tests/Makefile.include: add (clean-)check-tcg targets X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , famz@redhat.com, cota@braap.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 This will ensure all linux-user targets build their guest test programs. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- tests/Makefile.include | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index 3d2f0458ab..c402de901e 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -10,6 +10,7 @@ check-help: @echo " $(MAKE) check-speed Run qobject speed tests" @echo " $(MAKE) check-qapi-schema Run QAPI schema tests" @echo " $(MAKE) check-block Run block tests" + @echo " $(MAKE) check-tcg Run TCG tests" @echo " $(MAKE) check-report.html Generates an HTML test report" @echo " $(MAKE) check-clean Clean the tests" @echo @@ -916,6 +917,23 @@ check-report.xml: $(patsubst %,check-report-qtest-%.xm= l, $(QTEST_TARGETS)) check check-report.html: check-report.xml $(call quiet-command,gtester-report $< > $@,"GEN","$@") =20 +# Per guest TCG tests + +LINUX_USER_TARGETS=3D$(filter %-linux-user,$(TARGET_LIST)) +BUILD_TCG_TARGET_RULES=3D$(patsubst %,tcg-tests-%, $(LINUX_USER_TARGETS)) +CLEAN_TCG_TARGET_RULES=3D$(patsubst %,clean-tcg-tests-%, $(LINUX_USER_TARG= ETS)) + +tcg-tests-%: + $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V=3D"$(V)" TARGET_= DIR=3D"$*/" guest-tests,) + +clean-tcg-tests-%: + $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V=3D"$(V)" TARGET_= DIR=3D"$*/" clean-guest-tests,) + +.PHONY: check-tcg +check-tcg: $(BUILD_TCG_TARGET_RULES) + +.PHONY: clean-tcg +clean-tcg: $(CLEAN_TCG_TARGET_RULES) =20 # Other tests =20 @@ -958,7 +976,6 @@ check-speed: $(patsubst %,check-%, $(check-speed-y)) check-block: $(patsubst %,check-%, $(check-block-y)) check: check-qapi-schema check-unit check-qtest check-decodetree check-clean: - $(MAKE) -C tests/tcg clean rm -rf $(check-unit-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y) rm -rf $(sort $(foreach target,$(SYSEMU_TARGET_LIST), $(check-qtest-$(tar= get)-y)) $(check-qtest-generic-y)) rm -f tests/test-qapi-gen-timestamp --=20 2.16.2