RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/trace-cmd#57b6456aa8577d62c3ef6380cd0a72c49d77babf
This commit is contained in:
parent
ec30dd068e
commit
5a7c42a207
9
.gitignore
vendored
9
.gitignore
vendored
@ -0,0 +1,9 @@
|
|||||||
|
/trace-cmd-1.2.20120606git8266dff.tar.gz
|
||||||
|
/trace-cmd-2.1.0.tar.gz
|
||||||
|
/trace-cmd-2.2.1.tar.gz
|
||||||
|
/trace-cmd-2.6.tar.gz
|
||||||
|
/trace-cmd-2.6.1.tar.gz
|
||||||
|
/trace-cmd-v2.6.2.tar.gz
|
||||||
|
/trace-cmd-v2.7.tar.gz
|
||||||
|
/trace-cmd-v2.8.3.tar.gz
|
||||||
|
/trace-cmd-v2.9.1.tar.gz
|
68
0001-libdir-cmake.patch
Normal file
68
0001-libdir-cmake.patch
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index 2bcc383..159b87f 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -262,7 +262,7 @@ all_cmd: $(CMD_TARGETS)
|
||||||
|
CMAKE_COMMAND = /usr/bin/cmake
|
||||||
|
|
||||||
|
$(kshark-dir)/build/Makefile: $(kshark-dir)/CMakeLists.txt
|
||||||
|
- $(Q) cd $(kshark-dir)/build && $(CMAKE_COMMAND) -D_INSTALL_PREFIX=$(prefix) ..
|
||||||
|
+ $(Q) cd $(kshark-dir)/build && $(CMAKE_COMMAND) -D_INSTALL_PREFIX=$(prefix) -D_LIBDIR=$(libdir) ..
|
||||||
|
|
||||||
|
gui: force $(CMD_TARGETS) $(kshark-dir)/build/Makefile
|
||||||
|
$(Q)$(MAKE) $(S) -C $(kshark-dir)/build
|
||||||
|
diff --git a/kernel-shark/CMakeLists.txt b/kernel-shark/CMakeLists.txt
|
||||||
|
index 145b058..bf24ed6 100644
|
||||||
|
--- a/kernel-shark/CMakeLists.txt
|
||||||
|
+++ b/kernel-shark/CMakeLists.txt
|
||||||
|
@@ -30,17 +30,21 @@ if (Qt5Widgets_FOUND)
|
||||||
|
|
||||||
|
endif (Qt5Widgets_FOUND)
|
||||||
|
|
||||||
|
-set(LIBRARY_OUTPUT_PATH "${KS_DIR}/lib")
|
||||||
|
-set(EXECUTABLE_OUTPUT_PATH "${KS_DIR}/bin")
|
||||||
|
-
|
||||||
|
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -pthread -fPIC")
|
||||||
|
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g -std=c++11 -pthread -fPIC")
|
||||||
|
-
|
||||||
|
if(NOT _INSTALL_PREFIX)
|
||||||
|
set(_INSTALL_PREFIX "/usr/local")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
-set(KS_PLUGIN_INSTALL_PREFIX ${_INSTALL_PREFIX}/lib/${KS_APP_NAME}/plugins/)
|
||||||
|
+if (NOT _LIBDIR)
|
||||||
|
+ set(_LIBDIR "${_INSTALL_PREFIX}/lib")
|
||||||
|
+endif (NOT _LIBDIR)
|
||||||
|
+
|
||||||
|
+set(LIBRARY_OUTPUT_PATH "${KS_DIR}/${_LIBDIR}")
|
||||||
|
+set(EXECUTABLE_OUTPUT_PATH "${KS_DIR}/${_INSTALL_PREFIX}/bin")
|
||||||
|
+
|
||||||
|
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -pthread -fPIC")
|
||||||
|
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g -std=c++11 -pthread -fPIC")
|
||||||
|
+
|
||||||
|
+set(KS_PLUGIN_INSTALL_PREFIX ${_LIBDIR}/${KS_APP_NAME}/plugins/)
|
||||||
|
set(KS_ICON ksharkicon.png)
|
||||||
|
|
||||||
|
if (NOT _DEBUG)
|
||||||
|
@@ -50,7 +54,7 @@ if (NOT _DEBUG)
|
||||||
|
|
||||||
|
endif (NOT _DEBUG)
|
||||||
|
|
||||||
|
-SET(CMAKE_INSTALL_RPATH "${_INSTALL_PREFIX}/lib/${KS_APP_NAME}/")
|
||||||
|
+SET(CMAKE_INSTALL_RPATH "${_LIBDIR}/${KS_APP_NAME}/")
|
||||||
|
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
||||||
|
|
||||||
|
include_directories(${KS_DIR}/src/
|
||||||
|
diff --git a/kernel-shark/src/CMakeLists.txt b/kernel-shark/src/CMakeLists.txt
|
||||||
|
index 6cbc00f..b790c7a 100644
|
||||||
|
--- a/kernel-shark/src/CMakeLists.txt
|
||||||
|
+++ b/kernel-shark/src/CMakeLists.txt
|
||||||
|
@@ -79,7 +79,7 @@ if (Qt5Widgets_FOUND AND Qt5Network_FOUND)
|
||||||
|
|
||||||
|
install(TARGETS ${KS_APP_NAME} kshark-record kshark kshark-plot kshark-gui
|
||||||
|
RUNTIME DESTINATION ${_INSTALL_PREFIX}/bin/
|
||||||
|
- LIBRARY DESTINATION ${_INSTALL_PREFIX}/lib/${KS_APP_NAME}/)
|
||||||
|
+ LIBRARY DESTINATION ${_LIBDIR}/${KS_APP_NAME}/)
|
||||||
|
|
||||||
|
install(FILES "${KS_DIR}/${KS_APP_NAME}.desktop"
|
||||||
|
DESTINATION ${_INSTALL_PREFIX}/share/applications/)
|
@ -0,0 +1,33 @@
|
|||||||
|
From 7e8a6e3d03c0a6a7a5014ce488be1e16f99db006 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Zamir SUN <sztsian@gmail.com>
|
||||||
|
Date: Sat, 11 Nov 2017 10:28:32 +0800
|
||||||
|
Subject: [PATCH] trace-cmd: Figure out the arch and install library to the
|
||||||
|
right place
|
||||||
|
|
||||||
|
Signed-off-by: Zamir SUN <sztsian@gmail.com>
|
||||||
|
---
|
||||||
|
Makefile | 8 +++++++-
|
||||||
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index 5c35143..d10e547 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -47,7 +47,13 @@ html_install = $(prefix)/share/kernelshark/html
|
||||||
|
html_install_SQ = '$(subst ','\'',$(html_install))'
|
||||||
|
img_install = $(prefix)/share/kernelshark/html/images
|
||||||
|
img_install_SQ = '$(subst ','\'',$(img_install))'
|
||||||
|
-libdir ?= $(prefix)/lib
|
||||||
|
+
|
||||||
|
+# figure out what arch we are on and install to the right place
|
||||||
|
+ARCH = $(shell getconf LONG_BIT)
|
||||||
|
+LIBDIR_32 = /lib
|
||||||
|
+LIBDIR_64 = /lib64
|
||||||
|
+
|
||||||
|
+libdir ?= $(prefix)/$(LIBDIR_$(ARCH))
|
||||||
|
libdir_SQ = '$(subst ','\'',$(libdir))'
|
||||||
|
includedir = $(prefix)/include/trace-cmd
|
||||||
|
includedir_SQ = '$(subst ','\'',$(includedir))'
|
||||||
|
--
|
||||||
|
2.13.4
|
||||||
|
|
@ -0,0 +1,27 @@
|
|||||||
|
From be4884c74355e0b84552e95a5ea2a4a808693acb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Zamir SUN <sztsian@gmail.com>
|
||||||
|
Date: Mon, 12 Oct 2020 21:05:29 +0800
|
||||||
|
Subject: [PATCH] trace-cmd: Temporary move libtraceevent back to
|
||||||
|
%{_libdir}/trace-cmd
|
||||||
|
|
||||||
|
Signed-off-by: Zamir SUN <sztsian@gmail.com>
|
||||||
|
---
|
||||||
|
Makefile | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index b034042..fc0de09 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -68,7 +68,7 @@ plugin_tracecmd_dir = $(libdir)/trace-cmd/plugins
|
||||||
|
python_dir ?= $(libdir)/traceevent/python
|
||||||
|
var_dir = $(HOME)/.trace-cmd/
|
||||||
|
else
|
||||||
|
-plugin_traceevent_dir = $(libdir)/traceevent/plugins
|
||||||
|
+plugin_traceevent_dir = $(libdir)/trace-cmd/plugins
|
||||||
|
python_dir ?= $(libdir)/trace-cmd/python
|
||||||
|
PLUGIN_DIR_TRACEEVENT = -DPLUGIN_TRACEEVENT_DIR="$(plugin_traceevent_dir)"
|
||||||
|
PLUGIN_DIR_TRACECMD = -DPLUGIN_TRACECMD_DIR="$(plugin_tracecmd_dir)"
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
@ -0,0 +1,45 @@
|
|||||||
|
From 2abc926978474c4588ad43fd49c54f6a7fa3abaf Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Vladislav Valtchev (VMware)" <vladislav.valtchev@gmail.com>
|
||||||
|
Date: Tue, 6 Feb 2018 10:48:59 +0200
|
||||||
|
Subject: [PATCH 01/25] trace-cmd: Fix the logic behind SWIG_DEFINED in the
|
||||||
|
Makefile
|
||||||
|
|
||||||
|
At least on Ubuntu, the $(shell ...) command used in the master Makefile to test
|
||||||
|
for the existence of the 'swig' command does not work in the negative case.
|
||||||
|
That causes the build to report ugly errors in case 'swig' is not installed on
|
||||||
|
the system.
|
||||||
|
This one-line patch, fixes the problem by using the POSIX 'comamnd -v {CMD}'
|
||||||
|
in $(shell ...) to detect the presence of the swig and restores this way the
|
||||||
|
fake report_noswig target.
|
||||||
|
|
||||||
|
Signed-off-by: Vladislav Valtchev (VMware) <vladislav.valtchev@gmail.com>
|
||||||
|
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
|
||||||
|
---
|
||||||
|
Makefile | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index 6217037..85433b8 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -92,7 +92,7 @@ ifndef VERBOSE
|
||||||
|
VERBOSE = 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
-SWIG_DEFINED := $(shell if swig -help &> /dev/null; then echo 1; else echo 0; fi)
|
||||||
|
+SWIG_DEFINED := $(shell if command -v swig; then echo 1; else echo 0; fi)
|
||||||
|
ifeq ($(SWIG_DEFINED), 0)
|
||||||
|
BUILD_PYTHON := report_noswig
|
||||||
|
NO_PYTHON = 1
|
||||||
|
@@ -105,7 +105,7 @@ PYTHON_GUI := ctracecmd.so ctracecmdgui.so
|
||||||
|
PYTHON_VERS ?= python
|
||||||
|
|
||||||
|
# Can build python?
|
||||||
|
-ifeq ($(shell sh -c "pkg-config --cflags $(PYTHON_VERS) > /dev/null 2>&1 && which swig && echo y"), y)
|
||||||
|
+ifeq ($(shell sh -c "pkg-config --cflags $(PYTHON_VERS) > /dev/null 2>&1 && echo y"), y)
|
||||||
|
PYTHON_PLUGINS := plugin_python.so
|
||||||
|
BUILD_PYTHON := $(PYTHON) $(PYTHON_PLUGINS)
|
||||||
|
PYTHON_SO_INSTALL := ctracecmd.install
|
||||||
|
--
|
||||||
|
2.14.3
|
||||||
|
|
36
0003-change-the-way-of-getting-python-ldflags.patch
Normal file
36
0003-change-the-way-of-getting-python-ldflags.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
From c7e94b0d5d654162851bd6f62ed535c8721091e3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Zamir SUN <sztsian@gmail.com>
|
||||||
|
Date: Sun, 4 Feb 2018 11:20:14 +0800
|
||||||
|
Subject: trace-cmd: Change the way of getting python ldflags.
|
||||||
|
|
||||||
|
Prior than this patch, Makefile detects python ldflags using a hardcoded
|
||||||
|
python command. It will cause problems if we are building against
|
||||||
|
python3 in the future when ldflags for python2 and python3 are
|
||||||
|
different. With this patch, python ldflags are detected by
|
||||||
|
corresponding python{,3}-config which will detect the right config for
|
||||||
|
python plugins.
|
||||||
|
|
||||||
|
Link: http://lkml.kernel.org/r/20180204032014.6962-3-sztsian@gmail.com
|
||||||
|
|
||||||
|
Signed-off-by: Zamir SUN (Red Hat) <sztsian@gmail.com>
|
||||||
|
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
|
||||||
|
---
|
||||||
|
Makefile | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index 6b0c3c5..f9b7f65 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -642,7 +642,7 @@ report_noswig: force
|
||||||
|
|
||||||
|
PYTHON_INCLUDES = `pkg-config --cflags $(PYTHON_VERS)`
|
||||||
|
PYTHON_LDFLAGS = `pkg-config --libs $(PYTHON_VERS)` \
|
||||||
|
- $(shell python2 -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LINKFORSHARED')")
|
||||||
|
+ $(shell $(PYTHON_VERS)-config --ldflags)
|
||||||
|
PYGTK_CFLAGS = `pkg-config --cflags pygtk-2.0`
|
||||||
|
|
||||||
|
ctracecmd.so: $(TCMD_LIB_OBJS) ctracecmd.i
|
||||||
|
--
|
||||||
|
2.21.0
|
||||||
|
|
7
kernelshark.desktop
Normal file
7
kernelshark.desktop
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Name=Kernelshark
|
||||||
|
Comment=Analyze data output by trace-cmd
|
||||||
|
Exec=kernelshark
|
||||||
|
Type=Application
|
||||||
|
Categories=Development;Profiling;
|
||||||
|
Icon=applications-development
|
14
linklibs.patch
Normal file
14
linklibs.patch
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
diff --git a/kernel-shark/src/CMakeLists.txt b/kernel-shark/src/CMakeLists.txt
|
||||||
|
index b790c7a..b78e8d2 100644
|
||||||
|
--- a/kernel-shark/src/CMakeLists.txt
|
||||||
|
+++ b/kernel-shark/src/CMakeLists.txt
|
||||||
|
@@ -10,7 +10,8 @@ add_library(kshark SHARED libkshark.c
|
||||||
|
target_link_libraries(kshark ${CMAKE_DL_LIBS}
|
||||||
|
${JSONC_LIBRARY}
|
||||||
|
${TRACEEVENT_LIBRARY}
|
||||||
|
- ${TRACECMD_LIBRARY})
|
||||||
|
+ ${TRACECMD_LIBRARY}
|
||||||
|
+ ${TRACEEVENT_LIBRARY})
|
||||||
|
|
||||||
|
set_target_properties(kshark PROPERTIES SUFFIX ".so.${KS_VERSION_STRING}")
|
||||||
|
|
1
sources
Normal file
1
sources
Normal file
@ -0,0 +1 @@
|
|||||||
|
SHA512 (trace-cmd-v2.9.1.tar.gz) = 186bfdd8ff1e88e9e6d3ae87b123f049892deaaa8d6a42944b6f8abee6b828946b88774029aa96daf4423a3dfc01b42835508f44f636dd02579ef9a8ef425131
|
44
tests/README.md
Normal file
44
tests/README.md
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
About
|
||||||
|
|
||||||
|
Trace-cmd tests according to the CI wiki specifically the standard test interface in the [spec](https://fedoraproject.org/wiki/Changes/InvokingTests).
|
||||||
|
|
||||||
|
The playbook includes Tier1 level test cases that have been tested in classic contexts and is passing reliably.
|
||||||
|
|
||||||
|
The following steps are used to execute the tests using the standard test interface:
|
||||||
|
|
||||||
|
Test environment
|
||||||
|
|
||||||
|
Make sure you have installed packages from the spec
|
||||||
|
|
||||||
|
`# dnf install ansible python2-dnf libselinux-python standard-test-roles ansible python2-dnf libselinux-python standard-test-roles`
|
||||||
|
|
||||||
|
Run tests for Classic
|
||||||
|
~~~~
|
||||||
|
# export TEST_SUBJECTS=
|
||||||
|
# sudo ansible-playbook --tags=classic tests.yml
|
||||||
|
~~~~
|
||||||
|
|
||||||
|
Snip of the example test run for Classic tests:
|
||||||
|
|
||||||
|
> TASK [standard-test-beakerlib : Run beakerlib tests] *****************************************************************************************************************************************
|
||||||
|
>
|
||||||
|
> changed: [localhost] => (item=sanity)
|
||||||
|
>
|
||||||
|
> TASK [standard-test-beakerlib : Make the master tests summary log artifact] ******************************************************************************************************************
|
||||||
|
>
|
||||||
|
> changed: [localhost] => (item=sanity)
|
||||||
|
>
|
||||||
|
> TASK [standard-test-beakerlib : Check the results] *******************************************************************************************************************************************
|
||||||
|
>
|
||||||
|
> changed: [localhost]
|
||||||
|
>
|
||||||
|
> TASK [standard-test-beakerlib : include_role] ************************************************************************************************************************************************
|
||||||
|
>
|
||||||
|
> TASK [str-common : Pull out the logs from test environment to test runner] *******************************************************************************************************************
|
||||||
|
>
|
||||||
|
> changed: [localhost]
|
||||||
|
>
|
||||||
|
> PLAY RECAP ***********************************************************************************************************************************************************************************
|
||||||
|
>
|
||||||
|
> localhost : ok=27 changed=16 unreachable=0 failed=0
|
||||||
|
>
|
59
tests/sanity/Makefile
Normal file
59
tests/sanity/Makefile
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Description: Basic sanity test for trace-cmd
|
||||||
|
# Author: Ziqian SUN (Zamir) <zsun@redhat.com>
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Copyright (c) 2018 Red Hat, Inc. All rights reserved.
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
export PACKAGE_NAME=trace-cmd
|
||||||
|
export TEST=/kernel/general/ftrace/tools/trace-cmd/upstream
|
||||||
|
export TESTVERSION=0.1
|
||||||
|
|
||||||
|
FILES=$(METADATA) runtest.sh Makefile PURPOSE
|
||||||
|
|
||||||
|
.PHONY: all install download clean
|
||||||
|
|
||||||
|
run: $(FILES) build
|
||||||
|
./runtest.sh
|
||||||
|
|
||||||
|
build:
|
||||||
|
chmod a+x runtest.sh
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -fr *~ tests-*.rpm
|
||||||
|
|
||||||
|
include /usr/share/rhts/lib/rhts-make.include
|
||||||
|
|
||||||
|
$(METADATA): Makefile
|
||||||
|
@echo "Owner: Ziqian SUN (Zamir) <zsun@redhat.com>" > $(METADATA)
|
||||||
|
@echo "Name: $(TEST)" >> $(METADATA)
|
||||||
|
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||||
|
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||||
|
@echo "Description: Basic sanity test for trace-cmd" >> $(METADATA)
|
||||||
|
@echo "TestTime: 30m" >> $(METADATA)
|
||||||
|
@echo "RunFor: trace-cmd" >> $(METADATA)
|
||||||
|
@echo "Requires: @development" >> $(METADATA)
|
||||||
|
@echo "Priority: Normal" >> $(METADATA)
|
||||||
|
@echo "License: GPLv3" >> $(METADATA)
|
||||||
|
@echo "Confidential: no" >> $(METADATA)
|
||||||
|
@echo "Destructive: no" >> $(METADATA)
|
||||||
|
|
||||||
|
rhts-lint $(METADATA)
|
1
tests/sanity/PURPOSE
Normal file
1
tests/sanity/PURPOSE
Normal file
@ -0,0 +1 @@
|
|||||||
|
Basic sanity test for trace-cmd
|
58
tests/sanity/runtest.sh
Executable file
58
tests/sanity/runtest.sh
Executable file
@ -0,0 +1,58 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Description: Basic sanity test for trace-cmd
|
||||||
|
# Author: Ziqian SUN (Zamir) <zsun@redhat.com>
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Copyright (c) 2018 Red Hat, Inc. All rights reserved.
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
# Include rhts environment
|
||||||
|
. /usr/bin/rhts-environment.sh
|
||||||
|
. /usr/share/beakerlib/beakerlib.sh
|
||||||
|
|
||||||
|
if ! mount | grep -q debugfs ; then
|
||||||
|
mount -t debugfs nodev /sys/kernel/debug
|
||||||
|
fi
|
||||||
|
|
||||||
|
trace-cmd reset
|
||||||
|
rlJournalStart
|
||||||
|
for TRACER in $(cat /sys/kernel/debug/tracing/available_tracers) ; do
|
||||||
|
rlPhaseStartTest "Enable ${TRACER} using trace-cmd"
|
||||||
|
rlRun "trace-cmd start -p ${TRACER}"
|
||||||
|
rlAssertEquals "Check current tracer" "$(cat /sys/kernel/debug/tracing/current_tracer)" "${TRACER}"
|
||||||
|
rlAssertEquals "Check tracing status" "$(cat /sys/kernel/debug/tracing/tracing_on)" "1"
|
||||||
|
rlRun "trace-cmd stop"
|
||||||
|
rlAssertEquals "Check tracing status" "$(cat /sys/kernel/debug/tracing/tracing_on)" "0"
|
||||||
|
rlRun "trace-cmd reset"
|
||||||
|
rlPhaseEnd
|
||||||
|
if [[ "${TRACER}" == "function" ]]; then
|
||||||
|
rlPhaseStartTest "Test trace-cmd show"
|
||||||
|
rlRun "trace-cmd start -p ${TRACER}"
|
||||||
|
rlWatchdog "trace-cmd show | grep -v '^#' > trace-cmd-show-function.log" 5 INT
|
||||||
|
rlAssertGreater "At least one line of trace data" $(cat trace-cmd-show-function.log | wc -l) 1
|
||||||
|
rlRun "trace-cmd stop"
|
||||||
|
rlRun "trace-cmd reset"
|
||||||
|
rlFileSubmit trace-cmd-show-function.log
|
||||||
|
rm -f trace-cmd-show-function.log
|
||||||
|
rlPhaseEnd
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
rlJournalEnd
|
11
tests/tests.yml
Normal file
11
tests/tests.yml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
- hosts: localhost
|
||||||
|
tags:
|
||||||
|
- classic
|
||||||
|
roles:
|
||||||
|
- role: standard-test-beakerlib
|
||||||
|
tests:
|
||||||
|
- sanity
|
||||||
|
required_packages:
|
||||||
|
- kernel
|
||||||
|
- trace-cmd
|
||||||
|
|
291
trace-cmd.spec
Normal file
291
trace-cmd.spec
Normal file
@ -0,0 +1,291 @@
|
|||||||
|
# git tag
|
||||||
|
#%%global git_commit trace-cmd-v2.6.2
|
||||||
|
#%%global git_commit 57371aaa2f469d0ba15fd85276deca7bfdd7ce36
|
||||||
|
|
||||||
|
Name: trace-cmd
|
||||||
|
Version: 2.9.1
|
||||||
|
# Note: After libtraceevent separated, remember to bump release to more than 20 to force a kernelshark update
|
||||||
|
Release: 3%{?dist}
|
||||||
|
License: GPLv2 and LGPLv2
|
||||||
|
Summary: A user interface to Ftrace
|
||||||
|
Requires: trace-cmd-libs%{_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
URL: http://git.kernel.org/?p=linux/kernel/git/rostedt/trace-cmd.git;a=summary
|
||||||
|
# If upstream does not provide tarballs, to generate:
|
||||||
|
# git clone https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git
|
||||||
|
# cd trace-cmd
|
||||||
|
# git archive --prefix=trace-cmd-%%{version}/ -o trace-cmd-v%%{version}.tar.gz %%{git_commit}
|
||||||
|
Source0: https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/snapshot/trace-cmd-v%{version}.tar.gz
|
||||||
|
Patch0: 0001-trace-cmd-Temporary-move-libtraceevent-back-to-_libd.patch
|
||||||
|
BuildRequires: gcc
|
||||||
|
BuildRequires: xmlto
|
||||||
|
BuildRequires: asciidoc
|
||||||
|
BuildRequires: mlocate
|
||||||
|
BuildRequires: graphviz doxygen
|
||||||
|
BuildRequires: libxml2-devel
|
||||||
|
BuildRequires: gcc-c++
|
||||||
|
BuildRequires: desktop-file-utils
|
||||||
|
BuildRequires: cmake
|
||||||
|
BuildRequires: qt5-qtbase-devel
|
||||||
|
BuildRequires: freeglut-devel
|
||||||
|
BuildRequires: json-c-devel
|
||||||
|
|
||||||
|
%description
|
||||||
|
trace-cmd is a user interface to Ftrace. Instead of needing to use the
|
||||||
|
debugfs directly, trace-cmd will handle of setting of options and
|
||||||
|
tracers and will record into a data file.
|
||||||
|
|
||||||
|
%package python3
|
||||||
|
Summary: Python plugin support for trace-cmd
|
||||||
|
Requires: trace-cmd%{_isa} = %{version}-%{release}
|
||||||
|
BuildRequires: swig
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
|
||||||
|
%description python3
|
||||||
|
Python plugin support for trace-cmd
|
||||||
|
|
||||||
|
%package libs
|
||||||
|
Summary: Libraries of trace-cmd
|
||||||
|
|
||||||
|
%description libs
|
||||||
|
Libraries of trace-cmd
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Development headers of trace-cmd-libs
|
||||||
|
Requires: trace-cmd-libs%{_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
Development headers of trace-cmd-libs
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n %{name}-v%{version}
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
# MANPAGE_DOCBOOK_XSL define is hack to avoid using locate
|
||||||
|
# -z muldefs to workaround the enforcing multi definition check of gcc10.
|
||||||
|
# and it need to be removed once upstream fixed the variable name
|
||||||
|
MANPAGE_DOCBOOK_XSL=`rpm -ql docbook-style-xsl | grep manpages/docbook.xsl`
|
||||||
|
CFLAGS="%{optflags} -D_GNU_SOURCE" LDFLAGS="%{build_ldflags}" BUILD_TYPE=Release \
|
||||||
|
make V=9999999999 MANPAGE_DOCBOOK_XSL=$MANPAGE_DOCBOOK_XSL \
|
||||||
|
prefix=%{_prefix} libdir=%{_libdir} \
|
||||||
|
PYTHON_VERS=python3 all doc plugins libs
|
||||||
|
for i in python/*.py ; do
|
||||||
|
sed -i 's/env python2/python3/g' $i
|
||||||
|
done
|
||||||
|
|
||||||
|
%install
|
||||||
|
make libdir=%{_libdir} prefix=%{_prefix} V=1 DESTDIR=%{buildroot}/ CFLAGS="%{optflags} -D_GNU_SOURCE" LDFLAGS="%{build_ldflags} -z muldefs " BUILD_TYPE=Release install install_doc install_python install_libs
|
||||||
|
find %{buildroot}%{_mandir} -type f | xargs chmod u-x,g-x,o-x
|
||||||
|
find %{buildroot}%{_datadir} -type f | xargs chmod u-x,g-x,o-x
|
||||||
|
find %{buildroot}%{_libdir} -type f -iname "*.so" | xargs chmod 0755
|
||||||
|
#sed -i '/Version/d' %{buildroot}/%{_datadir}/applications/kernelshark.desktop
|
||||||
|
#desktop-file-validate %{buildroot}/%{_datadir}/applications/kernelshark.desktop
|
||||||
|
mkdir -p %{buildroot}/%{_sysconfdir}
|
||||||
|
mv %{buildroot}/usr/etc/bash_completion.d %{buildroot}/%{_sysconfdir}/bash_completion.d
|
||||||
|
|
||||||
|
%files
|
||||||
|
%doc COPYING COPYING.LIB README
|
||||||
|
%{_bindir}/trace-cmd
|
||||||
|
%{_mandir}/man1/%{name}*
|
||||||
|
%{_mandir}/man5/%{name}*
|
||||||
|
%{_sysconfdir}/bash_completion.d/trace-cmd.bash
|
||||||
|
|
||||||
|
%files python3
|
||||||
|
%doc Documentation/README.PythonPlugin
|
||||||
|
%{_libdir}/%{name}/python/
|
||||||
|
|
||||||
|
%files libs
|
||||||
|
%dir %{_libdir}/%{name}
|
||||||
|
%dir %{_libdir}/traceevent/
|
||||||
|
%dir %{_libdir}/tracefs/
|
||||||
|
%{_libdir}/trace-cmd/
|
||||||
|
%{_libdir}/traceevent/
|
||||||
|
%{_libdir}/tracefs/
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%{_includedir}/trace-cmd
|
||||||
|
%{_includedir}/traceevent
|
||||||
|
%{_includedir}/tracefs
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Mon Oct 12 2020 Zamir SUN <sztsian@gmail.com> - 2.9.1-3
|
||||||
|
- Temporary move libtraceevent back to trace-cmd/plugins to mitigate the conflicts
|
||||||
|
|
||||||
|
* Tue Sep 29 2020 Zamir SUN <sztsian@gmail.com> - 2.9.1-2
|
||||||
|
- Remove kernelsharl as it's now separate package
|
||||||
|
|
||||||
|
* Fri Aug 07 2020 Zamir SUN <sztsian@gmail.com> - 2.9.1-1
|
||||||
|
- Update to 2.9.1
|
||||||
|
|
||||||
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.3-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue May 26 2020 Jeff Law <law@redhat.com> - 2.8.3-3
|
||||||
|
- TRACECMD_LIBRARY can reference things in TRACEEVENT_LIBRARY, so
|
||||||
|
link TRACEEVENT_LIBRARY after TRACECMD_LIBRARY.
|
||||||
|
|
||||||
|
* Tue Apr 21 2020 Björn Esser <besser82@fedoraproject.org> - 2.8.3-2
|
||||||
|
- Rebuild (json-c)
|
||||||
|
|
||||||
|
* Sat Feb 08 2020 Zamir SUN <sztsian@gmail.com> - 2.8.3-1
|
||||||
|
- Update to 2.8
|
||||||
|
- Add workaround to resolve gcc 10 multiple definition of `common_type_field' problem
|
||||||
|
- Resolves 1794296
|
||||||
|
- Resolves 1727368
|
||||||
|
|
||||||
|
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.7-9
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2.7-8
|
||||||
|
- Rebuilt for Python 3.8
|
||||||
|
|
||||||
|
* Wed Aug 07 2019 Zamir SUN <sztsian@gmail.com> - 2.7-7
|
||||||
|
- Fix more python2 residuals.
|
||||||
|
- Fixes 1738158
|
||||||
|
|
||||||
|
* Sat Aug 03 2019 Zamir SUN <sztsian@gmail.com> - 2.7-6
|
||||||
|
- Switch the python plugin to python3
|
||||||
|
|
||||||
|
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.7-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.7-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.7-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Mar 02 2018 Zamir SUN <sztsian@gmail.com> - 2.7-2
|
||||||
|
- Add python plugins
|
||||||
|
|
||||||
|
* Fri Mar 02 2018 Zamir SUN <sztsian@gmail.com> - 2.7-1
|
||||||
|
- Update to 2.7
|
||||||
|
- Remove Groups tag
|
||||||
|
|
||||||
|
* Fri Feb 23 2018 Florian Weimer <fweimer@redhat.com> - 2.6.2-3
|
||||||
|
- Use LDFLAGS from redhat-rpm-config
|
||||||
|
|
||||||
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.2-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Nov 11 2017 Zamir SUN <zsun@fedoraproject.org> - 2.6.2-1
|
||||||
|
- Rebase to 2.6.2.
|
||||||
|
|
||||||
|
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.1-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.1-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue May 23 2017 Zamir SUN <zsun@fedoraproject.org> - 2.6.1-1
|
||||||
|
- Rebase to 2.6.1.
|
||||||
|
|
||||||
|
* Thu Mar 30 2017 Zamir SUN <zsun@fedoraproject.org> - 2.6-4.20170330git013205
|
||||||
|
- Rebase to newest upstream version to include various bug fixes.
|
||||||
|
|
||||||
|
* Mon Mar 27 2017 Zamir SUN <zsun@fedoraproject.org> - 2.6-4
|
||||||
|
- Fix bz1389219 segmentation fault in trace-cmd snapshot
|
||||||
|
|
||||||
|
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.6-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Oct 19 2016 Zamir SUN <zsun@fedoraproject.org> - 2.6-2
|
||||||
|
- Add bz1386451-trace-cmd-record-crash-f-before-e.patch
|
||||||
|
- Fix rpmlint error unstripped-binary-or-object
|
||||||
|
- Resolves: rhbz#1386451
|
||||||
|
|
||||||
|
* Thu Aug 18 2016 Jon Stanley <jonstanley@gmail.com> - 2.6-1
|
||||||
|
- Upgrade to uptream 2.6
|
||||||
|
- Rebase distro patch
|
||||||
|
- Resolves: rhbz#1365951
|
||||||
|
|
||||||
|
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.1-7
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.1-6
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.1-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.1-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.1-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 24 2013 Jon Stanley <jonstanley@gmail.com> - 2.2.1-2
|
||||||
|
- Remove addition to %%files - not needed with Makefile patch
|
||||||
|
|
||||||
|
* Tue Jul 23 2013 Dwight Engen <dwight.engen@oracle.com> - 2.2.1-1
|
||||||
|
- Update to 2.2.1
|
||||||
|
|
||||||
|
* Wed Feb 13 2013 Jon Stanley <jonstanley@gmail.com> - 2.1.0-1
|
||||||
|
- Update to latest upstream
|
||||||
|
|
||||||
|
* Thu Sep 13 2012 Jon Stanley <jonstanley@gmail.com> - 1.2-4.20120606git8266dff
|
||||||
|
- Remove %%defattr
|
||||||
|
|
||||||
|
* Thu Sep 06 2012 Jon Stanley <jonstanley@gmail.com> - 1.2-3.20120606git8266dff
|
||||||
|
- More review fixups
|
||||||
|
|
||||||
|
* Tue Aug 28 2012 Jon Stanley <jonstanley@gmail.com> - 1.2-2.20120606git8266dff
|
||||||
|
- Rebase to git snapshot so it builds
|
||||||
|
- Fix license tag per review
|
||||||
|
- Move plugin dir per review
|
||||||
|
|
||||||
|
* Mon Aug 27 2012 Jon Stanley <jonstanley@gmail.com> - 1.2-1
|
||||||
|
- Rebase to 1.2
|
||||||
|
- Makefile now supports CFLAGS, drop patch
|
||||||
|
|
||||||
|
* Sat Feb 19 2011 Jon Stanley <jonstanley@gmail.com> - 1.0.5-1
|
||||||
|
- Rebase to 1.0.5
|
||||||
|
- Add Makefile patch to support passing RPM_OPT_FLAGS
|
||||||
|
- Add kernelshark subpackage
|
||||||
|
- Initial Fedora version
|
||||||
|
|
||||||
|
* Mon Jul 5 2010 John Kacur <jkacur@redhat.com> - 1.0.4-7
|
||||||
|
- Rebasing to trace-cmd-1.0.4
|
||||||
|
|
||||||
|
* Wed Jun 16 2010 John Kacur <jkacur@redhat.com>
|
||||||
|
- Rebasing to trace-cmd-1.0.2
|
||||||
|
- Added parse-events-Do-not-fail-on-FORMAT-TOO-BIG-event-err.patch
|
||||||
|
- Added trace-cmd-Prevent-latency-tracer-plugins-from-doing-.patch
|
||||||
|
- Added trace-cmd-Prevent-print_graph_duration-buffer-overfl.patch
|
||||||
|
|
||||||
|
* Wed Jun 9 2010 John Kacur <jkacur@redhat.com>
|
||||||
|
- Added trace-cmd-Makefile-EXTRAVERSION-should-be-set-withou.patch
|
||||||
|
- Added trace-cmd-Makefile-use-a-substitution-reference.patch
|
||||||
|
- add-DESTDIR-to-make.patch
|
||||||
|
- Related: rhbz599507
|
||||||
|
|
||||||
|
* Fri Jun 4 2010 John Kacur <jkacur@redhat.com>
|
||||||
|
- Updating to trace-cmd-1.0.1
|
||||||
|
- Related: rhbz599507
|
||||||
|
|
||||||
|
* Wed Apr 21 2010 John Kacur <jkacur@redhat.com>
|
||||||
|
- Using trick from William Cohen to avoid the "locate" problem.
|
||||||
|
|
||||||
|
* Fri Apr 16 2010 John Kacur <jkacur@redhat.com>
|
||||||
|
- Update the source to the 1.0.0 version
|
||||||
|
- Many fixes to the spec file.
|
||||||
|
|
||||||
|
* Mon Apr 12 2010 William Cohen <wcohen@redhat.com>
|
||||||
|
- Include manpages in the package.
|
||||||
|
|
||||||
|
* Fri Apr 9 2010 John Kacur <jkacur@redhat.com>
|
||||||
|
- disabled #patch01
|
||||||
|
- Updated the trace-cmd source
|
||||||
|
- Changed version to 0.7.0
|
||||||
|
- Added bogus patch to satisfy rpm requirements
|
||||||
|
- Related:bz519630
|
||||||
|
|
||||||
|
* Mon Mar 15 2010 John Kacur <jkacur@redhat.com>
|
||||||
|
- disabled trace-cmd_rusage.patch
|
||||||
|
- Updated the trace-cmd source
|
||||||
|
- Related:bz519630
|
||||||
|
|
||||||
|
* Fri Nov 16 2007 Luis Claudio R. Goncalves <lgoncalv@redhat.com> - 1.0-1%{?dist}
|
||||||
|
- Initial packaging
|
||||||
|
- Added a patch to display rusage information
|
Loading…
Reference in New Issue
Block a user