[ACT][PATCH 2/3] UBUNTU: SAUCE: ubuntu_ltp_syscalls: import pending LTP patches for several failures

Krzysztof Kozlowski krzysztof.kozlowski at canonical.com
Mon Jun 28 07:52:16 UTC 2021


Few patches to upstream LTP project are pending for longer time (2-3
weeks).  Either the discussion is on-going (and not necessarily going
anywhere like in case of controllers/memcg patches) or they are ignored.

These patches fix real test issues, so apply them here.  The patchset
contains fixes for ubuntu_ltp and ubuntu_ltp_syscalls, because it is
easier to keep one set.

Move the existing syscalls "UBUNTU: SAUCE: skip fanotify09 test #2 for
older kernels" to same folder and share it with ubuntu_ltp to keep
out-of-tree patches consistent.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski at canonical.com>
---
 ...p-fanotify09-test-2-for-older-kernel.patch |  0
 ubuntu_ltp/ubuntu_ltp.py                      |  2 ++
 ubuntu_ltp_syscalls/patches                   |  1 +
 ubuntu_ltp_syscalls/ubuntu_ltp_syscalls.py    | 34 +++++++++++++++++++
 4 files changed, 37 insertions(+)
 rename {ubuntu_ltp_syscalls => ubuntu_ltp/patches}/0001-skip-fanotify09-test-2-for-older-kernel.patch (100%)
 create mode 120000 ubuntu_ltp_syscalls/patches

diff --git a/ubuntu_ltp_syscalls/0001-skip-fanotify09-test-2-for-older-kernel.patch b/ubuntu_ltp/patches/0001-skip-fanotify09-test-2-for-older-kernel.patch
similarity index 100%
rename from ubuntu_ltp_syscalls/0001-skip-fanotify09-test-2-for-older-kernel.patch
rename to ubuntu_ltp/patches/0001-skip-fanotify09-test-2-for-older-kernel.patch
diff --git a/ubuntu_ltp/ubuntu_ltp.py b/ubuntu_ltp/ubuntu_ltp.py
index 3b89d21d2c92..9d0f96d4730c 100644
--- a/ubuntu_ltp/ubuntu_ltp.py
+++ b/ubuntu_ltp/ubuntu_ltp.py
@@ -13,6 +13,8 @@ class ubuntu_ltp(test.test):
     version = 1
     patches = [
         # Each element is also a list of patch title (user printable) and relative path to patch from bindir
+        ['UBUNTU: SAUCE: skip fanotify09 test #2 for older kernels',
+         'patches/0001-skip-fanotify09-test-2-for-older-kernel.patch'],
         ['controllers/cpuacct: skip cpuacct_100_100 on small memory systems',
          'patches/0001-controllers-cpuacct-skip-cpuacct_100_100-on-small-me.patch'],
         ['include/tst_pid.h: fix language typo (subtraction)',
diff --git a/ubuntu_ltp_syscalls/patches b/ubuntu_ltp_syscalls/patches
new file mode 120000
index 000000000000..bd31461cfab9
--- /dev/null
+++ b/ubuntu_ltp_syscalls/patches
@@ -0,0 +1 @@
+../ubuntu_ltp/patches
\ No newline at end of file
diff --git a/ubuntu_ltp_syscalls/ubuntu_ltp_syscalls.py b/ubuntu_ltp_syscalls/ubuntu_ltp_syscalls.py
index b6b09246393b..1f8bbfee46d0 100644
--- a/ubuntu_ltp_syscalls/ubuntu_ltp_syscalls.py
+++ b/ubuntu_ltp_syscalls/ubuntu_ltp_syscalls.py
@@ -22,6 +22,35 @@ except Exception, e:
 
 class ubuntu_ltp_syscalls(test.test):
     version = 1
+    patches = [
+        # Each element is also a list of patch title (user printable) and relative path to patch from bindir
+        ['UBUNTU: SAUCE: skip fanotify09 test #2 for older kernels',
+         'patches/0001-skip-fanotify09-test-2-for-older-kernel.patch'],
+        ['controllers/cpuacct: skip cpuacct_100_100 on small memory systems',
+         'patches/0001-controllers-cpuacct-skip-cpuacct_100_100-on-small-me.patch'],
+        ['include/tst_pid.h: fix language typo (subtraction)',
+         'patches/0002-include-tst_pid.h-fix-language-typo-subtraction.patch'],
+        ['syscalls/msgstress04: fix fork failure on small memory systems',
+         'patches/0003-syscalls-msgstress04-fix-fork-failure-on-small-memor.patch'],
+        ['syscalls/msgstress03: fix fork failure on small memory systems',
+         'patches/0004-syscalls-msgstress03-fix-fork-failure-on-small-memor.patch'],
+        ['syscalls/msgstress: tune limit of processes for small machines',
+         'patches/0005-syscalls-msgstress-tune-limit-of-processes-for-small.patch'],
+        ['patches/device-drivers/cpufreq_boost: skip test on virtual machines',
+         'patches/0006-device-drivers-cpufreq_boost-skip-test-on-virtual-ma.patch'],
+        ['lib: memutils: don\'t pollute entire system memory to avoid OoM',
+         'patches/0007-lib-memutils-don-t-pollute-entire-system-memory-to-a.patch'],
+        ['controllers/memcg: accept range of max_usage_in_bytes/memcg: accept range of max_usage_in_bytes',
+         'patches/0008-controllers-memcg-accept-range-of-max_usage_in_bytes.patch'],
+        ['controllers/memcg: accept range of usage_in_bytes',
+         'patches/0009-controllers-memcg-accept-range-of-usage_in_bytes.patch'],
+        ['controllers/memcg: accept non-zero max_usage_in_bytes after reset',
+          'patches/0010-controllers-memcg-accept-non-zero-max_usage_in_bytes.patch'],
+        ['controllers/memcg: increase memory limit in subgroup charge',
+         'patches/0011-controllers-memcg-increase-memory-limit-in-subgroup-.patch'],
+        ['tpci: accept ENOMEM resource failure with virtio-pci',
+         'patches/0012-tpci-accept-ENOMEM-resource-failure-with-virtio-pci.patch'],
+    ]
 
     def install_required_pkgs(self):
         arch = platform.processor()
@@ -42,6 +71,7 @@ class ubuntu_ltp_syscalls(test.test):
             'libselinux1-dev',
             'libssl-dev',
             'libtirpc-dev',
+            'patchutils',
             'pkg-config',
             'quota',
             'virt-what',
@@ -97,6 +127,10 @@ class ubuntu_ltp_syscalls(test.test):
         print("Patching fanotify09 for older kernels...")
         utils.system('patch -N -p1 < %s/0001-skip-fanotify09-test-2-for-older-kernel.patch' % self.bindir)
 
+        for patch in self.patches:
+            print("Patching with: %s" % patch[0])
+            utils.system('patch -p1 < %s/%s' % (self.bindir, patch[1]))
+
         # Disable NTFS as we disable RW support
         cmd = 'sed -i /ntfs/d lib/tst_supported_fs_types.c'
         utils.system_output(cmd)
-- 
2.27.0




More information about the kernel-team mailing list