diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-07-17 19:04:28 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-07-17 19:04:28 +0100 |
commit | 514d1bbe260df2521fe60f1a3ec87cfcfde1a829 (patch) | |
tree | 555c194dbeb0fb2ac4ad3cde7c0f6a80fd330ce2 /dev-util/rt-tests/files | |
parent | 4df3bf9762850b34cd1ead5c80374d1a0fc3362e (diff) |
gentoo resync : 17.07.2021
Diffstat (limited to 'dev-util/rt-tests/files')
-rw-r--r-- | dev-util/rt-tests/files/rt-tests-2.1-musl.patch (renamed from dev-util/rt-tests/files/rt-tests-1.10-musl.patch) | 153 |
1 files changed, 62 insertions, 91 deletions
diff --git a/dev-util/rt-tests/files/rt-tests-1.10-musl.patch b/dev-util/rt-tests/files/rt-tests-2.1-musl.patch index 2dc17d504922..caa8d415aad5 100644 --- a/dev-util/rt-tests/files/rt-tests-1.10-musl.patch +++ b/dev-util/rt-tests/files/rt-tests-2.1-musl.patch @@ -14,23 +14,21 @@ With these changes applied, the rt-tests seem to run fine. Signed-off-by: Kurt Kanzenbach <kurt@kmk-computers.de> --- - Makefile | 5 -- - src/backfire/sendme.c | 1 + - src/cyclictest/cyclictest.c | 70 ++++----------------------- - src/hackbench/hackbench.c | 4 +- - src/include/musl.h | 28 +++++++++++ - src/lib/rt-utils.c | 1 + - src/pi_tests/classic_pi.c | 2 + - src/pi_tests/tst-mutexpi10.c | 2 + - src/pmqtest/pmqtest.c | 1 + - src/ptsematest/ptsematest.c | 1 + - src/rt-migrate-test/rt-migrate-test.c | 1 + - src/sched_deadline/cyclicdeadline.c | 2 + - 12 files changed, 51 insertions(+), 67 deletions(-) + Makefile | 5 -- + src/backfire/sendme.c | 1 + src/cyclictest/cyclictest.c | 70 ++++------------------------------ + src/hackbench/hackbench.c | 4 + + src/include/musl.h | 28 +++++++++++++ + src/lib/rt-utils.c | 1 + src/pi_tests/classic_pi.c | 2 + src/pi_tests/tst-mutexpi10.c | 2 + src/pmqtest/pmqtest.c | 1 + src/ptsematest/ptsematest.c | 1 + src/rt-migrate-test/rt-migrate-test.c | 1 + src/sched_deadline/cyclicdeadline.c | 1 + 12 files changed, 50 insertions(+), 67 deletions(-) create mode 100644 src/include/musl.h -diff --git a/Makefile b/Makefile -index 636f1914a777..01732ee2647f 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,6 @@ OBJDIR = bld @@ -49,7 +47,7 @@ index 636f1914a777..01732ee2647f 100644 src/ptsematest/ptsematest.8 \ src/rt-migrate-test/rt-migrate-test.8 \ src/sigwaittest/sigwaittest.8 \ -@@ -130,9 +128,6 @@ deadline_test: $(OBJDIR)/deadline_test.o $(OBJDIR)/librttest.a +@@ -130,9 +128,6 @@ deadline_test: $(OBJDIR)/deadline_test.o signaltest: $(OBJDIR)/signaltest.o $(OBJDIR)/librttest.a $(OBJDIR)/librttestnuma.a $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(RTTESTLIB) $(RTTESTNUMA) @@ -59,31 +57,27 @@ index 636f1914a777..01732ee2647f 100644 hwlatdetect: src/hwlatdetect/hwlatdetect.py chmod +x src/hwlatdetect/hwlatdetect.py ln -s src/hwlatdetect/hwlatdetect.py hwlatdetect -diff --git a/src/backfire/sendme.c b/src/backfire/sendme.c -index d963723b1c93..b355bbbcfece 100644 --- a/src/backfire/sendme.c +++ b/src/backfire/sendme.c -@@ -31,6 +31,7 @@ +@@ -29,6 +29,7 @@ + #include <string.h> + #include <time.h> #include <errno.h> ++#include "musl.h" #include "rt-utils.h" #include "rt-get_cpu.h" -+#include "musl.h" - #include <utmpx.h> - #include <sys/types.h> -diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c -index f38c453f1975..b6b91218f756 100644 --- a/src/cyclictest/cyclictest.c +++ b/src/cyclictest/cyclictest.c -@@ -37,6 +37,7 @@ - - #include "rt-utils.h" - #include "rt-numa.h" +@@ -33,6 +33,7 @@ + #include <sys/utsname.h> + #include <sys/mman.h> + #include <sys/syscall.h> +#include "musl.h" + #include "rt_numa.h" - #include <bionic.h> - -@@ -500,12 +501,8 @@ static void *timerthread(void *param) + #include "rt-utils.h" +@@ -502,12 +503,8 @@ static void *timerthread(void *param) { struct thread_param *par = param; struct sched_param schedp; @@ -96,7 +90,7 @@ index f38c453f1975..b6b91218f756 100644 struct thread_stat *stat = par->stats; int stopped = 0; cpu_set_t mask; -@@ -536,14 +533,6 @@ static void *timerthread(void *param) +@@ -538,14 +535,6 @@ static void *timerthread(void *param) sigaddset(&sigset, par->signal); sigprocmask(SIG_BLOCK, &sigset, NULL); @@ -111,7 +105,7 @@ index f38c453f1975..b6b91218f756 100644 memset(&schedp, 0, sizeof(schedp)); schedp.sched_priority = par->prio; if (setscheduler(0, par->policy, &schedp)) -@@ -598,20 +587,6 @@ static void *timerthread(void *param) +@@ -600,20 +589,6 @@ static void *timerthread(void *param) stop = now; stop.tv_sec += duration; } @@ -132,7 +126,7 @@ index f38c453f1975..b6b91218f756 100644 stat->threadstarted++; -@@ -619,16 +594,10 @@ static void *timerthread(void *param) +@@ -621,16 +596,10 @@ static void *timerthread(void *param) uint64_t diff; unsigned long diff_smi = 0; @@ -150,7 +144,7 @@ index f38c453f1975..b6b91218f756 100644 case MODE_CLOCK_NANOSLEEP: if (par->timermode == TIMER_ABSTIME) { ret = clock_nanosleep(par->clock, TIMER_ABSTIME, -@@ -749,11 +718,6 @@ static void *timerthread(void *param) +@@ -751,11 +720,6 @@ static void *timerthread(void *param) next.tv_sec += interval.tv_sec; next.tv_nsec += interval.tv_nsec; @@ -162,7 +156,7 @@ index f38c453f1975..b6b91218f756 100644 tsnorm(&next); while (tsgreater(&now, &next)) { -@@ -778,17 +742,6 @@ out: +@@ -780,17 +744,6 @@ out: pthread_mutex_unlock(&refresh_on_max_lock); } @@ -180,7 +174,7 @@ index f38c453f1975..b6b91218f756 100644 /* close msr file */ if (smi) close(par->msr_fd); -@@ -1159,7 +1112,8 @@ static void process_options(int argc, char *argv[], int max_cpus) +@@ -1174,7 +1127,8 @@ static void process_options(int argc, ch case OPT_VERBOSE: verbose = 1; break; case 'x': case OPT_POSIX_TIMERS: @@ -190,7 +184,7 @@ index f38c453f1975..b6b91218f756 100644 case '?': case OPT_HELP: display_help(0); break; -@@ -1192,13 +1146,6 @@ static void process_options(int argc, char *argv[], int max_cpus) +@@ -1207,13 +1161,6 @@ static void process_options(int argc, ch } } @@ -203,8 +197,8 @@ index f38c453f1975..b6b91218f756 100644 - /* if smp wasn't requested, test for numa automatically */ if (!smp) { - if (numa_initialize()) -@@ -1881,7 +1828,6 @@ int main(int argc, char **argv) + numa = numa_initialize(); +@@ -1943,7 +1890,6 @@ int main(int argc, char **argv) } @@ -212,7 +206,7 @@ index f38c453f1975..b6b91218f756 100644 mode = use_nanosleep + use_system; sigemptyset(&sigset); -@@ -1931,16 +1877,18 @@ int main(int argc, char **argv) +@@ -1993,16 +1939,18 @@ int main(int argc, char **argv) void *stack; void *currstk; size_t stksize; @@ -234,8 +228,6 @@ index f38c453f1975..b6b91218f756 100644 stksize = PTHREAD_STACK_MIN * 2; /* allocate memory for a stack on appropriate node */ -diff --git a/src/hackbench/hackbench.c b/src/hackbench/hackbench.c -index 268c23233004..bbbb29a3a430 100644 --- a/src/hackbench/hackbench.c +++ b/src/hackbench/hackbench.c @@ -24,13 +24,15 @@ @@ -255,9 +247,6 @@ index 268c23233004..bbbb29a3a430 100644 static unsigned int datasize = 100; static unsigned int loops = 100; static unsigned int num_groups = 10; -diff --git a/src/include/musl.h b/src/include/musl.h -new file mode 100644 -index 000000000000..ea5075e768c8 --- /dev/null +++ b/src/include/musl.h @@ -0,0 +1,28 @@ @@ -289,20 +278,16 @@ index 000000000000..ea5075e768c8 + syscall(SYS_sched_setscheduler, pid, policy, param) + +#endif /* _MUSL_H_ */ -diff --git a/src/lib/rt-utils.c b/src/lib/rt-utils.c -index 2d68d62cd875..529d427c8084 100644 --- a/src/lib/rt-utils.c +++ b/src/lib/rt-utils.c -@@ -23,6 +23,7 @@ +@@ -24,6 +24,7 @@ + #include <time.h> + #include <sys/time.h> + ++#include "musl.h" #include "rt-utils.h" #include "rt-sched.h" - #include "error.h" -+#include "musl.h" - - #define TRACEBUFSIZ 1024 - -diff --git a/src/pi_tests/classic_pi.c b/src/pi_tests/classic_pi.c -index 64af8890276f..bb088d3973b2 100644 + #include "rt-error.h" --- a/src/pi_tests/classic_pi.c +++ b/src/pi_tests/classic_pi.c @@ -34,6 +34,8 @@ @@ -314,8 +299,6 @@ index 64af8890276f..bb088d3973b2 100644 /* test timeout */ #define TIMEOUT 2 -diff --git a/src/pi_tests/tst-mutexpi10.c b/src/pi_tests/tst-mutexpi10.c -index 97a345edd26e..1028d344edff 100644 --- a/src/pi_tests/tst-mutexpi10.c +++ b/src/pi_tests/tst-mutexpi10.c @@ -35,6 +35,8 @@ @@ -327,55 +310,43 @@ index 97a345edd26e..1028d344edff 100644 /* test timeout */ #define TIMEOUT 2 -diff --git a/src/pmqtest/pmqtest.c b/src/pmqtest/pmqtest.c -index 5f7a24d55db6..555679cf36ef 100644 --- a/src/pmqtest/pmqtest.c +++ b/src/pmqtest/pmqtest.c @@ -24,6 +24,7 @@ - #include "rt-utils.h" - #include "rt-get_cpu.h" - #include "error.h" -+#include "musl.h" - #include <pthread.h> + #include <inttypes.h> -diff --git a/src/ptsematest/ptsematest.c b/src/ptsematest/ptsematest.c -index 2e392299fdc4..b45d35755865 100644 ++#include "musl.h" + #include "rt-utils.h" + #include "rt-get_cpu.h" + #include "rt-error.h" --- a/src/ptsematest/ptsematest.c +++ b/src/ptsematest/ptsematest.c @@ -22,6 +22,7 @@ - #include "rt-utils.h" - #include "rt-get_cpu.h" - #include "error.h" -+#include "musl.h" - #include <pthread.h> + #include <inttypes.h> -diff --git a/src/rt-migrate-test/rt-migrate-test.c b/src/rt-migrate-test/rt-migrate-test.c -index 9bf716c9178c..f51d388d9150 100644 ++#include "musl.h" + #include "rt-utils.h" + #include "rt-get_cpu.h" + #include "rt-error.h" --- a/src/rt-migrate-test/rt-migrate-test.c +++ b/src/rt-migrate-test/rt-migrate-test.c -@@ -25,6 +25,7 @@ - #include <sched.h> - #include <pthread.h> - #include "rt-utils.h" +@@ -27,6 +27,7 @@ + + #include <linux/unistd.h> + +#include "musl.h" + #include "rt-utils.h" int nr_tasks; - int lfd; -diff --git a/src/sched_deadline/cyclicdeadline.c b/src/sched_deadline/cyclicdeadline.c -index 98eb367248ac..45b27f72a5a7 100644 --- a/src/sched_deadline/cyclicdeadline.c +++ b/src/sched_deadline/cyclicdeadline.c -@@ -34,6 +34,8 @@ - #include <rt-sched.h> - #include <error.h> +@@ -30,6 +30,7 @@ + #include <linux/unistd.h> + #include <linux/magic.h> +#include "musl.h" -+ - #define _STR(x) #x - #define STR(x) _STR(x) - #ifndef MAXPATH --- -2.26.2 - + #include "rt-utils.h" + #include "rt-sched.h" + #include "rt-error.h" |