Hello community,
here is the log from the commit of package stress-ng for openSUSE:Factory checked in at 2019-09-20 14:54:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/stress-ng (Old)
and /work/SRC/openSUSE:Factory/.stress-ng.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "stress-ng"
Fri Sep 20 14:54:16 2019 rev:64 rq:731902 version:0.10.05
Changes:
--------
--- /work/SRC/openSUSE:Factory/stress-ng/stress-ng.changes 2019-09-04 09:14:51.986942115 +0200
+++ /work/SRC/openSUSE:Factory/.stress-ng.new.7948/stress-ng.changes 2019-09-20 14:54:20.562868922 +0200
@@ -1,0 +2,17 @@
+Wed Sep 18 19:47:08 UTC 2019 - Martin Hauke
+
+- Update to version 0.10.05
+ * core-shim: fix typo in shim_move_mount
+ * core-shim: use shim_enosys for more ENOSYS returns
+ * Clean up shims for syslog(2) and syslog(3)
+ * stress-ramfs: remove it from the filesystem test
+ * stress-dirdeep: make inodes info into a debug message
+ * stress-vm: fix verification failure with gray code method
+ * stress-socket: make EPIPE a non-fatal error condition
+ * stress-udp: use correct default UDP port 7000
+ * stress-ng: rescan the exclusion list for --class stressors
+ * core-shim: reset errno before each waitpid call
+ * stress-socket: handle SIGPIPE as non-fatal
+ * stress-physpage: don't abort on zero address physpage
+
+-------------------------------------------------------------------
Old:
----
stress-ng-0.10.02.tar.xz
New:
----
stress-ng-0.10.05.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ stress-ng.spec ++++++
--- /var/tmp/diff_new_pack.2ntdfu/_old 2019-09-20 14:54:21.662868703 +0200
+++ /var/tmp/diff_new_pack.2ntdfu/_new 2019-09-20 14:54:21.670868701 +0200
@@ -18,7 +18,7 @@
Name: stress-ng
-Version: 0.10.02
+Version: 0.10.05
Release: 0
Summary: Tool to load and stress a computer
License: GPL-2.0-only
++++++ stress-ng-0.10.02.tar.xz -> stress-ng-0.10.05.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/Makefile new/stress-ng-0.10.05/Makefile
--- old/stress-ng-0.10.02/Makefile 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/Makefile 2019-09-12 16:26:48.000000000 +0200
@@ -16,7 +16,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
-VERSION=0.10.02
+VERSION=0.10.05
#
# Codename "systematic system smasher"
#
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/README new/stress-ng-0.10.05/README
--- old/stress-ng-0.10.02/README 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/README 2019-09-12 16:26:48.000000000 +0200
@@ -94,7 +94,7 @@
make clean
CC=tcc make
-For more information, see: http://kernel.ubuntu.com/~cking/stress-ng/
+For more information, see: https://kernel.ubuntu.com/~cking/stress-ng/
I am keen to add to the stress-ng project page any citations to research or
projects that use stress-ng. I also appreciate information concerning kernel
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/bash-completion/stress-ng new/stress-ng-0.10.05/bash-completion/stress-ng
--- old/stress-ng-0.10.02/bash-completion/stress-ng 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/bash-completion/stress-ng 2019-09-12 16:26:48.000000000 +0200
@@ -99,7 +99,7 @@
case "$cur" in
#
# args without further options
- #
+ #
'--abort' | '--aggressive' | '--dry-run' | '--help' | '--ignite-cpu' |\
'--keep-name' | '--log-brief' | '--maximize' | '--metrics' |\
'--metrics-brief' | '--minimize' | '--no-madvise' | '--no-rand-seed' |\
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/core-cache.c new/stress-ng-0.10.05/core-cache.c
--- old/stress-ng-0.10.02/core-cache.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/core-cache.c 2019-09-12 16:26:48.000000000 +0200
@@ -169,11 +169,11 @@
*/
static int add_cpu_cache_detail(cpu_cache_t *cache, const char *index_path)
{
- const size_t index_posn = strlen(index_path);
+ const size_t index_posn = index_path ? strlen(index_path) : 0;
const size_t path_len = index_posn + 32;
- char path[path_len];
- char tmp[2048];
int ret = EXIT_FAILURE;
+ char tmp[2048];
+ char path[path_len];
(void)memset(path, 0, sizeof(path));
if (!cache) {
@@ -185,29 +185,29 @@
goto out;
}
- snprintf(path, sizeof(path), "%s/type", index_path);
+ (void)snprintf(path, sizeof(path), "%s/type", index_path);
if (get_string_from_file(path, tmp, sizeof(tmp)) < 0)
goto out;
cache->type = (cache_type_t)get_cache_type(tmp);
if (cache->type == CACHE_TYPE_UNKNOWN)
goto out;
- snprintf(path, sizeof(path), "%s/size", index_path);
+ (void)snprintf(path, sizeof(path), "%s/size", index_path);
if (get_string_from_file(path, tmp, sizeof(tmp)) < 0)
goto out;
cache->size = size_to_bytes(tmp);
- snprintf(path, sizeof(path), "%s/level", index_path);
+ (void)snprintf(path, sizeof(path), "%s/level", index_path);
if (get_string_from_file(path, tmp, sizeof(tmp)) < 0)
goto out;
cache->level = (uint16_t)atoi(tmp);
- snprintf(path, sizeof(path), "%s/coherency_line_size", index_path);
+ (void)snprintf(path, sizeof(path), "%s/coherency_line_size", index_path);
if (get_string_from_file(path, tmp, sizeof(tmp)) < 0)
goto out;
cache->line_size = (uint32_t)atoi(tmp);
- snprintf(path, sizeof(path), "%s/ways_of_associativity", index_path);
+ (void)snprintf(path, sizeof(path), "%s/ways_of_associativity", index_path);
if (get_string_from_file(path, tmp, sizeof(tmp)) < 0)
cache->ways = atoi(tmp);
else
@@ -325,7 +325,8 @@
*/
static int get_cpu_cache_details(cpu_t *cpu, const char *cpu_path)
{
- char path[strlen(cpu_path) + strlen(SYS_CPU_CACHE_DIR) + 2];
+ const size_t cpu_path_len = cpu_path ? strlen(cpu_path) : 0;
+ char path[cpu_path_len + strlen(SYS_CPU_CACHE_DIR) + 2];
int i, j, n, ret = EXIT_FAILURE;
struct dirent **namelist;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/core-helper.c new/stress-ng-0.10.05/core-helper.c
--- old/stress-ng-0.10.02/core-helper.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/core-helper.c 2019-09-12 16:26:48.000000000 +0200
@@ -1083,7 +1083,9 @@
*/
unsigned int stress_get_cpu(void)
{
-#if defined(HAVE_SCHED_GETCPU) && !defined(__PPC64__)
+#if defined(HAVE_SCHED_GETCPU) && \
+ !defined(__PPC64__) && \
+ !defined(__s390x__)
const int cpu = sched_getcpu();
return (unsigned int)((cpu < 0) ? 0 : cpu);
@@ -1461,7 +1463,7 @@
char *str = strdup(opt);
if (!str)
- fprintf(stderr, "out of memory duplicating option '%s'\n", opt);
+ (void)fprintf(stderr, "out of memory duplicating option '%s'\n", opt);
return str;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/core-job.c new/stress-ng-0.10.05/core-job.c
--- old/stress-ng-0.10.02/core-job.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/core-job.c 2019-09-12 16:26:48.000000000 +0200
@@ -92,7 +92,7 @@
const uint32_t lineno,
const char *line)
{
- fprintf(stderr, "error in line %" PRIu32 ": '%s'\n",
+ (void)fprintf(stderr, "error in line %" PRIu32 ": '%s'\n",
lineno, line);
}
@@ -186,7 +186,7 @@
/* Must check for --job -h option! */
if (!strcmp(new_argv[1], "job") ||
!strcmp(new_argv[1], "j")) {
- fprintf(stderr, "Cannot read job file in from a job script!\n");
+ (void)fprintf(stderr, "Cannot read job file in from a job script!\n");
goto err;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/core-sched.c new/stress-ng-0.10.05/core-sched.c
--- old/stress-ng-0.10.02/core-sched.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/core-sched.c 2019-09-12 16:26:48.000000000 +0200
@@ -227,9 +227,9 @@
} else {
(void)fprintf(stderr, "Available scheduler options are:");
for (i = 0; i < SIZEOF_ARRAY(sched_types); i++) {
- fprintf(stderr, " %s", sched_types[i].name);
+ (void)fprintf(stderr, " %s", sched_types[i].name);
}
- fprintf(stderr, "\n");
+ (void)fprintf(stderr, "\n");
}
_exit(EXIT_FAILURE);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/core-shim.c new/stress-ng-0.10.05/core-shim.c
--- old/stress-ng-0.10.02/core-shim.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/core-shim.c 2019-09-12 16:26:48.000000000 +0200
@@ -288,10 +288,10 @@
}
/*
- * shim_syslog()
+ * shim_klogctl()
* wrapper for syslog(2) (NOT syslog(3))
*/
-int shim_syslog(int type, char *bufp, int len)
+int shim_klogctl(int type, char *bufp, int len)
{
#if defined(__NR_syslog)
return syscall(__NR_syslog, type, bufp, len);
@@ -1182,6 +1182,7 @@
pid_t ret;
for (;;) {
+ errno = 0;
ret = waitpid(pid, wstatus, options);
if (ret >= 0)
break;
@@ -1219,11 +1220,7 @@
#if defined(__NR_fsopen)
return syscall(__NR_fsopen, fsname, flags);
#else
- (void)fsname;
- (void)flags;
-
- errno = ENOSYS;
- return -1;
+ return shim_enosys(0, fsname, flags);
#endif
}
@@ -1232,12 +1229,7 @@
#if defined(__NR_fsmount)
return syscall(__NR_fsmount, fd, flags, ms_flags);
#else
- (void)fd;
- (void)flags;
- (void)ms_flags;
-
- errno = ENOSYS;
- return -1;
+ return shim_enosys(0, fd, flags, ms_flags);
#endif
}
@@ -1251,14 +1243,7 @@
#if defined(__NR_fsconfig)
return syscall(__NR_fsconfig, fd, cmd, key, value, aux);
#else
- (void)fd;
- (void)cmd;
- (void)key;
- (void)value;
- (void)aux;
-
- errno = ENOSYS;
- return -1;
+ return shim_enosys(0, fd, cmd, key, value, aux);
#endif
}
@@ -1273,14 +1258,7 @@
return syscall(__NR_move_mount, from_dfd, from_pathname,
to_dfd, to_pathname, flags);
#else
- (void)from_dfd;
- (void)from_pathname;
- (void)to_dfd;
- (void)to_pathname;
- (void)flags;
-
- errno = ENOSYS;
- return -1;
+ return shim_enosys(0, from_dfd, from_pathname,
+ to_dfd, to_pathname, flags);
#endif
}
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/core-thermal-zone.c new/stress-ng-0.10.05/core-thermal-zone.c
--- old/stress-ng-0.10.02/core-thermal-zone.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/core-thermal-zone.c 2019-09-12 16:26:48.000000000 +0200
@@ -159,7 +159,7 @@
for (tz_info = g_shared->tz_info; tz_info; tz_info = tz_info->next) {
for (j = 0; j < pi->started_procs; j++) {
- const uint64_t temp =
+ const uint64_t temp =
pi->stats[j]->tz.tz_stat[tz_info->index].temperature;
/* Avoid crazy temperatures. e.g. > 250 C */
if (temp <= 250000) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/core-thrash.c new/stress-ng-0.10.05/core-thrash.c
--- old/stress-ng-0.10.02/core-thrash.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/core-thrash.c 2019-09-12 16:26:48.000000000 +0200
@@ -207,7 +207,7 @@
(void)ret;
#endif
while (g_keep_stressing_flag) {
- if ((mwc8() & 0x3f) == 0)
+ if ((mwc8() & 0x3f) == 0)
pagein_all_procs();
compact_memory();
merge_memory();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/kernel-coverage.sh new/stress-ng-0.10.05/kernel-coverage.sh
--- old/stress-ng-0.10.02/kernel-coverage.sh 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/kernel-coverage.sh 2019-09-12 16:26:48.000000000 +0200
@@ -136,7 +136,7 @@
do_stress --vm 0 --vm-madvise willneed
DURATION=60
-
+
for S in $STRESSORS
do
do_stress --${S} 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-af-alg.c new/stress-ng-0.10.05/stress-af-alg.c
--- old/stress-ng-0.10.02/stress-af-alg.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-af-alg.c 2019-09-12 16:26:48.000000000 +0200
@@ -561,7 +561,6 @@
SIZEOF_ARRAY(algo_hash_info), &af_alg_hash_skip_sz);
g_shared->af_alg_cipher_skip = stress_af_alg_skip_alloc(
SIZEOF_ARRAY(algo_cipher_info), &af_alg_cipher_skip_sz);
-
}
static void stress_af_alg_deinit(void)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-apparmor.c new/stress-ng-0.10.05/stress-apparmor.c
--- old/stress-ng-0.10.02/stress-apparmor.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-apparmor.c 2019-09-12 16:26:48.000000000 +0200
@@ -405,10 +405,10 @@
{
static size_t p = 0;
- if (p > (len * sizeof(char)))
+ if (p > len)
p = 0;
- copy[p / sizeof(char)] ^= (1 << (p & 7));
+ copy[p] ^= (1 << (p & 7));
p++;
}
@@ -421,10 +421,10 @@
{
static size_t p = 0;
- if (p > (len * sizeof(char)))
+ if (p > len)
p = 0;
- copy[p / sizeof(char)] &= ~(1 << (p & 7));
+ copy[p] &= ~(1 << (p & 7));
p++;
}
@@ -437,10 +437,10 @@
{
static size_t p = 0;
- if (p > (len * sizeof(char)))
+ if (p > len)
p = 0;
- copy[p / sizeof(char)] |= (1 << (p & 7));
+ copy[p] |= (1 << (p & 7));
p++;
}
@@ -520,10 +520,10 @@
size_t p = (size_t)mwc32() % (len * sizeof(char));
for (i = 0; i < 32; i++) {
- if (p > (len * sizeof(char)))
+ if (p > len)
p = 0;
- copy[p / sizeof(char)] ^= (1 << (p & 7));
+ copy[p] ^= (1 << (p & 7));
p++;
}
}
@@ -679,7 +679,7 @@
}
for (i = 0; i < n; i++) {
- pids[i] = apparmor_spawn(args,
+ pids[i] = apparmor_spawn(args,
ops_per_child + ((i == 0) ? ops : 0),
&counters[i], apparmor_funcs[i]);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-bind-mount.c new/stress-ng-0.10.05/stress-bind-mount.c
--- old/stress-ng-0.10.02/stress-bind-mount.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-bind-mount.c 2019-09-12 16:26:48.000000000 +0200
@@ -79,8 +79,8 @@
break;
}
/*
- * The following fails with -EBUSY, but try it anyhow
- ` * just to make the kernel work harder
+ * The following fails with -EBUSY, but try it anyhow
+ * just to make the kernel work harder
*/
(void)umount("/");
inc_counter(args);
@@ -97,7 +97,7 @@
static int stress_bind_mount(const args_t *args)
{
int pid = 0, status;
- pthread_args_t pargs = { args, NULL };
+ pthread_args_t pargs = { args, NULL, 0 };
const ssize_t stack_offset =
stress_get_stack_direction() *
(CLONE_STACK_SIZE - 64);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-chroot.c new/stress-ng-0.10.05/stress-chroot.c
--- old/stress-ng-0.10.02/stress-chroot.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-chroot.c 2019-09-12 16:26:48.000000000 +0200
@@ -178,7 +178,7 @@
* so ignore this error
*/
if ((ret1 >= 0) || ((errno1 != ENOTDIR) &&
- (errno1 != ENOENT) &&
+ (errno1 != ENOENT) &&
(errno1 != EPERM))) {
pr_fail("%s: chroot(\"%s\"), expected ENOTDIR"
", got instead errno=%d (%s)\n",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-clock.c new/stress-ng-0.10.05/stress-clock.c
--- old/stress-ng-0.10.02/stress-clock.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-clock.c 2019-09-12 16:26:48.000000000 +0200
@@ -89,7 +89,7 @@
defined(HAVE_TIMER_DELETE) && \
defined(HAVE_TIMER_GETTIME) && \
defined(HAVE_TIMER_GETOVERRUN) && \
- defined(HAVE_TIMER_SETTIME)
+ defined(HAVE_TIMER_SETTIME)
static const int timers[] = {
#if defined(CLOCK_REALTIME)
CLOCK_REALTIME,
@@ -219,7 +219,7 @@
defined(HAVE_TIMER_DELETE) && \
defined(HAVE_TIMER_GETTIME) && \
defined(HAVE_TIMER_GETOVERRUN) && \
- defined(HAVE_TIMER_SETTIME)
+ defined(HAVE_TIMER_SETTIME)
{
size_t i;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-cpu.c new/stress-ng-0.10.05/stress-cpu.c
--- old/stress-ng-0.10.02/stress-cpu.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-cpu.c 2019-09-12 16:26:48.000000000 +0200
@@ -577,6 +577,23 @@
}
/*
+ * stress_cpu_collatz()
+ * stress test integer collatz conjecture
+ */
+static void HOT OPTIMIZE3 TARGET_CLONES stress_cpu_collatz(const char *name)
+{
+ register uint64_t n = 989345275647ULL; /* Has 1348 steps in cycle */
+ register int i;
+
+ for (i = 0; n != 1; i++) {
+ n = (n & 1) ? (3 * n) + 1 : n / 2;
+ }
+ if ((g_opt_flags & OPT_FLAGS_VERIFY) && (i != 1348))
+ pr_fail("%s: error detected, failed collatz progression\n",
+ name);
+}
+
+/*
* stress_cpu_hash_generic()
* stress test generic string hash function
*/
@@ -2115,7 +2132,10 @@
* stress_cpu_cpuid()
* get CPU id info, x86 only
*/
-#if defined(STRESS_X86)
+#if defined(HAVE_CPUID_H) && \
+ defined(STRESS_X86) && \
+ defined(HAVE_CPUID) && \
+ NEED_GNUC(4,6,0)
static void TARGET_CLONES stress_cpu_cpuid(const char *name)
{
register int i;
@@ -2428,8 +2448,12 @@
{ "cfloat", stress_cpu_complex_float },
{ "clongdouble", stress_cpu_complex_long_double },
#endif
+ { "collatz", stress_cpu_collatz },
{ "correlate", stress_cpu_correlate },
-#if defined(STRESS_X86)
+#if defined(HAVE_CPUID_H) && \
+ defined(STRESS_X86) && \
+ defined(HAVE_CPUID) && \
+ NEED_GNUC(4,6,0)
{ "cpuid", stress_cpu_cpuid },
#endif
{ "crc16", stress_cpu_crc16 },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-cyclic.c new/stress-ng-0.10.05/stress-cyclic.c
--- old/stress-ng-0.10.02/stress-cyclic.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-cyclic.c 2019-09-12 16:26:48.000000000 +0200
@@ -145,7 +145,7 @@
}
#if defined(HAVE_CLOCK_GETTIME) && \
- defined(HAVE_CLOCK_NANOSLEEP)
+ defined(HAVE_CLOCK_NANOSLEEP)
/*
* stress_cyclic_clock_nanosleep()
* measure latencies with clock_nanosleep
@@ -454,7 +454,7 @@
*/
static const stress_cyclic_method_info_t cyclic_methods[] = {
#if defined(HAVE_CLOCK_GETTIME) && \
- defined(HAVE_CLOCK_NANOSLEEP)
+ defined(HAVE_CLOCK_NANOSLEEP)
{ "clock_ns", stress_cyclic_clock_nanosleep },
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-dev.c new/stress-ng-0.10.05/stress-dev.c
--- old/stress-ng-0.10.02/stress-dev.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-dev.c 2019-09-12 16:26:48.000000000 +0200
@@ -1304,9 +1304,9 @@
/*
* Xen clients hang on hpet when running as root
* see: LP#1741409, so avoid opening /dev/hpet
+ */
if (!euid && !strcmp(d->d_name, "hpet"))
continue;
- */
len = strlen(d->d_name);
/*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-dirdeep.c new/stress-ng-0.10.05/stress-dirdeep.c
--- old/stress-ng-0.10.02/stress-dirdeep.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-dirdeep.c 2019-09-12 16:26:48.000000000 +0200
@@ -309,7 +309,7 @@
(void)shim_strlcpy(linkpath, rootpath, sizeof(linkpath));
(void)shim_strlcat(linkpath, "/f", sizeof(linkpath) - 3);
- pr_inf("%s: %" PRIu64 " inodes available, exercising up to %" PRIu64 " inodes\n",
+ pr_dbg("%s: %" PRIu64 " inodes available, exercising up to %" PRIu64 " inodes\n",
args->name, inodes_avail, inodes_avail - inodes_target_free);
(void)shim_strlcpy(path, rootpath, sizeof(path));
@@ -324,7 +324,7 @@
pr_tidy("%s: removing directories\n", args->name);
stress_dir_tidy(args, path, path_len, sizeof(path));
- pr_inf("%s: %" PRIu64 " inodes exercised\n", args->name, inodes_avail - min_inodes_free);
+ pr_dbg("%s: %" PRIu64 " inodes exercised\n", args->name, inodes_avail - min_inodes_free);
if ((args->instance == 0) && (inodes_target_free < min_inodes_free))
pr_inf("%s: note: specifying a larger --dirdeep setting or "
"running the stressor for longer will use more "
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-get.c new/stress-ng-0.10.05/stress-get.c
--- old/stress-ng-0.10.02/stress-get.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-get.c 2019-09-12 16:26:48.000000000 +0200
@@ -271,7 +271,7 @@
size_t kern_version_len;
struct __sysctl_args sysctl_args;
- memset(&sysctl_args, 0, sizeof(sysctl_args));
+ (void)memset(&sysctl_args, 0, sizeof(sysctl_args));
sysctl_args.name = name;
sysctl_args.nlen = SIZEOF_ARRAY(name);
sysctl_args.oldval = kern_version;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-inode-flags.c new/stress-ng-0.10.05/stress-inode-flags.c
--- old/stress-ng-0.10.02/stress-inode-flags.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-inode-flags.c 2019-09-12 16:26:48.000000000 +0200
@@ -92,7 +92,7 @@
* toggle these on and off to see if they break rather
* than fail.
*/
-static void stress_inode_flags_stressor(
+static int stress_inode_flags_stressor(
const args_t *args,
char *filename)
{
@@ -107,14 +107,14 @@
if (fddir < 0) {
pr_err("%s: cannot open %s: errno=%d (%s)\n",
args->name, path, errno, strerror(errno));
- return;
+ return -1;
}
fdfile = open(filename, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
if (fdfile < 0) {
pr_err("%s: cannot open %s: errno=%d (%s)\n",
args->name, filename, errno, strerror(errno));
(void)close(fddir);
- return;
+ return -1;
}
while (keep_running && keep_stressing()) {
@@ -177,6 +177,8 @@
stress_inode_flags_ioctl_sane(fdfile);
(void)close(fdfile);
(void)close(fddir);
+
+ return 0;
}
/*
@@ -205,7 +207,7 @@
if (stress_sigaltstack(stack, SIGSTKSZ) < 0)
return &nowt;
- stress_inode_flags_stressor(pa->args, (char *)pa->data);
+ pa->pthread_ret = stress_inode_flags_stressor(pa->args, (char *)pa->data);
return &nowt;
}
@@ -221,7 +223,7 @@
size_t i;
pthread_t pthreads[MAX_INODE_FLAG_THREADS];
int rc, ret[MAX_INODE_FLAG_THREADS];
- pthread_args_t pa;
+ pthread_args_t pa[MAX_INODE_FLAG_THREADS];
rc = shim_pthread_spin_init(&spinlock, SHIM_PTHREAD_PROCESS_SHARED);
if (rc) {
@@ -235,15 +237,16 @@
(void)stress_temp_filename_args(args,
filename, sizeof(filename), mwc32());
- pa.args = args;
- pa.data = (void *)filename;
-
(void)memset(ret, 0, sizeof(ret));
keep_running = true;
for (i = 0; i < MAX_INODE_FLAG_THREADS; i++) {
+ pa[i].args = args;
+ pa[i].data = (void *)filename;
+ pa[i].pthread_ret = 0;
+
ret[i] = pthread_create(&pthreads[i], NULL,
- stress_inode_flags_thread, &pa);
+ stress_inode_flags_thread, &pa[i]);
}
do {
@@ -251,17 +254,21 @@
} while (keep_stressing());
keep_running = false;
+ rc = EXIT_SUCCESS;
for (i = 0; i < MAX_INODE_FLAG_THREADS; i++) {
- if (ret[i] == 0)
+ if (ret[i] == 0) {
pthread_join(pthreads[i], NULL);
+ if (pa[i].pthread_ret < 0)
+ rc = EXIT_FAILURE;
+ }
}
(void)shim_pthread_spin_destroy(&spinlock);
(void)unlink(filename);
stress_temp_dir_rm_args(args);
- return EXIT_SUCCESS;
+ return rc;
}
stressor_info_t stress_inode_flags_info = {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-ioprio.c new/stress-ng-0.10.05/stress-ioprio.c
--- old/stress-ng-0.10.02/stress-ioprio.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-ioprio.c 2019-09-12 16:26:48.000000000 +0200
@@ -93,7 +93,7 @@
pr_fail("%s: ioprio_get(OPRIO_WHO_PGRP, %d), "
"errno = %d (%s)\n",
args->name, g_pgrp, errno, strerror(errno));
- goto cleanup_file;
+ goto cleanup_file;
}
}
if (!keep_stressing())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-ipsec-mb.c new/stress-ng-0.10.05/stress-ipsec-mb.c
--- old/stress-ng-0.10.02/stress-ipsec-mb.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-ipsec-mb.c 2019-09-12 16:26:48.000000000 +0200
@@ -39,7 +39,7 @@
defined(IMB_FEATURE_AESNI) && \
defined(IMB_FEATURE_AVX) && \
defined(IMB_FEATURE_AVX2) && \
- defined(IMB_FEATURE_AVX512_SKX)
+ defined(IMB_FEATURE_AVX512_SKX)
#define FEATURE_SSE (IMB_FEATURE_SSE4_2 | IMB_FEATURE_CMOV | IMB_FEATURE_AESNI)
#define FEATURE_AVX (IMB_FEATURE_AVX | IMB_FEATURE_CMOV | IMB_FEATURE_AESNI)
@@ -593,7 +593,7 @@
return EXIT_NO_RESOURCE;
}
if (imb_get_version() < IMB_VERSION(0, 51, 0)) {
- pr_inf("%s: version %s of Intel IPSEC MB library is too low, skipping\n",
+ pr_inf("%s: version %s of Intel IPSEC MB library is too low, skipping\n",
args->name, imb_get_version_str());
free_mb_mgr(p_mgr);
return EXIT_NOT_IMPLEMENTED;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-klog.c new/stress-ng-0.10.05/stress-klog.c
--- old/stress-ng-0.10.02/stress-klog.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-klog.c 2019-09-12 16:26:48.000000000 +0200
@@ -53,7 +53,7 @@
char *buffer;
ssize_t len;
- len = shim_syslog(SYSLOG_ACTION_SIZE_BUFFER, NULL, 0);
+ len = shim_klogctl(SYSLOG_ACTION_SIZE_BUFFER, NULL, 0);
if (len < 0) {
if (!args->instance)
pr_err("%s: cannot determine syslog buffer "
@@ -80,7 +80,7 @@
do {
int ret, buflen = (mwc32() % len) + 1;
- ret = shim_syslog(SYSLOG_ACTION_READ_ALL, buffer, buflen);
+ ret = shim_klogctl(SYSLOG_ACTION_READ_ALL, buffer, buflen);
if (ret < 0)
pr_fail_err("syslog ACTION_READ_ALL");
if (ret > buflen)
@@ -88,16 +88,16 @@
"data than was requested.\n", args->name);
/* open, no-op, ignore failure */
- (void)shim_syslog(SYSLOG_ACTION_OPEN, NULL, 0);
+ (void)shim_klogctl(SYSLOG_ACTION_OPEN, NULL, 0);
/* close, no-op, ignore failure */
- (void)shim_syslog(SYSLOG_ACTION_CLOSE, NULL, 0);
+ (void)shim_klogctl(SYSLOG_ACTION_CLOSE, NULL, 0);
/* get unread size, ignore failure */
- (void)shim_syslog(SYSLOG_ACTION_SIZE_UNREAD, NULL, 0);
+ (void)shim_klogctl(SYSLOG_ACTION_SIZE_UNREAD, NULL, 0);
/* get size of kernel buffer, ignore return */
- (void)shim_syslog(SYSLOG_ACTION_SIZE_BUFFER, NULL, 0);
+ (void)shim_klogctl(SYSLOG_ACTION_SIZE_BUFFER, NULL, 0);
inc_counter(args);
} while (keep_stressing());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-lockbus.c new/stress-ng-0.10.05/stress-lockbus.c
--- old/stress-ng-0.10.02/stress-lockbus.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-lockbus.c 2019-09-12 16:26:48.000000000 +0200
@@ -40,7 +40,7 @@
#define LOCK(ptr) __atomic_add_fetch(ptr, inc, __ATOMIC_SEQ_CST);
#else
-#define LOCK(ptr) asm volatile("lock addl %1,%0" : "+m" (*ptr) : "ir" (inc));
+#define LOCK(ptr) asm volatile("lock addl %1,%0" : "+m" (*ptr) : "ir" (inc));
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-matrix-3d.c new/stress-ng-0.10.05/stress-matrix-3d.c
--- old/stress-ng-0.10.02/stress-matrix-3d.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-matrix-3d.c 2019-09-12 16:26:48.000000000 +0200
@@ -229,7 +229,7 @@
for (j = 0; j < n; j++) {
register size_t i;
-
+
for (i = 0; i < n; i++) {
r[i][j][k] = a[k][j][i];
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-membarrier.c new/stress-ng-0.10.05/stress-membarrier.c
--- old/stress-ng-0.10.02/stress-membarrier.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-membarrier.c 2019-09-12 16:26:48.000000000 +0200
@@ -99,7 +99,7 @@
pthread_t pthreads[MAX_MEMBARRIER_THREADS];
size_t i;
int pthread_ret[MAX_MEMBARRIER_THREADS];
- pthread_args_t pargs = { args, NULL };
+ pthread_args_t pargs = { args, NULL, 0 };
ret = shim_membarrier(MEMBARRIER_CMD_QUERY, 0);
if (ret < 0) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-ng.1 new/stress-ng-0.10.05/stress-ng.1
--- old/stress-ng-0.10.02/stress-ng.1 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-ng.1 2019-09-12 16:26:48.000000000 +0200
@@ -2,7 +2,7 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
-.TH STRESS-NG 1 "August 21, 2019"
+.TH STRESS-NG 1 "September 2, 2019"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@@ -735,6 +735,10 @@
clongdouble T{
1000 iterations of a mix of long double floating point complex operations
T}
+collatz T{
+compute the 1348 steps in the collatz sequence from starting number 989345275647.
+Where f(n) = n / 2 (for even n) and f(n) = 3n + 1 (for odd n).
+T}
correlate T{
perform a 16384 \(mu 1024 correlation of random doubles
T}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-ng.c new/stress-ng-0.10.05/stress-ng.c
--- old/stress-ng-0.10.02/stress-ng.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-ng.c 2019-09-12 16:26:48.000000000 +0200
@@ -1482,9 +1482,9 @@
case SIGSEGV:
case SIGFPE:
case SIGBUS:
- fprintf(stderr, "%s: info: [%d] terminated with unexpected signal %s\n",
+ (void)fprintf(stderr, "%s: info: [%d] terminated with unexpected signal %s\n",
g_app_name, (int)getpid(), stress_strsignal(signum));
- fflush(stderr);
+ (void)fflush(stderr);
_exit(EXIT_SIGNALED);
break;
default:
@@ -1935,9 +1935,7 @@
(void)shim_strlcat(buf + len, argv[i], arglen[i]);
len += arglen[i];
}
-#if defined(HAVE_SYSLOG_H)
- syslog(LOG_INFO, "invoked with '%s' by user %d", buf, getuid());
-#endif
+ shim_syslog(LOG_INFO, "invoked with '%s' by user %d", buf, getuid());
free(buf);
}
@@ -1953,7 +1951,7 @@
struct sysinfo info;
if (sysinfo(&info) == 0) {
- syslog(LOG_INFO, "memory (MB): total %.2f, "
+ shim_syslog(LOG_INFO, "memory (MB): total %.2f, "
"free %.2f, "
"shared %.2f, "
"buffer %.2f, "
@@ -1981,7 +1979,7 @@
struct utsname buf;
if (uname(&buf) == 0) {
- syslog(LOG_INFO, "system: '%s' %s %s %s %s\n",
+ shim_syslog(LOG_INFO, "system: '%s' %s %s %s %s\n",
buf.nodename,
buf.sysname,
buf.release,
@@ -2753,9 +2751,7 @@
*/
if (get_setting("log-file", &log_filename))
pr_openlog(log_filename);
-#if defined(HAVE_SYSLOG_H)
- openlog("stress-ng", 0, LOG_USER);
-#endif
+ shim_openlog("stress-ng", 0, LOG_USER);
log_args(argc, argv);
log_system_info();
log_system_mem_info();
@@ -2844,6 +2840,12 @@
} else {
stress_setup_parallel(class);
}
+ /*
+ * Seq/parallel modes may have added in
+ * excluded stressors, so exclude check again
+ */
+ exclude_unsupported();
+ exclude_pathological();
set_proc_limits();
@@ -2984,9 +2986,7 @@
/*
* Close logs
*/
-#if defined(HAVE_SYSLOG_H)
- closelog();
-#endif
+ shim_closelog();
pr_closelog();
if (yaml) {
pr_yaml(yaml, "...\n");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-ng.h new/stress-ng-0.10.05/stress-ng.h
--- old/stress-ng-0.10.02/stress-ng.h 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-ng.h 2019-09-12 16:26:48.000000000 +0200
@@ -917,8 +917,9 @@
/* pthread wrapped args_t */
typedef struct {
- const args_t *args;
- void *data;
+ const args_t *args; /* Stress test args */
+ void *data; /* Per thread private data */
+ int pthread_ret; /* Per thread return value */
} pthread_args_t;
/* gcc 4.7 and later support vector ops */
@@ -1124,6 +1125,18 @@
#define pr_fail_errno(msg, err) pr_fail_errno__(args, msg, err)
#define pr_fail_dbg(msg) pr_fail_dbg__(args, msg)
+#if defined(HAVE_SYSLOG_H)
+#define shim_syslog(priority, format, ...) \
+ syslog(priority, format, __VA_ARGS__)
+#define shim_openlog(ident, option, facility) \
+ openlog(ident, option, facility)
+#define shim_closelog() closelog()
+#else
+#define shim_syslog(priority, format, ...)
+#define shim_openlog(ident, option, facility)
+#define shim_closelog()
+#endif
+
/* Memory size constants */
#define KB (1ULL << 10)
#define MB (1ULL << 20)
@@ -3435,6 +3448,8 @@
uint64_t sched_runtime; /* runtime SCHED_DEADLINE, ns */
uint64_t sched_deadline; /* deadline time, ns */
uint64_t sched_period; /* period, ns */
+ uint32_t sched_util_min; /* utilization hint, min */
+ uint32_t sched_util_max; /* utilization hint, max */
};
/* shim'd STATX flags */
@@ -3560,7 +3575,7 @@
extern int shim_sync_file_range(int fd, shim_off64_t offset,
shim_off64_t nbytes, unsigned int flags);
extern int shim_sysfs(int option, ...);
-extern int shim_syslog(int type, char *bufp, int len);
+extern int shim_klogctl(int type, char *bufp, int len);
extern int shim_unshare(int flags);
extern int shim_userfaultfd(int flags);
extern int shim_usleep(uint64_t usec);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-numa.c new/stress-ng-0.10.05/stress-numa.c
--- old/stress-ng-0.10.02/stress-numa.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-numa.c 2019-09-12 16:26:48.000000000 +0200
@@ -106,9 +106,9 @@
FILE *fp;
unsigned long n = 0, node_id = 0;
node_t *tail = NULL;
- *node_ptr = NULL;
char buffer[8192], *str = NULL, *ptr;
+ *node_ptr = NULL;
fp = fopen("/proc/self/status", "r");
if (!fp)
return -1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-physpage.c new/stress-ng-0.10.05/stress-physpage.c
--- old/stress-ng-0.10.02/stress-physpage.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-physpage.c 2019-09-12 16:26:48.000000000 +0200
@@ -80,12 +80,8 @@
phys_addr |= (virt_addr & (page_size - 1));
offset = pfn * sizeof(uint64_t);
- if (phys_addr == 0) {
- pr_err("%s: got zero physical address from virtual address %p\n",
- args->name, (void *)virt_addr);
- goto err;
- }
-
+ if (phys_addr == 0)
+ return 0;
if (fd_pc < 0)
return 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-pidfd.c new/stress-ng-0.10.05/stress-pidfd.c
--- old/stress-ng-0.10.02/stress-pidfd.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-pidfd.c 2019-09-12 16:26:48.000000000 +0200
@@ -35,7 +35,7 @@
static int stress_pidfd_open_fd(pid_t pid)
{
char buffer[1024];
-
+
(void)snprintf(buffer, sizeof(buffer), "/proc/%d", pid);
return open(buffer, O_DIRECTORY | O_CLOEXEC);
}
@@ -98,7 +98,7 @@
} else {
/* Parent */
int pidfd, ret;
-
+
pidfd = stress_pidfd_open_fd(pid);
if (pidfd < 0) {
/* Process not found, try again */
@@ -113,7 +113,7 @@
args->name);
stress_pidfd_reap(pid, pidfd);
return EXIT_NOT_IMPLEMENTED;
- }
+ }
pr_err("%s: pidfd_send_signal failed: errno=%d (%s)\n",
args->name, errno, strerror(errno));
stress_pidfd_reap(pid, pidfd);
@@ -149,7 +149,7 @@
pr_inf("pidfd stressor will be skipped, system call not supported at build time\n");
return -1;
}
-
+
stressor_info_t stress_pidfd_info = {
.stressor = stress_not_implemented,
.class = CLASS_INTERRUPT | CLASS_OS,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-pkey.c new/stress-ng-0.10.05/stress-pkey.c
--- old/stress-ng-0.10.02/stress-pkey.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-pkey.c 2019-09-12 16:26:48.000000000 +0200
@@ -93,7 +93,7 @@
int rights;
rights = shim_pkey_get(pkey);
- if (rights > -1)
+ if (rights > -1)
(void)shim_pkey_set(pkey, rights);
(void)shim_pkey_free(pkey);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-pthread.c new/stress-ng-0.10.05/stress-pthread.c
--- old/stress-ng-0.10.02/stress-pthread.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-pthread.c 2019-09-12 16:26:48.000000000 +0200
@@ -257,7 +257,7 @@
uint64_t limited = 0, attempted = 0;
uint64_t pthread_max = DEFAULT_PTHREAD;
int ret;
- pthread_args_t pargs = { args, NULL };
+ pthread_args_t pargs = { args, NULL, 0 };
sigset_t set;
keep_running_flag = true;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-quota.c new/stress-ng-0.10.05/stress-quota.c
--- old/stress-ng-0.10.02/stress-quota.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-quota.c 2019-09-12 16:26:48.000000000 +0200
@@ -306,7 +306,7 @@
rc = EXIT_SUCCESS;
goto tidy;
}
-
+
/* All failed, then give up */
if (failed == n_devs)
goto tidy;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-ramfs.c new/stress-ng-0.10.05/stress-ramfs.c
--- old/stress-ng-0.10.02/stress-ramfs.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-ramfs.c 2019-09-12 16:26:48.000000000 +0200
@@ -177,7 +177,7 @@
int fd, mfd;
#endif
- snprintf(opt, sizeof(opt), "size=%" PRIu64, ramfs_size);
+ (void)snprintf(opt, sizeof(opt), "size=%" PRIu64, ramfs_size);
rc = mount("", realpathname, "tmpfs", 0, opt);
if (rc < 0) {
if ((errno != ENOSPC) && (errno != ENOMEM))
@@ -202,7 +202,7 @@
pr_fail("%s: fsopen failed: errno=%d (%s)\n",
args->name, errno, strerror(errno));
}
- snprintf(opt, sizeof(opt), "%" PRIu64, ramfs_size);
+ (void)snprintf(opt, sizeof(opt), "%" PRIu64, ramfs_size);
if (shim_fsconfig(fd, FSCONFIG_SET_STRING, "size", opt, 0) < 0) {
if (errno == ENOSYS)
goto cleanup_fd;
@@ -320,7 +320,7 @@
stressor_info_t stress_ramfs_info = {
.stressor = stress_ramfs_mount,
- .class = CLASS_FILESYSTEM | CLASS_OS,
+ .class = CLASS_OS,
.opt_set_funcs = opt_set_funcs,
.supported = stress_ramfs_supported,
.help = help
@@ -328,7 +328,7 @@
#else
stressor_info_t stress_ramfs_info = {
.stressor = stress_not_implemented,
- .class = CLASS_FILESYSTEM | CLASS_OS,
+ .class = CLASS_OS,
.supported = stress_ramfs_supported,
.help = help
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-rdrand.c new/stress-ng-0.10.05/stress-rdrand.c
--- old/stress-ng-0.10.02/stress-rdrand.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-rdrand.c 2019-09-12 16:26:48.000000000 +0200
@@ -253,7 +253,7 @@
#else
static int stress_rdrand_supported(void)
-{
+{
pr_inf("rdrand stressor will be skipped, CPU "
"does not support the rdrand instruction.\n");
return -1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-seccomp.c new/stress-ng-0.10.05/stress-seccomp.c
--- old/stress-ng-0.10.02/stress-seccomp.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-seccomp.c 2019-09-12 16:26:48.000000000 +0200
@@ -182,7 +182,7 @@
const size_t n_max = ((size_t)1 << bits) - 1;
size_t i, j, n = 32, max = 1;
- memset(&huge_prog, 0, sizeof(huge_prog));
+ (void)memset(&huge_prog, 0, sizeof(huge_prog));
if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) < 0) {
pr_fail_err("prctl PR_SET_NEW_PRIVS");
return -1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-sigfpe.c new/stress-ng-0.10.05/stress-sigfpe.c
--- old/stress-ng-0.10.02/stress-sigfpe.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-sigfpe.c 2019-09-12 16:26:48.000000000 +0200
@@ -32,7 +32,7 @@
#if !defined(__UCLIBC__) && \
defined(HAVE_FENV_H) && \
- defined(HAVE_FLOAT_H)
+ defined(HAVE_FLOAT_H)
#define SNG_INTDIV (0x40000000)
#define SNG_FLTDIV (0x80000000)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-sleep.c new/stress-ng-0.10.05/stress-sleep.c
--- old/stress-ng-0.10.02/stress-sleep.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-sleep.c 2019-09-12 16:26:48.000000000 +0200
@@ -78,7 +78,7 @@
static void *nowt = NULL;
ctxt_t *ctxt = (ctxt_t *)c;
const args_t *args = ctxt->args;
- const uint64_t max_ops =
+ const uint64_t max_ops =
args->max_ops ? (args->max_ops / ctxt->sleep_max) + 1 : 0;
/*
* According to POSIX.1 a thread should have
@@ -90,7 +90,7 @@
if (stress_sigaltstack(stack, SIGSTKSZ) < 0)
goto die;
- while (keep_stressing() &&
+ while (keep_stressing() &&
!thread_terminate &&
(!max_ops || ctxt->counter < max_ops)) {
struct timespec tv;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-socket.c new/stress-ng-0.10.05/stress-socket.c
--- old/stress-ng-0.10.02/stress-socket.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-socket.c 2019-09-12 16:26:48.000000000 +0200
@@ -391,7 +391,7 @@
for (i = 16; i < sizeof(buf); i += 16) {
ssize_t ret = send(sfd, buf, i, 0);
if (ret < 0) {
- if (errno != EINTR)
+ if ((errno != EINTR) && (errno != EPIPE))
pr_fail_dbg("send");
break;
} else
@@ -407,7 +407,7 @@
msg.msg_iov = vec;
msg.msg_iovlen = j;
if (sendmsg(sfd, &msg, 0) < 0) {
- if (errno != EINTR)
+ if ((errno != EINTR) && (errno != EPIPE))
pr_fail_dbg("sendmsg");
} else
msgs += j;
@@ -425,7 +425,7 @@
msgvec[i].msg_hdr.msg_iovlen = j;
}
if (sendmmsg(sfd, msgvec, MSGVEC_SIZE, 0) < 0) {
- if (errno != EINTR)
+ if ((errno != EINTR) && (errno != EPIPE))
pr_fail_dbg("sendmmsg");
} else
msgs += (MSGVEC_SIZE * j);
@@ -466,6 +466,13 @@
return rc;
}
+static void stress_sock_sigpipe_handler(int signum)
+{
+ (void)signum;
+
+ g_keep_stressing_flag = false;
+}
+
/*
* stress_sock
* stress by heavy socket I/O
@@ -486,6 +493,8 @@
pr_dbg("%s: process [%d] using socket port %d\n",
args->name, (int)args->pid, socket_port + args->instance);
+ if (stress_sighandler(args->name, SIGPIPE, stress_sock_sigpipe_handler, NULL) < 0)
+ return EXIT_NO_RESOURCE;
again:
pid = fork();
if (pid < 0) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-stack.c new/stress-ng-0.10.05/stress-stack.c
--- old/stress-ng-0.10.02/stress-stack.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-stack.c 2019-09-12 16:26:48.000000000 +0200
@@ -93,22 +93,41 @@
*/
static int stress_stack(const args_t *args)
{
- uint8_t stack[SIGSTKSZ + STACK_ALIGNMENT];
+ uint8_t *altstack;
pid_t pid;
bool stack_fill = false;
+ ssize_t altstack_size = (SIGSTKSZ +
+ STACK_ALIGNMENT +
+ args->page_size) & ~(args->page_size -1);
(void)get_setting("stack-fill", &stack_fill);
/*
+ * Allocate altstack on heap rather than an
+ * autoexpanding stack that may trip a segfault
+ * if there is no memory to back it later.
+ */
+ altstack = mmap(NULL, altstack_size, PROT_READ | PROT_WRITE,
+ MAP_SHARED | MAP_ANONYMOUS, -1, 0);
+ if (altstack == MAP_FAILED) {
+ pr_inf("%s: cannot allocate stack for signal handler, "
+ "skipping test\n", args->name);
+ return EXIT_NO_RESOURCE;
+ }
+ (void)mincore_touch_pages(altstack, altstack_size);
+
+ /*
* We need to create an alternative signal
* stack so when a segfault occurs we use
* this already allocated signal stack rather
* than try to push onto an already overflowed
* stack
*/
- (void)memset(stack, 0, sizeof(stack));
- if (stress_sigaltstack(stack, SIGSTKSZ) < 0)
+ if (stress_sigaltstack(altstack, SIGSTKSZ) < 0) {
+ (void)munmap(altstack, altstack_size);
return EXIT_FAILURE;
+ }
+
again:
pid = fork();
@@ -196,6 +215,7 @@
}
_exit(0);
}
+ (void)munmap(altstack, altstack_size);
return EXIT_SUCCESS;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-udp.c new/stress-ng-0.10.05/stress-udp.c
--- old/stress-ng-0.10.02/stress-udp.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-udp.c 2019-09-12 16:26:48.000000000 +0200
@@ -82,7 +82,7 @@
*/
static int stress_udp(const args_t *args)
{
- int udp_port = DEFAULT_SOCKET_PORT;
+ int udp_port = DEFAULT_UDP_PORT;
int udp_domain = AF_INET;
pid_t pid, ppid = getppid();
int rc = EXIT_SUCCESS;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-vm-rw.c new/stress-ng-0.10.05/stress-vm-rw.c
--- old/stress-ng-0.10.02/stress-vm-rw.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-vm-rw.c 2019-09-12 16:26:48.000000000 +0200
@@ -64,7 +64,7 @@
}
static const opt_set_func_t opt_set_funcs[] = {
- { OPT_vm_rw_bytes, stress_set_vm_rw_bytes },
+ { OPT_vm_rw_bytes, stress_set_vm_rw_bytes },
{ 0, NULL }
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-vm-segv.c new/stress-ng-0.10.05/stress-vm-segv.c
--- old/stress-ng-0.10.02/stress-vm-segv.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-vm-segv.c 2019-09-12 16:26:48.000000000 +0200
@@ -107,7 +107,7 @@
inc_counter(args);
break;
}
- if (signum & 0x80)
+ if (signum & 0x80)
continue;
}
if (WIFEXITED(status)) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-vm.c new/stress-ng-0.10.05/stress-vm.c
--- old/stress-ng-0.10.02/stress-vm.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-vm.c 2019-09-12 16:26:48.000000000 +0200
@@ -664,9 +664,10 @@
uint8_t v, *buf_end = buf + sz;
volatile uint8_t *ptr;
size_t bit_errors = 0;
- uint64_t c = get_counter(args);
+ const uint64_t c_orig = get_counter(args);
+ uint64_t c;
- for (v = val, ptr = buf; ptr < buf_end; ptr++, v++) {
+ for (c = c_orig, v = val, ptr = buf; ptr < buf_end; ptr++, v++) {
if (UNLIKELY(!g_keep_stressing_flag))
return 0;
*ptr = (v >> 1) ^ v;
@@ -677,11 +678,14 @@
(void)mincore_touch_pages(buf, sz);
inject_random_bit_errors(buf, sz);
- for (v = val, ptr = buf; ptr < buf_end; ptr++, v++) {
+ for (c = c_orig, v = val, ptr = buf; ptr < buf_end; ptr++, v++) {
if (UNLIKELY(!g_keep_stressing_flag))
break;
if (UNLIKELY(*ptr != ((v >> 1) ^ v)))
bit_errors++;
+ c++;
+ if (UNLIKELY(max_ops && c >= max_ops))
+ break;
}
val++;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-watchdog.c new/stress-ng-0.10.05/stress-watchdog.c
--- old/stress-ng-0.10.02/stress-watchdog.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-watchdog.c 2019-09-12 16:26:48.000000000 +0200
@@ -30,7 +30,7 @@
{ NULL, NULL, NULL }
};
-#if defined(HAVE_LINUX_WATCHDOG_H)
+#if defined(HAVE_LINUX_WATCHDOG_H)
static sigjmp_buf jmp_env;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-wcstr.c new/stress-ng-0.10.05/stress-wcstr.c
--- old/stress-ng-0.10.02/stress-wcstr.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-wcstr.c 2019-09-12 16:26:48.000000000 +0200
@@ -702,7 +702,7 @@
stress_set_wcs_method("all");
}
-static const opt_set_func_t opt_set_funcs[] = {
+static const opt_set_func_t opt_set_funcs[] = {
{ OPT_wcs_method, stress_set_wcs_method },
{ 0, NULL }
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/stress-zlib.c new/stress-ng-0.10.05/stress-zlib.c
--- old/stress-ng-0.10.02/stress-zlib.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/stress-zlib.c 2019-09-12 16:26:48.000000000 +0200
@@ -57,7 +57,7 @@
bool pipe_broken;
bool interrupted;
} xsum_t;
-
+
static stress_zlib_rand_data_info_t zlib_rand_data_methods[];
static volatile bool pipe_broken = false;
static sigjmp_buf jmpbuf;
@@ -156,7 +156,7 @@
while (ptr < end) {
uint8_t ch = mwc8();
-
+
if (ch <= 0x7f)
*ptr++ = ch;
else {
@@ -371,7 +371,7 @@
/*
* stress_rand_data_gray()
- * fill buffer with gray code of incrementing 16 bit values
+ * fill buffer with gray code of incrementing 16 bit values
*
*/
static void stress_rand_data_gray(const args_t *args, uint32_t *data, const int size)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/syscalls.txt new/stress-ng-0.10.05/syscalls.txt
--- old/stress-ng-0.10.02/syscalls.txt 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/syscalls.txt 2019-09-12 16:26:48.000000000 +0200
@@ -235,7 +235,7 @@
recvmmsg
remap_file_pages remap
removexattr
-rename rename
+rename rename
renameat rename
renameat2 rename
request_key key
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.02/test/test-copy-file-range.c new/stress-ng-0.10.05/test/test-copy-file-range.c
--- old/stress-ng-0.10.02/test/test-copy-file-range.c 2019-08-21 12:02:30.000000000 +0200
+++ new/stress-ng-0.10.05/test/test-copy-file-range.c 2019-09-12 16:26:48.000000000 +0200
@@ -31,4 +31,4 @@
int main(void)
{
return copy_file_range(0, NULL, 0, NULL, 1024, 0);
-}
+}