Message ID | 20210607152313.76054-2-krzysztof.kozlowski@canonical.com |
---|---|
State | New |
Headers | show |
Series | [ACT,1/3] UBUNTU: SAUCE: ubuntu_ltp_syscalls: drop unneeded pass | expand |
Hi Krzysztof, I gave this a try, it will blacklist the semctl09 test correctly with older libc version. However I found out that on Hirsute with glibc = 2.33 this test will pass, we might need to check our libc source code to see which version we have this patch backported. So that we can blacklist it more precisely. Thanks Sam On Mon, Jun 7, 2021 at 11:23 PM Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> wrote: > > The semctl09 fails: > > tst_test.c:1261: TINFO: Timeout per run is 0h 05m 00s > semctl09.c:70: TINFO: Test libc semctl() > semctl09.c:132: TINFO: Test SEM_STAT_ANY with nobody user > semctl09.c:148: TFAIL: SEM_STAT_ANY doesn't pass the buffer specified by the caller to kernel > semctl09.c:132: TINFO: Test SEM_STAT_ANY with root user > semctl09.c:148: TFAIL: SEM_STAT_ANY doesn't pass the buffer specified by the caller to kernel > > The test depends on Glibc commit 574500a108be ("sysvipc: Fix > SEM_STAT_ANY kernel argument pass [BZ #26637]") which should be fixed > around Glibc v2.34. Blacklist it if current libc is older. > > BugLink: https://bugs.launchpad.net/bugs/1910312 > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> > --- > ubuntu_ltp_syscalls/testcase_blacklist.py | 10 +++++++++- > ubuntu_ltp_syscalls/ubuntu_ltp_syscalls.py | 11 +++++++++++ > 2 files changed, 20 insertions(+), 1 deletion(-) > > diff --git a/ubuntu_ltp_syscalls/testcase_blacklist.py b/ubuntu_ltp_syscalls/testcase_blacklist.py > index 3718a7d6485a..2705c583a501 100644 > --- a/ubuntu_ltp_syscalls/testcase_blacklist.py > +++ b/ubuntu_ltp_syscalls/testcase_blacklist.py > @@ -35,5 +35,13 @@ blacklist_db = { > 'copy_file_range02 copy_file_range02': { > 'comment': 'copy_file_range02 will not get fixed < 5.2.0 (https://lwn.net/Articles/774114)'} > } > - } > + }, > + 'libc': { > + # Coming with 574500a108be1d2a6a0dc97a075c9e0a98371aba > + '2.34': { > + 'semctl09 semctl09': { > + 'comment': 'semctl09 will not get fixed for glibc < 2.34 (lp: 1910312)', > + }, > + }, > + }, > } > diff --git a/ubuntu_ltp_syscalls/ubuntu_ltp_syscalls.py b/ubuntu_ltp_syscalls/ubuntu_ltp_syscalls.py > index 5d99195908aa..296a8aa33777 100644 > --- a/ubuntu_ltp_syscalls/ubuntu_ltp_syscalls.py > +++ b/ubuntu_ltp_syscalls/ubuntu_ltp_syscalls.py > @@ -72,6 +72,7 @@ class ubuntu_ltp_syscalls(test.test): > self.series = distro.codename() > self.flavour = re.split('-\d*-', platform.uname()[2])[-1] > self.kernel = platform.uname()[2].split('-')[0] > + self.libc = platform.libc_ver()[1] > > # setup > # > @@ -132,6 +133,16 @@ class ubuntu_ltp_syscalls(test.test): > if StrictVersion(self.kernel) < StrictVersion(_kernel): > _blacklist += list(blacklist_db['kernel'][_kernel].keys()) > > + try: > + current_version = parse(self.libc) > + for _libc in blacklist_db['libc']: > + if current_version < parse(_libc): > + _blacklist += list(blacklist_db['libc'][_libc].keys()) > + except NameError: > + for _libc in blacklist_db['libc']: > + if StrictVersion(self.libc) < StrictVersion(_libc): > + _blacklist += list(blacklist_db['libc'][_libc].keys()) > + > return _blacklist > > def should_stop_timesyncd(self, test): > -- > 2.27.0 > > > -- > kernel-team mailing list > kernel-team@lists.ubuntu.com > https://lists.ubuntu.com/mailman/listinfo/kernel-team
On 09/06/2021 13:49, Po-Hsu Lin wrote: > Hi Krzysztof, > > I gave this a try, it will blacklist the semctl09 test correctly with > older libc version. > However I found out that on Hirsute with glibc = 2.33 this test will > pass, we might need to check our libc source code to see which version > we have this patch backported. > So that we can blacklist it more precisely. Oh, I think I wrongly interpreted `git describe --contains`. The commit is in v2.33 in Glibc Git repo, so I'll change the patch here. Thanks for testing! Best regards, Krzysztof
A newer version has been applied.
diff --git a/ubuntu_ltp_syscalls/testcase_blacklist.py b/ubuntu_ltp_syscalls/testcase_blacklist.py index 3718a7d6485a..2705c583a501 100644 --- a/ubuntu_ltp_syscalls/testcase_blacklist.py +++ b/ubuntu_ltp_syscalls/testcase_blacklist.py @@ -35,5 +35,13 @@ blacklist_db = { 'copy_file_range02 copy_file_range02': { 'comment': 'copy_file_range02 will not get fixed < 5.2.0 (https://lwn.net/Articles/774114)'} } - } + }, + 'libc': { + # Coming with 574500a108be1d2a6a0dc97a075c9e0a98371aba + '2.34': { + 'semctl09 semctl09': { + 'comment': 'semctl09 will not get fixed for glibc < 2.34 (lp: 1910312)', + }, + }, + }, } diff --git a/ubuntu_ltp_syscalls/ubuntu_ltp_syscalls.py b/ubuntu_ltp_syscalls/ubuntu_ltp_syscalls.py index 5d99195908aa..296a8aa33777 100644 --- a/ubuntu_ltp_syscalls/ubuntu_ltp_syscalls.py +++ b/ubuntu_ltp_syscalls/ubuntu_ltp_syscalls.py @@ -72,6 +72,7 @@ class ubuntu_ltp_syscalls(test.test): self.series = distro.codename() self.flavour = re.split('-\d*-', platform.uname()[2])[-1] self.kernel = platform.uname()[2].split('-')[0] + self.libc = platform.libc_ver()[1] # setup # @@ -132,6 +133,16 @@ class ubuntu_ltp_syscalls(test.test): if StrictVersion(self.kernel) < StrictVersion(_kernel): _blacklist += list(blacklist_db['kernel'][_kernel].keys()) + try: + current_version = parse(self.libc) + for _libc in blacklist_db['libc']: + if current_version < parse(_libc): + _blacklist += list(blacklist_db['libc'][_libc].keys()) + except NameError: + for _libc in blacklist_db['libc']: + if StrictVersion(self.libc) < StrictVersion(_libc): + _blacklist += list(blacklist_db['libc'][_libc].keys()) + return _blacklist def should_stop_timesyncd(self, test):
The semctl09 fails: tst_test.c:1261: TINFO: Timeout per run is 0h 05m 00s semctl09.c:70: TINFO: Test libc semctl() semctl09.c:132: TINFO: Test SEM_STAT_ANY with nobody user semctl09.c:148: TFAIL: SEM_STAT_ANY doesn't pass the buffer specified by the caller to kernel semctl09.c:132: TINFO: Test SEM_STAT_ANY with root user semctl09.c:148: TFAIL: SEM_STAT_ANY doesn't pass the buffer specified by the caller to kernel The test depends on Glibc commit 574500a108be ("sysvipc: Fix SEM_STAT_ANY kernel argument pass [BZ #26637]") which should be fixed around Glibc v2.34. Blacklist it if current libc is older. BugLink: https://bugs.launchpad.net/bugs/1910312 Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> --- ubuntu_ltp_syscalls/testcase_blacklist.py | 10 +++++++++- ubuntu_ltp_syscalls/ubuntu_ltp_syscalls.py | 11 +++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-)