NAK/cmnt: [ACT][PATCH 2/3] UBUNTU: SAUCE: ubuntu_ltp_syscalls: import pending LTP patches for several failures
Po-Hsu Lin
po-hsu.lin at canonical.com
Thu Jul 8 11:14:05 UTC 2021
On Wed, Jul 7, 2021 at 3:15 PM Krzysztof Kozlowski
<krzysztof.kozlowski at canonical.com> wrote:
>
> On 07/07/2021 08:08, Po-Hsu Lin wrote:
> > On Wed, Jun 30, 2021 at 7:38 PM Krzysztof Kozlowski
> > <krzysztof.kozlowski at canonical.com> wrote:
> >>
> >> 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.
> >
> > Hi Krzysztof,
> > after discussing this with Francis, we decided to:
> > 1. Host a mirror LTP repo from upstream
> > 2. Apply our SAUCE patch on top of it
> > 3. Use a script to do automatic pull and rebase periodically
> > 4. Change the SHA1 printing code in ubuntu_ltp* to print the first
> > SHA1 that is not a SAUCE patch
> > 5. We will keep an extra branch for ESM series, to help us filter
> > out know (and won't fix) issues.
> >
> > Thoughts?
> >
> > We will update the repo location in ubuntu_ltp* once it's ready.
> > Thanks
>
> Great! Let me know when I can refresh the patches (I have updates for
> the memcg limits) or optionally you can take them directly from:
> https://github.com/krzk/ltp
> branch: canonical-set
>
I have the LTP suite hosted on:
https://kernel.ubuntu.com/git/ubuntu/ltp.git/
And with all your changes in canonical-set branch on your github repo
applied, with a new branch called "sru" (With patch titles renamed, I
added "UBUNTU: SAUCE:" there)
I will work on the bits in autotest-client-tests.
Thanks
Sam
>
> Best regards,
> Krzysztof
More information about the kernel-team
mailing list