Hello community, here is the log from the commit of package stress-ng for openSUSE:Factory checked in at 2019-10-02 14:55:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/stress-ng (Old) and /work/SRC/openSUSE:Factory/.stress-ng.new.2352 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "stress-ng" Wed Oct 2 14:55:53 2019 rev:66 rq:734558 version:0.10.07 Changes: -------- --- /work/SRC/openSUSE:Factory/stress-ng/stress-ng.changes 2019-09-25 08:35:42.670325322 +0200 +++ /work/SRC/openSUSE:Factory/.stress-ng.new.2352/stress-ng.changes 2019-10-02 14:55:53.819286182 +0200 @@ -1,0 +2,17 @@ +Tue Oct 1 20:44:28 UTC 2019 - Martin Hauke <mar...@gmx.de> + +- Update to version 0.10.07 + * Remove smatchify script, we now use other tools to static + analyse stress-ng + * Don't show utf8 chars on dump consoles + * stress-clone: make child process larger to make it more + OOM-able + * core-out-of-memory: open and close proc interface after each + write + * stress-rdrand: unroll loop x 4 more times for more throughput + * inline the __keep_stressing function, reduce call overhead + for more throughput + * stress-stack: make alternative signal stack privately + mapped + +------------------------------------------------------------------- Old: ---- stress-ng-0.10.06.tar.xz New: ---- stress-ng-0.10.07.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ stress-ng.spec ++++++ --- /var/tmp/diff_new_pack.aPocv6/_old 2019-10-02 14:55:54.263285017 +0200 +++ /var/tmp/diff_new_pack.aPocv6/_new 2019-10-02 14:55:54.267285006 +0200 @@ -18,7 +18,7 @@ Name: stress-ng -Version: 0.10.06 +Version: 0.10.07 Release: 0 Summary: Tool to load and stress a computer License: GPL-2.0-only ++++++ stress-ng-0.10.06.tar.xz -> stress-ng-0.10.07.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.06/Makefile new/stress-ng-0.10.07/Makefile --- old/stress-ng-0.10.06/Makefile 2019-09-23 18:50:56.000000000 +0200 +++ new/stress-ng-0.10.07/Makefile 2019-10-01 17:49:32.000000000 +0200 @@ -16,7 +16,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -VERSION=0.10.06 +VERSION=0.10.07 # # Codename "systematic system smasher" # @@ -416,7 +416,7 @@ mkdir stress-ng-$(VERSION) cp -rp Makefile Makefile.config $(SRC) stress-ng.h stress-ng.1 \ core-personality.c COPYING syscalls.txt mascot README \ - README.Android test snap smatchify.sh config TODO \ + README.Android test snap config TODO \ core-perf-event.c usr.bin.pulseaudio.eg stress-version.h \ bash-completion example-jobs .travis.yml kernel-coverage.sh \ stress-ng-$(VERSION) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.06/Makefile.config new/stress-ng-0.10.07/Makefile.config --- old/stress-ng-0.10.06/Makefile.config 2019-09-23 18:50:56.000000000 +0200 +++ new/stress-ng-0.10.07/Makefile.config 2019-10-01 17:49:32.000000000 +0200 @@ -1601,6 +1601,14 @@ endif endif +ifndef $(HAVE_GETSID) +HAVE_GETSID = $(shell $(MAKE) -f Makefile.config --no-print-directory $(HAVE_NOT) TEST_PROG=test-getsid have_test_prog) +ifeq ($(HAVE_GETSID),1) + CONFIG_CFLAGS += -DHAVE_GETSID +$(info autoconfig: using getsid) +endif +endif + ifndef $(HAVE_GETXATTR) HAVE_GETXATTR = $(shell $(MAKE) -f Makefile.config --no-print-directory $(HAVE_NOT) TEST_PROG=test-getxattr have_test_prog) ifeq ($(HAVE_GETXATTR),1) @@ -2460,7 +2468,6 @@ endif endif - ifndef $(HAVE_TIMER_SETTIME) HAVE_TIMER_SETTIME = $(shell $(MAKE) -f Makefile.config --no-print-directory $(HAVE_NOT) TEST_LIBS=$(LIB_RT) TEST_PROG=test-timer-settime have_test_prog) ifeq ($(HAVE_TIMER_SETTIME),1) @@ -2469,6 +2476,14 @@ endif endif +ifndef $(HAVE_TTYNAME) +HAVE_TTYNAME = $(shell $(MAKE) -f Makefile.config --no-print-directory $(HAVE_NOT) TEST_PROG=test-ttyname have_test_prog) +ifeq ($(HAVE_TTYNAME),1) + CONFIG_CFLAGS += -DHAVE_TTYNAME +$(info autoconfig: using ttyname) +endif +endif + ifndef $(HAVE_UNAME) HAVE_UNAME = $(shell $(MAKE) -f Makefile.config --no-print-directory $(HAVE_NOT) TEST_PROG=test-uname have_test_prog) ifeq ($(HAVE_UNAME),1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.06/core-helper.c new/stress-ng-0.10.07/core-helper.c --- old/stress-ng-0.10.06/core-helper.c 2019-09-23 18:50:56.000000000 +0200 +++ new/stress-ng-0.10.07/core-helper.c 2019-10-01 17:49:32.000000000 +0200 @@ -1250,16 +1250,6 @@ } /* - * keep_stressing() - * returns true if we can keep on running a stressor - */ -bool HOT OPTIMIZE3 __keep_stressing(const args_t *args) -{ - return (LIKELY(g_keep_stressing_flag) && - LIKELY(!args->max_ops || (get_counter(args) < args->max_ops))); -} - -/* * stress_sigalrm_pending() * return true if SIGALRM is pending */ @@ -1508,3 +1498,22 @@ return text_len; } + +/* + * stress_is_dev_tty() + * return true if fd is on a /dev/ttyN device. If it can't + * be determined than default to assuming it is. + */ +bool stress_is_dev_tty(const int fd) +{ +#if defined(HAVE_TTYNAME) + const char *name = ttyname(fd); + + if (!name) + return true; + return !strncmp("/dev/tty", ttyname(fd), 8); +#else + /* Assume it is */ + return true; +#endif +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.06/core-out-of-memory.c new/stress-ng-0.10.07/core-out-of-memory.c --- old/stress-ng-0.10.06/core-out-of-memory.c 2019-09-23 18:50:56.000000000 +0200 +++ new/stress-ng-0.10.07/core-out-of-memory.c 2019-10-01 17:49:32.000000000 +0200 @@ -81,26 +81,34 @@ * try to set OOM adjustment, retry if EAGAIN or EINTR, give up * after multiple retries. */ -static void set_adjustment(const char *name, const int fd, const char *str) +static int set_adjustment(const char *procname, const char *name, const char *str) { const size_t len = strlen(str); int i; for (i = 0; i < 32; i++) { ssize_t n; + int fd; + + fd = open(procname, O_WRONLY); + if (fd < 0) + return -1; n = write(fd, str, len); + (void)close(fd); if (n > 0) - return; - - if ((errno != EAGAIN) && (errno != EINTR)) { - pr_dbg("%s: can't set oom_score_adj\n", name); - return; + return 0; + if (n < 0) { + if ((errno != EAGAIN) && (errno != EINTR)) { + pr_dbg("%s: can't set oom_score_adj\n", name); + return -1; + } } } /* Unexpected failure, report why */ pr_dbg("%s: can't set oom_score_adj, errno=%d (%s)\n", name, errno, strerror(errno)); + return -1; } /* @@ -111,9 +119,9 @@ */ void set_oom_adjustment(const char *name, const bool killable) { - int fd; bool high_priv; bool make_killable = killable; + char *str; high_priv = (getuid() == 0) && (geteuid() == 0); @@ -127,33 +135,20 @@ /* * Try modern oom interface */ - if ((fd = open("/proc/self/oom_score_adj", O_WRONLY)) >= 0) { - char *str; - - if (make_killable) - str = OOM_SCORE_ADJ_MAX; - else - str = high_priv ? OOM_SCORE_ADJ_MIN : "0"; - - set_adjustment(name, fd, str); - (void)close(fd); + if (make_killable) + str = OOM_SCORE_ADJ_MAX; + else + str = high_priv ? OOM_SCORE_ADJ_MIN : "0"; + if (set_adjustment("/proc/self/oom_score_adj", name, str) == 0) return; - } /* * Fall back to old oom interface */ - if ((fd = open("/proc/self/oom_adj", O_WRONLY)) >= 0) { - char *str; - - if (make_killable) - str = high_priv ? OOM_ADJ_NO_OOM : OOM_ADJ_MIN; - else - str = OOM_ADJ_MAX; - - set_adjustment(name, fd, str); - (void)close(fd); - } - return; + if (make_killable) + str = high_priv ? OOM_ADJ_NO_OOM : OOM_ADJ_MIN; + else + str = OOM_ADJ_MAX; + (void)set_adjustment("/proc/self/oom_adj", name, str); } #else void set_oom_adjustment(const char *name, const bool killable) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.06/smatchify.sh new/stress-ng-0.10.07/smatchify.sh --- old/stress-ng-0.10.06/smatchify.sh 2019-09-23 18:50:56.000000000 +0200 +++ new/stress-ng-0.10.07/smatchify.sh 1970-01-01 01:00:00.000000000 +0100 @@ -1,118 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2012-2019 Canonical -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -SMATCH_DIR=smatch -SMATCH_REPO=git://repo.or.cz/smatch -DEPENDENCIES="libxml2-dev llvm-dev libsqlite3-dev" - -INCLUDES="-I/usr/lib/gcc/i686-linux-gnu/ -I/usr/include/x86_64-linux-gnu" - -HERE=$(pwd) - -# -# Install any packages we depend on to build smatch -# -smatch_install_dependencies() -{ - install="" - - echo "Checking for dependencies for smatch.." - - for d in ${DEPENDENCIES} - do - if [ "$(dpkg -l | grep $d)" == "" ]; then - install="$install $d" - fi - done - if [ "$install" != "" ]; then - echo "Need to install:$install" - sudo apt-get install $install - if [ $? -ne 0 ]; then - echo "Installation of packages failed" - exit 1 - fi - fi -} - -# -# Get an up to date version of smatch -# -smatch_get() -{ - if [ -d ${SMATCH_DIR} ]; then - echo "Getting latest version of smatch.." - cd ${SMATCH_DIR} - git checkout -f master >& /dev/null - git fetch origin >& /dev/null - git fetch origin master >& /dev/null - git reset --hard FETCH_HEAD >& /dev/null - cd ${HERE} - else - echo "Getting smatch.." - git clone ${SMATCH_REPO} ${SMATCH_DIR} - fi -} - -# -# Build smatch -# -smatch_build() -{ - cd ${SMATCH_DIR} - echo "Smatch: make clean.." - make clean >& /dev/null - echo "Smatch: make.." - make > /dev/null 2>&1 - if [ $? -eq 0 ]; then - echo "Build of smatch succeeded" - else - echo "Build of smatchfailed" - exit 1 - fi - cd ${HERE} -} - -# -# Build using smatch -# -smatch_check() -{ - echo "Smatchifying.." - autoreconf -ivf > /dev/null - ./configure > /dev/null - make clean - - make CHECK="${HERE}/${SMATCH_DIR}/smatch --full-path --two-passes" \ - CC="${HERE}/${SMATCH_DIR}/cgcc $INCLUDES" | tee smatch.log -} - -# -# Check for errors -# -smatch_errors() -{ - errors=$(grep "error: " smatch.log | wc -l) - echo " " - echo "Smatch found $errors errors, see smatch.log for more details." -} - -smatch_install_dependencies -smatch_get -smatch_build -smatch_check -smatch_errors diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.06/stress-clone.c new/stress-ng-0.10.07/stress-clone.c --- old/stress-ng-0.10.06/stress-clone.c 2019-09-23 18:50:56.000000000 +0200 +++ new/stress-ng-0.10.07/stress-clone.c 2019-10-01 17:49:32.000000000 +0200 @@ -341,7 +341,7 @@ } else if (pid == 0) { /* Child */ int ret; - const size_t mmap_size = args->page_size * 8192; + const size_t mmap_size = args->page_size * 32768; void *ptr; #if defined(MAP_POPULATE) const int mflags = MAP_ANONYMOUS | MAP_PRIVATE | MAP_POPULATE; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.06/stress-fp-error.c new/stress-ng-0.10.07/stress-fp-error.c --- old/stress-ng-0.10.06/stress-fp-error.c 2019-09-23 18:50:56.000000000 +0200 +++ new/stress-ng-0.10.07/stress-fp-error.c 2019-10-01 17:49:32.000000000 +0200 @@ -47,46 +47,56 @@ feclearexcept(FE_ALL_EXCEPT); } -static inline bool stress_double_same(const double d1, const double d2) +static inline bool stress_double_same( + const double val, + const double val_expected, + const bool is_nan, + const bool is_inf) { - if (isnan(d1) && isnan(d2)) + if (is_nan && isnan(val)) + return true; + if (is_inf && isinf(val)) + return true; + if (isnan(val) && isnan(val_expected)) return true; - if (isinf(d1) && isinf(d2)) + if (isinf(val) && isinf(val_expected)) return true; - return (d1 - d2) < 0.0000001; + return fabsl(val - val_expected) < 0.0000001; } static void stress_fp_check( const args_t *args, const char *expr, const double val, - const double val_wanted, - const int errno_wanted, - const int excepts_wanted) + const double val_expected, + const bool is_nan, + const bool is_inf, + const int errno_expected, + const int excepts_expected) { #if defined(__linux__) && NEED_GNUC(4,8,0) - if (stress_double_same(val, val_wanted) && - (fetestexcept(excepts_wanted) & excepts_wanted) && - (errno == errno_wanted)) + if (stress_double_same(val, val_expected, is_nan, is_inf) && + (fetestexcept(excepts_expected) & excepts_expected) && + (errno == errno_expected)) return; pr_fail("%s: %s return was %f (expected %f), " "errno=%d (expected %d), " "excepts=%d (expected %d)\n", args->name, expr, - val, val_wanted, - errno, errno_wanted, - fetestexcept(excepts_wanted), excepts_wanted); + val, val_expected, + errno, errno_expected, + fetestexcept(excepts_expected), excepts_expected); #else - (void)errno_wanted; - (void)excepts_wanted; + (void)errno_expected; + (void)excepts_expected; - if (stress_double_same(val, val_wanted)) + if (stress_double_same(val, val_expected, is_nan, is_inf)) return; pr_fail("%s: %s return was %f (expected %f)\n", args->name, expr, - val, val_wanted); + val, val_expected); #endif } @@ -102,37 +112,37 @@ #if defined(EDOM) stress_fp_clear_error(); stress_fp_check(args, "log(-1.0)", log(-1.0), NAN, - EDOM, FE_INVALID); + true, false, EDOM, FE_INVALID); #endif #if defined(ERANGE) stress_fp_clear_error(); stress_fp_check(args, "log(0.0)", log(0.0), -HUGE_VAL, - ERANGE, FE_DIVBYZERO); + false, false, ERANGE, FE_DIVBYZERO); #endif #if defined(EDOM) stress_fp_clear_error(); stress_fp_check(args, "log2(-1.0)", log2(-1.0), NAN, - EDOM, FE_INVALID); + true, false, EDOM, FE_INVALID); #endif #if defined(ERANGE) stress_fp_clear_error(); stress_fp_check(args, "log2(0.0)", log2(0.0), -HUGE_VAL, - ERANGE, FE_DIVBYZERO); + false, false, ERANGE, FE_DIVBYZERO); #endif #if defined(EDOM) stress_fp_clear_error(); stress_fp_check(args, "sqrt(-1.0)", sqrt(-1.0), NAN, - EDOM, FE_INVALID); + true, false, EDOM, FE_INVALID); #endif #if defined(EDOM) stress_fp_clear_error(); stress_fp_check(args, "sqrt(-1.0)", sqrt(-1.0), NAN, - EDOM, FE_INVALID); + true, false, EDOM, FE_INVALID); #endif /* @@ -143,7 +153,7 @@ SET_VOLATILE(d1, 1.0); SET_VOLATILE(d2, M_PI); stress_fp_check(args, "1.0 / M_PI", d1 / d2, d1 / d2, - 0, FE_INEXACT); + false, false, 0, FE_INEXACT); /* * Use volatiles to force compiler to generate code @@ -154,18 +164,18 @@ SET_VOLATILE(d2, DBL_MAX / 2.0); stress_fp_check(args, "DBL_MAX + DBL_MAX / 2.0", DBL_MAX + DBL_MAX / 2.0, INFINITY, - 0, FE_OVERFLOW | FE_INEXACT); + false, true, 0, FE_OVERFLOW | FE_INEXACT); #if defined(ERANGE) stress_fp_clear_error(); stress_fp_check(args, "exp(-1000000.0)", exp(-1000000.0), 0.0, - ERANGE, FE_UNDERFLOW); + false, false, ERANGE, FE_UNDERFLOW); #endif #if defined(ERANGE) stress_fp_clear_error(); stress_fp_check(args, "exp(DBL_MAX)", exp(DBL_MAX), HUGE_VAL, - ERANGE, FE_OVERFLOW); + false, false, ERANGE, FE_OVERFLOW); #endif if (fegetround() == -1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.06/stress-get.c new/stress-ng-0.10.07/stress-get.c --- old/stress-ng-0.10.06/stress-get.c 2019-09-23 18:50:56.000000000 +0200 +++ new/stress-ng-0.10.07/stress-get.c 2019-10-01 17:49:32.000000000 +0200 @@ -294,7 +294,7 @@ check_do_run(); } -#if _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED +#if defined(HAVE_GETSID) ret = getsid(mypid); if (verify && (ret < 0)) pr_fail_err("getsid"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.06/stress-ng.c new/stress-ng-0.10.07/stress-ng.c --- old/stress-ng-0.10.06/stress-ng.c 2019-09-23 18:50:56.000000000 +0200 +++ new/stress-ng-0.10.07/stress-ng.c 2019-10-01 17:49:32.000000000 +0200 @@ -1143,8 +1143,9 @@ */ static void version(void) { - (void)printf("%s, version " VERSION " (%s, %s) \U0001F4BB\U0001F525\n", - g_app_name, stress_get_compiler(), stress_get_uname_info()); + (void)printf("%s, version " VERSION " (%s, %s)%s\n", + g_app_name, stress_get_compiler(), stress_get_uname_info(), + stress_is_dev_tty(STDOUT_FILENO) ? "" : " \U0001F4BB\U0001F525"); } /* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.06/stress-ng.h new/stress-ng-0.10.07/stress-ng.h --- old/stress-ng-0.10.06/stress-ng.h 2019-09-23 18:50:56.000000000 +0200 +++ new/stress-ng-0.10.07/stress-ng.h 2019-10-01 17:49:32.000000000 +0200 @@ -1575,7 +1575,7 @@ #endif /* GCC5.0+ target_clones attribute */ -#if defined(HAVE_TARGET_CLONES) +#if defined(HAVE_TARGET_CLONES) && defined(STRESS_X86) #define TARGET_CLONES __attribute__((target_clones("mmx","sse","sse2","ssse3", "sse4.1", "sse4a", "avx", "avx2", "avx512f", "default"))) #else #define TARGET_CLONES @@ -1618,13 +1618,6 @@ #define HAVE_PRCTL_TIMER_SLACK #endif -/* - * checks to see if we should keep in running the stressors - */ -extern bool __keep_stressing(const args_t *args); - -#define keep_stressing() __keep_stressing(args) - /* increment the stessor bogo ops counter */ static inline void ALWAYS_INLINE inc_counter(const args_t *args) { @@ -3043,6 +3036,18 @@ extern put_val_t g_put_val; /* sync data to somewhere */ /* + * keep_stressing() + * returns true if we can keep on running a stressor + */ +static inline bool HOT OPTIMIZE3 __keep_stressing(const args_t *args) +{ + return (LIKELY(g_keep_stressing_flag) && + LIKELY(!args->max_ops || (get_counter(args) < args->max_ops))); +} + +#define keep_stressing() __keep_stressing(args) + +/* * stressor option value handling */ extern int set_setting(const char *name, const type_id_t type_id, const void *value); @@ -3305,6 +3310,7 @@ extern WARN_UNUSED bool stress_check_capability(const int capability); extern WARN_UNUSED bool stress_sigalrm_pending(void); extern void stress_sigalrm_block(void); +extern WARN_UNUSED bool stress_is_dev_tty(const int fd); /* * Indicate a stress test failed because of limited resources diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.06/stress-rdrand.c new/stress-ng-0.10.07/stress-rdrand.c --- old/stress-ng-0.10.06/stress-rdrand.c 2019-09-23 18:50:56.000000000 +0200 +++ new/stress-ng-0.10.07/stress-rdrand.c 2019-10-01 17:49:32.000000000 +0200 @@ -117,6 +117,14 @@ rdrand64(); \ rdrand64(); \ } + +#define RDRAND64x128() \ +{ \ + RDRAND64x32() \ + RDRAND64x32() \ + RDRAND64x32() \ + RDRAND64x32() \ +} #else /* * rdrand32() @@ -203,6 +211,14 @@ rdrand32(); \ rdrand32(); \ } + +#define RDRAND32x256() \ +{ \ + RDRAND32x64() \ + RDRAND32x64() \ + RDRAND32x64() \ + RDRAND32x64() \ +} #endif /* @@ -218,15 +234,15 @@ time_start = time_now(); do { #if defined(__x86_64__) || defined(__x86_64) - RDRAND64x32(); + RDRAND64x128(); #else - RDRAND32x64(); + RDRAND32x256(); #endif inc_counter(args); } while (keep_stressing()); duration = time_now() - time_start; - billion_bits = ((double)get_counter(args) * 64.0 * 32.0) / 1000000000.0; + billion_bits = ((double)get_counter(args) * 64.0 * 128.0) / 1000000000.0; pr_lock(&lock); pr_dbg_lock(&lock, "%s: %.3f billion random bits read " diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.06/stress-stack.c new/stress-ng-0.10.07/stress-stack.c --- old/stress-ng-0.10.06/stress-stack.c 2019-09-23 18:50:56.000000000 +0200 +++ new/stress-ng-0.10.07/stress-stack.c 2019-10-01 17:49:32.000000000 +0200 @@ -105,10 +105,11 @@ /* * Allocate altstack on heap rather than an * autoexpanding stack that may trip a segfault - * if there is no memory to back it later. + * if there is no memory to back it later. Stack + * must be privately mapped. */ altstack = mmap(NULL, altstack_size, PROT_READ | PROT_WRITE, - MAP_SHARED | MAP_ANONYMOUS, -1, 0); + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); if (altstack == MAP_FAILED) { pr_inf("%s: cannot allocate stack for signal handler, " "skipping test\n", args->name); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.06/test/test-getsid.c new/stress-ng-0.10.07/test/test-getsid.c --- old/stress-ng-0.10.06/test/test-getsid.c 1970-01-01 01:00:00.000000000 +0100 +++ new/stress-ng-0.10.07/test/test-getsid.c 2019-10-01 17:49:32.000000000 +0200 @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2013-2019 Canonical, Ltd. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * This code is a complete clean re-write of the stress tool by + * Colin Ian King <colin.k...@canonical.com> and attempts to be + * backwardly compatible with the stress tool by Amos Waterland + * <a...@rossby.metr.ou.edu> but has more stress tests and more + * functionality. + * + */ + +#include <sys/types.h> +#include <unistd.h> + +int main(void) +{ + return getsid(0); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.10.06/test/test-ttyname.c new/stress-ng-0.10.07/test/test-ttyname.c --- old/stress-ng-0.10.06/test/test-ttyname.c 1970-01-01 01:00:00.000000000 +0100 +++ new/stress-ng-0.10.07/test/test-ttyname.c 2019-10-01 17:49:32.000000000 +0200 @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2013-2019 Canonical, Ltd. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * This code is a complete clean re-write of the stress tool by + * Colin Ian King <colin.k...@canonical.com> and attempts to be + * backwardly compatible with the stress tool by Amos Waterland + * <a...@rossby.metr.ou.edu> but has more stress tests and more + * functionality. + * + */ +#include <unistd.h> + +int main(void) +{ + char *name = ttyname(0); + + (void)name; + + return 0; +}