Compare commits

...

8 Commits

Author SHA1 Message Date
openharmony_ci
bd864ea871 !939 refactor: sysroot部件化
Merge pull request !939 from Zhaotianyu/cherry-pick-1658840206
2022-07-26 15:40:34 +00:00
arvinzzz
e7c1633f00 fixed 1568c31 from https://gitee.com/arvinzzz/kernel_liteos_a/pulls/934
refactor: sysroot部件化
close: #I5HF8S

Signed-off-by: arvinzzz <zhaotianyu9@huawei.com>
Change-Id: I727b10c3b419fc71e228f5ad92abc107e756bbac
2022-07-26 12:56:47 +00:00
openharmony_ci
5e70129199 !917 【OpenHarmony开源贡献者计划2022】fix warning: unused variable
Merge pull request !917 from rtos_ming/unused
2022-07-04 01:24:28 +00:00
zhumingxian
089376994a fix warning: unused variable
Signed-off-by: zhumingxian <zhumingxian@ohos.com.cn>
2022-06-30 20:49:50 +08:00
openharmony_ci
12adfd5832 !915 【OpenHarmony开源贡献者计划2022】Fixed typos.
Merge pull request !915 from Mr_YX/master
2022-06-30 06:11:01 +00:00
openharmony_ci
c46c5a640d !905 「OpenHarmony贡献者计划2022」update signal_test_020.cpp
Merge pull request !905 from Mr_YX/master
2022-06-30 06:09:18 +00:00
mr-yx
c812b0c27b fixed typos
Signed-off-by: mr-yx <496043997@qq.com>
2022-06-28 23:48:24 +08:00
Mr_YX
0164461b33 Signed-off-by: mr-yx <496043997@qq.com> 2022-06-20 15:16:02 +00:00
20 changed files with 34 additions and 106 deletions

View File

@@ -323,7 +323,7 @@ group("liteos_a") {
deps += [
":apps",
":tests",
"//prebuilts/lite/sysroot/build:strip",
"//third_party/musl/scripts/build_lite:strip",
]
if (liteos_skip_make == false) {
deps += [ ":make" ]

View File

@@ -121,7 +121,7 @@ sysroot:
$(HIDE)echo "sysroot:" $(abspath $(SYSROOT_PATH))
ifeq ($(origin SYSROOT_PATH),file)
$(HIDE)mkdir -p $(SYSROOT_PATH)/build && cd $(SYSROOT_PATH)/build && \
ln -snf $(LITEOSTOPDIR)/../../prebuilts/lite/sysroot/build/Makefile && \
ln -snf $(LITEOSTOPDIR)/../../third_party/musl/scripts/build_lite/Makefile && \
$(MAKE) TARGETS=liteos_a_user \
ARCH=$(ARCH) \
TARGET=$(LOSCFG_LLVM_TARGET) \

View File

@@ -42,7 +42,7 @@ copy("copy_mksh_src") {
build_ext_component("build_mksh") {
deps = [ ":copy_mksh_src" ]
deps += [ "//prebuilts/lite/sysroot" ]
deps += [ "//third_party/musl:sysroot_lite" ]
exec_path = rebase_path("$target_out_dir/mksh_build")
cflags = [

View File

@@ -51,7 +51,7 @@ build_ext_component("build_toybox") {
":copy_toybox_config",
":copy_toybox_src",
]
deps += [ "//prebuilts/lite/sysroot" ]
deps += [ "//third_party/musl:sysroot_lite" ]
exec_path = rebase_path("$target_out_dir/toybox_build")
cflags = [

View File

@@ -67,7 +67,7 @@ static UINT32 Testcase(VOID)
/*
* Check to make sure that 'value_ptr' that was passed to
* pthread_join() and the pthread_exit() return code that
* was used in the thread funciton are the same.
* was used in the thread function are the same.
*/
ICUNIT_ASSERT_EQUAL(valuePtr, PTHREAD_EXIT_VALUE, errno);

View File

@@ -31,7 +31,7 @@
#include "it_test_signal.h"
#include "signal.h"
static void SigHandler(int sig) // <EFBFBD>źŴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
static void SigHandler(int sig) // źŴ
{
if (sig == SIGINT) {
printf("SIGINT sig\n");
@@ -74,8 +74,8 @@ static int TestSigSuspend()
if (retValue != 0) {
exit(retValue);
}
printf("newset 1 = %x\n", newset.__bits[0]);
printf("old 1 = %x\n", old.__bits[0]);
printf("newset 1 = %lx\n", newset.__bits[0]);
printf("old 1 = %lx\n", old.__bits[0]);
retValue = sigemptyset(&newset);
if (retValue != 0) {
@@ -89,8 +89,8 @@ static int TestSigSuspend()
if (retValue != 0) {
exit(retValue);
}
printf("newset 2 = %x\n", newset.__bits[0]);
printf("old 2 = %x\n", old.__bits[0]);
printf("newset 2 = %lx\n", newset.__bits[0]);
printf("old 2 = %lx\n", old.__bits[0]);
retValue = sigemptyset(&newset);
if (retValue != 0) {
@@ -105,8 +105,8 @@ static int TestSigSuspend()
if (retValue != 0) {
exit(retValue);
}
printf("newset 1 = %x\n", newset.__bits[0]);
printf("old 1 = %x\n", old.__bits[0]);
printf("newset 1 = %lx\n", newset.__bits[0]);
printf("old 1 = %lx\n", old.__bits[0]);
retValue = sigemptyset(&wait);
if (retValue != 0) {
@@ -116,7 +116,7 @@ static int TestSigSuspend()
if (retValue != 0) {
exit(retValue);
}
printf("wait = %x\n", wait.__bits[0]);
printf("wait = %lx\n", wait.__bits[0]);
if (sigsuspend(&wait) != -1) {
printf("sigsuspend error\n");
@@ -126,14 +126,14 @@ static int TestSigSuspend()
if (retValue != 0) {
exit(retValue);
}
printf("old 2= %x\n", old.__bits[0]);
printf("old 2= %lx\n", old.__bits[0]);
sigset_t pending;
retValue = sigemptyset(&pending);
if (retValue != 0) {
exit(retValue);
}
printf("pending 1= %x\n", pending.__bits[0]);
printf("pending 1= %lx\n", pending.__bits[0]);
retValue = raise(SIGINT);
if (retValue != 0) {
exit(retValue);
@@ -142,7 +142,7 @@ static int TestSigSuspend()
if (retValue != 0) {
exit(retValue);
}
printf("pending 2= %x\n", pending.__bits[0]);
printf("pending 2= %lx\n", pending.__bits[0]);
retValue = raise(SIGALRM);
if (retValue != 0) {
@@ -152,7 +152,7 @@ static int TestSigSuspend()
if (retValue != 0) {
exit(retValue);
}
printf("pending 3= %x\n", pending.__bits[0]);
printf("pending 3= %lx\n", pending.__bits[0]);
exit(0);
}
@@ -192,8 +192,8 @@ static int TestSigSuspend()
if (retValue != 0) {
exit(retValue);
}
printf("new 1 = %x\n", new1.__bits[0]);
printf("old 1 = %x\n", old1.__bits[0]);
printf("new 1 = %lx\n", new1.__bits[0]);
printf("old 1 = %lx\n", old1.__bits[0]);
retValue = kill(getpid(), SIGINT);
if (retValue != 0) {
@@ -203,7 +203,7 @@ static int TestSigSuspend()
if (retValue != 0) {
exit(retValue);
}
printf("raise 1 = %x\n", new1.__bits[0]);
printf("raise 1 = %lx\n", new1.__bits[0]);
exit(0);
}

View File

@@ -60,7 +60,7 @@ static UINT32 Testcase(VOID)
/*
* Check to make sure that 'value_ptr' that was passed to
* pthread_join() and the pthread_exit() return code that
* was used in the thread funciton are the same.
* was used in the thread function are the same.
*/
ICUNIT_ASSERT_EQUAL(valuePtr, PTHREAD_EXIT_VALUE, errno);

View File

@@ -64,12 +64,8 @@ EXIT:
static int Testcase(void)
{
struct sched_param param = { 0 };
int ret;
void *res = nullptr;
pthread_attr_t a = { 0 };
pthread_t thread = pthread_self();
pthread_t newPthread, newPthread1;
pthread_t newPthread;
pthread_mutexattr_t mutex;
int index = 0;
pthread_mutexattr_settype(&mutex, PTHREAD_MUTEX_NORMAL);

View File

@@ -65,10 +65,8 @@ static int Testcase(void)
{
struct sched_param param = { 0 };
int ret;
void *res = nullptr;
pthread_attr_t a = { 0 };
pthread_t thread = pthread_self();
pthread_t newPthread, newPthread1;
pthread_t newPthread;
pthread_mutexattr_t mutex;
int index = 0;
int currThreadPri, currThreadPolicy;

View File

@@ -74,12 +74,9 @@ static int Testcase(void)
{
struct sched_param param = { 0 };
int ret;
void *res = nullptr;
pthread_attr_t a = { 0 };
pthread_t thread = pthread_self();
pthread_t newPthread, newPthread1;
pthread_t newPthread;
pthread_mutexattr_t mutex;
int count = 0;
int currThreadPri, currThreadPolicy;
g_preTaskPri = 0xffffffff;

View File

@@ -49,8 +49,6 @@ static void *ThreadFuncTest3(void *a)
int ret;
int tid = Gettid();
pthread_t thread = pthread_self();
int currThreadPri, currThreadPolicy;
struct sched_param param = { 0 };
ret = pthread_detach(thread);
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT);
@@ -124,14 +122,10 @@ EXIT:
static int Testcase(void)
{
struct sched_param param = { 0 };
int ret;
void *res = nullptr;
pthread_attr_t a = { 0 };
pthread_t thread = pthread_self();
pthread_t newPthread, newPthread1;
pthread_t newPthread;
pthread_mutexattr_t mutex;
int index = 0;
pthread_mutexattr_settype(&mutex, PTHREAD_MUTEX_NORMAL);
pthread_mutex_init(&g_muxLock001, &mutex);
pthread_mutex_init(&g_muxLock002, &mutex);

View File

@@ -49,8 +49,6 @@ static void *ThreadFuncTest3(void *a)
int ret;
int tid;
pthread_t thread = pthread_self();
int currThreadPri, currThreadPolicy;
struct sched_param param = { 0 };
ret = pthread_detach(thread);
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT);
@@ -126,14 +124,10 @@ EXIT:
static int Testcase(void)
{
struct sched_param param = { 0 };
int ret;
void *res = nullptr;
pthread_attr_t a = { 0 };
pthread_t thread = pthread_self();
pthread_t newPthread, newPthread1;
pthread_t newPthread;
pthread_mutexattr_t mutex;
int index = 0;
pthread_mutexattr_settype(&mutex, PTHREAD_MUTEX_NORMAL);
pthread_mutex_init(&g_muxLock001, &mutex);
pthread_mutex_init(&g_muxLock002, &mutex);

View File

@@ -48,8 +48,6 @@ static void *ThreadFuncTest3(void *a)
{
int ret;
int tid = Gettid();
int currThreadPri, currThreadPolicy;
struct sched_param param = { 0 };
pthread_t thread = pthread_self();
ret = pthread_detach(thread);
@@ -118,18 +116,14 @@ static void *ThreadFuncTest1(void *a)
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT);
EXIT:
return nullptr;
return nullptr;
}
static int Testcase(void)
{
struct sched_param param = { 0 };
int ret;
void *res = nullptr;
pthread_attr_t a = { 0 };
pthread_t newPthread, newPthread1;
pthread_t newPthread;
pthread_mutexattr_t mutex;
int index = 0;
pthread_mutexattr_settype(&mutex, PTHREAD_MUTEX_NORMAL);
pthread_mutex_init(&g_mutexLock001, &mutex);
pthread_mutex_init(&g_mutexLock002, &mutex);

View File

@@ -43,7 +43,6 @@ static void *ThreadFuncTest3(void *a)
{
int ret;
pthread_t thread = pthread_self();
int currThreadPri, currThreadPolicy;
struct sched_param param = { 0 };
struct timespec time;
struct timeval timeVal = { 0 };
@@ -62,7 +61,7 @@ static void *ThreadFuncTest3(void *a)
g_testToCount003++;
while (g_testToCount002 == 0) {
SLEEP_AND_YIELD(2); // 2, delay enouge time
SLEEP_AND_YIELD(2); // 2, delay enough time
}
ret = pthread_mutex_unlock(&g_muxLock003);
@@ -96,7 +95,7 @@ static void *ThreadFuncTest2(void *a)
g_testToCount002++;
while (g_testToCount001 == 0) {
SLEEP_AND_YIELD(2); // 2, delay enouge time
SLEEP_AND_YIELD(2); // 2, delay enough time
}
ret = pthread_mutex_unlock(&g_muxLock002);
@@ -141,12 +140,8 @@ EXIT:
static int Testcase(void)
{
struct sched_param param = { 0 };
int ret;
void *res = nullptr;
pthread_attr_t a = { 0 };
pthread_t thread = pthread_self();
pthread_t newPthread, newPthread1;
pthread_t newPthread;
pthread_mutexattr_t mutex = { 0 };
int index = TEST_COUNT;

View File

@@ -41,8 +41,6 @@ static void *ThreadFuncTest3(void *a)
{
int ret;
pthread_t thread = pthread_self();
int currThreadPri, currThreadPolicy;
struct sched_param param = { 0 };
struct timespec time;
struct timeval timeVal = { 0 };
@@ -120,12 +118,8 @@ EXIT:
static int Testcase(void)
{
struct sched_param param = { 0 };
int ret;
void *res = nullptr;
pthread_attr_t a = { 0 };
pthread_t thread = pthread_self();
pthread_t newPthread, newPthread1;
pthread_t newPthread;
pthread_mutexattr_t mutex;
int index = TEST_COUNT;

View File

@@ -38,7 +38,6 @@ static int g_testBackCount = 0;
static void *ThreadFuncTest3(void *a)
{
int ret;
int tid = Gettid();
pthread_t thread = pthread_self();
ret = pthread_detach(thread);
@@ -59,8 +58,6 @@ EXIT:
static void *ThreadFuncTest2(void *a)
{
int ret;
int tid = Gettid();
pthread_t thread = pthread_self();
g_testBackCount++;
ret = pthread_mutex_lock(&g_mutexLock);
@@ -78,10 +75,8 @@ static int TestCase(void)
{
struct sched_param param = { 0 };
int ret;
void *res = nullptr;
int currThreadPri, currThreadPolicy;
pthread_attr_t a = { 0 };
pthread_t thread = pthread_self();
pthread_t newPthread;
pthread_mutexattr_t mutex;
pthread_mutexattr_settype(&mutex, PTHREAD_MUTEX_NORMAL);

View File

@@ -45,8 +45,6 @@ static void *ThreadFuncTest2(void *a)
{
int ret;
pthread_t thread = pthread_self();
struct timespec time;
struct timeval timeVal = { 0 };
ret = pthread_detach(thread);
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT);
@@ -69,7 +67,6 @@ EXIT:
static void *ThreadFuncTest1(void *a)
{
int ret;
pthread_t thread = pthread_self();
struct timespec time;
struct timeval timeVal = { 0 };
@@ -106,9 +103,7 @@ static int Testcase(void)
struct sched_param param = { 0 };
int ret;
int threadCount;
void *res = nullptr;
pthread_attr_t a = { 0 };
pthread_t thread = pthread_self();
pthread_t newPthread[10], newPthread1;
pthread_mutexattr_t mutex;
int index = TEST_COUNT;

View File

@@ -45,8 +45,6 @@ static void *ThreadFuncTest2(void *a)
{
int ret;
pthread_t thread = pthread_self();
struct timespec time;
struct timeval timeVal = { 0 };
ret = pthread_detach(thread);
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT);
@@ -69,9 +67,6 @@ EXIT:
static void *ThreadFuncTest1(void *a)
{
int ret;
pthread_t thread = pthread_self();
struct timespec time;
struct timeval timeVal = { 0 };
ret = pthread_mutex_lock(&g_muxLock001);
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT);
@@ -96,7 +91,6 @@ EXIT:
static void *ThreadFuncTest0(void *a)
{
int ret;
pthread_t thread = pthread_self();
struct timespec time;
struct timeval timeVal = { 0 };
@@ -136,9 +130,7 @@ static int Testcase(void)
struct sched_param param = { 0 };
int ret;
int threadCount;
void *res = nullptr;
pthread_attr_t a = { 0 };
pthread_t thread = pthread_self();
pthread_t newPthread[10], newPthread1;
pthread_mutexattr_t mutex;
int index = TEST_COUNT;

View File

@@ -45,8 +45,6 @@ static void *ThreadFuncTest2(void *a)
{
int ret;
pthread_t thread = pthread_self();
struct timespec time;
struct timeval timeVal = { 0 };
ret = pthread_detach(thread);
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT);
@@ -69,9 +67,6 @@ EXIT:
static void *ThreadFuncTest1(void *a)
{
int ret;
pthread_t thread = pthread_self();
struct timespec time;
struct timeval timeVal = { 0 };
ret = pthread_mutex_lock(&g_muxLock001);
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT);
@@ -96,7 +91,6 @@ EXIT:
static void *ThreadFuncTest0(void *a)
{
int ret;
pthread_t thread = pthread_self();
struct timespec time;
struct timeval timeVal = { 0 };
@@ -136,9 +130,7 @@ static int Testcase(void)
struct sched_param param = { 0 };
int ret;
int threadCount;
void *res = nullptr;
pthread_attr_t a = { 0 };
pthread_t thread = pthread_self();
pthread_t newPthread[10], newPthread1;
pthread_mutexattr_t mutex;
int index = TEST_COUNT;

View File

@@ -45,8 +45,6 @@ static void *ThreadFuncTest2(void *a)
{
int ret;
pthread_t thread = pthread_self();
struct timespec time;
struct timeval timeVal = { 0 };
ret = pthread_detach(thread);
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT);
@@ -69,9 +67,6 @@ EXIT:
static void *ThreadFuncTest1(void *a)
{
int ret;
pthread_t thread = pthread_self();
struct timespec time;
struct timeval timeVal = { 0 };
ret = pthread_mutex_lock(&g_muxLock001);
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT);
@@ -96,7 +91,6 @@ EXIT:
static void *ThreadFuncTest0(void *a)
{
int ret;
pthread_t thread = pthread_self();
struct timespec time;
struct timeval timeVal = { 0 };
@@ -136,9 +130,7 @@ static int Testcase(void)
struct sched_param param = { 0 };
int ret;
int threadCount;
void *res = nullptr;
pthread_attr_t a = { 0 };
pthread_t thread = pthread_self();
pthread_t newPthread[10], newPthread1;
pthread_mutexattr_t mutex;
int index = TEST_COUNT;