GNU bug report logs - #53057
[PATCH] gnu: Add stress-ng.

Previous Next

Package: guix-patches;

Reported by: Tobias Geerinckx-Rice <me <at> tobias.gr>

Date: Thu, 6 Jan 2022 18:06:02 UTC

Severity: normal

Tags: patch

Done: Tobias Geerinckx-Rice <me <at> tobias.gr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 53057 in the body.
You can then email your comments to 53057 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#53057; Package guix-patches. (Thu, 06 Jan 2022 18:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 06 Jan 2022 18:06:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add stress-ng.
Date: Thu,  6 Jan 2022 19:06:36 +0100
* gnu/packages/admin.scm (stress-ng): New public variable.
---
 gnu/packages/admin.scm | 67 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index d45857150f..6e180ec80a 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -2260,6 +2260,73 @@ (define-public stress
 system is under heavy load.")
     (license license:gpl2+)))
 
+(define-public stress-ng
+  (package
+    (name "stress-ng")
+    (version "0.13.10")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/ColinIanKing/stress-ng")
+             (commit (string-append "V" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1z9vjn2131iv3pwrh04z6r5ygi1qgad5bi3jhghcvc3v1b4k5ran"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:make-flags
+           #~(list (string-append "CC=" #$(cc-for-target))
+                   (string-append "BINDIR=" #$output "/bin")
+                   (string-append "MANDIR=" #$output "/share/man")
+                   (string-append "JOBDIR=" #$output
+                                  "/share/stress-ng/example-jobs")
+                   (string-append "BASHDIR=" #$output
+                                  "/share/bash-completion/completions"))
+           #:test-target "lite-test"
+           #:phases
+           #~(modify-phases %standard-phases
+               (delete 'configure)      ; no configure script
+               (add-after 'check 'check-a-little-harder
+                 ;; XXX Guix supports only one #:test-target.  Run more tests.
+                 (lambda* (#:key tests? #:allow-other-keys)
+                   (when tests?
+                     (substitute* "debian/tests/fast-test-all"
+                       (("EXCLUDE=\"" exclude=)
+                        (string-append exclude=
+                                       ;; Fails if host kernel denies ptracing.
+                                       "ptrace ")))
+                     (invoke "make" "fast-test-all"
+                             "-j" (number->string (parallel-job-count)))))))))
+    (inputs
+     (list keyutils
+           kmod
+           libaio
+           libbsd
+           libcap
+           libgcrypt
+           zlib))
+    (home-page "https://github.com/ColinIanKing/stress-ng")
+    (synopsis "Load and stress-test a computer system in various ways")
+    (description
+     "stress-ng stress-tests a computer system by exercising both physical
+subsystems as operating system kernel interfaces.  It can stress the CPU, cache,
+disk, memory, socket and pipe I/O, scheduling, and much more, in various
+selectable ways.  This can trip hardware issues such as thermal overruns as well
+as operating system bugs that occur only when a system is being thrashed hard.
+
+You can also measure test throughput rates, which can be useful to observe
+performance changes across different operating system releases or types of
+hardware.  However, stress-ng is not a benchmark.  Use it with caution: some of
+the tests can make poorly designed hardware run dangerously hot or make the
+whole system lock up.
+
+Compared to its inspiration, @command{stress}, @command{stress-ng} offers many
+additional options such as the number of bogo operations to run, execution
+metrics, verification of memory and computational operations, and considerably
+more stress mechanisms.")
+    (license license:gpl2+)))
+
 (define-public detox
   (package
     (name "detox")
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#53057; Package guix-patches. (Fri, 07 Jan 2022 04:40:02 GMT) Full text and rfc822 format available.

Message #8 received at 53057 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: 53057 <at> debbugs.gnu.org
Subject: Re: bug#53057: [PATCH] gnu: Add stress-ng.
Date: Thu, 06 Jan 2022 23:39:09 -0500
Hi Tobias,

How timely! :-)

Tobias Geerinckx-Rice <me <at> tobias.gr> writes:

> * gnu/packages/admin.scm (stress-ng): New public variable.
> ---
>  gnu/packages/admin.scm | 67 ++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 67 insertions(+)
>
> diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
> index d45857150f..6e180ec80a 100644
> --- a/gnu/packages/admin.scm
> +++ b/gnu/packages/admin.scm
> @@ -2260,6 +2260,73 @@ (define-public stress
>  system is under heavy load.")
>      (license license:gpl2+)))
>
> +(define-public stress-ng
> +  (package
> +    (name "stress-ng")
> +    (version "0.13.10")
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://github.com/ColinIanKing/stress-ng")
> +             (commit (string-append "V" version))))
> +       (file-name (git-file-name name version))
> +       (sha256
> +        (base32 "1z9vjn2131iv3pwrh04z6r5ygi1qgad5bi3jhghcvc3v1b4k5ran"))))
> +    (build-system gnu-build-system)
> +    (arguments
> +     (list #:make-flags
> +           #~(list (string-append "CC=" #$(cc-for-target))
> +                   (string-append "BINDIR=" #$output "/bin")
> +                   (string-append "MANDIR=" #$output "/share/man")
> +                   (string-append "JOBDIR=" #$output
> +                                  "/share/stress-ng/example-jobs")
> +                   (string-append "BASHDIR=" #$output
> +                                  "/share/bash-completion/completions"))
> +           #:test-target "lite-test"
> +           #:phases
> +           #~(modify-phases %standard-phases
> +               (delete 'configure)      ; no configure script
> +               (add-after 'check 'check-a-little-harder
> +                 ;; XXX Guix supports only one #:test-target.  Run more tests.
> +                 (lambda* (#:key tests? #:allow-other-keys)
> +                   (when tests?
> +                     (substitute* "debian/tests/fast-test-all"
> +                       (("EXCLUDE=\"" exclude=)
> +                        (string-append exclude=
> +                                       ;; Fails if host kernel denies ptracing.
> +                                       "ptrace ")))
> +                     (invoke "make" "fast-test-all"
> +                             "-j" (number->string (parallel-job-count)))))))))

This looks good and works good too!  My only comment is that this should
honor parallel-tests?.  Reusing the check phase but overriding the
test-target argument should do it:

modified   gnu/packages/admin.scm
@@ -2289,15 +2289,15 @@ (define-public stress-ng
                (delete 'configure)      ; no configure script
                (add-after 'check 'check-a-little-harder
                  ;; XXX Guix supports only one #:test-target.  Run more tests.
-                 (lambda* (#:key tests? #:allow-other-keys)
+                 (lambda* (#:key tests? #:allow-other-keys #:rest args)
                    (when tests?
                      (substitute* "debian/tests/fast-test-all"
                        (("EXCLUDE=\"" exclude=)
                         (string-append exclude=
                                        ;; Fails if host kernel denies ptracing.
-                                       "ptrace ")))
-                     (invoke "make" "fast-test-all"
-                             "-j" (number->string (parallel-job-count)))))))))
+                                       "ptrace "))))
+                   (apply (assoc-ref %standard-phases 'check)
+                          `(,@args #:test-target "fast-test-all")))))))
     (inputs
      (list keyutils
            kmod

Otherwise, LGTM!  Feel free to push with such adjustment.

Thank you!

Maxim




Reply sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
You have taken responsibility. (Fri, 07 Jan 2022 05:01:01 GMT) Full text and rfc822 format available.

Notification sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
bug acknowledged by developer. (Fri, 07 Jan 2022 05:01:01 GMT) Full text and rfc822 format available.

Message #13 received at 53057-done <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 53057-done <at> debbugs.gnu.org
Subject: Re: bug#53057: [PATCH] gnu: Add stress-ng.
Date: Fri, 07 Jan 2022 05:48:03 +0100
[Message part 1 (text/plain, inline)]
Hi Maxim,

Maxim Cournoyer 写道:
> + (apply (assoc-ref %standard-phases 'check)

This is a trick I've forgotten before… sigh.  Thanks for pointing 
it out!

Pushed as 046322189b62981fca6baab4e758e6878eab0758.

Kind regards,

T G-R
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 04 Feb 2022 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 73 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.