diff options
| -rw-r--r-- | meta/recipes-extended/ltp/ltp/0001-sched_stress-Use-time_t-instead-of-long-for-type.patch | 54 | ||||
| -rw-r--r-- | meta/recipes-extended/ltp/ltp_20240129.bb | 1 |
2 files changed, 55 insertions, 0 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0001-sched_stress-Use-time_t-instead-of-long-for-type.patch b/meta/recipes-extended/ltp/ltp/0001-sched_stress-Use-time_t-instead-of-long-for-type.patch new file mode 100644 index 0000000000..ae8dc8706e --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0001-sched_stress-Use-time_t-instead-of-long-for-type.patch | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | From 74074f9a71c876d6e95c2d72702888dd2fabc761 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Mon, 6 May 2024 11:43:20 -0700 | ||
| 4 | Subject: [PATCH] sched_stress: Use time_t instead of long for type | ||
| 5 | |||
| 6 | This ensures it works across different architectures | ||
| 7 | Fixes | ||
| 8 | |||
| 9 | | sched_driver.c:744:43: error: passing argument 1 of 'ctime' from incompatible pointer type [-Wincompatible-pointer-types] | ||
| 10 | | 744 | printf("\nend time = %s\n", ctime(&end_time)); | ||
| 11 | | | ^~~~~~~~~ | ||
| 12 | |||
| 13 | With gcc-14 | ||
| 14 | |||
| 15 | Upstream-Status: Backport [https://github.com/linux-test-project/ltp/commit/0a682f1af42d8d261202821be580fe26d17ee9b7] | ||
| 16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 17 | --- | ||
| 18 | testcases/kernel/sched/sched_stress/sched_driver.c | 6 +++--- | ||
| 19 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
| 20 | |||
| 21 | diff --git a/testcases/kernel/sched/sched_stress/sched_driver.c b/testcases/kernel/sched/sched_stress/sched_driver.c | ||
| 22 | index 61573d788..5b8c187fe 100644 | ||
| 23 | --- a/testcases/kernel/sched/sched_stress/sched_driver.c | ||
| 24 | +++ b/testcases/kernel/sched/sched_stress/sched_driver.c | ||
| 25 | @@ -136,7 +136,7 @@ int debug = 0; | ||
| 26 | /* | ||
| 27 | * Function prototypes | ||
| 28 | */ | ||
| 29 | -void startup(long); | ||
| 30 | +void startup(time_t); | ||
| 31 | int start_testcase(char *, char *, char *, char *, char *, char *); | ||
| 32 | int process_slots_in_use(); | ||
| 33 | int available_user_process_slots(); | ||
| 34 | @@ -251,7 +251,7 @@ int main(int argc, char **argv) | ||
| 35 | * information to the screen and . It also initializes the * | ||
| 36 | * process id list and other global variables. * | ||
| 37 | *-----------------------------------------------------------------------*/ | ||
| 38 | -void startup(long start_time) | ||
| 39 | +void startup(time_t start_time) | ||
| 40 | { | ||
| 41 | char tempbuffer[50]; /* temporary buffer to hold names */ | ||
| 42 | |||
| 43 | @@ -734,7 +734,7 @@ void kill_short_term_testcases() | ||
| 44 | void finishup(start_time) | ||
| 45 | long start_time; /* starting time to calculate elapsed time */ | ||
| 46 | { | ||
| 47 | - long end_time; /* time when program finished */ | ||
| 48 | + time_t end_time; /* time when program finished */ | ||
| 49 | |||
| 50 | /* | ||
| 51 | * Get the end time and calculate elapsed time; write all this out | ||
| 52 | -- | ||
| 53 | 2.45.0 | ||
| 54 | |||
diff --git a/meta/recipes-extended/ltp/ltp_20240129.bb b/meta/recipes-extended/ltp/ltp_20240129.bb index e88e931a68..f8e6d3987e 100644 --- a/meta/recipes-extended/ltp/ltp_20240129.bb +++ b/meta/recipes-extended/ltp/ltp_20240129.bb | |||
| @@ -29,6 +29,7 @@ SRCREV = "68737d20556d37364c95776044b1119c0912a36a" | |||
| 29 | SRC_URI = "git://github.com/linux-test-project/ltp.git;branch=master;protocol=https \ | 29 | SRC_URI = "git://github.com/linux-test-project/ltp.git;branch=master;protocol=https \ |
| 30 | file://0001-Remove-OOM-tests-from-runtest-mm.patch \ | 30 | file://0001-Remove-OOM-tests-from-runtest-mm.patch \ |
| 31 | file://0001-scenario_groups-default-remove-connectors.patch \ | 31 | file://0001-scenario_groups-default-remove-connectors.patch \ |
| 32 | file://0001-sched_stress-Use-time_t-instead-of-long-for-type.patch \ | ||
| 32 | " | 33 | " |
| 33 | 34 | ||
| 34 | S = "${WORKDIR}/git" | 35 | S = "${WORKDIR}/git" |
