Hello community, here is the log from the commit of package stress-ng for openSUSE:Factory checked in at 2018-08-03 12:40:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/stress-ng (Old) and /work/SRC/openSUSE:Factory/.stress-ng.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "stress-ng" Fri Aug 3 12:40:39 2018 rev:51 rq:627250 version:0.09.36 Changes: -------- --- /work/SRC/openSUSE:Factory/stress-ng/stress-ng.changes 2018-07-22 23:04:34.580923042 +0200 +++ /work/SRC/openSUSE:Factory/.stress-ng.new/stress-ng.changes 2018-08-03 12:40:40.375870576 +0200 @@ -1,0 +2,27 @@ +Fri Aug 3 06:38:56 UTC 2018 - mar...@gmx.de + +- Update to version 0.09.36 + * Makefile: bump version + * stress-schedpolicy: ignore EINVAL on non-POSIX policies + * mungify _ to - on stressor name before calling the stressor + * stress-seek: disabled SEEK_HOLE and SEEK_DATA for OS X + * stress-fp-error: relax checking on non-Linux systems + * stress-schedpolicy: skip FIFO if sched_get_priority_min/max return -1 + * stress-mknod: fix cut-n-paste error on struct stress_info_t + * stress-fp-error: be less pedantic with errno checks on non-Linux systems + * stress-mknod: disable this for non-Linux systems + * stress-affinity: check that process can set CPU affinity + * stress-access: remove AT_SYMLINK_NOFOLLOW, it is not needed + * stress-vm-segv: remove some old commented out debug text + * stress-vm-segv: retry on ENOMEM on fork + * stress-vm-segv: make child process non-dumpable + * test/test_modify_ldt: fail for no-x86 architectures + * stress-cpu: compute geometric mean by split mantissa and exponent method + * stress-fork: turn warnings off around vfork and not fork + * stress-dentry: fall back to using fcntl if flock is not available + * Turn off warnings around vfork calls + * Makefile: "SunOS" should be SunOS and not quoted in if statement + * Makefile: check for SunOS to use non-default grep for -e capability + * stress-dentry: don't flock the entry if we don't have flock flags + +------------------------------------------------------------------- Old: ---- stress-ng-0.09.35.tar.xz New: ---- stress-ng-0.09.36.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ stress-ng.spec ++++++ --- /var/tmp/diff_new_pack.2BFQb4/_old 2018-08-03 12:40:41.759872641 +0200 +++ /var/tmp/diff_new_pack.2BFQb4/_new 2018-08-03 12:40:41.763872646 +0200 @@ -18,7 +18,7 @@ Name: stress-ng -Version: 0.09.35 +Version: 0.09.36 Release: 0 Summary: Tool to load and stress a computer License: GPL-2.0-only ++++++ stress-ng-0.09.35.tar.xz -> stress-ng-0.09.36.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.35/Makefile new/stress-ng-0.09.36/Makefile --- old/stress-ng-0.09.35/Makefile 2018-07-20 13:24:31.000000000 +0200 +++ new/stress-ng-0.09.36/Makefile 2018-08-02 15:47:50.000000000 +0200 @@ -16,7 +16,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -VERSION=0.09.35 +VERSION=0.09.36 # # Codename "portable pressure producer" # @@ -34,6 +34,17 @@ endif # +# SunOS requires special grep for -e support +# +KERNEL=$(shell uname -s) +ifeq ($(KERNEL),SunOS) +GREP = /usr/xpg4/bin/grep +else +GREP = grep +endif + + +# # Static flags, only to be used when using GCC # ifeq ($(STATIC),1) @@ -354,7 +365,7 @@ # extract the PER_* personality enums # personality.h: - @$(CPP) personality.c | grep -e "PER_[A-Z0-9]* =.*," | cut -d "=" -f 1 \ + @$(CPP) personality.c | $(GREP) -e "PER_[A-Z0-9]* =.*," | cut -d "=" -f 1 \ | sed "s/.$$/,/" > personality.h stress-personality.c: personality.h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.35/stress-access.c new/stress-ng-0.09.36/stress-access.c --- old/stress-ng-0.09.35/stress-access.c 2018-07-20 13:24:31.000000000 +0200 +++ new/stress-ng-0.09.36/stress-access.c 2018-08-02 15:47:50.000000000 +0200 @@ -133,7 +133,7 @@ errno, strerror(errno)); } #if defined(HAVE_FACCESSAT) - ret = faccessat(AT_FDCWD, filename, modes[i].access_mode, AT_SYMLINK_NOFOLLOW); + ret = faccessat(AT_FDCWD, filename, modes[i].access_mode, 0); if (ret < 0) { pr_fail("%s: faccessat %3.3o on chmod mode %3.3o failed: %d (%s)\n", args->name, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.35/stress-affinity.c new/stress-ng-0.09.36/stress-affinity.c --- old/stress-ng-0.09.35/stress-affinity.c 2018-07-20 13:24:31.000000000 +0200 +++ new/stress-ng-0.09.36/stress-affinity.c 2018-08-02 15:47:50.000000000 +0200 @@ -27,6 +27,27 @@ #if defined(HAVE_AFFINITY) /* + * stress_affinity_supported() + * check that we can set affinity + */ +static int stress_affinity_supported(void) +{ + cpu_set_t mask; + + CPU_ZERO(&mask); + CPU_SET(0, &mask); + + if (sched_setaffinity(0, sizeof(mask), &mask) < 0) { + if (errno == EPERM) { + pr_inf("affinity stressor cannot set CPU affinity, " + "process lacks privilege, skipping the stressor\n"); + return -1; + } + } + return 0; +} + +/* * stress on sched_affinity() * stress system by changing CPU affinity periodically */ @@ -75,7 +96,8 @@ stressor_info_t stress_affinity_info = { .stressor = stress_affinity, - .class = CLASS_SCHEDULER + .class = CLASS_SCHEDULER, + .supported = stress_affinity_supported }; #else stressor_info_t stress_affinity_info = { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.35/stress-cpu.c new/stress-ng-0.09.36/stress-cpu.c --- old/stress-ng-0.09.35/stress-cpu.c 2018-07-20 13:24:31.000000000 +0200 +++ new/stress-ng-0.09.36/stress-cpu.c 2018-08-02 15:47:50.000000000 +0200 @@ -2194,6 +2194,9 @@ size_t i; double data[STATS_MAX]; double min, max, am = 0.0, gm = 1.0, hm = 0.0, stddev = 0.0; + int64_t expon = 0; + double mant = 1.0; + const double inverse_n = 1.0 / (double)STATS_MAX; for (i = 0; i < STATS_MAX; i++) data[i] = ((double)(mwc32() + 1)) / 4294967296.0; @@ -2202,6 +2205,12 @@ for (i = 0; i < STATS_MAX; i++) { double d = data[i]; + double f; + int e; + + f = frexp(d, &e); + mant *= f; + expon += e; if (min > d) min = d; @@ -2215,7 +2224,8 @@ /* Arithmetic mean (average) */ am = am / STATS_MAX; /* Geometric mean */ - gm = pow(gm, 1.0 / STATS_MAX); + gm = pow(mant, inverse_n) * + pow(2.0, (double)expon * inverse_n); /* Harmonic mean */ hm = STATS_MAX / hm; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.35/stress-dentry.c new/stress-ng-0.09.36/stress-dentry.c --- old/stress-ng-0.09.35/stress-dentry.c 2018-07-20 13:24:31.000000000 +0200 +++ new/stress-ng-0.09.36/stress-dentry.c 2018-08-02 15:47:50.000000000 +0200 @@ -177,11 +177,37 @@ ret = select(fd + 1, &rdfds, NULL, NULL, &timeout); (void)ret; +#if defined(LOCK_EX) && defined(LOCK_UN) + /* + * flock capable systems.. + */ ret = flock(fd, LOCK_EX); if (ret == 0) { ret = flock(fd, LOCK_UN); (void)ret; } +#elif defined(F_SETLKW) && defined(F_RDLCK) && defined(F_UNLCK) + /* + * ..otherwise fall back to fcntl (e.g. Solaris) + */ + { + struct flock lock; + + lock.l_start = 0; + lock.l_len = 0; + lock.l_whence = SEEK_SET; + lock.l_type = F_RDLCK; + ret = fcntl(fd, F_SETLKW, &lock); + if (ret == 0) { + lock.l_start = 0; + lock.l_len = 0; + lock.l_whence = SEEK_SET; + lock.l_type = F_UNLCK; + ret = fcntl(fd, F_SETLKW, &lock); + (void)ret; + } + } +#endif #if defined(F_GETFL) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.35/stress-fork.c new/stress-ng-0.09.36/stress-fork.c --- old/stress-ng-0.09.35/stress-fork.c 2018-07-20 13:24:31.000000000 +0200 +++ new/stress-ng-0.09.36/stress-fork.c 2018-08-02 15:47:50.000000000 +0200 @@ -134,6 +134,7 @@ static int stress_vfork(const args_t *args) { uint64_t vfork_max = DEFAULT_VFORKS; + register int ret; if (!get_setting("vfork-max", &vfork_max)) { if (g_opt_flags & OPT_FLAGS_MAXIMIZE) @@ -142,7 +143,11 @@ vfork_max = MIN_VFORKS; } - return stress_fork_fn(args, vfork, vfork_max); +PRAGMA_PUSH +PRAGMA_WARN_OFF + ret = stress_fork_fn(args, vfork, vfork_max); +PRAGMA_POP + return ret; } stressor_info_t stress_fork_info = { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.35/stress-fp-error.c new/stress-ng-0.09.36/stress-fp-error.c --- old/stress-ng-0.09.35/stress-fp-error.c 2018-07-20 13:24:31.000000000 +0200 +++ new/stress-ng-0.09.36/stress-fp-error.c 2018-08-02 15:47:50.000000000 +0200 @@ -57,6 +57,7 @@ const int errno_wanted, const int excepts_wanted) { +#if defined(__linux__) if (stress_double_same(val, val_wanted) && (fetestexcept(excepts_wanted) & excepts_wanted) && (errno == errno_wanted)) @@ -69,6 +70,17 @@ val, val_wanted, errno, errno_wanted, fetestexcept(excepts_wanted), excepts_wanted); +#else + (void)errno_wanted; + (void)excepts_wanted; + + if (stress_double_same(val, val_wanted)) + return; + + pr_fail("%s: %s return was %f (expected %f)\n", + args->name, expr, + val, val_wanted); +#endif } /* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.35/stress-mknod.c new/stress-ng-0.09.36/stress-mknod.c --- old/stress-ng-0.09.35/stress-mknod.c 2018-07-20 13:24:31.000000000 +0200 +++ new/stress-ng-0.09.36/stress-mknod.c 2018-08-02 15:47:50.000000000 +0200 @@ -24,6 +24,8 @@ */ #include "stress-ng.h" +#if defined(__linux__) + static const int modes[] = { #if defined(S_IFIFO) S_IFIFO, /* FIFO */ @@ -116,3 +118,9 @@ .stressor = stress_mknod, .class = CLASS_FILESYSTEM | CLASS_OS }; +#else +stressor_info_t stress_mknod_info = { + .stressor = stress_not_implemented, + .class = CLASS_FILESYSTEM | CLASS_OS +}; +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.35/stress-ng.c new/stress-ng-0.09.36/stress-ng.c --- old/stress-ng-0.09.35/stress-ng.c 2018-07-20 13:24:31.000000000 +0200 +++ new/stress-ng-0.09.36/stress-ng.c 2018-08-02 15:47:50.000000000 +0200 @@ -2218,6 +2218,7 @@ if (pid) { int status, ret; bool do_abort = false; + const char *stressor_name = munge_underscore(pi->stressor->name); ret = waitpid(pid, &status, 0); if (ret > 0) { @@ -2227,16 +2228,16 @@ const char *signame = strsignal(WTERMSIG(status)); pr_dbg("process [%d] (stress-ng-%s) terminated on signal: %d (%s)\n", - ret, pi->stressor->name, + ret, stressor_name, WTERMSIG(status), signame); #else pr_dbg("process [%d] (stress-ng-%s) terminated on signal: %d\n", - ret, pi->stressor->name, + ret, stressor_name, WTERMSIG(status)); #endif #else pr_dbg("process [%d] (stress-ng-%s) terminated on signal\n", - ret, pi->stressor->name); + ret, stressor_name)); #endif /* * If the stressor got killed by OOM or SIGKILL @@ -2246,10 +2247,10 @@ */ if (process_oomed(ret)) { pr_dbg("process [%d] (stress-ng-%s) was killed by the OOM killer\n", - ret, pi->stressor->name); + ret, stressor_name); } else if (WTERMSIG(status) == SIGKILL) { pr_dbg("process [%d] (stress-ng-%s) was possibly killed by the OOM killer\n", - ret, pi->stressor->name); + ret, stressor_name); } else { *success = false; } @@ -2259,7 +2260,7 @@ break; case EXIT_NO_RESOURCE: pr_err("process [%d] (stress-ng-%s) aborted early, out of system resources\n", - ret, pi->stressor->name); + ret, stressor_name); *resource_success = false; do_abort = true; break; @@ -2268,12 +2269,12 @@ break; case EXIT_BY_SYS_EXIT: pr_dbg("process [%d] (stress-ng-%s) aborted via exit() which was not expected\n", - ret, pi->stressor->name); + ret, stressor_name); do_abort = true; break; default: pr_err("process %d (stress-ng-%s) terminated with an error, exit status=%d (%s)\n", - ret, pi->stressor->name, WEXITSTATUS(status), + ret, stressor_name, WEXITSTATUS(status), str_exitstatus(WEXITSTATUS(status))); *success = false; do_abort = true; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.35/stress-ng.h new/stress-ng-0.09.36/stress-ng.h --- old/stress-ng-0.09.35/stress-ng.h 2018-07-20 13:24:31.000000000 +0200 +++ new/stress-ng-0.09.36/stress-ng.h 2018-08-02 15:47:50.000000000 +0200 @@ -623,6 +623,7 @@ #define PRAGMA_POP _Pragma("GCC diagnostic pop") #define PRAGMA_WARN_OFF _Pragma("GCC diagnostic ignored \"-Wall\"") \ _Pragma("GCC diagnostic ignored \"-Wextra\"") \ + _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \ _Pragma("GCC diagnostic ignored \"-Wcast-qual\"") #else #define PRAGMA_PUSH diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.35/stress-schedpolicy.c new/stress-ng-0.09.36/stress-schedpolicy.c --- old/stress-ng-0.09.35/stress-schedpolicy.c 2018-07-20 13:24:31.000000000 +0200 +++ new/stress-ng-0.09.36/stress-schedpolicy.c 2018-08-02 15:47:50.000000000 +0200 @@ -101,6 +101,11 @@ #endif min_prio = sched_get_priority_min(policy); max_prio = sched_get_priority_max(policy); + + /* Check if min/max is supported or not */ + if ((min_prio == -1) || (max_prio == -1)) + continue; + rng_prio = max_prio - min_prio; if (rng_prio == 0) { pr_err("%s: invalid min/max priority " @@ -120,7 +125,12 @@ break; } if (ret < 0) { - if (errno != EPERM) { + /* + * Some systems return EINVAL for non-POSIX + * scheduling policies, silently ignore these + * failures. + */ + if ((errno != EPERM) && (errno != EINVAL)) { pr_fail("%s: sched_setscheduler " "failed: errno=%d (%s) " "for scheduler policy %s\n", @@ -142,11 +152,11 @@ #if defined(_POSIX_PRIORITY_SCHEDULING) (void)memset(¶m, 0, sizeof param); ret = sched_getparam(pid, ¶m); - if (ret < 0) + if ((ret < 0) && (errno != EINVAL)) pr_fail_err("sched_getparam failed"); ret = sched_setparam(pid, ¶m); - if (ret < 0) + if ((ret < 0) && (errno != EINVAL)) pr_fail_err("sched_setparam"); #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.35/stress-seek.c new/stress-ng-0.09.36/stress-seek.c --- old/stress-ng-0.09.35/stress-seek.c 2018-07-20 13:24:31.000000000 +0200 +++ new/stress-ng-0.09.36/stress-seek.c 2018-08-02 15:47:50.000000000 +0200 @@ -140,13 +140,13 @@ pr_fail_err("lseek SEEK_CUR"); } #endif -#if defined(SEEK_HOLE) +#if defined(SEEK_HOLE) && !defined(__APPLE__) if (lseek(fd, 0, SEEK_HOLE) < 0) { if (errno != EINVAL) pr_fail_err("lseek SEEK_HOLE"); } #endif -#if defined(SEEK_DATA) +#if defined(SEEK_DATA) && !defined(__APPLE__) if (lseek(fd, 0, SEEK_DATA) < 0) { if (errno != EINVAL) pr_fail_err("lseek SEEK_DATA"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.35/stress-vforkmany.c new/stress-ng-0.09.36/stress-vforkmany.c --- old/stress-ng-0.09.35/stress-vforkmany.c 2018-07-20 13:24:31.000000000 +0200 +++ new/stress-ng-0.09.36/stress-vforkmany.c 2018-08-02 15:47:50.000000000 +0200 @@ -128,11 +128,14 @@ if (first) { pid = fork(); } else { +PRAGMA_PUSH +PRAGMA_WARN_OFF #if defined(__NR_vfork) pid = (pid_t)syscall(__NR_vfork); #else pid = vfork(); #endif +PRAGMA_POP } if (pid < 0) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.35/stress-vm-segv.c new/stress-ng-0.09.36/stress-vm-segv.c --- old/stress-ng-0.09.35/stress-vm-segv.c 2018-07-20 13:24:31.000000000 +0200 +++ new/stress-ng-0.09.36/stress-vm-segv.c 2018-08-02 15:47:50.000000000 +0200 @@ -65,7 +65,7 @@ return EXIT_SUCCESS; pid = fork(); if (pid < 0) { - if ((errno == EAGAIN) || (errno == EINTR)) + if ((errno == EAGAIN) || (errno == EINTR) || (errno == ENOMEM)) goto again; pr_err("%s: fork failed: errno=%d: (%s)\n", args->name, errno, strerror(errno)); @@ -84,11 +84,6 @@ (void)kill(pid, SIGKILL); (void)waitpid(pid, &status, 0); } else if (WIFSIGNALED(status)) { - /* - pr_dbg("%s: child died: %s (instance %d)\n", - args->name, stress_strsignal(WTERMSIG(status)), - args->instance); - */ /* If we got killed by OOM killer, re-start */ if (WTERMSIG(status) == SIGKILL) { if (g_opt_flags & OPT_FLAGS_OOMABLE) { @@ -119,6 +114,8 @@ const struct rlimit lim = { RLIM_INFINITY, RLIM_INFINITY }; setrlimit(RLIMIT_CORE, &lim); + set_oom_adjustment(args->name, true); + stress_process_dumpable(false); /* * Try to ummap the child's address space, should cause diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.09.35/test/test-modify-ldt.c new/stress-ng-0.09.36/test/test-modify-ldt.c --- old/stress-ng-0.09.35/test/test-modify-ldt.c 2018-07-20 13:24:31.000000000 +0200 +++ new/stress-ng-0.09.36/test/test-modify-ldt.c 2018-08-02 15:47:50.000000000 +0200 @@ -34,6 +34,13 @@ #error modify_ldt syscall not defined #endif +/* Arch specific, x86 */ +#if defined(__x86_64__) || defined(__x86_64) || \ + defined(__i386__) || defined(__i386) +#else +#error modify_ldt syscall not applicable for non-x86 architectures +#endif + int main(void) { struct user_desc ud;