Compare commits

..

No commits in common. "c8" and "a10s" have entirely different histories.
c8 ... a10s

145 changed files with 14955 additions and 17 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

7
.gitignore vendored
View File

@ -1 +1,6 @@
SOURCES/ltrace-0.7.91.tar.bz2
ltrace-0.5-svn45.tar.gz
ltrace-*/
/ltrace-0.6.0.tar.bz2
/ltrace-0.7.0.tar.bz2
/ltrace-0.7.2.tar.bz2
/ltrace-0.7.91.tar.bz2

View File

@ -1 +0,0 @@
74029042af10b0e9fca6acccb016ce096460a176 SOURCES/ltrace-0.7.91.tar.bz2

File diff suppressed because it is too large Load Diff

19
gating.yaml Normal file
View File

@ -0,0 +1,19 @@
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_stable
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
--- !Policy
product_versions:
- rhel-10
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}

2811
ltrace-0.7.2-arm.patch Normal file

File diff suppressed because it is too large Load Diff

6472
ltrace-0.7.2-bits.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,13 @@
diff -rup a/sysdeps/linux-gnu/ppc/plt.c b/sysdeps/linux-gnu/ppc/plt.c
--- a/sysdeps/linux-gnu/ppc/plt.c 2022-01-27 20:40:52.956980433 -0500
+++ b/sysdeps/linux-gnu/ppc/plt.c 2022-01-27 20:41:37.031599771 -0500
@@ -687,8 +687,8 @@ arch_elf_add_func_entry(struct process *
if (libsym == NULL
|| library_symbol_init(libsym, addr, full_name, 1,
LS_TOPLT_NONE) < 0) {
- free(libsym);
delete_symbol_chain(libsym);
+ free(libsym);
libsym = NULL;
fprintf(stderr, "Couldn't add symbol %s"
"for tracing.\n", name);

View File

@ -0,0 +1,151 @@
diff -rupN a/options.c b/options.c
--- a/options.c 2019-06-28 17:15:31.515626363 -0400
+++ b/options.c 2019-06-28 17:18:59.490632337 -0400
@@ -440,7 +440,8 @@ parse_int(const char *optarg, char opt,
}
int
-parse_colon_separated_list(const char *paths, struct vect *vec)
+parse_colon_separated_list(const char *paths, struct vect *vec,
+ enum opt_F_origin origin)
{
/* PATHS contains a colon-separated list of directories and
* files to load. It's modeled after shell PATH variable,
@@ -467,6 +468,7 @@ parse_colon_separated_list(const char *p
struct opt_F_t arg = {
.pathname = tok,
.own_pathname = tok == clone,
+ .origin = origin,
};
if (VECT_PUSHBACK(vec, &arg) < 0)
/* Presumably this is not a deal-breaker. */
@@ -494,16 +496,18 @@ opt_F_get_kind(struct opt_F_t *entry)
if (entry->kind == OPT_F_UNKNOWN) {
struct stat st;
if (lstat(entry->pathname, &st) < 0) {
- fprintf(stderr, "Couldn't stat %s: %s\n",
- entry->pathname, strerror(errno));
+ if (entry->origin == OPT_F_CMDLINE)
+ fprintf(stderr, "Couldn't stat %s: %s\n",
+ entry->pathname, strerror(errno));
entry->kind = OPT_F_BROKEN;
} else if (S_ISDIR(st.st_mode)) {
entry->kind = OPT_F_DIR;
} else if (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)) {
entry->kind = OPT_F_FILE;
} else {
- fprintf(stderr, "%s is neither a regular file, "
- "nor a directory.\n", entry->pathname);
+ if (entry->origin == OPT_F_CMDLINE)
+ fprintf(stderr, "%s is neither a regular file, "
+ "nor a directory.\n", entry->pathname);
entry->kind = OPT_F_BROKEN;
}
}
@@ -607,7 +611,8 @@ process_options(int argc, char **argv)
options.follow = 1;
break;
case 'F':
- parse_colon_separated_list(optarg, &opt_F);
+ parse_colon_separated_list(optarg, &opt_F,
+ OPT_F_CMDLINE);
break;
case 'h':
usage();
diff -rupN a/options.h b/options.h
--- a/options.h 2019-06-28 17:15:31.515626363 -0400
+++ b/options.h 2019-06-28 17:18:55.984632238 -0400
@@ -1,6 +1,6 @@
/*
* This file is part of ltrace.
- * Copyright (C) 2012,2013 Petr Machata, Red Hat Inc.
+ * Copyright (C) 2012, 2013, 2015 Petr Machata, Red Hat Inc.
* Copyright (C) 2009,2010 Joe Damato
* Copyright (C) 1998,2002,2008 Juan Cespedes
* Copyright (C) 2006 Ian Wienand
@@ -77,10 +77,16 @@ enum opt_F_kind {
OPT_F_DIR,
};
+enum opt_F_origin {
+ OPT_F_CMDLINE = 0,
+ OPT_F_ENVIRON,
+};
+
struct opt_F_t {
char *pathname;
int own_pathname : 1;
enum opt_F_kind kind : 2;
+ enum opt_F_origin origin : 1;
};
/* If entry->kind is OPT_F_UNKNOWN, figure out whether it should be
@@ -98,7 +104,8 @@ void opt_F_destroy(struct opt_F_t *entry
* The list is split and added to VEC, which shall be a vector
* initialized like VECT_INIT(VEC, struct opt_F_t); Returns 0 on
* success or a negative value on failure. */
-int parse_colon_separated_list(const char *paths, struct vect *vec);
+int parse_colon_separated_list(const char *paths, struct vect *vec,
+ enum opt_F_origin origin);
/* Vector of struct opt_F_t. */
extern struct vect opt_F;
diff -rupN a/sysdeps/linux-gnu/hooks.c b/sysdeps/linux-gnu/hooks.c
--- a/sysdeps/linux-gnu/hooks.c 2013-11-04 20:08:03.000000000 -0500
+++ b/sysdeps/linux-gnu/hooks.c 2019-06-28 17:18:55.989632238 -0400
@@ -1,6 +1,6 @@
/*
* This file is part of ltrace.
- * Copyright (C) 2012, 2013 Petr Machata
+ * Copyright (C) 2012, 2013, 2015 Petr Machata
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -153,7 +153,7 @@ again:
if (xdg_sys != NULL) {
struct vect v;
VECT_INIT(&v, struct opt_F_t);
- if (parse_colon_separated_list(xdg_sys, &v) < 0
+ if (parse_colon_separated_list(xdg_sys, &v, OPT_F_ENVIRON) < 0
|| VECT_EACH(&v, struct opt_F_t, NULL,
add_dir_component_cb, &dirs) != NULL)
fprintf(stderr,
diff -rupN a/testsuite/ltrace.main/XDG_CONFIG_DIRS.exp b/testsuite/ltrace.main/XDG_CONFIG_DIRS.exp
--- a/testsuite/ltrace.main/XDG_CONFIG_DIRS.exp 1969-12-31 19:00:00.000000000 -0500
+++ b/testsuite/ltrace.main/XDG_CONFIG_DIRS.exp 2019-06-28 17:18:55.989632238 -0400
@@ -0,0 +1,35 @@
+# This file is part of ltrace.
+# Copyright (C) 2015 Petr Machata, Red Hat Inc.
+#
+# 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+# 02110-1301 USA
+
+set bin [ltraceCompile {} [ltraceSource c {
+ int main() { return 0; }
+}]]
+
+setenv XDG_CONFIG_DIRS "blah"
+ltraceRun -L -- $bin
+unsetenv XDG_CONFIG_DIRS
+
+if {[catch "exec $LTRACE -L -F blah -- $bin" output]} {
+ ltraceMatch [ltraceSource ltrace "$output"] {
+ {blah == 1}
+ }
+} else {
+ fail "expected error message regarding `blah`"
+}
+
+ltraceDone

View File

@ -0,0 +1,24 @@
Index: ltrace-0.7.91/sysdeps/linux-gnu/aarch64/regs.c
===================================================================
--- ltrace-0.7.91.orig/sysdeps/linux-gnu/aarch64/regs.c
+++ ltrace-0.7.91/sysdeps/linux-gnu/aarch64/regs.c
@@ -23,6 +23,7 @@
#include <linux/uio.h>
#include <assert.h>
#include <stdlib.h>
+#include <stdio.h>
#include "backend.h"
#include "proc.h"
Index: ltrace-0.7.91/sysdeps/linux-gnu/aarch64/trace.c
===================================================================
--- ltrace-0.7.91.orig/sysdeps/linux-gnu/aarch64/trace.c
+++ ltrace-0.7.91/sysdeps/linux-gnu/aarch64/trace.c
@@ -24,6 +24,7 @@
#include <asm/ptrace.h>
#include <string.h>
#include <errno.h>
+#include <stdio.h>
#include "backend.h"
#include "proc.h"

View File

@ -1,6 +1,6 @@
diff -rup a/sysdeps/linux-gnu/aarch64/fetch.c b/sysdeps/linux-gnu/aarch64/fetch.c
--- a/sysdeps/linux-gnu/aarch64/fetch.c 2018-07-05 16:06:04.697642086 -0400
+++ b/sysdeps/linux-gnu/aarch64/fetch.c 2018-07-05 16:16:19.366905601 -0400
--- a/sysdeps/linux-gnu/aarch64/fetch.c 2018-07-05 16:06:10.066626252 -0400
+++ b/sysdeps/linux-gnu/aarch64/fetch.c 2018-07-05 16:17:17.659748481 -0400
@@ -308,12 +308,9 @@ arch_fetch_arg_init(enum tof type, struc
struct fetch_script how = pass_arg(context, proc, ret_info);
if (how.c == CVT_ERR)
@ -16,8 +16,8 @@ diff -rup a/sysdeps/linux-gnu/aarch64/fetch.c b/sysdeps/linux-gnu/aarch64/fetch.
return context;
diff -rup a/testsuite/ltrace.main/system_call_params.exp b/testsuite/ltrace.main/system_call_params.exp
--- a/testsuite/ltrace.main/system_call_params.exp 2018-07-05 16:06:05.176640673 -0400
+++ b/testsuite/ltrace.main/system_call_params.exp 2018-07-05 17:27:25.052710126 -0400
--- a/testsuite/ltrace.main/system_call_params.exp 2018-07-05 16:06:10.516624926 -0400
+++ b/testsuite/ltrace.main/system_call_params.exp 2018-07-05 16:58:01.549830643 -0400
@@ -61,13 +61,13 @@ set conf [ltraceNamedSource "$dir/syscal
# doesn't list readdir, that would be taken from somelib.conf with a
# wrong prototype.

14
ltrace-0.7.91-null.patch Normal file
View File

@ -0,0 +1,14 @@
diff --git a/output.c b/output.c
index 7cab383..18f9cf0 100644
--- a/output.c
+++ b/output.c
@@ -598,6 +598,9 @@ frame_callback (Dwfl_Frame *state, void *arg)
NULL, NULL, NULL);
symname = dwfl_module_addrinfo(mod, pc, &off, &sym,
NULL, NULL, NULL);
+ } else {
+ modname = "unknown";
+ symname = "unknown";
}
/* This mimics the output produced by libunwind below. */

View File

@ -0,0 +1,20 @@
diff -rup a/sysdeps/linux-gnu/ppc/trace.c b/sysdeps/linux-gnu/ppc/trace.c
--- a/sysdeps/linux-gnu/ppc/trace.c 2021-02-08 14:35:16.876494095 -0500
+++ b/sysdeps/linux-gnu/ppc/trace.c 2021-02-08 15:05:59.468107311 -0500
@@ -57,6 +57,7 @@ get_arch_dep(struct process *proc)
}
#define SYSCALL_INSN 0x44000002
+#define SYSCALL2_INSN 0x44000001
/* Returns 1 if syscall, 2 if sysret, 0 otherwise. */
int
@@ -75,7 +76,7 @@ syscall_p(struct process *proc, int stat
0);
#endif
- if (insn == SYSCALL_INSN) {
+ if (insn == SYSCALL_INSN || insn == SYSCALL2_INSN) {
*sysnum =
(int)ptrace(PTRACE_PEEKUSER, proc->pid,
sizeof(long) * PT_R0, 0);

View File

@ -0,0 +1,16 @@
diff -rup a/expr.c b/expr.c
--- a/expr.c 2013-10-10 08:43:55.000000000 -0400
+++ b/expr.c 2020-02-06 17:05:40.658679755 -0500
@@ -189,10 +189,10 @@ int
expr_clone(struct expr_node *retp, const struct expr_node *node)
{
*retp = *node;
+ struct expr_node *nlhs;
+ struct expr_node *nrhs = NULL;
switch (node->kind) {
- struct expr_node *nlhs;
- struct expr_node *nrhs;
case EXPR_OP_ARGNO:
case EXPR_OP_SELF:

View File

@ -0,0 +1,68 @@
diff -rup a/testsuite/Makefile.am b/testsuite/Makefile.am
--- a/testsuite/Makefile.am 2012-12-16 20:53:45.000000000 -0500
+++ b/testsuite/Makefile.am 2019-06-28 16:59:19.935602953 -0400
@@ -39,6 +39,7 @@ env.exp: Makefile
rm -f env.exp
echo set libelf_LD_LIBRARY_PATH '"$(libelf_LD_LIBRARY_PATH)"' >> $@
echo set libunwind_LD_LIBRARY_PATH '"$(libunwind_LD_LIBRARY_PATH)"' >> $@
+ echo set PREFIX '"$(prefix)"' >> $@
CLEANFILES = *.o *.so *.log *.sum *.ltrace site.bak setval.tmp site.exp env.exp
diff -rup a/testsuite/Makefile.in b/testsuite/Makefile.in
--- a/testsuite/Makefile.in 2013-11-04 20:22:47.000000000 -0500
+++ b/testsuite/Makefile.in 2019-06-28 16:59:12.075602806 -0400
@@ -648,6 +648,7 @@ env.exp: Makefile
rm -f env.exp
echo set libelf_LD_LIBRARY_PATH '"$(libelf_LD_LIBRARY_PATH)"' >> $@
echo set libunwind_LD_LIBRARY_PATH '"$(libunwind_LD_LIBRARY_PATH)"' >> $@
+ echo set PREFIX '"$(prefix)"' >> $@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff -rup a/testsuite/ltrace.main/system_call_params.exp b/testsuite/ltrace.main/system_call_params.exp
--- a/testsuite/ltrace.main/system_call_params.exp 2019-06-28 16:44:07.542584754 -0400
+++ b/testsuite/ltrace.main/system_call_params.exp 2019-06-28 17:00:35.811604355 -0400
@@ -1,5 +1,5 @@
# This file is part of ltrace.
-# Copyright (C) 2013, 2014 Petr Machata, Red Hat Inc.
+# Copyright (C) 2013, 2014, 2015 Petr Machata, Red Hat Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
@@ -60,8 +60,35 @@ set conf [ltraceNamedSource "$dir/syscal
# somelib.conf is passed, and syscalls.conf is not available, or
# doesn't list readdir, that would be taken from somelib.conf with a
# wrong prototype.
+#
+# This test relies on the fact that there is no global config file
+# that would provide legitimate system call prototypes. But that
+# doesn't have to be true, maybe ltrace is already installed on the
+# system with the right prefix. So first compile a wrapper that we
+# use to redirect fopen calls.
+
+set libfopen_so [ltraceCompile libfopen.so -ldl \
+ [ltraceSource c [string map [list "@PREFIX@" "$PREFIX"] {
+ #define _GNU_SOURCE
+ #include <dlfcn.h>
+ #include <stdio.h>
+ #include <string.h>
+
+ FILE *
+ fopen(const char *path, const char *mode)
+ {
+ #define PATH "@PREFIX@/share"
+ if (strncmp(path, PATH, sizeof(PATH) - 1) == 0)
+ path = "/dev/null";
+ return ((FILE *(*)(const char *, const char *))
+ dlsym(RTLD_NEXT, "fopen")) (path, mode);
+ }
+}]]]
+
+setenv LD_PRELOAD $libfopen_so
ltraceMatch1 [ltraceRun -L -S -F $conf -- $bin] {^open@SYS\("/some/path", 0\)} == 0
+unsetenv LD_PRELOAD
# On the other hand, if -F somedir/ is given, we want to accept
# syscalls.conf found there.

12
ltrace-rh1225568.patch Normal file
View File

@ -0,0 +1,12 @@
diff -Nrup a/testsuite/ltrace.minor/trace-irelative.exp b/testsuite/ltrace.minor/trace-irelative.exp
--- a/testsuite/ltrace.minor/trace-irelative.exp 2013-11-04 18:08:03.000000000 -0700
+++ b/testsuite/ltrace.minor/trace-irelative.exp 2015-06-01 12:30:59.737371166 -0600
@@ -54,6 +54,8 @@ set src [ltraceSource c {
}]
foreach ext {{} .pie} {
+ # ltrace does not yet support AARCH64's ifuncs
+ setup_xfail aarch64*-*-*
set bin1 [ltraceCompile $ext $src]
do_tests $bin1 ""
}

31
ltrace-rhel68373.patch Normal file
View File

@ -0,0 +1,31 @@
From 4da87819752101fb9665120641454448ebc95526 Mon Sep 17 00:00:00 2001
From: DJ Delorie <dj@delorie.com>
Date: Wed, 17 Sep 2025 17:08:18 -0400
Subject: ppc64le: fix couldn't find DT_PPC64_GLINK on /lib64/ld64.so.2
The loader is static and doesn't have a PLT so not finding
this there is not an issue, but it shows up in the dynamic
loader chain, so ignore this "error".
diff --git a/sysdeps/linux-gnu/ppc/plt.c b/sysdeps/linux-gnu/ppc/plt.c
index 66a842b..321eda3 100644
--- a/sysdeps/linux-gnu/ppc/plt.c
+++ b/sysdeps/linux-gnu/ppc/plt.c
@@ -520,13 +520,12 @@ arch_elf_init(struct ltelf *lte, struct library *lib)
GElf_Addr glink_vma;
if (elf_load_dynamic_entry(lte, DT_PPC64_GLINK,
&glink_vma) < 0) {
- fprintf(stderr, "couldn't find DT_PPC64_GLINK\n");
- return -1;
+ lte->arch.plt_stub_vma = 0;
+ } else {
+ /* The first glink stub starts at offset 32. */
+ lte->arch.plt_stub_vma = glink_vma + 32;
}
- /* The first glink stub starts at offset 32. */
- lte->arch.plt_stub_vma = glink_vma + 32;
-
} else {
/* By exhaustion--PPC32 BSS. */
if (elf_load_dynamic_entry(lte, DT_PLTGOT,

View File

@ -1,14 +1,17 @@
Summary: Tracks runtime library calls from dynamically linked executables
Name: ltrace
Version: 0.7.91
Release: 28%{?dist}
URL: http://ltrace.alioth.debian.org/
Release: 53%{?dist}.alma.1
# In coordination with Juan Céspedes, upstream is now officially on gitlab.
# We are going to being sending all of our Fedora patches upstream to gitlab.
URL: https://gitlab.com/cespedes/ltrace
License: GPLv2+
Group: Development/Debuggers
BuildRequires: elfutils-devel dejagnu
BuildRequires: libselinux-devel
BuildRequires: autoconf automake libtool
BuildRequires: gcc-c++
BuildRequires: make
# Note: this URL needs to be updated for each release, as the file
# number changes for each file. Full list of released files is at:
@ -106,8 +109,35 @@ Patch27: ltrace-rh1423913.patch
# AARCH64 large parameters and syscall testsuite fixes.
Patch28: ltrace-0.7.91-aarch64-params.patch
# IA64 CET support
Patch29: ltrace-0.7.91-cet.patch
# gcc-9 fix. Avoid passing NULL as argument to %s
Patch29: ltrace-0.7.91-null.patch
# Adds support for CET PLTs via second-plt lookups.
Patch30: ltrace-0.7.91-cet.patch
# Extra #includes for gcc 9
Patch31: ltrace-0.7.91-aarch64-headers.patch
# Testsuite: AARCH64 ifuncs not supported yet yet.
Patch32: ltrace-rh1225568.patch
# testsuite fixes for pre-installed config files
Patch33: ltrace-0.7.91-testsuite-system_call_params.patch
# Ignore bogus files from the environment
Patch34: ltrace-0.7.91-XDG_CONFIG_DIRS.patch
# GCC erroneously warns about uninitialized values
Patch35: ltrace-0.7.91-rh1799619.patch
# Support for both SC and SCV sycall insns
Patch36: ltrace-0.7.91-ppc64le-scv.patch
Patch37: ltrace-0.7.91-W-use-after-free.patch
Patch38: ltrace-rhel68373.patch
# AlmaLinux Patch
Patch1001: 0001-riscv64-add-initial-riscv64-support.patch
%description
Ltrace is a debugging program which runs a specified command until the
@ -150,24 +180,38 @@ execution of processes.
%patch27 -p1
%patch28 -p1
%patch29 -p1
%patch30 -p1
%patch31 -p1
%patch32 -p1
%patch33 -p1
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%patch38 -p1
# Applying AlmaLinux Patch
%patch1001 -p1 -b .0001-riscv64-add-initial-riscv64-support
%build
autoreconf -i
%configure --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}
make %{?_smp_mflags}
%make_build
%install
make DESTDIR=$RPM_BUILD_ROOT bindir=%{_bindir} install
%make_install bindir=%{_bindir}
# The testsuite is useful for development in real world, but fails in
# koji for some reason. Disable it, but have it handy.
%check
echo ====================TESTING=========================
# The ppc64 testsuite hangs rpmbuild hard in koji, disable until fixed.
%ifnarch ppc64le
timeout 180 make check ||:
%endif
echo ====================TESTING END=====================
%files
%defattr(-,root,root)
%doc NEWS COPYING CREDITS INSTALL README TODO
%{_bindir}/ltrace
%{_mandir}/man1/ltrace.1*
@ -175,10 +219,93 @@ echo ====================TESTING END=====================
%{_datadir}/ltrace
%changelog
* Tue Nov 05 2019 DJ Delorie <dj@redhat.com> - 0.7.91-28
- Support Intel CET PLTs (#1655368)
* Fri Sep 19 2025 Andrew Lukoshko <alukoshko@almalinux.org> - 0.7.91-53.alma.1
- riscv64: add initial riscv64 support
* Fri Jul 06 2018 DJ Delorie <dj@redhat.com> - 0.7.91-27
* Wed Sep 17 2025 DJ Delorie <dj@redhat.com> - 0.7.91-53
- Resolves "couldn't find DT_PPC64_GLINK" bug (RHEL-68373)
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 0.7.91-52
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 0.7.91-51
- Bump release for June 2024 mass rebuild
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.91-50
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.91-49
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.91-48
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.91-47
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.91-46
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri May 03 2022 Carlos O'Donell <carlos@redhat.com> - 0.7.91-45
- Rebuild ltrace for rawhide (#2046722)
* Thu Jan 27 2022 DJ Delorie <dj@redhat.com> - 0.7.91-44
- Fix use-after-free cases.
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.91-43
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.91-42
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Mon Feb 8 2021 DJ Delorie <dj@redhat.com> - 0.7.91-41
- Add support for SCV syscall insn for ppc64le
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.91-40
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.91-39
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 14 2020 Tom Stellard <tstellar@redhat.com> - 0.7.91-38
- Use make macros
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
* Thu Feb 6 2020 DJ Delorie <dj@redhat.com> - 0.7.91-37
- Initialize some variables to avoid gcc warning (#1799619)
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.91-36
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Jul 23 2019 DJ Delorie <dj@redhat.com> - 0.7.91-35
- Skip ppc64 testsuite until the hangs in koji can be fixed.
* Wed Jul 17 2019 DJ Delorie <dj@redhat.com> - 0.7.91-34
- Add fixes in handling of bogus paths that come from XDG_CONFIG_DIRS.
- Testsuite fixes for pre-installed config files.
- Extra AARCH64 includes for gcc 9.
- Testsuite: AARCH64 ifuncs not supported yet yet.
* Thu Apr 4 2019 DJ Delorie <dj@redhat.com> - 0.7.91-33
- Add Intel CET support.
* Tue Mar 12 2019 DJ Delorie <dj@redhat.com> - 0.7.91-32
- Revert previous patch, redundant
* Tue Mar 5 2019 Eugene Syromiatnikov <esyr@redhat.com> - 0.7.91-31
- Fix "Too many return value classes" assert
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.91-30
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Wed Jan 16 2019 Jeff Law <law@redhat.com> - 0.7.91-29
- Avoid passing NULL as argument to %s in printf call
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.91-28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Jul 05 2018 DJ Delorie <dj@redhat.com> - 0.7.91-27
- Fix aarch64 long parameters (via $r8) support.
- Make system_call_params test compare more exactly.

6
plans/ci.fmf Normal file
View File

@ -0,0 +1,6 @@
summary: CI Gating Plan
discover:
how: fmf
directory: tests
execute:
how: tmt

1
sources Normal file
View File

@ -0,0 +1 @@
9db3bdee7cf3e11c87d8cc7673d4d25b ltrace-0.7.91.tar.bz2

2
tests/README Normal file
View File

@ -0,0 +1,2 @@
The test's Makefiles are not used in Fedora CI infrastructure. But are kept here
for backward compatibility with traditional beakerlib test harness in RHEL.

View File

@ -0,0 +1,61 @@
# Copyright (c) 2008 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/>.
#
# Author: Michal Nowak <mnowak@redhat.com>
TOPLEVEL_NAMESPACE=/tools
PACKAGE_NAME=ltrace
RELATIVE_PATH=Regression/211135-ltrace-hangs-while-tracing-child-process-with--f-option
export TEST=$(TOPLEVEL_NAMESPACE)/$(PACKAGE_NAME)/$(RELATIVE_PATH)
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE reproducer.c
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
chmod a+x ./runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@touch $(METADATA)
@echo "Owner: Michal Nowak <mnowak@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Description: ltrace hangs while tracing child process with -f option" >> $(METADATA)
@echo "Bug: 211135" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: $(PACKAGE_NAME)" >> $(METADATA)
@echo "Requires: $(PACKAGE_NAME)" >> $(METADATA)
@echo "Requires: glibc-devel" >> $(METADATA)
@echo "License: GPLv3+" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -0,0 +1,2 @@
ltrace could possibly crash/hang when tracing fork() on ppc/ppc64
in ltrace with option "-f".

View File

@ -0,0 +1,17 @@
summary: ltrace hangs while tracing child process with -f option
description: |
ltrace could possibly crash/hang when tracing fork() on ppc/ppc64
in ltrace with option "-f".
contact: Michal Nowak <mnowak@redhat.com>
component:
- ltrace
test: ./runtest.sh
framework: beakerlib
recommend:
- ltrace
- glibc-devel
duration: 5m
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=211135
extra-summary: /tools/ltrace/Regression/211135-ltrace-hangs-while-tracing-child-process-with--f-option
extra-task: /tools/ltrace/Regression/211135-ltrace-hangs-while-tracing-child-process-with--f-option

View File

@ -0,0 +1,31 @@
/* Ltrace Test : trace-fork.c
* Objectives : Verify that ltrace can trace to child process after
* fork called.
*
* This file was written by Yao Qi <qiyao@cn.ibm.com>
*
*/
#include <stdio.h>
#include <sys/types.h>
void child() {
printf("Fork Child\n");
sleep(1);
}
int main() {
pid_t pid;
pid = fork ();
if (pid == -1)
printf("fork failed!\n");
else if (pid == 0)
child();
else {
printf("My child pid is %d\n",pid);
wait();
}
return 0;
}

View File

@ -0,0 +1,49 @@
#!/bin/bash
#
# Copyright (c) 2008 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/>.
#
# Author: Michal Nowak <mnowak@redhat.com>
# source the test script helpers
. /usr/bin/rhts_environment.sh
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="$(rpm -qf $(which ltrace))"
rlJournalStart
rlPhaseStartSetup "Gathering information & compiling"
rlAssertRpm $PACKAGE
rlAssertRpm $(rpm -qf $(which gcc))
rlShowRunningKernel
rlRun "gcc reproducer.c -o reproducer" 0 "Compiling the reproducer"
rlPhaseEnd
rlPhaseStartTest
rlRun "ltrace -o ltrace-test.log -f ./reproducer" 0 "'ltrace -f' is crunching the reproducer"
rlAssertGrep "My child pid is" ltrace-test.log
rlAssertNotGrep "signal from wrong pid" ltrace-test.log
rlAssertGrep "SIGCHLD (Child exited)" ltrace-test.log
rlAssertNotGrep "Cannot attach to pid" ltrace-test.log
rlPhaseEnd
rlPhaseStartCleanup "Doing clean-up"
rlBundleLogs "ltrace-outputs" ltrace-test.log
rlRun "rm -f ltrace-test.log reproducer"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,61 @@
# Copyright (c) 2008 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/>.
#
# Author: Michal Nowak <mnowak@redhat.com>
TOPLEVEL_NAMESPACE=/tools
PACKAGE_NAME=ltrace
RELATIVE_PATH=Regression/211163-ltrace-with--c-omit-execl-call
export TEST=/tools/ltrace/Regression/211163-ltrace-with--c-omit-execl-call
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE reproducer.c
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
chmod a+x ./runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Michal Nowak <mnowak@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: ltrace with -c omit execl call" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: ltrace" >> $(METADATA)
@echo "Requires: ltrace gcc glibc-devel" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv3+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 211163 528466" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -0,0 +1 @@
ltrace with -c omit execl call

View File

@ -0,0 +1,17 @@
summary: ltrace with -c omit execl call
description: |
ltrace with -c omit execl call
contact: Michal Nowak <mnowak@redhat.com>
component:
- ltrace
test: ./runtest.sh
framework: beakerlib
recommend:
- ltrace
- gcc
- glibc-devel
duration: 5m
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=211163
extra-summary: /tools/ltrace/Regression/211163-ltrace-with--c-omit-execl-call
extra-task: /tools/ltrace/Regression/211163-ltrace-with--c-omit-execl-call

View File

@ -0,0 +1,9 @@
#include <stdio.h>
#include <unistd.h>
int main()
{
execl("/bin/ls","ls",0);
return 0;
}

View File

@ -0,0 +1,109 @@
#!/bin/bash
# Copyright (c) 2008 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/>.
#
# Author: Michal Nowak <mnowak@redhat.com>
# source the test script helpers
. /usr/bin/rhts_environment.sh
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE=$(rpm -qf $(which ltrace))
rlJournalStart
rlPhaseStartSetup "Gathering information & compiling"
rlAssertRpm $PACKAGE
rlAssertRpm $(rpm -qf $(which gcc))
rlShowRunningKernel
rlRun "gcc reproducer.c -o reproducer" 0 "Compiling the reproducer"
rlPhaseEnd
rlPhaseStartTest "Counting the number of calls noted by ltrace"
rlRun "ltrace -o ltrace-test-c.log -c ./reproducer" 0 "Execute reproducer"
rlRun "cat -n ltrace-test-c.log"
# Check if exec is not omitted (rhbz#797761)
rlAssertGrep "exec" ltrace-test-c.log
# Check if ltrace is able to trace system binaries with execl /bin/ls (rhbz#1618748/rhbz#1655368/rhbz#1731119)
if rlIsRHEL 8; then
case "$PACKAGE" in
ltrace*)
# bz#1655368 was fixed on ltrace-0.7.91-28.el8.x86_64, but it is still reproducible on ppc64le
if [ "$(arch)" = "ppc64le" ]; then
rlLogWarning "RHEL8 ltrace fails to trace system binaries on ppc64le due to bz#1618748/bz#1655368, hence skipping failure checking"
skip_test=1
fi
;;
gcc-toolset-*)
if [ "$(arch)" = "ppc64le" ]; then
rlLogWarning "RHEL8 gcc-toolset-*-ltrace fails to trace system binaries on ppc64le due to bz#1731119, hence skipping failure checking"
skip_test=1
fi
;;
esac
elif rlIsRHEL 9 && [[ $PACKAGE =~ ^ltrace ]] && [ "$(arch)" = "ppc64le" ]; then
rlLogWarning "RHEL-9 ltrace fails to trace system binaries on ppc64le due to bz#1906881, hence skipping failure checking"
skip_test=1
elif rlIsFedora 33 && [ "$(arch)" = "ppc64le" ]; then
rlLogWarning "FC33 ltrace fails to trace system binaries on ppc64le due to bz#1902770, hence skipping failure checking"
skip_test=1
fi
rlRun "n_lines_c=$(grep -c . ltrace-test-c.log)"
if [ $n_lines_c -gt 20 ]; then
if [ $skip_test ]; then
rlLogWarning "Test was skipped but it seems ok. Review skip check."
fi
else
if [ $skip_test ]; then
rlLogInfo"'ltrace -c ./reproducer' does not report more than 20 lines of trace summary output (expected failure)"
else
rlFail "'ltrace -c ./reproducer' does not report more than 20 lines of trace summary output"
fi
fi
rlPhaseEnd
rlPhaseStartTest "Looking for SEGFAULT of reproducer under ltrace"
rlRun "ltrace -o ltrace-test.log ./reproducer" 0 "Execute reproducer"
rlRun "cat -n ltrace-test.log"
# Check if neither segfault nor 'unexpected breakpoint' errors occur (rhbz#211163)
rlAssertNotGrep "SIGSEGV" ltrace-test.log
rlAssertNotGrep "unexpected breakpoint" ltrace-test.log
# Check if exec is not omitted (rhbz#797761)
rlAssertGrep "exec" ltrace-test.log
# Check if ltrace is able to trace system binaries with execl /bin/ls (rhbz#1618748/rhbz#1655368/rhbz#1731119)
rlRun "n_lines=$(grep -c . ltrace-test.log)"
if [ $n_lines -gt 20 ]; then
if [ $skip_test ]; then
rlLogWarning "Test was skipped but it seems ok. Review skip check."
fi
else
if [ $skip_test ]; then
rlLogInfo"'ltrace ./reproducer' does not report more than 20 lines of trace summary output (expected failure)"
else
rlFail "'ltrace ./reproducer' does not report more than 20 lines of trace summary output"
fi
fi
rlPhaseEnd
rlPhaseStartCleanup "Doing clean-up"
rlBundleLogs "ltrace-outputs" ltrace-test.log ltrace-test-c.log
rlRun "rm -f ltrace-test.log ltrace-test-c.log reproducer"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,60 @@
# Copyright (c) 2008 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/>.
#
# Author: Michal Nowak <mnowak@redhat.com>
TOPLEVEL_NAMESPACE=/tools
PACKAGE_NAME=ltrace
RELATIVE_PATH=Regression/223732-man-page-of-ltrace
export TEST=$(TOPLEVEL_NAMESPACE)/$(PACKAGE_NAME)/$(RELATIVE_PATH)
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
chmod a+x ./runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@touch $(METADATA)
@echo "Owner: Michal Nowak <mnowak@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Description: man page of ltrace had a note about ELF32-support-only" >> $(METADATA)
@echo "Bug: 223732" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: $(PACKAGE_NAME)" >> $(METADATA)
@echo "Requires: $(PACKAGE_NAME)" >> $(METADATA)
@echo "License: GPLv3+" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -0,0 +1,7 @@
Man page of ltrace said,
'Only ELF32 binaries are supported.'
I seemed ltrace does not support ia64 architecture.
That's not true.

View File

@ -0,0 +1,21 @@
summary: man page of ltrace had a note about ELF32-support-only
description: |+
Man page of ltrace said,
'Only ELF32 binaries are supported.'
I seemed ltrace does not support ia64 architecture.
That's not true.
contact: Michal Nowak <mnowak@redhat.com>
component:
- ltrace
test: ./runtest.sh
framework: beakerlib
recommend:
- ltrace
duration: 5m
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=223732
extra-summary: /tools/ltrace/Regression/223732-man-page-of-ltrace
extra-task: /tools/ltrace/Regression/223732-man-page-of-ltrace

View File

@ -0,0 +1,41 @@
#!/bin/bash
# Copyright (c) 2008 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/>.
#
# Author: Michal Nowak <mnowak@redhat.com>
# source the test script helpers
. /usr/bin/rhts_environment.sh
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE=ltrace
rlJournalStart
rlPhaseStartSetup "Gathering information"
rlShowPackageVersion $PACKAGE
rlShowRunningKernel
rlPhaseEnd
rlPhaseStartTest "Running tar inside ltrace"
man ltrace > trace.man
rlAssertNotGrep "Only ELF32 binaries are supported" trace.man
rlPhaseEnd
rlPhaseStartCleanup "Doing clean-up"
rm -f trace.man
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,60 @@
# Copyright (c) 2008 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/>.
#
# Author: Michal Nowak <mnowak@redhat.com>
TOPLEVEL_NAMESPACE=/tools
PACKAGE_NAME=ltrace
RELATIVE_PATH=Regression/235671-ltrace-receives-SIGILL-signal
export TEST=$(TOPLEVEL_NAMESPACE)/$(PACKAGE_NAME)/$(RELATIVE_PATH)
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
chmod a+x ./runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@touch $(METADATA)
@echo "Owner: Michal Nowak <mnowak@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Description: ltrace receives SIGILL signal and terminates" >> $(METADATA)
@echo "Bug: 235671" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: $(PACKAGE_NAME)" >> $(METADATA)
@echo "Requires: $(PACKAGE_NAME)" >> $(METADATA)
@echo "License: GPLv3+" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -0,0 +1,2 @@
ltrace receives SIGILL signal instead of the ltraced program,
which terminates ltrace.

View File

@ -0,0 +1,16 @@
summary: ltrace receives SIGILL signal and terminates
description: |
ltrace receives SIGILL signal instead of the ltraced program,
which terminates ltrace.
contact: Michal Nowak <mnowak@redhat.com>
component:
- ltrace
test: ./runtest.sh
framework: beakerlib
recommend:
- ltrace
duration: 5m
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=235671
extra-summary: /tools/ltrace/Regression/235671-ltrace-receives-SIGILL-signal
extra-task: /tools/ltrace/Regression/235671-ltrace-receives-SIGILL-signal

View File

@ -0,0 +1,43 @@
#!/bin/bash
# Copyright (c) 2008 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/>.
#
# Author: Michal Nowak <mnowak@redhat.com>
# source the test script helpers
. /usr/bin/rhts_environment.sh
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="$(rpm -qf $(which ltrace))"
rlJournalStart
rlPhaseStartSetup "Gathering information"
rlAssertRpm $PACKAGE
rlAssertRpm $(rpm -qf $(which gcc))
rlShowRunningKernel
rlPhaseEnd
rlPhaseStartTest "Running tar inside ltrace"
rlRun "ltrace -o ltrace-test.log tar" 0 "ltrace is crunching tar"
rlAssertNotGrep "SIGILL" ltrace-test.log -A1
rlPhaseEnd
rlPhaseStartCleanup "Doing clean-up"
rlBundleLogs "ltrace-outputs" ltrace-test.log
rlRun "rm -f ltrace-test.log"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,62 @@
# Copyright (c) 2008 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/>.
#
# Author: Michal Nowak <mnowak@redhat.com>
TOPLEVEL_NAMESPACE=/tools
PACKAGE_NAME=ltrace
RELATIVE_PATH=Regression/427444-ltrace-crashes-process-to-be-analysed
export TEST=$(TOPLEVEL_NAMESPACE)/$(PACKAGE_NAME)/$(RELATIVE_PATH)
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE reproducer.c
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
chmod a+x ./runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@touch $(METADATA)
@echo "Owner: Michal Nowak <mnowak@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Description: ltrace crashes process to be analysed" >> $(METADATA)
@echo "Bug: 427444" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: $(PACKAGE_NAME)" >> $(METADATA)
@echo "Requires: $(PACKAGE_NAME)" >> $(METADATA)
@echo "Requires: gcc" >> $(METADATA)
@echo "Requires: glibc-devel" >> $(METADATA)
@echo "License: GPLv3+" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -0,0 +1 @@
ltrace could possibly crash traced application on s390 and s390x.

View File

@ -0,0 +1,17 @@
summary: ltrace crashes process to be analysed
description: |
ltrace could possibly crash traced application on s390 and s390x.
contact: Michal Nowak <mnowak@redhat.com>
component:
- ltrace
test: ./runtest.sh
framework: beakerlib
recommend:
- ltrace
- gcc
- glibc-devel
duration: 5m
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=427444
extra-summary: /tools/ltrace/Regression/427444-ltrace-crashes-process-to-be-analysed
extra-task: /tools/ltrace/Regression/427444-ltrace-crashes-process-to-be-analysed

View File

@ -0,0 +1,69 @@
#include <stdio.h>
#include <stdlib.h>
#include <netdb.h>
#include <netinet/in.h>
#include <sys/socket.h>
#ifndef NI_MAXHOST
#define NI_MAXHOST 1025
#endif // NI_MAX_HOST
// On a DARWIN system EAI_OVERFLOW is define as EAI_MAX
#ifndef EAI_OVERFLOW
#define EAI_OVERFLOW EAI_MAX
#endif // EAI_OVERFLOW
int main(int argc, char *argv[])
{
// sleep before we can catch you via ltrace
sleep(5);
struct addrinfo * result;
size_t hostname_len = NI_MAXHOST;
char * hostname = NULL;
int error;
if ( 0 != ( error = getaddrinfo( "www.example.com", NULL, NULL, &result ) ) )
{
fprintf( stderr, "error using getaddrinfo: %s\n", gai_strerror( error ) );
}
if ( result )
{
for( ; ; hostname_len *= 2 )
{
hostname = ( char * ) realloc( hostname, hostname_len );
if ( NULL == hostname )
{
perror( "" );
break;
}
error = getnameinfo( result->ai_addr, result->ai_addrlen, hostname, hostname_len, NULL, 0, 0 );
if ( 0 == error )
{
break;
}
if ( EAI_OVERFLOW != error )
{
fprintf( stderr, "error using getaddrinfo: %s\n", gai_strerror( error ) );
break;
}
}
if ( NULL != hostname )
{
free( hostname );
}
freeaddrinfo( result );
}
return 0;
}

View File

@ -0,0 +1,46 @@
#!/bin/bash
#
# Copyright (c) 2008 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/>.
#
# Author: Michal Nowak <mnowak@redhat.com>
# source the test script helpers
. /usr/bin/rhts_environment.sh
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="$(rpm -qf $(which ltrace))"
rlJournalStart
rlPhaseStartSetup "Gathering information & compiling"
rlAssertRpm $PACKAGE
rlAssertRpm $(rpm -qf $(which gcc))
rlShowRunningKernel
rlRun "gcc reproducer.c -o reproducer" 0 "Compiling the reproducer"
rlPhaseEnd
rlPhaseStartTest "Testing the executable under ltrace"
rlRun "./reproducer &" 0 "Fire the reproducer in the background"
rlWatchdog "ltrace -o ltrace-test.log -p $( pgrep reproducer )" 200
rlAssertNotGrep "gimme_arg called with wrong arguments" ltrace-test.log
rlPhaseEnd
rlPhaseStartCleanup "Doing clean-up"
rlBundleLogs "ltrace-outputs" ltrace-test.log
rlRun "rm -f ltrace-test.log reproducer"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,60 @@
# Copyright (c) 2008 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/>.
#
# Author: Michal Nowak <mnowak@redhat.com>
TOPLEVEL_NAMESPACE=/tools
PACKAGE_NAME=ltrace
RELATIVE_PATH=Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file
export TEST=$(TOPLEVEL_NAMESPACE)/$(PACKAGE_NAME)/$(RELATIVE_PATH)
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
chmod a+x ./runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@touch $(METADATA)
@echo "Owner: Michal Nowak <mnowak@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Description: When executing ltrace command with both -o and -c option, the result of ltrace command is not output into file" >> $(METADATA)
@echo "Bug: 447404" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: $(PACKAGE_NAME)" >> $(METADATA)
@echo "Requires: $(PACKAGE_NAME) gcc" >> $(METADATA)
@echo "License: GPLv3+" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -0,0 +1,4 @@
When executing ltrace command with both -o and -c option,
the result of ltrace command is not output into the file
which is specified by -o option.

View File

@ -0,0 +1,18 @@
summary: When executing ltrace command with both -o and -c option, the result of ltrace
command is not output into file
description: "When executing ltrace command with both -o and -c option, \nthe result\
\ of ltrace command is not output into the file \nwhich is specified by -o option.\n\
\n"
contact: Michal Nowak <mnowak@redhat.com>
component:
- ltrace
test: ./runtest.sh
framework: beakerlib
recommend:
- ltrace
- gcc
duration: 5m
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=447404
extra-summary: /tools/ltrace/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file
extra-task: /tools/ltrace/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file

View File

@ -0,0 +1,110 @@
#!/bin/bash
#
# Copyright (c) 2008 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/>.
#
# Author: Michal Nowak <mnowak@redhat.com>
# source the test script helpers
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="$(rpm -qf --queryformat '%{name}' $(which ltrace))"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlAssertRpm $(rpm -qf $(which gcc))
rlShowRunningKernel
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest "ltrace with -o and -c options tracing testing binary"
rlRun "echo 'int main(){alarm(42);return 0;}'| gcc -x c -o test.bin -"
rlRun "ltrace -o ltrace-test.log -c ./test.bin" 0 "ltrace is crunching a testing binary"
rlRun -l "cat ltrace-test.log"
rlAssertGrep "alarm" ltrace-test.log
rlAssertGreater "There has to be something in output file" $(cat ltrace-test.log | wc -l) 5
rlPhaseEnd
rlPhaseStartTest "ltrace with -o and -c options tracing system binary"
rlRun "ltrace -o ltrace-test-sys.log -c ls" 0 "ltrace is crunching ls"
rlRun -l "cat ltrace-test-sys.log"
if rlIsRHEL 8; then
case "$PACKAGE" in
"ltrace")
# bz#1655368 was fixed on ltrace-0.7.91-28.el8.x86_64, but it is still reproducible on ppc64le
if [ "$(arch)" = "ppc64le" ]; then
rlLogWarning "RHEL8 ltrace fails to trace system binaries on ppc64le due to bz#1618748/bz#1655368, hence skipping failure checking"
skip_system_binary_test=1
fi
;;
"gcc-toolset-9-ltrace" | "gcc-toolset-10-ltrace")
if [ "$(arch)" = "ppc64le" ]; then
rlLogWarning "RHEL8 gcc-toolset-9-ltrace/gcc-toolset-10-ltrace fails to trace system binaries on ppc64le due to bz#1731119, hence skipping failure checking"
skip_system_binary_test=1
fi
;;
esac
elif rlIsRHEL 9 && [[ $PACKAGE =~ ^ltrace ]] && [ "$(arch)" = "ppc64le" ]; then
rlLogWarning "RHEL-9 ltrace fails to trace system binaries on ppc64le due to bz#1906881, hence skipping failure checking"
skip_system_binary_test=1
elif rlIsFedora 33 && [ "$(arch)" = "ppc64le" ]; then
rlLogWarning "FC33 ltrace fails to trace system binaries on ppc64le due to bz#1902770, hence skipping failure checking"
skip_system_binary_test=1
fi
# ltrace no longer reports __libc_start_main on rhel-8 x86_64 (rhbz#1654734)
# search for either malloc or ioctl.
func_found=0
for traced_func in "malloc" "ioctl"; do
if grep "$traced_func" ltrace-test-sys.log; then
func_found=1
fi
done
if [ $func_found -ne 0 ]; then
if [ $skip_system_binary_test ]; then
rlLogWarning "Test was skipped but it seems ok. Review skip check."
fi
else
if [ $skip_system_binary_test ]; then
rlLogInfo "ltrace output does not contain ioctl or malloc calls (expected failure)"
else
rlFail "ltrace output does not contain ioctl or malloc calls"
fi
fi
rlRun "n_lines=$(grep -c . ltrace-test-sys.log)"
if [ $n_lines -gt 10 ]; then
if [ $skip_system_binary_test ]; then
rlLogWarning "Test was skipped but it seems ok. Review skip check."
fi
else
if [ $skip_system_binary_test ]; then
rlLogInfo "ltrace output does not contain more than 10 lines (expected failure)"
else
rlFail "ltrace output does not contain more than 10 lines"
fi
fi
rlPhaseEnd
rlPhaseStartCleanup "Doing clean-up"
rlFileSubmit ltrace-test.log
rlFileSubmit ltrace-test-sys.log
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /tools/ltrace/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64
# Description: The test tries to workaround of a bz1051221 a little.
# Author: Michael Petlan <mpetlan@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2014 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing
# to use, modify, copy, or redistribute it subject to the terms
# and conditions of the GNU General Public License version 2.
#
# 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, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/tools/ltrace/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE hello.c
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Michael Petlan <mpetlan@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: The test tries to workaround of a bz1051221 a little." >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: ltrace" >> $(METADATA)
@echo "Requires: ltrace prelink binutils gcc" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 1051221" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -0,0 +1,3 @@
PURPOSE of /tools/ltrace/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64
Description: The test tries to workaround of a bz1051221 a little.
Author: Michael Petlan <mpetlan@redhat.com>

View File

@ -0,0 +1,7 @@
#include <stdlib.h>
#include <stdio.h>
int main(void)
{
puts("Hello world...\n");
}

View File

@ -0,0 +1,17 @@
summary: The test tries to workaround of a bz1051221 a little.
description: ''
contact: Michael Petlan <mpetlan@redhat.com>
component:
- ltrace
test: ./runtest.sh
framework: beakerlib
recommend:
- ltrace
- prelink
- binutils
- gcc
duration: 5m
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1051221
extra-summary: /tools/ltrace/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64
extra-task: /tools/ltrace/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64

View File

@ -0,0 +1,74 @@
#!/bin/bash
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/ltrace/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64
# Description: The test tries to workaround of a bz1051221 a little.
# Author: Michael Petlan <mpetlan@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2014 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing
# to use, modify, copy, or redistribute it subject to the terms
# and conditions of the GNU General Public License version 2.
#
# 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, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="ltrace"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "cp hello.c $TmpDir/"
rlRun "pushd $TmpDir"
rlRun "gcc -o hello-raw hello.c"
rlRun "cp hello-raw hello-stripped"
rlRun "strip ./hello-stripped"
if rpm -q prelink; then
rlRun "cp hello-raw hello-prelinked"
rlRun "cp hello-raw hello-stripped-prelinked"
rlRun "cp hello-raw hello-prelinked-stripped"
rlRun "prelink ./hello-prelinked"
rlRun "strip ./hello-stripped-prelinked"
rlRun "prelink hello-stripped-prelinked"
rlRun "prelink hello-prelinked-stripped"
rlRun "strip hello-prelinked-stripped"
fi
rlPhaseEnd
rlPhaseStartTest
for binary in hello-*; do
rlLog "==== TESTING $binary ===="
rlRun "{ ltrace -e __libc_start_main ./$binary 2> err_$binary.log > out_$binary.log; } 2> superr_$binary.log"
rlAssertNotGrep "Aborted" superr_$binary.log
rlAssertNotGrep "SIGSEGV" superr_$binary.log
rlAssertNotGrep "Segmentation fault" superr_$binary.log
rlAssertNotGrep "killed" err_$binary.log
rlAssertNotGrep "SIGSEGV" err_$binary.log
rlAssertNotGrep "Segmentation fault" err_$binary.log
rlLog "+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+"
done
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /tools/ltrace/Regression/bz1053765-invalid-command-assertion-failure
# Description: The test tries to ltrace a non-existing app, ltrace should handle that.
# Author: Michael Petlan <mpetlan@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2014 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing
# to use, modify, copy, or redistribute it subject to the terms
# and conditions of the GNU General Public License version 2.
#
# 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, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/tools/ltrace/Regression/bz1053765-invalid-command-assertion-failure
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Michael Petlan <mpetlan@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: The test tries to ltrace a non-existing app, ltrace should handle that." >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: ltrace" >> $(METADATA)
@echo "Requires: ltrace" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 1053765" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -0,0 +1,3 @@
PURPOSE of /tools/ltrace/Regression/bz1053765-invalid-command-assertion-failure
Description: The test tries to ltrace a non-existing app, ltrace should handle that.
Author: Michael Petlan <mpetlan@redhat.com>

View File

@ -0,0 +1,14 @@
summary: The test tries to ltrace a non-existing app, ltrace should handle that.
description: ''
contact: Michael Petlan <mpetlan@redhat.com>
component:
- ltrace
test: ./runtest.sh
framework: beakerlib
recommend:
- ltrace
duration: 5m
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1053765
extra-summary: /tools/ltrace/Regression/bz1053765-invalid-command-assertion-failure
extra-task: /tools/ltrace/Regression/bz1053765-invalid-command-assertion-failure

View File

@ -0,0 +1,59 @@
#!/bin/bash
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/ltrace/Regression/bz1053765-invalid-command-assertion-failure
# Description: The test tries to ltrace a non-existing app, ltrace should handle that.
# Author: Michael Petlan <mpetlan@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2014 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing
# to use, modify, copy, or redistribute it subject to the terms
# and conditions of the GNU General Public License version 2.
#
# 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, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="$(rpm -qf $(which ltrace))"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlPhaseEnd
rlPhaseStartTest
rlRun "{ ltrace blahblahblah0123546213208412321 2> err.log > out.log; } 2> superr.log" 1 "Running ltrace with a non-existing binary."
rlAssertNotGrep "Aborted" superr.log
rlAssertNotGrep "destroy" err.log
rlAssertNotGrep "Assertion" err.log
rlAssertNotGrep "assertion" err.log
rlAssertNotGrep "relocs" err.log
rlAssertNotGrep "failed" err.log
echo "==== stderr ===="
cat err.log
echo "==== stdout ===="
cat out.log
echo "==== external stderr ===="
cat superr.log
rlPhaseEnd
rlPhaseStartCleanup
rlRun "rm err.log out.log superr.log"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,63 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /tools/ltrace/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots
# Description: bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots
# Author: Martin Cermak <mcermak@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2015 Red Hat, Inc.
#
# 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 2 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 TEST=/tools/ltrace/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Martin Cermak <mcermak@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 10m" >> $(METADATA)
@echo "RunFor: ltrace" >> $(METADATA)
@echo "Requires: ltrace gcc gawk" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 1158713" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -0,0 +1,5 @@
PURPOSE of /tools/ltrace/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots
Description: bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots
Author: Martin Cermak <mcermak@redhat.com>
Bug summary: ltrace assigns wrong names to glibc PLT slots
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1158713

View File

@ -0,0 +1,18 @@
summary: bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots
description: |
Bug summary: ltrace assigns wrong names to glibc PLT slots
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1158713
contact: Martin Cermak <mcermak@redhat.com>
component:
- ltrace
test: ./runtest.sh
framework: beakerlib
recommend:
- ltrace
- gcc
- gawk
duration: 10m
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1158713
extra-summary: /tools/ltrace/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots
extra-task: /tools/ltrace/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots

View File

@ -0,0 +1,107 @@
#!/bin/bash
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/ltrace/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots
# Description: bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots
# Author: Martin Cermak <mcermak@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2015 Red Hat, Inc.
#
# 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 2 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 Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="$(rpm -qf $(which ltrace))"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlAssertRpm $(rpm -qf $(which gcc))
rlRun "TMPD=$(mktemp -d)"
rlRun "pushd $TMPD"
cat > test.c <<EOFA
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <pwd.h>
int main()
{
char *s = malloc(1000);
// trigger a free() call from libc:
setpwent();
getpwent();
endpwent();
// print maps
sprintf(s, "grep -F '[heap]' /proc/%d/maps", getpid());
system (s);
free(s);
}
EOFA
cat > test.awk <<EOFB
BEGIN {
addrindex = 0
}
/libc.*free\(0x[0-9a-f]+\)/ {
match(\$0,/0x[0-9a-f]+/,m)
addrs[addrindex++] = strtonum(m[0])
}
/\[heap\]/ {
sub("-", " ", \$0)
split(\$0, a, " ")
limit_min = strtonum("0x"a[1])
limit_max = strtonum("0x"a[2])
}
END {
for (i=0; i<addrindex; i++) {
if (addrs[i] < limit_min) {
print "ERROR 1 ("addrs[i]"<"limit_min")"
exit 1
}
if (addrs[i] > limit_max) {
print "ERROR 2 ("addrs[i]">"limit_max")"
exit 2
}
}
}
EOFB
rlRun "gcc test.c -o test"
rlPhaseEnd
rlPhaseStartTest
rlRun "ltrace -e free ./test |& tee log | awk -f test.awk" || \
rlRun "cat log"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TMPD"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /tools/ltrace/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option
# Description: Test for BZ#1360259 (ltrace crashes when run on certain processes with the -S option)
# Author: Edjunior Machado <emachado@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2018 Red Hat, Inc.
#
# 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 2 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 TEST=/tools/ltrace/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Edjunior Machado <emachado@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test for BZ#1360259 (ltrace crashes when run on certain processes with the -S option)" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: ltrace" >> $(METADATA)
@echo "Requires: ltrace dbus" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 1360259" >> $(METADATA)
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -0,0 +1,5 @@
PURPOSE of /tools/ltrace/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option
Description: Test for BZ#1360259 (ltrace crashes when run on certain processes with the -S option)
Author: Edjunior Machado <emachado@redhat.com>
Bug summary: ltrace crashes when run on certain processes with the -S option
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1360259

View File

@ -0,0 +1,18 @@
summary: Test for BZ#1360259 (ltrace crashes when run on certain processes with the
-S option)
description: |
Bug summary: ltrace crashes when run on certain processes with the -S option
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1360259
contact: Edjunior Machado <emachado@redhat.com>
component:
- ltrace
test: ./runtest.sh
framework: beakerlib
recommend:
- ltrace
- dbus
duration: 5m
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1360259
extra-summary: /tools/ltrace/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option
extra-task: /tools/ltrace/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option

View File

@ -0,0 +1,71 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/ltrace/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option
# Description: Test for BZ#1360259 (ltrace crashes when run on certain processes with the -S option)
# Author: Edjunior Machado <emachado@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2018 Red Hat, Inc.
#
# 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 2 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 Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
CMD='ltrace'
BIN=$(which --skip-alias $CMD)
PACKAGE="${PACKAGE:-$(rpm -qf --qf='%{name}\n' $BIN)}"
if rlIsRHEL 9 || rlIsFedora; then
PROC_NAME=dbus-broker
SERVICE_NAME=dbus-broker
elif rlIsRHEL 6; then
PROC_NAME=dbus-daemon
SERVICE_NAME=messagebus
else
PROC_NAME=dbus-daemon
SERVICE_NAME=dbus
fi
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "pgrep -x $PROC_NAME || service $SERVICE_NAME start" 0 "Checking/starting $SERVICE_NAME"
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest
rlRun "PID=$(pidof $PROC_NAME)"
# try to ltrace dbus-daemon. If there is a bug (BZ#1360259), it will crash
rlWatchdog "ltrace -S -p $PID > output.log 2>&1" 30 INT
rlAssertEquals "ltrace is expected to be terminated by watchdog" 1 "$?"
rlLog "output.log: $(cat output.log)"
rlAssertNotGrep "\(Assertion.*failed\|Segmentation fault\)" output.log
rlAssertEquals "$PROC_NAME is expected to be still running" $PID "$(pidof $PROC_NAME)"
rlFileSubmit output.log
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlRun "service $SERVICE_NAME status --no-pager || service $SERVICE_NAME start" 0 "Checking/starting $SERVICE_NAME"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /tools/ltrace/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by
# Description: Test for BZ#754096 (ltrace crashes on PowerPC if tracing is limited by)
# Author: Miroslav Franc <mfranc@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2013 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing
# to use, modify, copy, or redistribute it subject to the terms
# and conditions of the GNU General Public License version 2.
#
# 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, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/tools/ltrace/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Miroslav Franc <mfranc@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test for BZ#754096 (ltrace crashes on PowerPC if tracing is limited by)" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 2m" >> $(METADATA)
@echo "RunFor: ltrace" >> $(METADATA)
@echo "Requires: ltrace" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 754096" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -0,0 +1,5 @@
PURPOSE of /tools/ltrace/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by
Description: Test for BZ#754096 (ltrace crashes on PowerPC if tracing is limited by)
Author: Miroslav Franc <mfranc@redhat.com>
Bug summary: ltrace crashes on PowerPC if tracing is limited by `-e' to event not present in trace
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=754096

View File

@ -0,0 +1,16 @@
summary: Test for BZ#754096 (ltrace crashes on PowerPC if tracing is limited by)
description: |
Bug summary: ltrace crashes on PowerPC if tracing is limited by `-e' to event not present in trace
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=754096
contact: Miroslav Franc <mfranc@redhat.com>
component:
- ltrace
test: ./runtest.sh
framework: beakerlib
recommend:
- ltrace
duration: 2m
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=754096
extra-summary: /tools/ltrace/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by
extra-task: /tools/ltrace/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by

View File

@ -0,0 +1,52 @@
#!/bin/bash
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/ltrace/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by
# Description: Test for BZ#754096 (ltrace crashes on PowerPC if tracing is limited by)
# Author: Miroslav Franc <mfranc@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2013 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing
# to use, modify, copy, or redistribute it subject to the terms
# and conditions of the GNU General Public License version 2.
#
# 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, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="$(rpm -qf $(which ltrace))"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest
rlRun "ltrace -e puts /bin/true"
rlRun "ltrace -e sprintf /bin/true"
rlRun "ltrace -e puts -e gets /bin/true"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,65 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /tools/ltrace/Regression/bz797761-ltrace-c-ommits-execl-call
# Description: The test tries to ltrace an app which uses execl calls.
# Author: Michael Petlan <mpetlan@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2013 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing
# to use, modify, copy, or redistribute it subject to the terms
# and conditions of the GNU General Public License version 2.
#
# 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, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/tools/ltrace/Regression/bz797761-ltrace-c-ommits-execl-call
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Michael Petlan <mpetlan@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: The test tries to ltrace an app which uses execl calls." >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: ltrace" >> $(METADATA)
@echo "Requires: ltrace" >> $(METADATA)
@echo "Requires: glibc-devel" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 797761" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -0,0 +1,3 @@
PURPOSE of /tools/ltrace/Regression/bz797761-ltrace-c-ommits-execl-call
Description: The test tries to ltrace an app which uses execl calls.
Author: Michael Petlan <mpetlan@redhat.com>

View File

@ -0,0 +1,15 @@
summary: The test tries to ltrace an app which uses execl calls.
description: ''
contact: Michael Petlan <mpetlan@redhat.com>
component:
- ltrace
test: ./runtest.sh
framework: beakerlib
recommend:
- ltrace
- glibc-devel
duration: 5m
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=797761
extra-summary: /tools/ltrace/Regression/bz797761-ltrace-c-ommits-execl-call
extra-task: /tools/ltrace/Regression/bz797761-ltrace-c-ommits-execl-call

Some files were not shown because too many files have changed in this diff Show More