Skip to contentSkip to conversation

lttng-tools: Add patch to fix gcc 13 test issue

PATCH New Richard Purdie 1 participant 1 message May 26, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lttng-tools: Add patch to fix gcc 13 test issue

Add a couple of patches from upstream which fix a failing test with gcc 13.

---
 ...a4a793c81221a28f822d07135069456ea021.patch |  48 ++++++++
 .../lttng/lttng-tools/gcc13-ptest-fix.patch   | 107 ++++++++++++++++++
 .../lttng/lttng-tools_2.13.9.bb               |   2 +
 3 files changed, 157 insertions(+)
 create mode 100644 meta/recipes-kernel/lttng/lttng-tools/40b2a4a793c81221a28f822d07135069456ea021.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-tools/gcc13-ptest-fix.patch
meta/recipes-kernel/lttng/lttng-tools/40b2a4a793c81221a28f822d07135069456ea021.patch new file +48 -0
new file mode 100644
index 00000000000..e338eaff2b1
@@ -0,0 +1,48 @@
+From 40b2a4a793c81221a28f822d07135069456ea021 Mon Sep 17 00:00:00 2001
+From: Olivier Dion <[email protected]>
+Date: Fri, 10 Mar 2023 13:17:46 -0500
+Subject: [PATCH] Tests: fix: parse-callback reports missing addr2line
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Backport
+
+addr2line from binutils is required for this script to work correctly.
+However, it silently fails. Fix this by using `subprocess.run' with
+`check=True' instead of `subprocess.getoutput'. That way, an exception
+is raised if an error occurs.
+
+Fix the shebang by not assuming where python is installed while at it.
+
+Change-Id: I5157b3dbccf6bfbe08a6b6840b38f5db9010fe96
+Signed-off-by: Olivier Dion <[email protected]>
+Signed-off-by: Jérémie Galarneau <[email protected]>
+---
+ tests/utils/parse-callstack.py | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/tests/utils/parse-callstack.py b/tests/utils/parse-callstack.py
+index 3bfddd9ef..c3f0e2e9b 100755
+--- a/tests/utils/parse-callstack.py
++++ b/tests/utils/parse-callstack.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/env python3
+ #
+ # Copyright (C) 2017 Francis Deslauriers <[email protected]>
+ #
+@@ -24,7 +24,9 @@ def addr2line(executable, addr):
+     # Expand inlined functions
+     cmd += ['--addresses', addr]
+ 
+-    addr2line_output = subprocess.getoutput(' '.join(cmd))
++    status = subprocess.run(cmd, stdout=subprocess.PIPE, check=True)
++
++    addr2line_output = status.stdout.decode("utf-8")
+ 
+     # Omit the last 2 lines as the caller of main can not be determine
+     fcts = [addr2line_output.split()[-2]]
+-- 
+2.34.1
+
meta/recipes-kernel/lttng/lttng-tools/gcc13-ptest-fix.patch new file +107 -0

107 lines not on this page · raw message

meta/recipes-kernel/lttng/lttng-tools_2.13.9.bb +2 -0
index 58c0378d66f..113720ca5cb 100644
@@ -37,6 +37,8 @@ SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \
            file://lttng-sessiond.service \
            file://disable-tests.patch \
            file://0001-compat-Define-off64_t-as-off_t-on-linux.patch \
+           file://40b2a4a793c81221a28f822d07135069456ea021.patch \
+           file://gcc13-ptest-fix.patch \
            "
 
 SRC_URI[sha256sum] = "8d94dc95b608cf70216b01203a3f8242b97a232db2e23421a2f43708da08f337"
Signature · 1 line
2.39.2