diff options
| -rw-r--r-- | meta/recipes-extended/ltp/ltp/0001-syscalls-semctl08-Skip-semctl08-when-__USE_TIME64_RE.patch | 48 | ||||
| -rw-r--r-- | meta/recipes-extended/ltp/ltp_20250130.bb | 3 |
2 files changed, 50 insertions, 1 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0001-syscalls-semctl08-Skip-semctl08-when-__USE_TIME64_RE.patch b/meta/recipes-extended/ltp/ltp/0001-syscalls-semctl08-Skip-semctl08-when-__USE_TIME64_RE.patch new file mode 100644 index 0000000000..b4859a6f0a --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0001-syscalls-semctl08-Skip-semctl08-when-__USE_TIME64_RE.patch | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | From 55b48d66857a43c2609fc351293b5601e2eb955d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Jiaying Song <jiaying.song.cn@windriver.com> | ||
| 3 | Date: Fri, 23 May 2025 15:17:49 +0800 | ||
| 4 | Subject: [PATCH] syscalls/semctl08: Skip semctl08 when __USE_TIME64_REDIRECTS | ||
| 5 | is defined | ||
| 6 | |||
| 7 | When __USE_TIME64_REDIRECTS is defined, glibc redirects struct semid_ds to a | ||
| 8 | 64-bit time-safe version that omits the sem_otime_high and sem_ctime_high | ||
| 9 | fields. As a result, the case becomes invalid and leads to incorrect behavior. | ||
| 10 | |||
| 11 | This patch adds a check to skip the test when __USE_TIME64_REDIRECTS is | ||
| 12 | defined, ensuring the test only runs when semid_ds structurally matches | ||
| 13 | semid64_ds and the *_high fields are accessible. | ||
| 14 | |||
| 15 | Upstream-Status: Submitted [https://lists.linux.it/pipermail/ltp/2025-May/043647.html] | ||
| 16 | |||
| 17 | Signed-off-by: Jiaying Song <jiaying.song.cn@windriver.com> | ||
| 18 | --- | ||
| 19 | testcases/kernel/syscalls/ipc/semctl/semctl08.c | 8 +++++--- | ||
| 20 | 1 file changed, 5 insertions(+), 3 deletions(-) | ||
| 21 | |||
| 22 | diff --git a/testcases/kernel/syscalls/ipc/semctl/semctl08.c b/testcases/kernel/syscalls/ipc/semctl/semctl08.c | ||
| 23 | index 1878bd4..3b799fa 100644 | ||
| 24 | --- a/testcases/kernel/syscalls/ipc/semctl/semctl08.c | ||
| 25 | +++ b/testcases/kernel/syscalls/ipc/semctl/semctl08.c | ||
| 26 | @@ -10,7 +10,11 @@ | ||
| 27 | #include "tst_test.h" | ||
| 28 | #include "libnewipc.h" | ||
| 29 | |||
| 30 | -#ifdef HAVE_SEMID64_DS_TIME_HIGH | ||
| 31 | +#if !defined(HAVE_SEMID64_DS_TIME_HIGH) | ||
| 32 | +TST_TEST_TCONF("test requires struct semid64_ds to have the time_high fields"); | ||
| 33 | +#elif defined(__USE_TIME64_REDIRECTS) | ||
| 34 | +TST_TEST_TCONF("test requires __USE_TIME64_REDIRECTS to be undefined"); | ||
| 35 | +#else | ||
| 36 | |||
| 37 | static void run(void) | ||
| 38 | { | ||
| 39 | @@ -47,6 +51,4 @@ static struct tst_test test = { | ||
| 40 | .test_all = run, | ||
| 41 | .needs_tmpdir = 1, | ||
| 42 | }; | ||
| 43 | -#else | ||
| 44 | -TST_TEST_TCONF("test requires struct semid64_ds to have the time_high fields"); | ||
| 45 | #endif | ||
| 46 | -- | ||
| 47 | 2.34.1 | ||
| 48 | |||
diff --git a/meta/recipes-extended/ltp/ltp_20250130.bb b/meta/recipes-extended/ltp/ltp_20250130.bb index fc643c2ab9..8de13c6000 100644 --- a/meta/recipes-extended/ltp/ltp_20250130.bb +++ b/meta/recipes-extended/ltp/ltp_20250130.bb | |||
| @@ -31,7 +31,8 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git;branch=master;protocol=ht | |||
| 31 | file://0001-Add-__clear_cache-declaration-for-clang.patch \ | 31 | file://0001-Add-__clear_cache-declaration-for-clang.patch \ |
| 32 | file://0001-kernel-kvm-don-t-hardcode-objcopy.patch \ | 32 | file://0001-kernel-kvm-don-t-hardcode-objcopy.patch \ |
| 33 | file://0001-cve-2015-3290-Disable-AVX-for-x86_64.patch \ | 33 | file://0001-cve-2015-3290-Disable-AVX-for-x86_64.patch \ |
| 34 | " | 34 | file://0001-syscalls-semctl08-Skip-semctl08-when-__USE_TIME64_RE.patch \ |
| 35 | " | ||
| 35 | 36 | ||
| 36 | inherit autotools-brokensep pkgconfig | 37 | inherit autotools-brokensep pkgconfig |
| 37 | 38 | ||
