[LTP] [PATCH] realtime: Fix removal of autotools
Andrea Cervesato
andrea.cervesato@suse.com
Fri Sep 26 09:58:38 CEST 2025
Ups?
Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>
On 9/25/25 3:54 PM, Cyril Hrubis wrote:
> From: Cyril Hrubis <chrubis@suse.cz>
>
> When we removed the autotools from the realtime subdirectory we failed
> to remove the HAS_PRIORITY_INHERIT ifdefs from the source code.
>
> Closes: https://github.com/linux-test-project/ltp/issues/1264
>
> Fixes: a05298ec4494 ("testcases: realtime: Get rid of autotools")
> Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
> ---
> testcases/realtime/func/pi-tests/testpi-5.c | 5 -----
> testcases/realtime/lib/librttest.c | 4 ----
> testcases/realtime/stress/pi-tests/testpi-3.c | 2 --
> 3 files changed, 11 deletions(-)
>
> diff --git a/testcases/realtime/func/pi-tests/testpi-5.c b/testcases/realtime/func/pi-tests/testpi-5.c
> index 24bbb334c..80c83fa69 100644
> --- a/testcases/realtime/func/pi-tests/testpi-5.c
> +++ b/testcases/realtime/func/pi-tests/testpi-5.c
> @@ -69,8 +69,6 @@ int do_test(int argc, char **argv)
> pthread_mutexattr_t mutexattr;
> int retc, protocol;
>
> -#if HAS_PRIORITY_INHERIT
> -
> if (pthread_mutexattr_init(&mutexattr) != 0)
> printf("Failed to init mutexattr\n");
>
> @@ -91,9 +89,6 @@ int do_test(int argc, char **argv)
> join_threads();
>
> return 0;
> -#else
> - return 1;
> -#endif
> }
>
> #include "test-skeleton.c"
> diff --git a/testcases/realtime/lib/librttest.c b/testcases/realtime/lib/librttest.c
> index 99ce78b33..21ea57dec 100644
> --- a/testcases/realtime/lib/librttest.c
> +++ b/testcases/realtime/lib/librttest.c
> @@ -591,7 +591,6 @@ void *busy_work_us(int us)
>
> void init_pi_mutex(pthread_mutex_t * m)
> {
> -#if HAS_PRIORITY_INHERIT
> pthread_mutexattr_t attr;
> int ret;
> int protocol;
> @@ -614,9 +613,6 @@ void init_pi_mutex(pthread_mutex_t * m)
> if ((ret = pthread_mutex_init(m, &attr)) != 0) {
> printf("Failed to init mutex: %d (%s)\n", ret, strerror(ret));
> }
> -#endif
> -
> - /* FIXME: does any of this need to be destroyed ? */
> }
>
> /* Write the entirety of data. Complain if unable to do so. */
> diff --git a/testcases/realtime/stress/pi-tests/testpi-3.c b/testcases/realtime/stress/pi-tests/testpi-3.c
> index 70ec94513..8a3e7c731 100644
> --- a/testcases/realtime/stress/pi-tests/testpi-3.c
> +++ b/testcases/realtime/stress/pi-tests/testpi-3.c
> @@ -365,7 +365,6 @@ int main(int argc, char *argv[])
>
> printf("Start %s\n", argv[0]);
>
> -#if HAS_PRIORITY_INHERIT
> if (!nopi) {
> pthread_mutexattr_t mutexattr;
> int protocol;
> @@ -386,7 +385,6 @@ int main(int argc, char *argv[])
> printf("Failed to init mutex: %d\n", retc);
> }
> }
> -#endif
>
> startThread(&arg1);
> startThread(&arg2);
>
---
Andrea Cervesato
andrea.cervesato@suse.com
More information about the ltp
mailing list