/kernel/liteos_m/testsuites/sample/posix/ |
D | pthread_func_test.c | 76 UINT32 ret; variable 81 ret = pthread_attr_init(&attr); 82 ICUNIT_ASSERT_EQUAL(ret, 0, ret); 84 ret = pthread_attr_setstacksize(&attr, OS_TSK_TEST_STACK_SIZE); 85 ICUNIT_ASSERT_EQUAL(ret, 0, ret); 88 ret = pthread_attr_setschedparam(&attr, &schedParam); 89 ICUNIT_ASSERT_EQUAL(ret, 0, ret); 91 ret = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED); 92 ICUNIT_ASSERT_EQUAL(ret, 0, ret); 94 ret = pthread_create(&newTh, &attr, PthreadJoinF01, NULL); [all …]
|
/kernel/liteos_m/testsuites/unittest/posix/src/pthread/ |
D | pthread_cond_func_test.c | 93 UINT32 ret; variable 98 ret = pthread_attr_init(&attr); 99 ICUNIT_ASSERT_EQUAL(ret, 0, ret); 101 ret = pthread_attr_setstacksize(&attr, OS_TSK_TEST_STACK_SIZE); 102 ICUNIT_ASSERT_EQUAL(ret, 0, ret); 105 ret = pthread_attr_setschedparam(&attr, &schedParam); 106 ICUNIT_ASSERT_EQUAL(ret, 0, ret); 108 ret = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED); 109 ICUNIT_ASSERT_EQUAL(ret, 0, ret); 111 ret = pthread_create(&newTh, &attr, pthread_join_f01, NULL); [all …]
|
/kernel/liteos_m/testsuites/unittest/xts/ipc/semaphone/ |
D | sem_test.c | 49 int ret; variable 56 ret = sem_init((sem_t *)&sem, 0, testValue[0]); 57 ICUNIT_ASSERT_EQUAL(ret, 0, ret); 59 ret = sem_destroy(&sem); 60 ICUNIT_ASSERT_EQUAL(ret, 0, ret); 67 int ret; variable 70 ret = sem_init((sem_t *)&sem, 0, 0); 71 ICUNIT_ASSERT_EQUAL(ret, 0, ret); 73 ret = sem_post(&sem); 74 ICUNIT_ASSERT_EQUAL(ret, 0, ret); [all …]
|
D | sem_xts_test.c | 52 int ret; variable 57 ret = sem_init(&sem, 0, testValue); 58 ICUNIT_ASSERT_NOT_EQUAL(ret, -1, ret); /* -1, common data for test, no special meaning */ 60 ret = sem_getvalue(&sem, &semValue); 61 ICUNIT_ASSERT_EQUAL(ret, 0, ret); 65 ret = sem_destroy(&sem); 66 ICUNIT_ASSERT_EQUAL(ret, 0, ret); 77 int ret; variable 82 ret = sem_init(&sem, 0, testValue); 83 ICUNIT_ASSERT_NOT_EQUAL(ret, -1, ret); /* -1, common data for test, no special meaning */ [all …]
|
/kernel/liteos_a/testsuites/unittest/security/reugid/smoke/ |
D | reugid_test_001.cpp | 47 int ret; in Child1() local 54 ret = getresgid(reinterpret_cast<gid_t *>(&ruid), reinterpret_cast<gid_t *>(&euid), in Child1() 56 ICUNIT_ASSERT_EQUAL(ret, 0, ret); in Child1() 66 ret = getresuid(reinterpret_cast<gid_t *>(&ruid), reinterpret_cast<gid_t *>(&euid), in Child1() 68 ICUNIT_ASSERT_EQUAL(ret, 0, ret); in Child1() 83 ret = setgroups(0, reinterpret_cast<gid_t *>(getList)); in Child1() 84 ICUNIT_ASSERT_EQUAL(ret, 0, ret); in Child1() 86 ret = getgroups(0, NULL); in Child1() 87 ICUNIT_ASSERT_EQUAL(ret, 1, ret); in Child1() 89 ret = getgroups(ret, reinterpret_cast<gid_t *>(getList)); in Child1() [all …]
|
/kernel/linux/linux-5.10/drivers/net/wireless/ti/wlcore/ |
D | init.c | 25 int ret, i; in wl1271_init_templates_config() local 29 ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID, in wl1271_init_templates_config() 33 if (ret < 0) in wl1271_init_templates_config() 34 return ret; in wl1271_init_templates_config() 36 ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID, in wl1271_init_templates_config() 40 if (ret < 0) in wl1271_init_templates_config() 41 return ret; in wl1271_init_templates_config() 44 ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID, in wl1271_init_templates_config() 49 if (ret < 0) in wl1271_init_templates_config() 50 return ret; in wl1271_init_templates_config() [all …]
|
/kernel/liteos_a/testsuites/unittest/net/socket/smoke/ |
D | net_socket_test_012.cpp | 44 int ret; in SocketNullTestInternal() local 55 ret = accept(sfd, NULL, NULL); in SocketNullTestInternal() 56 LogPrintln("accept: %d, errno=%d", ret, errno); in SocketNullTestInternal() 57 ICUNIT_ASSERT_EQUAL(ret, -1, errno); in SocketNullTestInternal() 59 ret = accept(sfd, NULL, &addrlen); in SocketNullTestInternal() 60 LogPrintln("accept: %d, errno=%d", ret, errno); in SocketNullTestInternal() 61 ICUNIT_ASSERT_EQUAL(ret, -1, errno); in SocketNullTestInternal() 63 ret = accept(sfd, bad, &zero); in SocketNullTestInternal() 64 LogPrintln("accept: %d, errno=%d", ret, errno); in SocketNullTestInternal() 65 ICUNIT_ASSERT_EQUAL(ret, -1, errno); in SocketNullTestInternal() [all …]
|
D | net_socket_test_007.cpp | 41 int ret; in TcpTest() local 48 …ret = bind(lsfd, reinterpret_cast<const struct sockaddr *>(INVALID_USER_ADDR), sizeof(struct socka… in TcpTest() 49 ICUNIT_ASSERT_EQUAL(ret, -1, ret); in TcpTest() 51 …ret = bind(lsfd, reinterpret_cast<const struct sockaddr *>(INVALID_KERNEL_ADDR), sizeof(struct soc… in TcpTest() 52 ICUNIT_ASSERT_EQUAL(ret, -1, ret); in TcpTest() 54 …ret = connect(lsfd, reinterpret_cast<struct sockaddr *>(INVALID_USER_ADDR), sizeof(struct sockaddr… in TcpTest() 55 ICUNIT_ASSERT_EQUAL(ret, -1, ret); in TcpTest() 57 …ret = connect(lsfd, reinterpret_cast<struct sockaddr *>(INVALID_KERNEL_ADDR), sizeof(struct sockad… in TcpTest() 58 ICUNIT_ASSERT_EQUAL(ret, -1, ret); in TcpTest() 60 ret = accept(lsfd, reinterpret_cast<struct sockaddr *>(INVALID_USER_ADDR), in TcpTest() [all …]
|
/kernel/linux/linux-5.10/fs/btrfs/tests/ |
D | free-space-tests.c | 22 int ret = 0; in test_extents() local 27 ret = btrfs_add_free_space(cache, 0, SZ_4M); in test_extents() 28 if (ret) { in test_extents() 29 test_err("error adding initial extents %d", ret); in test_extents() 30 return ret; in test_extents() 33 ret = btrfs_remove_free_space(cache, 0, SZ_4M); in test_extents() 34 if (ret) { in test_extents() 35 test_err("error removing extent %d", ret); in test_extents() 36 return ret; in test_extents() 45 ret = btrfs_add_free_space(cache, 0, SZ_4M); in test_extents() [all …]
|
/kernel/linux/linux-5.10/drivers/net/wireless/ti/wl1251/ |
D | init.c | 20 int ret; in wl1251_hw_init_hwenc_config() local 22 ret = wl1251_acx_feature_cfg(wl, 0); in wl1251_hw_init_hwenc_config() 23 if (ret < 0) { in wl1251_hw_init_hwenc_config() 25 return ret; in wl1251_hw_init_hwenc_config() 28 ret = wl1251_acx_default_key(wl, wl->default_key); in wl1251_hw_init_hwenc_config() 29 if (ret < 0) { in wl1251_hw_init_hwenc_config() 31 return ret; in wl1251_hw_init_hwenc_config() 39 int ret; in wl1251_hw_init_templates_config() local 43 ret = wl1251_cmd_template_set(wl, CMD_PROBE_REQ, NULL, in wl1251_hw_init_templates_config() 45 if (ret < 0) in wl1251_hw_init_templates_config() [all …]
|
/kernel/liteos_a/testsuites/unittest/process/basic/pthread/full/ |
D | pthread_test_004.cpp | 41 int ret; in ThreadFunc8() local 43 ret = pthread_detach(pthread); in ThreadFunc8() 44 ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT); in ThreadFunc8() 46 ret = pthread_spin_lock(&g_spinTestLock); in ThreadFunc8() 47 ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT); in ThreadFunc8() 49 ret = pthread_spin_unlock(&g_spinTestLock); in ThreadFunc8() 50 ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT); in ThreadFunc8() 59 int ret; in ThreadFunc7() local 65 ret = pthread_detach(pthread); in ThreadFunc7() 66 ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT); in ThreadFunc7() [all …]
|
/kernel/linux/linux-5.10/sound/soc/qcom/ |
D | lpass-hdmi.c | 26 unsigned int ret; in lpass_hdmi_daiops_hw_params() local 77 ret = regmap_field_write(drvdata->tx_ctl->soft_reset, LPASS_TX_CTL_RESET); in lpass_hdmi_daiops_hw_params() 78 if (ret) in lpass_hdmi_daiops_hw_params() 79 return ret; in lpass_hdmi_daiops_hw_params() 81 ret = regmap_field_write(drvdata->tx_ctl->soft_reset, LPASS_TX_CTL_CLEAR); in lpass_hdmi_daiops_hw_params() 82 if (ret) in lpass_hdmi_daiops_hw_params() 83 return ret; in lpass_hdmi_daiops_hw_params() 85 ret = regmap_field_write(drvdata->hdmitx_legacy_en, LPASS_HDMITX_LEGACY_DISABLE); in lpass_hdmi_daiops_hw_params() 86 if (ret) in lpass_hdmi_daiops_hw_params() 87 return ret; in lpass_hdmi_daiops_hw_params() [all …]
|
/kernel/liteos_m/testsuites/sample/posix/mutex/ |
D | It_posix_mutex_037.c | 38 int ret; in TaskF01() local 40 ret = pthread_mutex_trylock(&g_mutex038); in TaskF01() 41 ICUNIT_GOTO_NOT_EQUAL(ret, 0, ret, EXIT); in TaskF01() 43 ret = sem_post(&g_sem038); in TaskF01() 44 ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT); in TaskF01() 46 ret = pthread_mutex_lock(&g_mutex038); in TaskF01() 47 ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT); in TaskF01() 49 ret = sem_post(&g_sem038); in TaskF01() 50 ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT); in TaskF01() 52 ret = pthread_mutex_unlock(&g_mutex038); in TaskF01() [all …]
|
D | It_posix_mutex_043.c | 39 UINT32 ret; in TaskF01() local 40 ret = pthread_mutex_trylock(&g_mutex079); in TaskF01() 41 ICUNIT_TRACK_EQUAL(ret, 0, ret); in TaskF01() 43 ret = sem_wait(&g_sem079); in TaskF01() 44 ICUNIT_TRACK_EQUAL(ret, 0, ret); in TaskF01() 46 ret = pthread_mutex_unlock(&g_mutex079); in TaskF01() 47 ICUNIT_TRACK_EQUAL(ret, 0, ret); in TaskF01() 54 UINT32 ret; in TaskF02() local 56 ret = sem_post(&g_sem079); in TaskF02() 57 ICUNIT_TRACK_EQUAL(ret, 0, ret); in TaskF02() [all …]
|
/kernel/linux/linux-5.10/drivers/media/dvb-frontends/cxd2880/ |
D | cxd2880_tnrdmd.c | 207 int ret; in p_init1() local 212 ret = tnr_dmd->io->write_reg(tnr_dmd->io, in p_init1() 215 if (ret) in p_init1() 216 return ret; in p_init1() 233 ret = tnr_dmd->io->write_reg(tnr_dmd->io, in p_init1() 236 if (ret) in p_init1() 237 return ret; in p_init1() 240 ret = cxd2880_io_write_multi_regs(tnr_dmd->io, in p_init1() 244 if (ret) in p_init1() 245 return ret; in p_init1() [all …]
|
/kernel/liteos_m/testsuites/unittest/xts/ipc/msg_queue/ |
D | mq_test.c | 52 int ret; variable 60 …ret = sprintf_s(qName, sizeof(qName), "testMqOneLevelCom_%d", GetRandom(10000)); /* 10000, common … 61 ICUNIT_ASSERT_EQUAL(ret, strlen(qName), ret); 66 ret = mq_send(queue, MQ_MSG, MQ_MSG_LEN, MQ_MSG_PRIO); 67 ICUNIT_ASSERT_EQUAL(ret, 0, ret); 69 ret = mq_getattr(queue, &getAttr); 70 ICUNIT_ASSERT_EQUAL(ret, 0, ret); 74 ret = mq_receive(queue, rMsg, getAttr.mq_msgsize, &prio); 75 ICUNIT_ASSERT_NOT_EQUAL(ret, -1, ret); /* -1, common data for test, no special meaning */ 78 ret = strncmp(MQ_MSG, rMsg, MQ_MSG_LEN); [all …]
|
D | mq_exp_test.c | 52 int ret; variable 59 …ret = sprintf_s(qName, MQ_NAME_LEN, "testMqReceiveEAGAIN_%d", GetRandom(10000)); /* 10000, common … 60 ICUNIT_ASSERT_EQUAL(ret, strlen(qName), ret); 65 ret = mq_send(queue, MQ_MSG, MQ_MSG_LEN, MQ_MSG_PRIO); 66 ICUNIT_ASSERT_EQUAL(ret, 0, ret); 67 ret = mq_getattr(queue, &getAttr); 68 ICUNIT_ASSERT_EQUAL(ret, 0, ret); 69 ret = mq_receive(queue, rMsg, getAttr.mq_msgsize, &prio); 70 ICUNIT_ASSERT_NOT_EQUAL(ret, -1, ret); /* -1, common data for test, no special meaning */ 71 ret = strncmp(MQ_MSG, rMsg, MQ_MSG_LEN); [all …]
|
/kernel/liteos_m/testsuites/unittest/xts/io/ |
D | xts_io_stdlib_test.c | 53 float ret = strtof(" -3.40E+38 hello", &endPtr); variable 54 ICUNIT_ASSERT_EQUAL(ret, (float)(-3.40E+38), ret); 57 ret = strtof(" 3.40E+38 ===", &endPtr); 58 ICUNIT_ASSERT_EQUAL(ret, (float)(3.40E+38), ret); 61 ret = strtof("-9.6e17 this 123", &endPtr); 62 ICUNIT_ASSERT_EQUAL(ret, (float)(-9.6e17), ret); 65 ret = strtof("this is string", &endPtr); 66 ICUNIT_ASSERT_EQUAL(ret, 0, ret); 79 double ret = strtod(" -1.79E+308 hello", &endPtr); variable 80 ICUNIT_ASSERT_EQUAL(ret, -1.79E+308, ret); [all …]
|
D | xts_io_string_test.c | 52 int ret = strcmp("abcdef", "ABCDEF"); variable 53 ICUNIT_ASSERT_WITHIN_EQUAL(ret, 0, INT_MAX, ret); 55 ret = strcmp("123456", "654321"); 56 ICUNIT_ASSERT_WITHIN_EQUAL(ret, INT_MIN, 0, ret); 58 ret = strcmp("~!@#$%^&*()_+", "~!@#$%^&*()_+"); 59 ICUNIT_ASSERT_EQUAL(ret, 0, ret); 72 int ret = strncmp(dest, src, 1); /* 1 common data for test, no special meaning */ variable 73 ICUNIT_ASSERT_WITHIN_EQUAL(ret, 0, INT_MAX, ret); 75 ret = strncmp("123456", "654321", 6); /* 6 common data for test, no special meaning */ 76 ICUNIT_ASSERT_WITHIN_EQUAL(ret, INT_MIN, 0, ret); [all …]
|
/kernel/liteos_a/testsuites/unittest/process/basic/process/smp/ |
D | process_test_smp_008.cpp | 35 int ret; in PthreadTest01() local 40 ret = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset); in PthreadTest01() 41 ICUNIT_GOTO_EQUAL(ret, 0, ret, ERROR_OUT1); in PthreadTest01() 44 ret = pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset); in PthreadTest01() 45 ICUNIT_GOTO_EQUAL(ret, 0, ret, ERROR_OUT1); in PthreadTest01() 46 ret = (CPU_ISSET(0, &cpuset)) > 0 ? 1 : 0; in PthreadTest01() 47 ICUNIT_GOTO_EQUAL(ret, 1, ret, ERROR_OUT1); in PthreadTest01() 48 ret = (CPU_ISSET(1, &cpuset)) > 0 ? 1 : 0; in PthreadTest01() 49 ICUNIT_GOTO_EQUAL(ret, 0, ret, ERROR_OUT1); in PthreadTest01() 54 ret = sched_setaffinity(getpid(), sizeof(cpu_set_t), &cpuset); in PthreadTest01() [all …]
|
/kernel/liteos_a/testsuites/unittest/process/basic/process/full/ |
D | process_test_059.cpp | 40 int ret; in TestSpawnAttrDef() local 42 ret = sigemptyset(&signalset); in TestSpawnAttrDef() 43 ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT); in TestSpawnAttrDef() 45 ret = sigaddset(&signalset, SIGPIPE); in TestSpawnAttrDef() 46 ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT); in TestSpawnAttrDef() 48 ret = posix_spawnattr_setsigdefault(attr, &signalset); in TestSpawnAttrDef() 49 ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT); in TestSpawnAttrDef() 52 ret = memcmp(&signalset, &signalset1, sizeof(sigset_t)); in TestSpawnAttrDef() 53 ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT); in TestSpawnAttrDef() 55 ret = sigismember(&signalset, SIGPIPE); in TestSpawnAttrDef() [all …]
|
D | process_test_058.cpp | 40 int ret; in TestSpawnAttrDef() local 42 ret = sigemptyset(&signalset); in TestSpawnAttrDef() 43 ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT); in TestSpawnAttrDef() 45 ret = sigaddset(&signalset, SIGPIPE); in TestSpawnAttrDef() 46 ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT); in TestSpawnAttrDef() 48 ret = posix_spawnattr_setsigdefault(attr, &signalset); in TestSpawnAttrDef() 49 ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT); in TestSpawnAttrDef() 52 ret = memcmp(&signalset, &signalset1, sizeof(sigset_t)); in TestSpawnAttrDef() 53 ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT); in TestSpawnAttrDef() 55 ret = sigismember(&signalset, SIGPIPE); in TestSpawnAttrDef() [all …]
|
/kernel/linux/linux-5.10/drivers/media/i2c/ |
D | max9271.c | 26 int ret; in max9271_read() local 30 ret = i2c_smbus_read_byte_data(dev->client, reg); in max9271_read() 31 if (ret < 0) in max9271_read() 34 __func__, reg, ret); in max9271_read() 36 return ret; in max9271_read() 41 int ret; in max9271_write() local 45 ret = i2c_smbus_write_byte_data(dev->client, reg, val); in max9271_write() 46 if (ret < 0) in max9271_write() 49 __func__, reg, ret); in max9271_write() 51 return ret; in max9271_write() [all …]
|
/kernel/linux/linux-5.10/drivers/media/usb/dvb-usb/ |
D | af9005-fe.c | 52 int ret; in af9005_write_word_agc() local 54 if ((ret = af9005_write_ofdm_register(d, reglo, (u8) (value & 0xff)))) in af9005_write_word_agc() 55 return ret; in af9005_write_word_agc() 63 int ret; in af9005_read_word_agc() local 66 if ((ret = af9005_read_ofdm_register(d, reglo, &temp0))) in af9005_read_word_agc() 67 return ret; in af9005_read_word_agc() 68 if ((ret = af9005_read_ofdm_register(d, reghi, &temp1))) in af9005_read_word_agc() 69 return ret; in af9005_read_word_agc() 94 int ret; in af9005_is_fecmon_available() local 99 ret = af9005_read_register_bits(state->d, xd_p_fec_vtb_rsd_mon_en, in af9005_is_fecmon_available() [all …]
|
/kernel/liteos_m/testsuites/unittest/xts/ipc/cond/ |
D | pthread_cond_test.c | 55 int ret; variable 58 ret = pthread_condattr_init(&condAttr); 59 ICUNIT_ASSERT_EQUAL(ret, POSIX_IPC_NO_ERROR, ret); 62 ret = pthread_cond_init(&cond1, &condAttr); 63 ICUNIT_ASSERT_EQUAL(ret, POSIX_IPC_NO_ERROR, ret); 66 ret = pthread_cond_init(&cond2, NULL); 67 ICUNIT_ASSERT_EQUAL(ret, POSIX_IPC_NO_ERROR, ret); 78 int ret; variable 80 ret = pthread_condattr_init(&condAttr); 81 ICUNIT_ASSERT_EQUAL(ret, POSIX_IPC_NO_ERROR, ret); [all …]
|