From a222567c6167f1a28257248d4b97a63926befbe5 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 30 2018 05:10:41 +0000 Subject: import strace-4.12-9.el7 --- diff --git a/SOURCES/strace-rh1540954-1.patch b/SOURCES/strace-rh1540954-1.patch index c90b29b..a0b9caa 100644 --- a/SOURCES/strace-rh1540954-1.patch +++ b/SOURCES/strace-rh1540954-1.patch @@ -9,6 +9,8 @@ Date: Fri Sep 15 16:06:14 2017 +0000 * NEWS: Mention this. * tests/membarrier.c (main): Update expected output. +[ ES: also patch files in tests-m32 and tests-mx32 directories ] + diff -rup a/tests/membarrier.c b/tests/membarrier.c --- a/tests/membarrier.c 2016-04-21 14:16:50.000000000 -0400 +++ b/tests/membarrier.c 2018-02-05 19:24:07.016341127 -0500 @@ -40,6 +42,68 @@ diff -rup a/tests/membarrier.c b/tests/membarrier.c } puts("+++ exited with 0 +++"); return 0; +diff -rup a/tests-m32/membarrier.c b/tests-m32/membarrier.c +--- a/tests-m32/membarrier.c 2016-04-21 14:16:50.000000000 -0400 ++++ b/tests-m32/membarrier.c 2018-02-05 19:24:07.016341127 -0500 +@@ -42,10 +42,23 @@ main(void) + printf("membarrier(0x3 /* MEMBARRIER_CMD_??? */, 255) = -1 %s (%m)\n", + errno2name()); + if (errno != ENOSYS) { +- /* the test needs to be updated? */ +- assert(syscall(__NR_membarrier, 0, 0) == 1); +- puts("membarrier(MEMBARRIER_CMD_QUERY, 0)" +- " = 0x1 (MEMBARRIER_CMD_SHARED)"); ++ const char *text; ++ int rc = syscall(__NR_membarrier, 0, 0); ++ ++ switch (rc) { ++ case 1: ++ text = "MEMBARRIER_CMD_SHARED"; ++ break; ++ case 1|8: ++ text = "MEMBARRIER_CMD_SHARED|" ++ "MEMBARRIER_CMD_PRIVATE_EXPEDITED"; ++ break; ++ default: ++ error_msg_and_fail("membarrier returned %#x, does" ++ " the test have to be updated?", rc); ++ } ++ printf("membarrier(MEMBARRIER_CMD_QUERY, 0) = %#x (%s)\n", ++ rc, text); + } + puts("+++ exited with 0 +++"); + return 0; +diff -rup a/tests-mx32/membarrier.c b/tests-mx32/membarrier.c +--- a/tests-mx32/membarrier.c 2016-04-21 14:16:50.000000000 -0400 ++++ b/tests-mx32/membarrier.c 2018-02-05 19:24:07.016341127 -0500 +@@ -42,10 +42,23 @@ main(void) + printf("membarrier(0x3 /* MEMBARRIER_CMD_??? */, 255) = -1 %s (%m)\n", + errno2name()); + if (errno != ENOSYS) { +- /* the test needs to be updated? */ +- assert(syscall(__NR_membarrier, 0, 0) == 1); +- puts("membarrier(MEMBARRIER_CMD_QUERY, 0)" +- " = 0x1 (MEMBARRIER_CMD_SHARED)"); ++ const char *text; ++ int rc = syscall(__NR_membarrier, 0, 0); ++ ++ switch (rc) { ++ case 1: ++ text = "MEMBARRIER_CMD_SHARED"; ++ break; ++ case 1|8: ++ text = "MEMBARRIER_CMD_SHARED|" ++ "MEMBARRIER_CMD_PRIVATE_EXPEDITED"; ++ break; ++ default: ++ error_msg_and_fail("membarrier returned %#x, does" ++ " the test have to be updated?", rc); ++ } ++ printf("membarrier(MEMBARRIER_CMD_QUERY, 0) = %#x (%s)\n", ++ rc, text); + } + puts("+++ exited with 0 +++"); + return 0; diff -rup a/xlat/membarrier_cmds.in b/xlat/membarrier_cmds.in --- a/xlat/membarrier_cmds.in 2015-11-16 19:40:22.000000000 -0500 +++ b/xlat/membarrier_cmds.in 2018-02-05 19:23:39.097820501 -0500 diff --git a/SOURCES/strace-rh1540954-2.patch b/SOURCES/strace-rh1540954-2.patch index d4ff3e2..16d008b 100644 --- a/SOURCES/strace-rh1540954-2.patch +++ b/SOURCES/strace-rh1540954-2.patch @@ -24,6 +24,38 @@ index 7d79724..75a8469 100644 default: error_msg_and_fail("membarrier returned %#x, does" " the test have to be updated?", rc); +diff --git a/tests-m32/membarrier.c b/tests-m32/membarrier.c +index 7d79724..75a8469 100644 +--- a/tests-m32/membarrier.c ++++ b/tests-m32/membarrier.c +@@ -55,6 +55,11 @@ main(void) + text = "MEMBARRIER_CMD_SHARED|" + "MEMBARRIER_CMD_PRIVATE_EXPEDITED"; + break; ++ case 1|8|16: ++ text = "MEMBARRIER_CMD_SHARED|" ++ "MEMBARRIER_CMD_PRIVATE_EXPEDITED|" ++ "MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED"; ++ break; + default: + error_msg_and_fail("membarrier returned %#x, does" + " the test have to be updated?", rc); +diff --git a/tests-mx32/membarrier.c b/tests-mx32/membarrier.c +index 7d79724..75a8469 100644 +--- a/tests-mx32/membarrier.c ++++ b/tests-mx32/membarrier.c +@@ -55,6 +55,11 @@ main(void) + text = "MEMBARRIER_CMD_SHARED|" + "MEMBARRIER_CMD_PRIVATE_EXPEDITED"; + break; ++ case 1|8|16: ++ text = "MEMBARRIER_CMD_SHARED|" ++ "MEMBARRIER_CMD_PRIVATE_EXPEDITED|" ++ "MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED"; ++ break; + default: + error_msg_and_fail("membarrier returned %#x, does" + " the test have to be updated?", rc); diff --git a/xlat/membarrier_cmds.in b/xlat/membarrier_cmds.in index 3baef17..e4fe06a 100644 --- a/xlat/membarrier_cmds.in diff --git a/SOURCES/strace-rh1573034.patch b/SOURCES/strace-rh1573034.patch new file mode 100644 index 0000000..43b60a4 --- /dev/null +++ b/SOURCES/strace-rh1573034.patch @@ -0,0 +1,42 @@ +Index: strace-4.12/strace.1 +=================================================================== +--- strace-4.12.orig/strace.1 2016-05-26 17:34:28.000000000 +0200 ++++ strace-4.12/strace.1 2018-04-30 13:08:34.770163287 +0200 +@@ -601,10 +601,13 @@ + is used. + .LP + When using +-.BR \-p , ++.B \-p ++without a ++.IR command , + the exit status of + .B strace +-is zero unless there was an unexpected error in doing the tracing. ++is zero unless no processes has been attached or there was an unexpected error ++in doing the tracing. + .SH "SETUID INSTALLATION" + If + .B strace +Index: strace-4.12/strace.c +=================================================================== +--- strace-4.12.orig/strace.c 2018-04-30 13:07:36.776730188 +0200 ++++ strace-4.12/strace.c 2018-04-30 13:08:34.771163277 +0200 +@@ -138,7 +138,7 @@ + /* Are we "strace PROG" and need to hide everything until execve? */ + bool hide_log_until_execve = 0; + +-static int exit_code = 0; ++static int exit_code; + static int strace_child = 0; + static int strace_tracer_pid = 0; + +@@ -2446,6 +2446,8 @@ + { + init(argc, argv); + ++ exit_code = !nprocs; ++ + while (trace()) + ; + diff --git a/SOURCES/strace-rh1600210-0001-Update-MEMBARRIER_CMD_-constants.patch b/SOURCES/strace-rh1600210-0001-Update-MEMBARRIER_CMD_-constants.patch new file mode 100644 index 0000000..fb8df66 --- /dev/null +++ b/SOURCES/strace-rh1600210-0001-Update-MEMBARRIER_CMD_-constants.patch @@ -0,0 +1,220 @@ +From e87c073ecc05fa903b0ce88b9237d45dea96ca22 Mon Sep 17 00:00:00 2001 +From: Eugene Syromyatnikov +Date: Thu, 8 Feb 2018 11:01:52 +0100 +Subject: [PATCH 1/2] Update MEMBARRIER_CMD_* constants + +* xlat/membarrier_cmds.in: Add new constants, rename +MEMBARRIER_CMD_SHARED to MEMBARRIER_CMD_GLOBAL. +* NEWS: Mention this. +* tests/membarrier.c (main): Update expected output. + +Co-Authored-by: Dmitry V. Levin + +[ ES: also patch files in tests-m32 and tests-mx32 directories, as well + as the generated xlat/membarriers_cmds.h ] + +--- + NEWS | 3 ++- + tests/membarrier.c | 25 ++++++++++++++++++++++--- + xlat/membarrier_cmds.in | 12 ++++++++---- + 3 files changed, 32 insertions(+), 8 deletions(-) + +Index: strace-4.12/tests/membarrier.c +=================================================================== +--- strace-4.12.orig/tests/membarrier.c 2018-07-19 05:12:03.106834204 +0200 ++++ strace-4.12/tests/membarrier.c 2018-07-19 05:47:43.260852729 +0200 +@@ -47,17 +47,36 @@ + + switch (rc) { + case 1: +- text = "MEMBARRIER_CMD_SHARED"; ++ text = "MEMBARRIER_CMD_GLOBAL"; + break; + case 1|8: +- text = "MEMBARRIER_CMD_SHARED|" ++ text = "MEMBARRIER_CMD_GLOBAL|" + "MEMBARRIER_CMD_PRIVATE_EXPEDITED"; + break; + case 1|8|16: +- text = "MEMBARRIER_CMD_SHARED|" ++ text = "MEMBARRIER_CMD_GLOBAL|" + "MEMBARRIER_CMD_PRIVATE_EXPEDITED|" + "MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED"; + break; ++ ++ case 1|2|4|8|16: ++ text = "MEMBARRIER_CMD_GLOBAL|" ++ "MEMBARRIER_CMD_GLOBAL_EXPEDITED|" ++ "MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED|" ++ "MEMBARRIER_CMD_PRIVATE_EXPEDITED|" ++ "MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED"; ++ break; ++ ++ case 1|2|4|8|16|32|64: ++ text = "MEMBARRIER_CMD_GLOBAL|" ++ "MEMBARRIER_CMD_GLOBAL_EXPEDITED|" ++ "MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED|" ++ "MEMBARRIER_CMD_PRIVATE_EXPEDITED|" ++ "MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED|" ++ "MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE|" ++ "MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE"; ++ break; ++ + default: + error_msg_and_fail("membarrier returned %#x, does" + " the test have to be updated?", rc); +Index: strace-4.12/tests-m32/membarrier.c +=================================================================== +--- strace-4.12.orig/tests-m32/membarrier.c 2018-07-19 05:12:03.106834204 +0200 ++++ strace-4.12/tests-m32/membarrier.c 2018-07-19 05:47:43.260852729 +0200 +@@ -47,17 +47,36 @@ + + switch (rc) { + case 1: +- text = "MEMBARRIER_CMD_SHARED"; ++ text = "MEMBARRIER_CMD_GLOBAL"; + break; + case 1|8: +- text = "MEMBARRIER_CMD_SHARED|" ++ text = "MEMBARRIER_CMD_GLOBAL|" + "MEMBARRIER_CMD_PRIVATE_EXPEDITED"; + break; + case 1|8|16: +- text = "MEMBARRIER_CMD_SHARED|" ++ text = "MEMBARRIER_CMD_GLOBAL|" + "MEMBARRIER_CMD_PRIVATE_EXPEDITED|" + "MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED"; + break; ++ ++ case 1|2|4|8|16: ++ text = "MEMBARRIER_CMD_GLOBAL|" ++ "MEMBARRIER_CMD_GLOBAL_EXPEDITED|" ++ "MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED|" ++ "MEMBARRIER_CMD_PRIVATE_EXPEDITED|" ++ "MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED"; ++ break; ++ ++ case 1|2|4|8|16|32|64: ++ text = "MEMBARRIER_CMD_GLOBAL|" ++ "MEMBARRIER_CMD_GLOBAL_EXPEDITED|" ++ "MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED|" ++ "MEMBARRIER_CMD_PRIVATE_EXPEDITED|" ++ "MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED|" ++ "MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE|" ++ "MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE"; ++ break; ++ + default: + error_msg_and_fail("membarrier returned %#x, does" + " the test have to be updated?", rc); +Index: strace-4.12/tests-mx32/membarrier.c +=================================================================== +--- strace-4.12.orig/tests-mx32/membarrier.c 2018-07-19 05:12:03.106834204 +0200 ++++ strace-4.12/tests-mx32/membarrier.c 2018-07-19 05:47:43.260852729 +0200 +@@ -47,17 +47,36 @@ + + switch (rc) { + case 1: +- text = "MEMBARRIER_CMD_SHARED"; ++ text = "MEMBARRIER_CMD_GLOBAL"; + break; + case 1|8: +- text = "MEMBARRIER_CMD_SHARED|" ++ text = "MEMBARRIER_CMD_GLOBAL|" + "MEMBARRIER_CMD_PRIVATE_EXPEDITED"; + break; + case 1|8|16: +- text = "MEMBARRIER_CMD_SHARED|" ++ text = "MEMBARRIER_CMD_GLOBAL|" + "MEMBARRIER_CMD_PRIVATE_EXPEDITED|" + "MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED"; + break; ++ ++ case 1|2|4|8|16: ++ text = "MEMBARRIER_CMD_GLOBAL|" ++ "MEMBARRIER_CMD_GLOBAL_EXPEDITED|" ++ "MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED|" ++ "MEMBARRIER_CMD_PRIVATE_EXPEDITED|" ++ "MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED"; ++ break; ++ ++ case 1|2|4|8|16|32|64: ++ text = "MEMBARRIER_CMD_GLOBAL|" ++ "MEMBARRIER_CMD_GLOBAL_EXPEDITED|" ++ "MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED|" ++ "MEMBARRIER_CMD_PRIVATE_EXPEDITED|" ++ "MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED|" ++ "MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE|" ++ "MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE"; ++ break; ++ + default: + error_msg_and_fail("membarrier returned %#x, does" + " the test have to be updated?", rc); +Index: strace-4.12/xlat/membarrier_cmds.in +=================================================================== +--- strace-4.12.orig/xlat/membarrier_cmds.in 2018-07-19 05:12:03.106834204 +0200 ++++ strace-4.12/xlat/membarrier_cmds.in 2018-07-19 05:36:28.224374142 +0200 +@@ -1,4 +1,8 @@ +-MEMBARRIER_CMD_QUERY 0 +-MEMBARRIER_CMD_SHARED 1 +-MEMBARRIER_CMD_PRIVATE_EXPEDITED 8 +-MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED 16 ++MEMBARRIER_CMD_QUERY 0 ++MEMBARRIER_CMD_GLOBAL 1 << 0 ++MEMBARRIER_CMD_GLOBAL_EXPEDITED 1 << 1 ++MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED 1 << 2 ++MEMBARRIER_CMD_PRIVATE_EXPEDITED 1 << 3 ++MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED 1 << 4 ++MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE 1 << 5 ++MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE 1 << 6 +Index: strace-4.12/xlat/membarrier_cmds.h +=================================================================== +--- strace-4.12.orig/xlat/membarrier_cmds.h 2018-07-19 04:50:23.523169050 +0200 ++++ strace-4.12/xlat/membarrier_cmds.h 2018-07-19 05:49:44.237325487 +0200 +@@ -2,14 +2,26 @@ + #if !(defined(MEMBARRIER_CMD_QUERY) || (defined(HAVE_DECL_MEMBARRIER_CMD_QUERY) && HAVE_DECL_MEMBARRIER_CMD_QUERY)) + # define MEMBARRIER_CMD_QUERY 0 + #endif +-#if !(defined(MEMBARRIER_CMD_SHARED) || (defined(HAVE_DECL_MEMBARRIER_CMD_SHARED) && HAVE_DECL_MEMBARRIER_CMD_SHARED)) +-# define MEMBARRIER_CMD_SHARED 1 ++#if !(defined(MEMBARRIER_CMD_GLOBAL) || (defined(HAVE_DECL_MEMBARRIER_CMD_GLOBAL) && HAVE_DECL_MEMBARRIER_CMD_GLOBAL)) ++# define MEMBARRIER_CMD_GLOBAL 1 << 0 ++#endif ++#if !(defined(MEMBARRIER_CMD_GLOBAL_EXPEDITED) || (defined(HAVE_DECL_MEMBARRIER_CMD_GLOBAL_EXPEDITED) && HAVE_DECL_MEMBARRIER_CMD_GLOBAL_EXPEDITED)) ++# define MEMBARRIER_CMD_GLOBAL_EXPEDITED 1 << 1 ++#endif ++#if !(defined(MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED) || (defined(HAVE_DECL_MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED) && HAVE_DECL_MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED)) ++# define MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED 1 << 2 + #endif + #if !(defined(MEMBARRIER_CMD_PRIVATE_EXPEDITED) || (defined(HAVE_DECL_MEMBARRIER_CMD_PRIVATE_EXPEDITED) && HAVE_DECL_MEMBARRIER_CMD_PRIVATE_EXPEDITED)) +-# define MEMBARRIER_CMD_PRIVATE_EXPEDITED 8 ++# define MEMBARRIER_CMD_PRIVATE_EXPEDITED 1 << 3 + #endif + #if !(defined(MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED) || (defined(HAVE_DECL_MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED) && HAVE_DECL_MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED)) +-# define MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED 16 ++# define MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED 1 << 4 ++#endif ++#if !(defined(MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE) || (defined(HAVE_DECL_MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE) && HAVE_DECL_MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE)) ++# define MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE 1 << 5 ++#endif ++#if !(defined(MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE) || (defined(HAVE_DECL_MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE) && HAVE_DECL_MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE)) ++# define MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE 1 << 6 + #endif + + #ifdef IN_MPERS +@@ -21,9 +33,13 @@ + static + const struct xlat membarrier_cmds[] = { + XLAT(MEMBARRIER_CMD_QUERY), +- XLAT(MEMBARRIER_CMD_SHARED), ++ XLAT(MEMBARRIER_CMD_GLOBAL), ++ XLAT(MEMBARRIER_CMD_GLOBAL_EXPEDITED), ++ XLAT(MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED), + XLAT(MEMBARRIER_CMD_PRIVATE_EXPEDITED), + XLAT(MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED), ++ XLAT(MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE), ++ XLAT(MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE), + XLAT_END + }; + diff --git a/SOURCES/strace-rh1600210-0002-tests-membarrier.c-fix-expected-output-on-nohz_full-.patch b/SOURCES/strace-rh1600210-0002-tests-membarrier.c-fix-expected-output-on-nohz_full-.patch new file mode 100644 index 0000000..49a7a6d --- /dev/null +++ b/SOURCES/strace-rh1600210-0002-tests-membarrier.c-fix-expected-output-on-nohz_full-.patch @@ -0,0 +1,220 @@ +From c2bacdd427e44b07160f45f821725441a8284af4 Mon Sep 17 00:00:00 2001 +From: Eugene Syromyatnikov +Date: Thu, 8 Feb 2018 11:09:01 +0100 +Subject: [PATCH 2/2] tests/membarrier.c: fix expected output on nohz_full + systems + +If nohz_full is enabled, MEMBARRIER_CMD_GLOBAL is not available. + +* tests/membarrier.c: check availability of MEMBARRIER_CMD_GLOBAL +separately. +--- + tests/membarrier.c | 36 +++++++++++++++++++----------------- + 1 file changed, 19 insertions(+), 17 deletions(-) + +[ ES: Also patch files in tests-m32 an tests-mx32 directories ] + +diff --git a/tests/membarrier.c b/tests/membarrier.c +index f195063..9c76be5 100644 +--- a/tests/membarrier.c ++++ b/tests/membarrier.c +@@ -44,34 +44,35 @@ main(void) + printf("membarrier(0x3 /* MEMBARRIER_CMD_??? */, 255) = -1 %s (%m)\n", + errno2name()); + if (errno != ENOSYS) { ++ const char *text_global; + const char *text; + int rc = syscall(__NR_membarrier, 0, 0); + +- switch (rc) { +- case 1: +- text = "MEMBARRIER_CMD_GLOBAL"; ++ assert(rc >= 0); ++ ++ text_global = rc & 1 ? "MEMBARRIER_CMD_GLOBAL" : ""; ++ ++ switch (rc & ~1) { ++ case 0: ++ text = ""; + break; +- case 1|8: +- text = "MEMBARRIER_CMD_GLOBAL|" +- "MEMBARRIER_CMD_PRIVATE_EXPEDITED"; ++ case 8: ++ text = "MEMBARRIER_CMD_PRIVATE_EXPEDITED"; + break; +- case 1|8|16: +- text = "MEMBARRIER_CMD_GLOBAL|" +- "MEMBARRIER_CMD_PRIVATE_EXPEDITED|" ++ case 8|16: ++ text = "MEMBARRIER_CMD_PRIVATE_EXPEDITED|" + "MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED"; + break; + +- case 1|2|4|8|16: +- text = "MEMBARRIER_CMD_GLOBAL|" +- "MEMBARRIER_CMD_GLOBAL_EXPEDITED|" ++ case 2|4|8|16: ++ text = "MEMBARRIER_CMD_GLOBAL_EXPEDITED|" + "MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED|" + "MEMBARRIER_CMD_PRIVATE_EXPEDITED|" + "MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED"; + break; + +- case 1|2|4|8|16|32|64: +- text = "MEMBARRIER_CMD_GLOBAL|" +- "MEMBARRIER_CMD_GLOBAL_EXPEDITED|" ++ case 2|4|8|16|32|64: ++ text = "MEMBARRIER_CMD_GLOBAL_EXPEDITED|" + "MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED|" + "MEMBARRIER_CMD_PRIVATE_EXPEDITED|" + "MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED|" +@@ -83,8 +84,9 @@ main(void) + error_msg_and_fail("membarrier returned %#x, does" + " the test have to be updated?", rc); + } +- printf("membarrier(MEMBARRIER_CMD_QUERY, 0) = %#x (%s)\n", +- rc, text); ++ printf("membarrier(MEMBARRIER_CMD_QUERY, 0) = %#x (%s%s%s)\n", ++ rc, text_global, text[0] && text_global[0] ? "|" : "", ++ text); + } + puts("+++ exited with 0 +++"); + return 0; +diff --git a/tests-m32/membarrier.c b/tests-m32/membarrier.c +index f195063..9c76be5 100644 +--- a/tests-m32/membarrier.c ++++ b/tests-m32/membarrier.c +@@ -44,34 +44,35 @@ main(void) + printf("membarrier(0x3 /* MEMBARRIER_CMD_??? */, 255) = -1 %s (%m)\n", + errno2name()); + if (errno != ENOSYS) { ++ const char *text_global; + const char *text; + int rc = syscall(__NR_membarrier, 0, 0); + +- switch (rc) { +- case 1: +- text = "MEMBARRIER_CMD_GLOBAL"; ++ assert(rc >= 0); ++ ++ text_global = rc & 1 ? "MEMBARRIER_CMD_GLOBAL" : ""; ++ ++ switch (rc & ~1) { ++ case 0: ++ text = ""; + break; +- case 1|8: +- text = "MEMBARRIER_CMD_GLOBAL|" +- "MEMBARRIER_CMD_PRIVATE_EXPEDITED"; ++ case 8: ++ text = "MEMBARRIER_CMD_PRIVATE_EXPEDITED"; + break; +- case 1|8|16: +- text = "MEMBARRIER_CMD_GLOBAL|" +- "MEMBARRIER_CMD_PRIVATE_EXPEDITED|" ++ case 8|16: ++ text = "MEMBARRIER_CMD_PRIVATE_EXPEDITED|" + "MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED"; + break; + +- case 1|2|4|8|16: +- text = "MEMBARRIER_CMD_GLOBAL|" +- "MEMBARRIER_CMD_GLOBAL_EXPEDITED|" ++ case 2|4|8|16: ++ text = "MEMBARRIER_CMD_GLOBAL_EXPEDITED|" + "MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED|" + "MEMBARRIER_CMD_PRIVATE_EXPEDITED|" + "MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED"; + break; + +- case 1|2|4|8|16|32|64: +- text = "MEMBARRIER_CMD_GLOBAL|" +- "MEMBARRIER_CMD_GLOBAL_EXPEDITED|" ++ case 2|4|8|16|32|64: ++ text = "MEMBARRIER_CMD_GLOBAL_EXPEDITED|" + "MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED|" + "MEMBARRIER_CMD_PRIVATE_EXPEDITED|" + "MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED|" +@@ -83,8 +84,9 @@ main(void) + error_msg_and_fail("membarrier returned %#x, does" + " the test have to be updated?", rc); + } +- printf("membarrier(MEMBARRIER_CMD_QUERY, 0) = %#x (%s)\n", +- rc, text); ++ printf("membarrier(MEMBARRIER_CMD_QUERY, 0) = %#x (%s%s%s)\n", ++ rc, text_global, text[0] && text_global[0] ? "|" : "", ++ text); + } + puts("+++ exited with 0 +++"); + return 0; +diff --git a/tests-mx32/membarrier.c b/tests-mx32/membarrier.c +index f195063..9c76be5 100644 +--- a/tests-mx32/membarrier.c ++++ b/tests-mx32/membarrier.c +@@ -44,34 +44,35 @@ main(void) + printf("membarrier(0x3 /* MEMBARRIER_CMD_??? */, 255) = -1 %s (%m)\n", + errno2name()); + if (errno != ENOSYS) { ++ const char *text_global; + const char *text; + int rc = syscall(__NR_membarrier, 0, 0); + +- switch (rc) { +- case 1: +- text = "MEMBARRIER_CMD_GLOBAL"; ++ assert(rc >= 0); ++ ++ text_global = rc & 1 ? "MEMBARRIER_CMD_GLOBAL" : ""; ++ ++ switch (rc & ~1) { ++ case 0: ++ text = ""; + break; +- case 1|8: +- text = "MEMBARRIER_CMD_GLOBAL|" +- "MEMBARRIER_CMD_PRIVATE_EXPEDITED"; ++ case 8: ++ text = "MEMBARRIER_CMD_PRIVATE_EXPEDITED"; + break; +- case 1|8|16: +- text = "MEMBARRIER_CMD_GLOBAL|" +- "MEMBARRIER_CMD_PRIVATE_EXPEDITED|" ++ case 8|16: ++ text = "MEMBARRIER_CMD_PRIVATE_EXPEDITED|" + "MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED"; + break; + +- case 1|2|4|8|16: +- text = "MEMBARRIER_CMD_GLOBAL|" +- "MEMBARRIER_CMD_GLOBAL_EXPEDITED|" ++ case 2|4|8|16: ++ text = "MEMBARRIER_CMD_GLOBAL_EXPEDITED|" + "MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED|" + "MEMBARRIER_CMD_PRIVATE_EXPEDITED|" + "MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED"; + break; + +- case 1|2|4|8|16|32|64: +- text = "MEMBARRIER_CMD_GLOBAL|" +- "MEMBARRIER_CMD_GLOBAL_EXPEDITED|" ++ case 2|4|8|16|32|64: ++ text = "MEMBARRIER_CMD_GLOBAL_EXPEDITED|" + "MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED|" + "MEMBARRIER_CMD_PRIVATE_EXPEDITED|" + "MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED|" +@@ -83,8 +84,9 @@ main(void) + error_msg_and_fail("membarrier returned %#x, does" + " the test have to be updated?", rc); + } +- printf("membarrier(MEMBARRIER_CMD_QUERY, 0) = %#x (%s)\n", +- rc, text); ++ printf("membarrier(MEMBARRIER_CMD_QUERY, 0) = %#x (%s%s%s)\n", ++ rc, text_global, text[0] && text_global[0] ? "|" : "", ++ text); + } + puts("+++ exited with 0 +++"); + return 0; +-- +2.1.4 + diff --git a/SPECS/strace.spec b/SPECS/strace.spec index 2c700c3..c864451 100644 --- a/SPECS/strace.spec +++ b/SPECS/strace.spec @@ -1,7 +1,7 @@ Summary: Tracks and displays system calls associated with a running process Name: strace Version: 4.12 -Release: 6%{?dist} +Release: 9%{?dist} License: BSD Group: Development/Debuggers URL: http://sourceforge.net/projects/strace/ @@ -26,6 +26,10 @@ Patch3003: strace-rh1449935.patch Patch3004: strace-rh1466535.patch Patch3005: strace-rh1540954-1.patch Patch3006: strace-rh1540954-2.patch +Patch3007: strace-rh1573034.patch +Patch3008: strace-rh1600210-0001-Update-MEMBARRIER_CMD_-constants.patch +Patch3009: strace-rh1600210-0002-tests-membarrier.c-fix-expected-output-on-nohz_full-.patch + # In the past we had a separate strace64 package, these days the # stndard 64 bit build provides that functionality. For tracing @@ -81,6 +85,9 @@ This package provides the `strace32' program to trace 32-bit processes on %patch3004 -p1 %patch3005 -p1 %patch3006 -p1 +%patch3007 -p1 +%patch3008 -p1 +%patch3009 -p1 %build %configure @@ -107,7 +114,7 @@ rm -f %{buildroot}%{_bindir}/strace-graph %check # Temporary until we dig deeper into the failures %ifnarch s390 s390x ppc64 ppc64le -make -k check +make -k check VERBOSE=1 %endif %clean @@ -127,6 +134,15 @@ rm -rf %{buildroot} %endif %changelog +* Sat Jul 21 2018 Eugene Syromiatnikov - 4.12-9 +- Patch files in tests-m32 and tests-mx32 as well. (#1600210) + +* Thu Jul 19 2018 Eugene Syromiatnikov - 4.12-8 +- Update membarrier constants. (#1600210) + +* Mon Apr 30 2018 Eugene Syromiatnikov - 4.12-7 +- Return non-zero exit code if no processes have been attached. (#1573034) + * Wed Feb 7 2018 DJ Delorie - 4.12-6 - Update membarrier constants. (#1540954)