-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
394 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
-- Licensed under the Apache License, Version 2.0 (the "License"); | ||
-- You may not use this file except in compliance with the License. | ||
-- You may obtain a copy of the License at | ||
-- | ||
-- http://www.apache.org/licenses/LICENSE-2.0 | ||
-- | ||
-- Unless required by applicable law or agreed to in writing, software | ||
-- distributed under the License is distributed on an "AS IS" BASIS, | ||
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
-- See the License for the specific language governing permissions and | ||
-- limitations under the License. | ||
-- | ||
-- Copyright (C) 2022-2023 RT-Thread Development Team | ||
-- | ||
-- @author xqyjlj | ||
-- @file xmake.lua | ||
-- | ||
-- Change Logs: | ||
-- Date Author Notes | ||
-- ------------ ---------- ----------------------------------------------- | ||
-- 2023-06-21 xqyjlj initial version | ||
-- | ||
|
||
add_rules("mode.debug", "mode.release") | ||
|
||
add_requires("rt-tests") | ||
|
||
target("rt-tests") | ||
do | ||
set_kind("phony") | ||
add_packages("rt-tests") | ||
end | ||
target_end() |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
diff --git a/Makefile b/Makefile | ||
index 5110357..569adc1 100644 | ||
--- a/Makefile | ||
+++ b/Makefile | ||
@@ -172,6 +172,7 @@ install: all install_hwlatdetect | ||
gzip -c src/cyclictest/cyclictest.8 >"$(DESTDIR)$(mandir)/man8/cyclictest.8.gz" | ||
gzip -c src/pi_tests/pi_stress.8 >"$(DESTDIR)$(mandir)/man8/pi_stress.8.gz" | ||
gzip -c src/ptsematest/ptsematest.8 >"$(DESTDIR)$(mandir)/man8/ptsematest.8.gz" | ||
+ gzip -c src/rt-migrate-test/rt-migrate-test.8 >"$(DESTDIR)$(mandir)/man8/rt-migrate-test.8.gz" | ||
gzip -c src/sigwaittest/sigwaittest.8 >"$(DESTDIR)$(mandir)/man8/sigwaittest.8.gz" | ||
gzip -c src/svsematest/svsematest.8 >"$(DESTDIR)$(mandir)/man8/svsematest.8.gz" | ||
gzip -c src/pmqtest/pmqtest.8 >"$(DESTDIR)$(mandir)/man8/pmqtest.8.gz" | ||
diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c | ||
index 00e5f3d..3f1bef1 100644 | ||
--- a/src/cyclictest/cyclictest.c | ||
+++ b/src/cyclictest/cyclictest.c | ||
@@ -927,10 +927,14 @@ static int has_smi_counter(void) | ||
case 0x56: /* BDX-DE */ | ||
case 0x4E: /* SKL */ | ||
case 0x5E: /* SKL */ | ||
+ case 0x8E: /* KBL */ | ||
+ case 0x9E: /* KBL */ | ||
+ case 0x55: /* SKX */ | ||
case 0x37: /* BYT */ | ||
case 0x4D: /* AVN */ | ||
case 0x4C: /* AMT */ | ||
case 0x57: /* PHI */ | ||
+ case 0x5C: /* BXT */ | ||
break; | ||
default: | ||
return 0; | ||
@@ -1684,7 +1688,6 @@ static void process_options (int argc, char *argv[], int max_cpus) | ||
case 'R': | ||
case OPT_RESOLUTION: | ||
check_clock_resolution = 1; break; | ||
- case 's': | ||
case OPT_SECALIGNED: | ||
secaligned = 1; | ||
if (optarg != NULL) | ||
@@ -1694,6 +1697,7 @@ static void process_options (int argc, char *argv[], int max_cpus) | ||
else | ||
offset = 0; | ||
break; | ||
+ case 's': | ||
case OPT_SYSTEM: | ||
use_system = MODE_SYS_OFFSET; break; | ||
case 'S': | ||
diff --git a/src/rt-migrate-test/rt-migrate-test.c b/src/rt-migrate-test/rt-migrate-test.c | ||
index d7b68dd..0a0bb77 100644 | ||
--- a/src/rt-migrate-test/rt-migrate-test.c | ||
+++ b/src/rt-migrate-test/rt-migrate-test.c | ||
@@ -20,9 +20,6 @@ | ||
* | ||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
*/ | ||
-#ifndef _GNU_SOURCE | ||
-#define _GNU_SOURCE | ||
-#endif | ||
#include <stdio.h> | ||
#ifndef __USE_XOPEN2K | ||
# define __USE_XOPEN2K |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c | ||
index 3f1bef1..dc33eca 100644 | ||
--- a/src/cyclictest/cyclictest.c | ||
+++ b/src/cyclictest/cyclictest.c | ||
@@ -25,7 +25,6 @@ | ||
#include <time.h> | ||
#include <errno.h> | ||
#include <limits.h> | ||
-#include <linux/unistd.h> | ||
|
||
#include <sys/prctl.h> | ||
#include <sys/stat.h> | ||
@@ -56,7 +55,7 @@ | ||
|
||
/* Ugly, but .... */ | ||
#define gettid() syscall(__NR_gettid) | ||
-#define sigev_notify_thread_id _sigev_un._tid | ||
+#define sigev_notify_thread_id __sev_fields.sigev_notify_thread_id | ||
|
||
#ifdef __UCLIBC__ | ||
#define MAKE_PROCESS_CPUCLOCK(pid, clock) \ | ||
@@ -1009,18 +1008,18 @@ static void *timerthread(void *param) | ||
sigprocmask(SIG_BLOCK, &sigset, NULL); | ||
|
||
if (par->mode == MODE_CYCLIC) { | ||
- sigev.sigev_notify = SIGEV_THREAD_ID | SIGEV_SIGNAL; | ||
+ sigev.sigev_notify = 4 | SIGEV_SIGNAL; | ||
sigev.sigev_signo = par->signal; | ||
- sigev.sigev_notify_thread_id = stat->tid; | ||
+ // sigev.sigev_notify_thread_id = stat->tid; | ||
timer_create(par->clock, &sigev, &timer); | ||
tspec.it_interval = interval; | ||
} | ||
|
||
memset(&schedp, 0, sizeof(schedp)); | ||
schedp.sched_priority = par->prio; | ||
- if (setscheduler(0, par->policy, &schedp)) | ||
- fatal("timerthread%d: failed to set priority to %d\n", | ||
- par->cpu, par->prio); | ||
+ if (setscheduler(0, par->policy, &schedp)) | ||
+ fatal("timerthread%d: failed to set priority to %d\n", | ||
+ par->cpu, par->prio); | ||
|
||
if(smi) { | ||
par->msr_fd = open_msr_file(par->cpu); | ||
@@ -1257,7 +1256,7 @@ out: | ||
close(par->msr_fd); | ||
/* switch to normal */ | ||
schedp.sched_priority = 0; | ||
- sched_setscheduler(0, SCHED_OTHER, &schedp); | ||
+ // sched_setscheduler(0, SCHED_OTHER, &schedp); | ||
stat->threadstarted = -1; | ||
|
||
return NULL; | ||
@@ -2195,8 +2194,8 @@ int main(int argc, char **argv) | ||
|
||
process_options(argc, argv, max_cpus); | ||
|
||
- if (check_privs()) | ||
- exit(EXIT_FAILURE); | ||
+ // if (check_privs()) | ||
+ // exit(EXIT_FAILURE); | ||
|
||
if (verbose) | ||
printf("Max CPUs = %d\n", max_cpus); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
diff --git a/Makefile b/Makefile | ||
index 569adc1..3fae87e 100644 | ||
--- a/Makefile | ||
+++ b/Makefile | ||
@@ -98,7 +98,7 @@ $(OBJDIR): | ||
mkdir $(OBJDIR) | ||
|
||
# Include dependency files, automatically generate them if needed. | ||
--include $(addprefix $(OBJDIR)/,$(sources:.c=.d)) | ||
+# -include $(addprefix $(OBJDIR)/,$(sources:.c=.d)) | ||
|
||
cyclictest: $(OBJDIR)/cyclictest.o $(OBJDIR)/librttest.a | ||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(RTTESTLIB) $(NUMA_LIBS) | ||
@@ -162,7 +162,7 @@ rebuild: | ||
$(MAKE) all | ||
|
||
.PHONY: install | ||
-install: all install_hwlatdetect | ||
+install: install_hwlatdetect | ||
mkdir -p "$(DESTDIR)$(bindir)" "$(DESTDIR)$(mandir)/man4" | ||
mkdir -p "$(DESTDIR)$(srcdir)" "$(DESTDIR)$(mandir)/man8" | ||
cp $(TARGETS) "$(DESTDIR)$(bindir)" |
Oops, something went wrong.