Hello community,

here is the log from the commit of package stress-ng for openSUSE:Factory 
checked in at 2018-01-20 11:27:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/stress-ng (Old)
 and      /work/SRC/openSUSE:Factory/.stress-ng.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "stress-ng"

Sat Jan 20 11:27:23 2018 rev:28 rq:567514 version:0.09.11

Changes:
--------
--- /work/SRC/openSUSE:Factory/stress-ng/stress-ng.changes      2018-01-16 
09:43:09.287486629 +0100
+++ /work/SRC/openSUSE:Factory/.stress-ng.new/stress-ng.changes 2018-01-20 
11:27:23.978444403 +0100
@@ -1,0 +2,13 @@
+Thu Jan 18 17:52:13 UTC 2018 - mar...@gmx.de
+
+- Update to version 0.09.11
+  * Makefile: bump version
+  * Manual: update date
+  * stress-sigio: don't build if missing various core functionality
+  * stress-sigio: remove sigprocmask, this is not used now
+  * Makefile: forgot to add the new stress-sigio stressor
+  * Add new sigio asynchronous I/O SIGIO stressor
+  * Add clone glibc wrapper autodetection, fixes ia64 builds
+  * Manual: remove excessive misplaced escape chars
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ stress-ng.spec ++++++
--- /var/tmp/diff_new_pack.5CxbiO/_old  2018-01-20 11:27:24.638413538 +0100
+++ /var/tmp/diff_new_pack.5CxbiO/_new  2018-01-20 11:27:24.642413352 +0100
@@ -18,7 +18,7 @@
 
 
 Name:           stress-ng
-Version:        0.09.10
+Version:        0.09.11
 Release:        0
 Summary:        Tool to load and stress a computer
 License:        GPL-2.0

++++++ stress-ng-0.09.10.tar.xz -> stress-ng-0.09.11.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.09.10/Makefile 
new/stress-ng-0.09.11/Makefile
--- old/stress-ng-0.09.10/Makefile      2018-01-12 14:48:03.000000000 +0100
+++ new/stress-ng-0.09.11/Makefile      2018-01-17 18:02:47.000000000 +0100
@@ -16,7 +16,7 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA.
 #
 
-VERSION=0.09.10
+VERSION=0.09.11
 #
 # Codename "portable pressure producer"
 #
@@ -189,6 +189,7 @@
        stress-shm-sysv.c \
        stress-sigfd.c \
        stress-sigfpe.c \
+       stress-sigio.c \
        stress-sigpending.c \
        stress-sigsegv.c \
        stress-sigsuspend.c \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.09.10/Makefile.config 
new/stress-ng-0.09.11/Makefile.config
--- old/stress-ng-0.09.10/Makefile.config       2018-01-12 14:48:03.000000000 
+0100
+++ new/stress-ng-0.09.11/Makefile.config       2018-01-17 18:02:47.000000000 
+0100
@@ -730,6 +730,14 @@
 endif
 endif
 
+ifndef $(HAVE_CLONE)
+HAVE_CLONE = $(shell $(MAKE) -f Makefile.config --no-print-directory 
$(HAVE_NOT) have_clone)
+ifeq ($(HAVE_CLONE),1)
+       CONFIG_CFLAGS += -DHAVE_CLONE
+$(info autoconfig: using clone)
+endif
+endif
+
 
 endif
 
@@ -1552,3 +1560,16 @@
                echo 0 ;\
        fi
        @rm -rf $(DIR)/test-lockf
+
+#
+#  check if we have clone
+#
+.PHONY: have_clone
+have_clone: $(DIR)/test-clone.c
+       @$(CC) $(CFLAGS) $(CPPFLAGS) $(DIR)/test-clone.c -o $(DIR)/test-clone 
2> /dev/null || true
+       @if [ -f $(DIR)/test-clone ]; then \
+               echo 1 ;\
+       else \
+               echo 0 ;\
+       fi
+       @rm -rf $(DIR)/test-clone
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.09.10/stress-clone.c 
new/stress-ng-0.09.11/stress-clone.c
--- old/stress-ng-0.09.10/stress-clone.c        2018-01-12 14:48:03.000000000 
+0100
+++ new/stress-ng-0.09.11/stress-clone.c        2018-01-17 18:02:47.000000000 
+0100
@@ -39,7 +39,7 @@
        uint64_t length;        /* Length of list */
 } clone_list_t;
 
-#if defined(__linux__) && NEED_GLIBC(2,14,0)
+#if defined(__linux__) && NEED_GLIBC(2,14,0) && defined(HAVE_CLONE)
 
 static clone_list_t clones;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.09.10/stress-ng.1 
new/stress-ng-0.09.11/stress-ng.1
--- old/stress-ng-0.09.10/stress-ng.1   2018-01-12 14:48:03.000000000 +0100
+++ new/stress-ng-0.09.11/stress-ng.1   2018-01-17 18:02:47.000000000 +0100
@@ -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 "January 12, 2018"
+.TH STRESS-NG 1 "January 17, 2018"
 .\" Please adjust this date whenever revising the manpage.
 .\"
 .\" Some roff macros, for reference:
@@ -1365,7 +1365,7 @@
 .B \-d N, \-\-hdd N
 start N workers continually writing, reading and removing temporary files. The
 default mode is to stress test sequential writes and reads.  With
-the \-\-\aggressive option enabled without any \-\-hdd\-opts options the
+the \-\-aggressive option enabled without any \-\-hdd\-opts options the
 hdd stressor will work through all the \-\-hdd\-opt options one by one to
 cover a range of I/O options.
 .TP
@@ -2546,6 +2546,13 @@
 .B \-\-sigfpe\-ops N
 stop sigfpe stress workers after N bogo SIGFPE faults.
 .TP
+.B \-\-sigio N
+start N workers that read data from a child process via a pipe and generate
+SIGIO signals. This exercises asynchronous I/O via SIGIO.
+.TP
+.B \-\-sigio\-ops N
+stop sigio stress workers after handling N SIGIO signals.
+.TP
 .B \-\-sigpending N
 start N workers that check if SIGUSR1 signals are pending. This stressor masks
 SIGUSR1, generates a SIGUSR1 signal and uses sigpending(2) to see if the signal
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.09.10/stress-ng.c 
new/stress-ng-0.09.11/stress-ng.c
--- old/stress-ng-0.09.10/stress-ng.c   2018-01-12 14:48:03.000000000 +0100
+++ new/stress-ng-0.09.11/stress-ng.c   2018-01-17 18:02:47.000000000 +0100
@@ -348,6 +348,7 @@
        STRESSOR(shm_sysv, SHM_SYSV, CLASS_VM | CLASS_OS),
        STRESSOR(sigfd, SIGFD, CLASS_INTERRUPT | CLASS_OS),
        STRESSOR(sigfpe, SIGFPE, CLASS_INTERRUPT | CLASS_OS),
+       STRESSOR(sigio, SIGIO, CLASS_INTERRUPT | CLASS_OS),
        STRESSOR(sigpending, SIGPENDING, CLASS_INTERRUPT | CLASS_OS),
        STRESSOR(sigq, SIGQUEUE, CLASS_INTERRUPT | CLASS_OS),
        STRESSOR(sigsegv, SIGSEGV, CLASS_INTERRUPT | CLASS_OS),
@@ -824,6 +825,8 @@
        { "shm-sysv-segs",1,    0,      OPT_SHM_SYSV_SEGMENTS },
        { "sigfd",      1,      0,      OPT_SIGFD },
        { "sigfd-ops",  1,      0,      OPT_SIGFD_OPS },
+       { "sigio",      1,      0,      OPT_SIGIO },
+       { "sigio-ops",  1,      0,      OPT_SIGIO_OPS },
        { "sigfpe",     1,      0,      OPT_SIGFPE },
        { "sigfpe-ops", 1,      0,      OPT_SIGFPE_OPS },
        { "sigsegv",    1,      0,      OPT_SIGSEGV },
@@ -1406,6 +1409,8 @@
        { NULL,         "sigfd-ops N",          "stop after N bogo signalfd 
reads" },
        { NULL,         "sigfpe N",             "start N workers generating 
floating point math faults" },
        { NULL,         "sigfpe-ops N",         "stop after N bogo floating 
point math faults" },
+       { NULL,         "sigio N",              "start N workers that exercise 
SIGIO signals" },
+       { NULL,         "sigio-ops N",          "stop after N bogo sigio 
signals" },
        { NULL,         "sigpending N",         "start N workers exercising 
sigpending" },
        { NULL,         "sigpending-ops N",     "stop after N sigpending bogo 
operations" },
        { NULL,         "sigq N",               "start N workers sending 
sigqueue signals" },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.09.10/stress-ng.h 
new/stress-ng-0.09.11/stress-ng.h
--- old/stress-ng-0.09.10/stress-ng.h   2018-01-12 14:48:03.000000000 +0100
+++ new/stress-ng-0.09.11/stress-ng.h   2018-01-17 18:02:47.000000000 +0100
@@ -1332,6 +1332,7 @@
        STRESS_SHM_SYSV,
        STRESS_SIGFD,
        STRESS_SIGFPE,
+       STRESS_SIGIO,
        STRESS_SIGPENDING,
        STRESS_SIGQUEUE,
        STRESS_SIGSEGV,
@@ -1961,6 +1962,9 @@
        OPT_SIGFPE,
        OPT_SIGFPE_OPS,
 
+       OPT_SIGIO,
+       OPT_SIGIO_OPS,
+
        OPT_SIGPENDING,
        OPT_SIGPENDING_OPS,
 
@@ -2994,6 +2998,7 @@
 STRESS(stress_shm_sysv);
 STRESS(stress_sigfd);
 STRESS(stress_sigfpe);
+STRESS(stress_sigio);
 STRESS(stress_sigpending);
 STRESS(stress_sigsegv);
 STRESS(stress_sigsuspend);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.09.10/stress-sigio.c 
new/stress-ng-0.09.11/stress-sigio.c
--- old/stress-ng-0.09.10/stress-sigio.c        1970-01-01 01:00:00.000000000 
+0100
+++ new/stress-ng-0.09.11/stress-sigio.c        2018-01-17 18:02:47.000000000 
+0100
@@ -0,0 +1,168 @@
+/*
+ * Copyright (C) 2013-2018 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 "stress-ng.h"
+
+#if defined(O_ASYNC) &&        \
+    defined(O_NONBLOCK) && \
+    defined(F_SETOWN) && \
+    defined(F_GETFL) && \
+    defined(F_SETFL)
+
+#define BUFFER_SIZE    (4096)
+
+static volatile int got_err;
+static int rd_fd;
+static const args_t *sigio_args;
+static pid_t pid;
+
+/*
+ *  stress_sigio_handler()
+ *      SIGIO handler
+ */
+static void MLOCKED stress_sigio_handler(int dummy)
+{
+       static char buffer[BUFFER_SIZE];
+       const args_t *args = sigio_args;
+
+        (void)dummy;
+
+       if (!keep_stressing() && (pid > 0)) {
+               (void)kill(pid, SIGKILL);
+               return;
+       }
+
+       if (rd_fd > 0) {
+               int ret;
+
+               got_err = 0;
+               ret = read(rd_fd, buffer, sizeof(buffer));
+               if ((ret < 0) && (errno != EAGAIN))
+                       got_err = errno;
+               else if (sigio_args)
+                       inc_counter(sigio_args);
+       }
+}
+
+/*
+ *  stress_sigio
+ *     stress reading of /dev/zero using SIGIO
+ */
+int stress_sigio(const args_t *args)
+{
+       int ret, rc = EXIT_FAILURE, fds[2], status;
+
+       rd_fd = -1;
+       sigio_args = args;
+
+       if (stress_sighandler(args->name, SIGIO, stress_sigio_handler, NULL) < 
0)
+               return rc;
+
+       if (pipe(fds) < 0) {
+               pr_fail_err("pipe");
+               return rc;
+       }
+       rd_fd = fds[0];
+
+       ret = fcntl(fds[0], F_SETOWN, getpid());
+       if (ret < 0) {
+               pr_fail_err("fcntl F_SETOWN");
+               goto err;
+       }
+       ret = fcntl(fds[0], F_GETFL);
+       if (ret < 0) {
+               pr_fail_err("fcntl F_GETFL");
+               goto err;
+       }
+       ret = fcntl(fds[0], F_SETFL, ret | O_ASYNC | O_NONBLOCK);
+       if (ret < 0) {
+               pr_fail_err("fcntl F_SETFL");
+               goto err;
+       }
+
+       pid = fork();
+       if (pid < 0) {
+               pr_fail_err("fork");
+               goto err;
+       } else if (pid == 0) {
+               /* Child */
+
+               char buffer[BUFFER_SIZE >> 4];
+
+               (void)setpgid(0, g_pgrp);
+                stress_parent_died_alarm();
+
+                /* Make sure this is killable by OOM killer */
+                set_oom_adjustment(args->name, true);
+
+               (void)close(fds[0]);
+
+               memset(buffer, 0, sizeof buffer);
+
+               while (keep_stressing()) {
+                       ssize_t n;
+
+                       n = write(fds[1], buffer, sizeof buffer);
+                       if (n < 0)
+                               break;
+               }
+               (void)close(fds[1]);
+               _exit(1);
+       }
+
+       /* Parent */
+       do {
+               struct timeval timeout;
+
+               timeout.tv_sec = 1;
+               timeout.tv_usec = 0000;
+
+               (void)select(0, NULL, NULL, NULL, &timeout);
+               if (got_err) {
+                       pr_inf("%s: read error, errno=%d (%s)\n",
+                               args->name, got_err, strerror(got_err));
+                       break;
+               }
+       } while (keep_stressing());
+
+       if (pid > 0) {
+               (void)kill(pid, SIGKILL);
+               (void)waitpid(pid, &status, 0);
+       }
+
+       rc = EXIT_SUCCESS;
+
+err:
+       (void)close(fds[0]);
+       (void)close(fds[1]);
+
+       return rc;
+}
+
+#else
+int stress_sigio(const args_t *args)
+{
+       return stress_not_implemented(args);
+}
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.09.10/stress-userfaultfd.c 
new/stress-ng-0.09.11/stress-userfaultfd.c
--- old/stress-ng-0.09.10/stress-userfaultfd.c  2018-01-12 14:48:03.000000000 
+0100
+++ new/stress-ng-0.09.11/stress-userfaultfd.c  2018-01-17 18:02:47.000000000 
+0100
@@ -24,7 +24,7 @@
  */
 #include "stress-ng.h"
 
-#if defined(__linux__) && defined(__NR_userfaultfd)
+#if defined(__linux__) && defined(__NR_userfaultfd) && defined(HAVE_CLONE)
 
 #include <poll.h>
 #include <linux/userfaultfd.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.09.10/stress-vm-rw.c 
new/stress-ng-0.09.11/stress-vm-rw.c
--- old/stress-ng-0.09.10/stress-vm-rw.c        2018-01-12 14:48:03.000000000 
+0100
+++ new/stress-ng-0.09.11/stress-vm-rw.c        2018-01-17 18:02:47.000000000 
+0100
@@ -27,7 +27,8 @@
 #if defined(__linux__) &&              \
     defined(__NR_process_vm_readv) &&  \
     defined(__NR_process_vm_writev) && \
-    NEED_GLIBC(2,15,0)
+    NEED_GLIBC(2,15,0) && \
+    defined(HAVE_CLONE)
 
 #include <sys/uio.h>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stress-ng-0.09.10/test/test-clone.c 
new/stress-ng-0.09.11/test/test-clone.c
--- old/stress-ng-0.09.10/test/test-clone.c     1970-01-01 01:00:00.000000000 
+0100
+++ new/stress-ng-0.09.11/test/test-clone.c     2018-01-17 18:02:47.000000000 
+0100
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2013-2018 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.
+ *
+ */
+#define _GNU_SOURCE
+#include <sched.h>
+#include <signal.h>
+#include <stdio.h>
+
+#define STACK_SIZE     (65536)
+
+static int clone_child(void *arg)
+{
+       (void)arg;
+
+       return 0;
+}
+
+int main(void)
+{
+       pid_t pid;
+       unsigned long stack[STACK_SIZE];
+
+       pid = clone(clone_child, &stack[STACK_SIZE - 1], SIGCHLD | CLONE_VM, 
NULL);
+
+       return pid;
+}


Reply via email to