]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
TEST-55-OOMD: Switch to stress-ng
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 5 Jul 2024 07:58:17 +0000 (09:58 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 10 Jul 2024 16:52:26 +0000 (18:52 +0200)
stress-ng is available in OpenSUSE and in CentOS Stream without needing
EPEL so let's switch to it instead of stress.

mkosi.conf.d/10-arch/mkosi.conf
mkosi.conf.d/10-centos-fedora/mkosi.conf
mkosi.conf.d/10-debian-ubuntu/mkosi.conf
mkosi.conf.d/10-opensuse/mkosi.conf
test/TEST-55-OOMD/test.sh
test/units/TEST-55-OOMD-testbloat.service
test/units/TEST-55-OOMD-testmunch.service
test/units/TEST-55-OOMD.sh

index 96ae8c88b1c0fe4badbff2de57edd87860379500..80e648a9451d40799e61d78690a9b0b9cd43365a 100644 (file)
@@ -54,7 +54,7 @@ Packages=
         shadow
         softhsm
         squashfs-tools
-        stress
+        stress-ng
         tgt
         tpm2-tools
         tpm2-tss
index f200409d6f1071a724d2a91ebba0c87bac6ca010..4d0f7e71ea2049157632b2e4405b69ccb182e22d 100644 (file)
@@ -62,7 +62,7 @@ Packages=
         sbsigntools
         softhsm
         squashfs-tools
-        stress
+        stress-ng
         tpm2-tools
         util-linux
         veritysetup
index 5f9e3843e36816f80f980f6bddde3f6d77830885..31be15af783ef7149c8721bfd746a538b2febe5a 100644 (file)
@@ -78,7 +78,7 @@ Packages=
         quota
         softhsm2
         squashfs-tools
-        stress
+        stress-ng
         tgt
         tpm2-tools
         tzdata
index c5a014f70bfd6f262274e57933769cacadbc018c..e54d19d55e704e54af72c9bd9449e422ca034cd8 100644 (file)
@@ -79,6 +79,7 @@ Packages=
         shadow
         softhsm
         squashfs
+        stress-ng
         tgt
         timezone
         tpm2.0-tools
index 5e3096315caf9d24a91b000802db1d1cda11446b..3b2f4710b0d24284ff831231b48f126614c1983d 100755 (executable)
@@ -14,7 +14,7 @@ TEST_NO_NSPAWN=1
 test_append_files() {
     local workspace="${1:?}"
 
-    image_install mkswap swapon swapoff stress
+    image_install mkswap swapon swapoff stress-ng
     image_install -o btrfs
 
     mkdir -p "${workspace:?}/etc/systemd/system/init.scope.d/"
index ba4f2bc88c4d06db91f6e8534391f7ca11e67901..70c87727c8b102d7592aab75d64b797c321d226e 100644 (file)
@@ -3,8 +3,8 @@
 Description=Create a lot of memory pressure
 
 [Service]
-# A VERY small memory.high will cause the 'stress' (trying to use a lot of memory)
+# A VERY small memory.high will cause the 'stress-ng' (trying to use a lot of memory)
 # to throttle and be put under heavy pressure.
 MemoryHigh=3M
 Slice=TEST-55-OOMD-workload.slice
-ExecStart=stress --timeout 3m --vm 10 --vm-bytes 200M --vm-keep --vm-stride 1
+ExecStart=stress-ng --timeout 3m --vm 10 --vm-bytes 200M --vm-keep
index 5659906ad1fba83f31b3a818f9983bcee28b04be..79bd01838e142bf61bad149c664af5be5e112174 100644 (file)
@@ -5,4 +5,4 @@ Description=Create some memory pressure
 [Service]
 MemoryHigh=12M
 Slice=TEST-55-OOMD-workload.slice
-ExecStart=stress --timeout 3m --vm 10 --vm-bytes 200M --vm-keep --vm-stride 1
+ExecStart=stress-ng --timeout 3m --vm 10 --vm-bytes 200M --vm-keep
index b04ebca7e21c982631dfeea0e2f34d3f032eb3d9..944067c5413043e3821267005b9cc7ae92d0c98d 100755 (executable)
@@ -6,14 +6,6 @@ set -o pipefail
 # shellcheck source=test/units/util.sh
  . "$(dirname "$0")"/util.sh
 
-. /etc/os-release
-# OpenSUSE does not have the stress tool packaged. It does have stress-ng but the stress-ng does not support
-# --vm-stride which this test uses.
-if [[ "$ID" =~ "opensuse" ]]; then
-    echo "Skipping due to missing stress package in OpenSUSE" >>/skipped
-    exit 77
-fi
-
 systemd-analyze log-level debug
 
 # Ensure that the init.scope.d drop-in is applied on boot