Hello community,

here is the log from the commit of package stress-ng for openSUSE:Factory 
checked in at 2019-12-18 14:46:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/stress-ng (Old)
 and      /work/SRC/openSUSE:Factory/.stress-ng.new.4691 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "stress-ng"

Wed Dec 18 14:46:25 2019 rev:74 rq:757688 version:0.10.14

Changes:
--------
--- /work/SRC/openSUSE:Factory/stress-ng/stress-ng.changes      2019-12-16 
15:19:26.483162331 +0100
+++ /work/SRC/openSUSE:Factory/.stress-ng.new.4691/stress-ng.changes    
2019-12-18 14:48:43.249949661 +0100
@@ -1,0 +2,17 @@
+Tue Dec 17 19:42:53 UTC 2019 - Martin Hauke <mar...@gmx.de>
+
+- Update to version 0.10.14
+  * stress-chdir: fix opening of paths[i]
+  * stress-vecmath: don't use TARGET_CLONES on ppc64, it breaks
+    some older compilers
+  * stress-hrtimes: handle fork resource failures more gracefully.
+  * stress-chdir: mix random value and grey code of nth file
+  * stress-chdir: make paths more random and chdir to / for more
+    stress
+  * stress-wait: clean up a comment
+  * stress-sem: add sem_getvalue call to increase coverage
+  * stress-sem: add sem_timedwait to increase test coverage
+  * sigprocmask: fix missing sigprogmask and add sigtimedwait
+  * core-cache: remove / from cache path
+
+-------------------------------------------------------------------

Old:
----
  stress-ng-0.10.13.tar.xz

New:
----
  stress-ng-0.10.14.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ stress-ng.spec ++++++
--- /var/tmp/diff_new_pack.SNmXsY/_old  2019-12-18 14:48:44.073950038 +0100
+++ /var/tmp/diff_new_pack.SNmXsY/_new  2019-12-18 14:48:44.073950038 +0100
@@ -18,7 +18,7 @@
 
 
 Name:           stress-ng
-Version:        0.10.13
+Version:        0.10.14
 Release:        0
 Summary:        Tool to load and stress a computer
 License:        GPL-2.0-only

++++++ stress-ng-0.10.13.tar.xz -> stress-ng-0.10.14.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.10.13/Makefile 
new/stress-ng-0.10.14/Makefile
--- old/stress-ng-0.10.13/Makefile      2019-12-09 13:42:13.000000000 +0100
+++ new/stress-ng-0.10.14/Makefile      2019-12-16 22:22:25.000000000 +0100
@@ -16,7 +16,7 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA.
 #
 
-VERSION=0.10.13
+VERSION=0.10.14
 #
 # Codename "systematic system smasher"
 #
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.10.13/core-cache.c 
new/stress-ng-0.10.14/core-cache.c
--- old/stress-ng-0.10.13/core-cache.c  2019-12-09 13:42:13.000000000 +0100
+++ new/stress-ng-0.10.14/core-cache.c  2019-12-16 22:22:25.000000000 +0100
@@ -28,7 +28,7 @@
 
 #if defined(__linux__)
 #define SYS_CPU_PREFIX               "/sys/devices/system/cpu"
-#define SYS_CPU_CACHE_DIR            "/cache"
+#define SYS_CPU_CACHE_DIR            "cache"
 #endif
 
 static const generic_map_t cache_type_map[] = {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.10.13/stress-chdir.c 
new/stress-ng-0.10.14/stress-chdir.c
--- old/stress-ng-0.10.13/stress-chdir.c        2019-12-09 13:42:13.000000000 
+0100
+++ new/stress-ng-0.10.14/stress-chdir.c        2019-12-16 22:22:25.000000000 
+0100
@@ -39,10 +39,10 @@
 {
        uint64_t chdir_dirs;
 
-       chdir_dirs = get_uint64(opt);
+       chdir_dirs = get_uint32(opt);
        check_range("chdir-dirs", chdir_dirs,
                MIN_CHDIR_DIRS, MAX_CHDIR_DIRS);
-       return set_setting("chdir-dirs", TYPE_ID_UINT64, &chdir_dirs);
+       return set_setting("chdir-dirs", TYPE_ID_UINT32, &chdir_dirs);
 }
 
 /*
@@ -51,9 +51,9 @@
  */
 static int stress_chdir(const args_t *args)
 {
-       uint64_t i, chdir_dirs = DEFAULT_CHDIR_DIRS;
+       uint32_t i, chdir_dirs = DEFAULT_CHDIR_DIRS;
        char path[PATH_MAX], cwd[PATH_MAX];
-       int fd = -1, rc, ret = EXIT_FAILURE;
+       int rc, ret = EXIT_FAILURE, *fds;
        char **paths;
 
        (void)get_setting("chdir-dirs", &chdir_dirs);
@@ -62,6 +62,12 @@
                pr_err("%s: out of memory allocating paths\n", args->name);
                return EXIT_NO_RESOURCE;
        }
+       fds = calloc(chdir_dirs, sizeof(*fds));
+       if (!fds) {
+               pr_err("%s: out of memory allocating file descriptors\n", 
args->name);
+               free(paths);
+               return EXIT_NO_RESOURCE;
+       }
 
        if (getcwd(cwd, sizeof(cwd)) == NULL) {
                pr_fail_err("getcwd");
@@ -76,10 +82,11 @@
 
        /* Populate */
        for (i = 0; i < chdir_dirs; i++) {
-               uint64_t gray_code = (i >> 1) ^ i;
+               uint64_t rnd = (uint64_t)mwc32() << 32;
+               uint32_t gray_code = (i >> 1) ^ i;
 
                (void)stress_temp_filename_args(args,
-                       path, sizeof(path), gray_code);
+                       path, sizeof(path), rnd | gray_code);
                paths[i] = strdup(path);
                if (paths[i] == NULL)
                        goto abort;
@@ -89,18 +96,20 @@
                        pr_fail_err("mkdir");
                        goto abort;
                }
-               if (!g_keep_stressing_flag)
-                       goto done;
-       }
-
 #if defined(O_DIRECTORY)
-       fd = open(paths[0], O_DIRECTORY | O_RDONLY);
+               fds[i] = open(paths[i], O_RDONLY | O_DIRECTORY);
 #else
-       fd = open(paths[0], O_RDONLY);
+               fds[i] = open(paths[i], O_RDONLY);
 #endif
+               if (!g_keep_stressing_flag)
+                       goto done;
+       }
 
        do {
                for (i = 0; i < chdir_dirs; i++) {
+                       uint32_t j = mwc32() % chdir_dirs;
+                       const int fd = fds[j] >= 0 ? fds[j] : fds[0];
+
                        if (!keep_stressing())
                                goto done;
                        if (chdir(paths[i]) < 0) {
@@ -110,13 +119,22 @@
                                }
                        }
 
-
                        if ((fd >= 0) && (fchdir(fd) < 0)) {
                                if (errno != ENOMEM) {
                                        pr_fail_err("fchdir");
                                        goto abort;
                                }
                        }
+
+                       /*
+                        *  chdir to / should always work, surely?
+                        */
+                       if (chdir("/") < 0) {
+                               if ((errno != ENOMEM) && (errno != EACCES)) {
+                                       pr_fail_err("chdir");
+                                       goto abort;
+                               }
+                       }
 redo1:
                        if (!keep_stressing())
                                goto done;
@@ -137,19 +155,18 @@
        if (chdir(cwd) < 0)
                pr_fail_err("chdir");
 
-       if (fd >= 0)
-               (void)close(fd);
-
        /* force unlink of all files */
-       pr_tidy("%s: removing %" PRIu64 " directories\n",
+       pr_tidy("%s: removing %" PRIu32 " directories\n",
                args->name, chdir_dirs);
 
        for (i = 0; (i < chdir_dirs) && paths[i] ; i++) {
+               (void)close(fds[i]);
                (void)rmdir(paths[i]);
                free(paths[i]);
        }
        (void)stress_temp_dir_rm_args(args);
 err:
+       free(fds);
        free(paths);
 
        return ret;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.10.13/stress-hrtimers.c 
new/stress-ng-0.10.14/stress-hrtimers.c
--- old/stress-ng-0.10.13/stress-hrtimers.c     2019-12-09 13:42:13.000000000 
+0100
+++ new/stress-ng-0.10.14/stress-hrtimers.c     2019-12-16 22:22:25.000000000 
+0100
@@ -164,10 +164,13 @@
                 return EXIT_NO_RESOURCE;
         }
 
-       for (i = 0; i < PROCS_MAX && keep_stressing(); i++) {
-               pids[i] = fork();
-               if (pids[0] < 0)
+       for (i = 0; i < PROCS_MAX; i++) {
+               if (!keep_stressing())
                        goto reap;
+
+               pids[i] = fork();
+               if (pids[i] < 0)
+                       continue;
                else if (pids[i] == 0) {
                        /* Child */
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.10.13/stress-sem.c 
new/stress-ng-0.10.14/stress-sem.c
--- old/stress-ng-0.10.13/stress-sem.c  2019-12-09 13:42:13.000000000 +0100
+++ new/stress-ng-0.10.14/stress-sem.c  2019-12-16 22:22:25.000000000 +0100
@@ -68,19 +68,46 @@
                int i;
 
                for (i = 0; g_keep_stressing_flag && i < 1000; i++) {
-                       if (sem_trywait(&sem) < 0) {
-                               if (errno == 0 || errno == EAGAIN)
-                                       continue;
-                               if (errno != EINTR)
-                                       pr_fail_dbg("sem_trywait");
-                               break;
+                       int value;
+
+                       if (sem_getvalue(&sem, &value) < 0)
+                               pr_fail("sem_getvalue");
+
+                       if (i & 1) {
+                               if (sem_trywait(&sem) < 0) {
+                                       if (errno == 0 ||
+                                           errno == EAGAIN)
+                                               continue;
+                                       if (errno != EINTR)
+                                               pr_fail_dbg("sem_trywait");
+                                       break;
+                               }
+                       } else {
+                               struct timespec ts;
+
+#if defined(CLOCK_REALTIME)
+                               if (clock_gettime(CLOCK_REALTIME, &ts) < 0)
+                                       (void)memset(&ts, 0, sizeof(ts));
+#else
+                               (void)memset(&ts, 0, sizeof(ts));
+#endif
+
+                               if (sem_timedwait(&sem, &ts) < 0) {
+                                       if (errno == 0 ||
+                                           errno == EAGAIN ||
+                                           errno == ETIMEDOUT)
+                                               continue;
+                                       if (errno != EINTR)
+                                               pr_fail_dbg("sem_timedwait");
+                                       break;
+                               }
                        }
                        inc_counter(args);
                        if (sem_post(&sem) < 0) {
                                pr_fail_dbg("sem_post");
                                break;
                        }
-                       if (i & 1)
+                       if (mwc1())
                                (void)shim_sched_yield();
                        else
                                (void)shim_usleep(0);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.10.13/stress-sigq.c 
new/stress-ng-0.10.14/stress-sigq.c
--- old/stress-ng-0.10.13/stress-sigq.c 2019-12-09 13:42:13.000000000 +0100
+++ new/stress-ng-0.10.14/stress-sigq.c 2019-12-16 22:22:25.000000000 +0100
@@ -58,19 +58,43 @@
                return EXIT_FAILURE;
        } else if (pid == 0) {
                sigset_t mask;
+               int i = 0;
 
                (void)setpgid(0, g_pgrp);
                stress_parent_died_alarm();
 
                (void)sigemptyset(&mask);
                (void)sigaddset(&mask, SIGUSR1);
+               if (sigprocmask(SIG_SETMASK, &mask, NULL) < 0) {
+                       pr_fail_err("sigprocmask");
+                       _exit(EXIT_FAILURE);
+               }
 
                while (g_keep_stressing_flag) {
                        siginfo_t info;
-                       if (sigwaitinfo(&mask, &info) < 0)
-                               break;
+                       int ret;
+
+                       if (i++ & 1) {
+                               ret = sigwaitinfo(&mask, &info);
+                               if (ret < 0)
+                                       break;
+                       } else {
+                               struct timespec timeout;
+
+                               timeout.tv_sec = 1;
+                               timeout.tv_nsec = 0;
+
+                               ret = sigtimedwait(&mask, &info, &timeout);
+                               if (ret < 0) {
+                                       if (errno == EAGAIN)
+                                               continue;
+                                       break;
+                               }
+                       }
                        if (info.si_value.sival_int)
                                break;
+                       if (info.si_signo != SIGUSR1)
+                               break;
                }
                pr_dbg("%s: child got termination notice\n", args->name);
                pr_dbg("%s: exited on pid [%d] (instance %" PRIu32 ")\n",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.10.13/stress-vecmath.c 
new/stress-ng-0.10.14/stress-vecmath.c
--- old/stress-ng-0.10.13/stress-vecmath.c      2019-12-09 13:42:13.000000000 
+0100
+++ new/stress-ng-0.10.14/stress-vecmath.c      2019-12-16 22:22:25.000000000 
+0100
@@ -87,7 +87,11 @@
  *  stress_vecmath()
  *     stress GCC vector maths
  */
+#if defined(STRESS_PPC64)
+static int HOT stress_vecmath(const args_t *args)
+#else
 static int HOT TARGET_CLONES stress_vecmath(const args_t *args)
+#endif
 {
        vint8_t a8 = {
                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.10.13/stress-wait.c 
new/stress-ng-0.10.14/stress-wait.c
--- old/stress-ng-0.10.13/stress-wait.c 2019-12-09 13:42:13.000000000 +0100
+++ new/stress-ng-0.10.14/stress-wait.c 2019-12-16 22:22:25.000000000 +0100
@@ -31,7 +31,7 @@
 };
 
 /*
- *  Disabled for GNU/Hurd because it this stressor breaks with
+ *  Disabled for GNU/Hurd because this stressor breaks with
  *  the error:
  *    intr-msg.c:387: _hurd_intr_rpc_mach_msg: Assertion
  *    `m->header.msgh_id == msgid + 100'


Reply via email to