diff mbox series

[ACT,v2] UBUNTU: SAUCE: ubuntu_ltp_syscalls: skip semctl09 on older Glibc

Message ID 20210609140240.85342-1-krzysztof.kozlowski@canonical.com
State New
Headers show
Series [ACT,v2] UBUNTU: SAUCE: ubuntu_ltp_syscalls: skip semctl09 on older Glibc | expand

Commit Message

Krzysztof Kozlowski June 9, 2021, 2:02 p.m. UTC
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 is fixed in Glibc
v2.33.  Blacklist it if current libc is older.

BugLink: https://bugs.launchpad.net/bugs/1910312
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>

---

Changes since v1:
1. v2.34 -> 2.33, following Sam's advice.
---
 ubuntu_ltp_syscalls/testcase_blacklist.py  | 11 ++++++++++-
 ubuntu_ltp_syscalls/ubuntu_ltp_syscalls.py | 11 +++++++++++
 2 files changed, 21 insertions(+), 1 deletion(-)

Comments

Po-Hsu Lin June 10, 2021, 6:36 a.m. UTC | #1
Looking good!
Acked-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Applied and pushed.

Thanks
Sam
diff mbox series

Patch

diff --git a/ubuntu_ltp_syscalls/testcase_blacklist.py b/ubuntu_ltp_syscalls/testcase_blacklist.py
index 3718a7d6485a..d9face73746a 100644
--- a/ubuntu_ltp_syscalls/testcase_blacklist.py
+++ b/ubuntu_ltp_syscalls/testcase_blacklist.py
@@ -35,5 +35,14 @@  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 commit 574500a108be ("sysvipc: Fix SEM_STAT_ANY kernel argument pass [BZ #26637]")
+        # in glibc v2.33
+        '2.33': {
+            'semctl09 semctl09': {
+                'comment': 'semctl09 will not get fixed for glibc < 2.33 (lp: 1910312)',
+            },
+        },
+    },
 }
diff --git a/ubuntu_ltp_syscalls/ubuntu_ltp_syscalls.py b/ubuntu_ltp_syscalls/ubuntu_ltp_syscalls.py
index 8107fdefc485..b6b09246393b 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):