summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--ltp-20140828-format-string.patch13
-rw-r--r--ltp-20140828-ftest-fix-tst_brkm-usage.patch73
-rw-r--r--ltp-20150119-cpufreq-format-string.patch42
-rw-r--r--ltp-20150119-diotest-format-string.patch38
-rw-r--r--ltp.spec33
-rw-r--r--sources2
7 files changed, 107 insertions, 96 deletions
diff --git a/.gitignore b/.gitignore
index d7a501d..fdb5578 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-/ltp-full-20140828.tar.xz
+/ltp-full-20150119.tar.xz
diff --git a/ltp-20140828-format-string.patch b/ltp-20140828-format-string.patch
deleted file mode 100644
index 6ccbf6a..0000000
--- a/ltp-20140828-format-string.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/testcases/network/lib6/asapi_05.c b/testcases/network/lib6/asapi_05.c
-index d5bbeb1..d1af7e5 100644
---- a/testcases/network/lib6/asapi_05.c
-+++ b/testcases/network/lib6/asapi_05.c
-@@ -415,7 +415,7 @@ void icmp6_ft(void)
- tst_resm(TFAIL, "%s: rv %d != expected %d",
- ftab[i].ft_tname, rv, ftab[i].ft_expected);
- else
-- tst_resm(TPASS, ftab[i].ft_tname);
-+ tst_resm(TPASS, "%s", ftab[i].ft_tname);
- }
- }
-
diff --git a/ltp-20140828-ftest-fix-tst_brkm-usage.patch b/ltp-20140828-ftest-fix-tst_brkm-usage.patch
deleted file mode 100644
index 78bef46..0000000
--- a/ltp-20140828-ftest-fix-tst_brkm-usage.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-commit ee7667ed47beeaa230ee637a6f4edaad4a0cb817
-Author: Cyril Hrubis <chrubis@suse.cz>
-Date: Wed Sep 24 13:14:56 2014 +0200
-
- ftest: Fix tst_brkm() usage.
-
- Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
-
-diff --git a/testcases/kernel/fs/ftest/ftest01.c b/testcases/kernel/fs/ftest/ftest01.c
-index 34cd9d6..09a223f 100644
---- a/testcases/kernel/fs/ftest/ftest01.c
-+++ b/testcases/kernel/fs/ftest/ftest01.c
-@@ -100,7 +100,7 @@ int main(int ac, char *av[])
- const char *msg;
-
- if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
-- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-+ tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-
- setup();
-
-diff --git a/testcases/kernel/fs/ftest/ftest04.c b/testcases/kernel/fs/ftest/ftest04.c
-index 05d1160..28e4e48 100644
---- a/testcases/kernel/fs/ftest/ftest04.c
-+++ b/testcases/kernel/fs/ftest/ftest04.c
-@@ -87,7 +87,7 @@ int main(int ac, char *av[])
- const char *msg;
-
- if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
-- tst_brkm(TBROK, "OPTION PARSING ERROR - %s", msg);
-+ tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-
- setup();
-
-diff --git a/testcases/kernel/fs/ftest/ftest05.c b/testcases/kernel/fs/ftest/ftest05.c
-index 95bf503..5f83c95 100644
---- a/testcases/kernel/fs/ftest/ftest05.c
-+++ b/testcases/kernel/fs/ftest/ftest05.c
-@@ -104,7 +104,7 @@ int main(int ac, char *av[])
- const char *msg;
-
- if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
-- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-+ tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-
- setup();
-
-diff --git a/testcases/kernel/fs/ftest/ftest07.c b/testcases/kernel/fs/ftest/ftest07.c
-index ffeb6cb..03fa32e 100644
---- a/testcases/kernel/fs/ftest/ftest07.c
-+++ b/testcases/kernel/fs/ftest/ftest07.c
-@@ -112,7 +112,7 @@ int main(int ac, char *av[])
- const char *msg;
-
- if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
-- tst_brkm(TBROK, "OPTION PARSING ERROR - %s", msg);
-+ tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-
- setup();
-
-diff --git a/testcases/kernel/fs/ftest/ftest08.c b/testcases/kernel/fs/ftest/ftest08.c
-index b561d47..5f4e3dd 100644
---- a/testcases/kernel/fs/ftest/ftest08.c
-+++ b/testcases/kernel/fs/ftest/ftest08.c
-@@ -94,7 +94,7 @@ int main(int ac, char *av[])
- const char *msg;
-
- if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
-- tst_brkm(TBROK, "OPTION PARSING ERROR - %s", msg);
-+ tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-
- for (lc = 0; TEST_LOOPING(lc); lc++) {
-
diff --git a/ltp-20150119-cpufreq-format-string.patch b/ltp-20150119-cpufreq-format-string.patch
new file mode 100644
index 0000000..40a9756
--- /dev/null
+++ b/ltp-20150119-cpufreq-format-string.patch
@@ -0,0 +1,42 @@
+From 7a84b96e7abe6251e217bd9c69a83230bda23bc5 Mon Sep 17 00:00:00 2001
+From: Ken Dreyer <kdreyer@redhat.com>
+Date: Mon, 26 Jan 2015 13:19:15 -0700
+Subject: [PATCH] device-drivers/cpufreq: use safe format string arg
+
+Prior to this commit, the cpufreq_boost test failed to build if
+-Werror=format-security was used. The compiler could not examine the
+contents of the cdrv array.
+
+Adjust the SAFE_FILE_PRINTF call so that the format string is a string
+literal.
+
+Fedora recently enabled this compiler option in their RPM builds, so
+this fixes the build on Fedora 21.
+
+Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
+---
+ testcases/kernel/device-drivers/cpufreq/cpufreq_boost.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/testcases/kernel/device-drivers/cpufreq/cpufreq_boost.c b/testcases/kernel/device-drivers/cpufreq/cpufreq_boost.c
+index d1ba2cf..872b120 100644
+--- a/testcases/kernel/device-drivers/cpufreq/cpufreq_boost.c
++++ b/testcases/kernel/device-drivers/cpufreq/cpufreq_boost.c
+@@ -152,12 +152,12 @@ static void test_run(void)
+
+ /* Enable boost */
+ if (boost_value == cdrv[id].off)
+- SAFE_FILE_PRINTF(cleanup, cdrv[id].file, cdrv[id].on_str);
++ SAFE_FILE_PRINTF(cleanup, cdrv[id].file, "%s", cdrv[id].on_str);
+ tst_resm(TINFO, "load CPU0 with boost enabled");
+ boost_time = load_cpu(max_freq_khz);
+
+ /* Disable boost */
+- SAFE_FILE_PRINTF(cleanup, cdrv[id].file, cdrv[id].off_str);
++ SAFE_FILE_PRINTF(cleanup, cdrv[id].file, "%s", cdrv[id].off_str);
+ tst_resm(TINFO, "load CPU0 with boost disabled");
+ boost_off_time = load_cpu(max_freq_khz);
+
+--
+1.9.3
+
diff --git a/ltp-20150119-diotest-format-string.patch b/ltp-20150119-diotest-format-string.patch
new file mode 100644
index 0000000..75da796
--- /dev/null
+++ b/ltp-20150119-diotest-format-string.patch
@@ -0,0 +1,38 @@
+From 37fb2fa901f1ee9741867815e621065dd3ed4ec5 Mon Sep 17 00:00:00 2001
+From: Ken Dreyer <kdreyer@redhat.com>
+Date: Mon, 26 Jan 2015 13:29:41 -0700
+Subject: [PATCH] diotest: use safe format argument to tst_resm()
+
+Prior to this commit, the diotest4 test failed to build if
+-Werror=format-security was used. The compiler could not examine the
+contents of the ftab array.
+
+Adjust the tst_resm calls so that the format string is a string literal.
+
+Fedora recently enabled this compiler option in their RPM builds, so
+this fixes the build on Fedora 21.
+
+Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
+---
+ testcases/kernel/io/direct_io/diotest4.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/testcases/kernel/io/direct_io/diotest4.c b/testcases/kernel/io/direct_io/diotest4.c
+index 82c5b33..363fbf6 100644
+--- a/testcases/kernel/io/direct_io/diotest4.c
++++ b/testcases/kernel/io/direct_io/diotest4.c
+@@ -180,9 +180,9 @@ static void testcheck_end(int ret, int *failed, int *fail_count, char *msg)
+ if (ret != 0) {
+ *failed = TRUE;
+ (*fail_count)++;
+- tst_resm(TFAIL, msg);
++ tst_resm(TFAIL, "%s", msg);
+ } else
+- tst_resm(TPASS, msg);
++ tst_resm(TPASS, "%s", msg);
+ }
+
+ static void setup(void);
+--
+1.9.3
+
diff --git a/ltp.spec b/ltp.spec
index 468b043..50d3d96 100644
--- a/ltp.spec
+++ b/ltp.spec
@@ -1,15 +1,15 @@
Name: ltp
-Version: 20140828
+Version: 20150119
Release: 1%{?dist}
Summary: Linux Test Project
Group: Development/Tools
License: GPLv2
URL: https://linux-test-project.github.io/
Source0: http://downloads.sourceforge.net/project/ltp/LTP%20Source/%{name}-%{version}/%{name}-full-%{version}.tar.xz
-# Proposed upstream at https://github.com/linux-test-project/ltp/pull/24
-Patch0: ltp-20140828-format-string.patch
-# Upstream commit ee7667ed47beeaa230ee637a6f4edaad4a0cb817 on master
-Patch1: ltp-20140828-ftest-fix-tst_brkm-usage.patch
+# These patches submitted upstream at
+# https://github.com/linux-test-project/ltp/pull/28
+Patch0: ltp-20150119-cpufreq-format-string.patch
+Patch1: ltp-20150119-diotest-format-string.patch
%description
The LTP testsuite contains a collection of tools for testing the Linux kernel
@@ -22,6 +22,9 @@ libraries by bringing test automation to the testing effort.
%patch0 -p1
%patch1 -p1
+# rm APSL 1.1 -licensed file:
+rm testcases/kernel/fs/fsx-linux/fsx-linux.c
+
%build
%configure --prefix=%{_libdir}/%{name}
make %{?_smp_mflags}
@@ -30,21 +33,35 @@ make %{?_smp_mflags}
%install
make install DESTDIR=%{buildroot}
-# find-debuginfo.sh cannot process the .obj files. Remove the execute bit.
-find %{buildroot}%{_libdir}/%{name}/testcases/bin -name \*.obj -print0 \
- | xargs -0 chmod -x
+# find-debuginfo.sh cannot process the .obj files.
+# See RHBZ #1172414 for the reasoning behind this solution.
+%undefine _missing_build_ids_terminate_build
+
+# Fix strange group-writable permissions.
+find %{buildroot}%{_libdir}/%{name} -perm -g=w -print0 | xargs -0 chmod g-w
%files
+%{!?_licensedir:%global license %%doc}
+%license COPYING
+%doc README
%doc doc/ltp-howto.lyx
%doc doc/ltp-howto.txt
%doc doc/automation-cookbook.html
%doc doc/automation-README.html
%{_libdir}/%{name}
%{_bindir}/execltp
+%{_bindir}/ffsb
%{_mandir}/man1/*
%{_mandir}/man3/*
%changelog
+* Wed Jan 07 2015 Ken Dreyer <ktdreyer@ktdreyer.com> - 20150119-1
+- Update to latest upstream version
+- Drop upstreamed patches, and add more for format-string bugs
+- Use _missing_build_ids_terminate_build macro (RHBZ #1172414)
+- Include COPYING and README (RHBZ #1172414)
+- Fix group-writable permissions for rpmlint (RHBZ #1172414)
+
* Tue Dec 09 2014 Ken Dreyer <ktdreyer@ktdreyer.com> - 20140828-1
- Initial package
diff --git a/sources b/sources
index 9415893..16417d1 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-156e3eb89b34648539c4b45070bc3f4c ltp-full-20140828.tar.xz
+5c0c9c509d46b8e3b5e2643b061a0478 ltp-full-20150119.tar.xz