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

Krzysztof Kozlowski krzysztof.kozlowski at canonical.com
Wed Jun 30 11:38:36 UTC 2021


On 30/06/2021 13:27, Po-Hsu Lin wrote:
> 
> On Mon, Jun 28, 2021 at 3:52 PM Krzysztof Kozlowski <krzysztof.kozlowski at canonical.com> wrote:
>>
>> 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)
>>
> Hi Krzysztof,
> 
> code below will conflict with the existing patch command above.

I thought I removed it... my bad.

> 
> Also, there is another tricky part is that we kinda "freeze" the LTP
> repo for ESM releases like trusty (b938c86be UBUNTU: SAUCE:
> ubuntu_ltp_syscalls: use a fixed SHA1 for ESM releases) since they're
> not going to receive any other non-CVE related patches. By doing so
> it can help us to narrow down failing cases that we need to fix on
> these ESM releases, otherwise we can alway expect to see newer test
> cases failing on them.
> (And we might need to do this for Xenial as well.)

How about then mirroring the LTP repo and having dedicated (obvious)
branches for xenial and current testing? Rebasing patches would be also
much easier. Usually rebase and cherry-pick can work around significant
hunk differences. Manual patching - cannot.

> Some of your patches cannot be applied on top of LTP de9dd02b:
> * 0007-lib-memutils-don-t-pollute-entire-system-memory-to-a.patch
> * 0008-controllers-memcg-accept-range-of-max_usage_in_bytes.patch
> * 0009-controllers-memcg-accept-range-of-usage_in_bytes.patch
> * 0010-controllers-memcg-accept-non-zero-max_usage_in_bytes.patch
> * 0011-controllers-memcg-increase-memory-limit-in-subgroup-.patch
> 
> We can fix this by tailoring which patch should be applied, or fast
> forward the tip we use on ESM series, but these changes here are
> mostly for other tests (not for syscalls), not sure if it worth it
> to spend more time on this?

I think the easiest would be to have the same code for all of them -
ubuntu_ltp, ltp_syscalls and ltp_stable. Managing two or three separate
patchsets is additional effort.


Best regards,
Krzysztof



More information about the kernel-team mailing list