From nobody Tue May 7 07:37:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; dkim=fail spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1491050141026109.29486705192369; Sat, 1 Apr 2017 05:35:41 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B636E155E4; Sat, 1 Apr 2017 12:35:38 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 22CA45C462; Sat, 1 Apr 2017 12:35:38 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E9F6C4EBDA; Sat, 1 Apr 2017 12:35:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v31CZYYG015232 for ; Sat, 1 Apr 2017 08:35:34 -0400 Received: by smtp.corp.redhat.com (Postfix) id DE0887F5C6; Sat, 1 Apr 2017 12:35:34 +0000 (UTC) Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.phx2.redhat.com [10.5.110.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D71FE7F5C0 for ; Sat, 1 Apr 2017 12:35:33 +0000 (UTC) Received: from mail-lf0-f65.google.com (mail-lf0-f65.google.com [209.85.215.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 290FF7E9CB for ; Sat, 1 Apr 2017 12:35:31 +0000 (UTC) Received: by mail-lf0-f65.google.com with SMTP id v2so9409514lfi.2 for ; Sat, 01 Apr 2017 05:35:31 -0700 (PDT) Received: from kloomba.my.domain ([213.147.222.1]) by smtp.gmail.com with ESMTPSA id c66sm1444649lfg.9.2017.04.01.05.35.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Apr 2017 05:35:29 -0700 (PDT) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B636E155E4 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com B636E155E4 Authentication-Results: mx1.redhat.com; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="obmEiZqe" DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 290FF7E9CB Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=bogorodskiy@gmail.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 290FF7E9CB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=sgOD8/SCgH3d1Qo/c6pFDeDXaX2bsFxI+A6+B/ByrzM=; b=obmEiZqe2Tqltyeq4U1AZgLhOG8Et6vAsrbn1/l+nk0aG5ZalW3nNoididyEUj8Xkm UnzrqSkEtYdQ9+iojICx1PrTL4uNiQZ3/X3dypXMaupuFiaX73EXidC1QB4Wh37HHr3V N5tm9LAXGwydvlq1lq9Zae42HCeACCCQnXme12/Xq2QmIH6yWpLFTHULovEsYhHa4Ljm dX6f8soOmtRkfEAdgIoYMcFvKhE0jDFPkZdcm2Ud4mYRTZgz8WDxYvlRGuD4NVN111WE IxL3/FKn8hyzBNm43bHen5Qa8H8DLXywIjgEM2gd4VOVxPWL+HuZq3Fqn10gx5Ly2xQg Utqw== 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; bh=sgOD8/SCgH3d1Qo/c6pFDeDXaX2bsFxI+A6+B/ByrzM=; b=B4SZ/6TkEp8VRKRwFMTXIBNC+QQkNMmx/vHFGNXQKJtYwcN99h7H2lucz2QwCGUqmm RpBIHqDjuA7EGmA30uriTsWpAOFvuGh74g9vrsa/bKh5Mc9DWQpJwDUd5khB36BsSd2e VT7uG3OK9rqvmT6SIyWjIME0hUtTP13eGknsrSttShi8IFlgY6iUstkpzoPxxJs85A2P Q9xtXrGcSSvphZyQAAHdI5yBEAJGAhLpbjwwGfl9pIg+IPBJ3C/zR5VZfTzl3KD8fIsu iVxyUZ59ArnhCaIR1FzI7tNS8wPN+QEQCJIzLdFIzxcDPK/RvGqw8PfXVuP4DyEmHNtX PEpg== X-Gm-Message-State: AFeK/H3uaUFmScx8QQX+pPqCteiD9MkT4wlGxJGlYSEANVMHH3wvMD2epWFb8Z3cVOiRmw== X-Received: by 10.25.20.198 with SMTP id 67mr2200497lfu.78.1491050129562; Sat, 01 Apr 2017 05:35:29 -0700 (PDT) From: Roman Bogorodskiy To: libvir-list@redhat.com Date: Sat, 1 Apr 2017 16:35:11 +0400 Message-Id: <20170401123511.75482-1-bogorodskiy@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Sat, 01 Apr 2017 12:35:31 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Sat, 01 Apr 2017 12:35:31 +0000 (UTC) for IP:'209.85.215.65' DOMAIN:'mail-lf0-f65.google.com' HELO:'mail-lf0-f65.google.com' FROM:'bogorodskiy@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.17 * (BAYES_50, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RCVD_IN_SORBS_SPAM, SPF_PASS) 209.85.215.65 mail-lf0-f65.google.com 209.85.215.65 mail-lf0-f65.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.26 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: Roman Bogorodskiy Subject: [libvirt] [PATCH] tests: ignore -Wframe-larger-than= with clang X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Sat, 01 Apr 2017 12:35:39 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" When building with clang and using CFLAGS for debugging (like -O2 -g), build fails on building tests unless configured with --disable-werror: virshtest.c:253:1: error: stack frame size of 5512 bytes in function 'mymai= n' [-Werror,-Wframe-larger-than=3D] mymain(void) To fix that, introduce VIR_WARNINGS_NO_FRAME_LARGER_THAN(_RESET) macros that disable "-Wframe-larger-than=3D" diagnostics when compiling with clang and use that for tests that fail. --- src/internal.h | 13 +++++++++++++ tests/cputest.c | 4 ++++ tests/qemuhotplugtest.c | 3 +++ tests/sockettest.c | 5 +++++ tests/virshtest.c | 4 ++++ tests/virstringtest.c | 5 +++++ 6 files changed, 34 insertions(+) diff --git a/src/internal.h b/src/internal.h index d64be93b3..c1f4aff27 100644 --- a/src/internal.h +++ b/src/internal.h @@ -286,6 +286,19 @@ # define VIR_WARNINGS_NO_WLOGICALOP_STRCHR # endif =20 +/* Workaround for clang's triggering "-Wframe-larger-than=3D" on tests + * when compiling with '-O0' */ +# ifndef VIR_WARNINGS_NO_FRAME_LARGER_THAN +# if defined(__clang__) +# define VIR_WARNINGS_NO_FRAME_LARGER_THAN \ + _Pragma ("clang diagnostic push") \ + _Pragma ("clang diagnostic ignored \"-Wframe-larger-than=3D\"") +# define VIR_WARNINGS_NO_FRAME_LARGER_THAN_RESET _Pragma("clang diagnos= tic pop") +# else +# define VIR_WARNINGS_NO_FRAME_LARGER_THAN +# define VIR_WARNINGS_NO_FRAME_LARGER_THAN_RESET +# endif /* defined(__clang__) */ +# endif =20 /* * Use this when passing possibly-NULL strings to printf-a-likes. diff --git a/tests/cputest.c b/tests/cputest.c index 3d3e43f16..b00352390 100644 --- a/tests/cputest.c +++ b/tests/cputest.c @@ -732,6 +732,8 @@ static const char *models[] =3D { "qemu64", "core2d= uo", "Nehalem" }; static const char *haswell[] =3D { "SandyBridge", "Haswell" }; static const char *ppc_models[] =3D { "POWER6", "POWER7", "POWER8" }; =20 +VIR_WARNINGS_NO_FRAME_LARGER_THAN + static int mymain(void) { @@ -1012,4 +1014,6 @@ mymain(void) return ret =3D=3D 0 ? EXIT_SUCCESS : EXIT_FAILURE; } =20 +VIR_WARNINGS_NO_FRAME_LARGER_THAN_RESET + VIRT_TEST_MAIN(mymain) diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index cdeb3f1bf..5492d09c6 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -574,6 +574,7 @@ testQemuHotplugCpuIndividual(const void *opaque) } =20 =20 +VIR_WARNINGS_NO_FRAME_LARGER_THAN =20 static int mymain(void) @@ -856,4 +857,6 @@ mymain(void) return (ret =3D=3D 0) ? EXIT_SUCCESS : EXIT_FAILURE; } =20 +VIR_WARNINGS_NO_FRAME_LARGER_THAN_RESET + VIRT_TEST_MAIN(mymain) diff --git a/tests/sockettest.c b/tests/sockettest.c index 4d49b38aa..a33b98f6f 100644 --- a/tests/sockettest.c +++ b/tests/sockettest.c @@ -264,6 +264,9 @@ testIsLocalhostHelper(const void *opaque) return 0; } =20 + +VIR_WARNINGS_NO_FRAME_LARGER_THAN + static int mymain(void) { @@ -482,4 +485,6 @@ mymain(void) return ret =3D=3D 0 ? EXIT_SUCCESS : EXIT_FAILURE; } =20 +VIR_WARNINGS_NO_FRAME_LARGER_THAN_RESET + VIRT_TEST_MAIN(mymain) diff --git a/tests/virshtest.c b/tests/virshtest.c index 2f1022416..149e33feb 100644 --- a/tests/virshtest.c +++ b/tests/virshtest.c @@ -249,6 +249,8 @@ static int testCompareEcho(const void *data) } =20 =20 +VIR_WARNINGS_NO_FRAME_LARGER_THAN + static int mymain(void) { @@ -419,6 +421,8 @@ mymain(void) return ret =3D=3D 0 ? EXIT_SUCCESS : EXIT_FAILURE; } =20 +VIR_WARNINGS_NO_FRAME_LARGER_THAN_RESET + VIRT_TEST_MAIN(mymain) =20 #endif /* WIN32 */ diff --git a/tests/virstringtest.c b/tests/virstringtest.c index db1731f96..914eeea24 100644 --- a/tests/virstringtest.c +++ b/tests/virstringtest.c @@ -693,6 +693,9 @@ static int testStripControlChars(const void *args) return ret; } =20 + +VIR_WARNINGS_NO_FRAME_LARGER_THAN + static int mymain(void) { @@ -961,4 +964,6 @@ mymain(void) return ret =3D=3D 0 ? EXIT_SUCCESS : EXIT_FAILURE; } =20 +VIR_WARNINGS_NO_FRAME_LARGER_THAN_RESET + VIRT_TEST_MAIN(mymain) --=20 2.11.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list