Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ] unit: test-bap: disable optimization to speed up compilation
@ 2026-06-21 12:54 Pauli Virtanen
  2026-06-21 15:11 ` [BlueZ] " bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Pauli Virtanen @ 2026-06-21 12:54 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Pauli Virtanen

Compilation of this file with optimization takes 12 min with ASAN, 1 min
without.  This is too long, and the -O2 doesn't serve purpose for unit
tests.

Disable optimization to reduce to 30 sec with ASAN (5 sec without).

autoconf puts global -O2 in CFLAGS that cannot be overridden eg. with
unit_test_bap_CFLAGS. Use pragma instead.
---
 unit/test-bap.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/unit/test-bap.c b/unit/test-bap.c
index 318b405a7..4e89ba6af 100644
--- a/unit/test-bap.c
+++ b/unit/test-bap.c
@@ -13,6 +13,12 @@
 #include <config.h>
 #endif
 
+#if defined(__GNUC__)
+/* Speed up compilation */
+#pragma GCC optimize ("O0")
+#undef _FORTIFY_SOURCE
+#endif
+
 #define _GNU_SOURCE
 #include <unistd.h>
 #include <string.h>
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [BlueZ] unit: test-bap: disable optimization to speed up compilation
  2026-06-21 12:54 [PATCH BlueZ] unit: test-bap: disable optimization to speed up compilation Pauli Virtanen
@ 2026-06-21 15:11 ` bluez.test.bot
  0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2026-06-21 15:11 UTC (permalink / raw)
  To: linux-bluetooth, pav

[-- Attachment #1: Type: text/plain, Size: 1909 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=1114334

---Test result---

Test Summary:
CheckPatch                    FAIL      0.57 seconds
GitLint                       PASS      0.36 seconds
BuildEll                      PASS      14.54 seconds
BluezMake                     PASS      454.07 seconds
MakeCheck                     PASS      17.38 seconds
MakeDistcheck                 PASS      101.41 seconds
CheckValgrind                 PASS      144.56 seconds
CheckSmatch                   PASS      177.29 seconds
bluezmakeextell               PASS      60.70 seconds
IncrementalBuild              PASS      465.69 seconds
ScanBuild                     PASS      521.19 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[BlueZ] unit: test-bap: disable optimization to speed up compilation
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#104: FILE: unit/test-bap.c:18:
+#pragma GCC optimize ("O0")

/github/workspace/src/patch/14638248.patch total: 0 errors, 1 warnings, 12 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/patch/14638248.patch has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.




https://github.com/bluez/bluez/pull/2246

---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-06-21 15:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-21 12:54 [PATCH BlueZ] unit: test-bap: disable optimization to speed up compilation Pauli Virtanen
2026-06-21 15:11 ` [BlueZ] " bluez.test.bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox