本文整理汇总了C++中CYG_TEST_NA函数的典型用法代码示例。如果您正苦于以下问题:C++ CYG_TEST_NA函数的具体用法?C++ CYG_TEST_NA怎么用?C++ CYG_TEST_NA使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CYG_TEST_NA函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: main
int
main( int argc, char *argv[] )
{
CYG_TEST_INIT();
CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C "
"library atexit() function");
#if defined(CYGFUN_LIBC_ATEXIT)
// we only have one test in us! We can only exit once :-)
CYG_TEST_PASS_FAIL( atexit(&myfun3)==0,
"Simple registration of first atexit() function" );
CYG_TEST_PASS_FAIL( atexit(&myfun2)==0,
"Simple registration of second atexit() function" );
CYG_TEST_PASS_FAIL( atexit(&myfun1)==0,
"Simple registration of third atexit() function" );
return 0;
#else
CYG_TEST_NA("Testing is not applicable to this configuration");
CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C "
"library atexit() function");
#endif // if defined(CYGFUN_LIBC_ATEXIT)
} // main()
开发者ID:Palantir555,项目名称:ecos-mars-zx3,代码行数:31,代码来源:atexit.c
示例2: main
int main( int argc, char **argv )
{
CYG_TEST_INIT();
CYG_TEST_NA("stdio");
}
开发者ID:lijinlei,项目名称:Kernel_BOOX60,代码行数:7,代码来源:stdio.c
示例3: cyg_start
externC void
cyg_start( void )
{
CYG_TEST_INIT();
CYG_TEST_NA( "This test needs CYGVAR_KERNEL_COUNTERS_CLOCK "
"and CYGFUN_KERNEL_API_C" );
}
开发者ID:Palantir555,项目名称:ecos-mars-zx3,代码行数:7,代码来源:kalarm0.c
示例4: cyg_start
externC void
cyg_start( void )
{
CYG_TEST_INIT();
CYG_TEST_NA("This test needs DHCP enabled");
}
开发者ID:LucidOne,项目名称:Rovio,代码行数:7,代码来源:dns2.c
示例5: cyg_start
void
cyg_start(void)
{
CYG_TEST_INIT();
CYG_TEST_NA( NA_MSG );
CYG_TEST_FINISH("Done");
}
开发者ID:Palantir555,项目名称:ecos-mars-zx3,代码行数:7,代码来源:malloc2.c
示例6: cyg_start
externC void
cyg_start( void )
{
CYG_TEST_INIT();
CYG_TEST_NA("FP test requires:\n"
"CYGFUN_KERNEL_API_C && \n"
"CYGSEM_KERNEL_SCHED_MLQUEUE && \n"
"(CYGNUM_KERNEL_SCHED_PRIORITIES > 12)\n");
}
开发者ID:Joel397,项目名称:Ongoing_work_files,代码行数:9,代码来源:fptest.c
示例7: cyg_start
externC void
cyg_start( void )
{
CYG_TEST_INIT();
CYG_TEST_INFO("FP test requires:\n"
"CYGFUN_KERNEL_API_C && \n"
"CYGSEM_KERNEL_SCHED_MLQUEUE && \n"
"(CYGNUM_KERNEL_SCHED_PRIORITIES > 12) &&\n"
"(CYGMEM_REGION_ram_SIZE >= (49152-4096))\n");
CYG_TEST_NA("FP test requirements");
}
开发者ID:Palantir555,项目名称:ecos-mars-zx3,代码行数:11,代码来源:fptest.c
示例8: tcp_server
void
tcp_server(cyg_addrword_t param)
{
init_all_network_interfaces();
diag_printf("Start TCP server - test\n");
cyg_thread_resume(client_thread_handle); // Start it
#if NLOOP > 0
server();
CYG_TEST_PASS_FINISH( "server returned OK" );
#endif
CYG_TEST_NA( "No loopback devs" );
}
开发者ID:Joel397,项目名称:Ongoing_work_files,代码行数:12,代码来源:tcp_lo_test.c
示例9: main
int
main(int argc, char *argv[])
{
CYG_TEST_INIT();
CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
"rand() function");
test(0);
CYG_TEST_NA("Testing is not applicable to this configuration");
} // main()
开发者ID:EPiCS,项目名称:reconos_v2,代码行数:12,代码来源:rand1.c
示例10: entry0
static void entry0( cyg_addrword_t data )
{
int i;
unsigned long len;
int err;
int buf_size = sizeof(gzip_test_ref)+512;
unsigned char* unpacked = malloc(buf_size);
if (NULL == unpacked)
CYG_TEST_NA("Not enough memory for buffers");
CYG_TEST_INFO("Decompressing");
len = buf_size;
err = uncompress(unpacked, &len, gzip_test, sizeof(gzip_test));
switch (err) {
case Z_OK:
break;
case Z_MEM_ERROR:
CYG_TEST_NA("Not enough memory for decompression");
break;
case Z_BUF_ERROR:
CYG_TEST_FAIL_FINISH("Decompressed data larger than original");
break;
case Z_DATA_ERROR:
CYG_TEST_FAIL_FINISH("Decompression failed");
break;
default:
CYG_TEST_FAIL_FINISH("Unknown decompression error");
break;
}
for (i = 0; i < sizeof(gzip_test_ref)-1; i++) {
if (gzip_test_ref[i] != unpacked[i])
CYG_TEST_FAIL_FINISH("Verify failed");
}
CYG_TEST_PASS_FINISH("zlib2 OK");
}
开发者ID:roccozhang,项目名称:mleafboot,代码行数:39,代码来源:zlib2.c
示例11: main
int
main(int argc, char *argv[])
{
CYG_TEST_INIT();
CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
"strtok() function");
CYG_TEST_INFO("This testcase provides simple basic tests");
test(0);
CYG_TEST_NA("Testing is not applicable to this configuration");
} // main()
开发者ID:lijinlei,项目名称:Kernel_BOOX60,代码行数:13,代码来源:strtok.c
示例12: cyg_start
externC void
cyg_start( void )
{
CYG_TEST_INIT();
CYG_TEST_INFO("Timeslice test requires:\n"
"CYGSEM_KERNEL_SCHED_TIMESLICE &&\n"
"CYGFUN_KERNEL_API_C && \n"
"CYGSEM_KERNEL_SCHED_MLQUEUE &&\n"
"CYGVAR_KERNEL_COUNTERS_CLOCK &&\n"
"!CYGDBG_INFRA_DIAG_USE_DEVICE &&\n"
"(CYGNUM_KERNEL_SCHED_PRIORITIES > 12)\n");
CYG_TEST_NA("Timeslice test requirements");
}
开发者ID:SQGiggsHuang,项目名称:ecosgit,代码行数:13,代码来源:timeslice.c
示例13: cyg_start
externC void
cyg_start( void )
{
CYG_TEST_INIT();
// Attaching the ISR will not succeed if the kernel real-time
// clock has been configured in.
#ifndef CYGVAR_KERNEL_COUNTERS_CLOCK
intr_main();
#else
CYG_TEST_NA("Cannot override kernel real-time clock.");
#endif
}
开发者ID:0xCA5A,项目名称:dd-wrt,代码行数:17,代码来源:intr.c
示例14: main
int
main(int argc, char *argv[])
{
#if TEST_VALID
int i;
int r, prev, prevprev;
int how_many_periodics = 0;
#endif
CYG_TEST_INIT();
CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
"rand() function");
CYG_TEST_INFO("This test tests the distribution of random numbers and");
CYG_TEST_INFO("may take some time");
#if TEST_VALID
r = rand() % 2;
prev = r;
r = rand() % 2;
for (i = 0; i < TEST_LENGTH; ++i) {
prevprev = prev;
prev = r;
r = rand() % 2;
if (r == prevprev) {
++how_many_periodics;
}
if (how_many_periodics > (2*TEST_LENGTH)/3) {
break;
}
}
CYG_TEST_PASS_FAIL( (how_many_periodics <= (2*TEST_LENGTH)/3),
"periodicity of rand() in lowest bit");
#else
// TODO: should be an _expected_ fail i.e. XFAIL
CYG_TEST_NA("Chosen rand algorithm is known to fail this test");
#endif
CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for "
"C library rand() function");
} // main()
开发者ID:EPiCS,项目名称:reconos_v2,代码行数:46,代码来源:rand4.c
示例15: cyg_start
void
cyg_start(void)
{
#ifdef CYGPKG_SNMPAGENT // Do we support SNMP at all?
// Create a main thread, so we can run the scheduler and have time 'pass'
cyg_thread_create(10, // Priority - just a number
net_test, // entry
0, // entry parameter
"Network test", // Name
&stack[0], // Stack
STACK_SIZE, // Size
&thread_handle, // Handle
&thread_data // Thread data structure
);
cyg_thread_resume(thread_handle); // Start it
cyg_scheduler_start();
#else
CYG_TEST_NA( "No SNMP agent in this configuration" );
#endif // CYGPKG_SNMPAGENT - Do we support SNMP at all?
}
开发者ID:Palantir555,项目名称:ecos-mars-zx3,代码行数:20,代码来源:snmpmulti.c
示例16: cyg_start
externC void
cyg_start( void )
{
CYG_TEST_INIT();
CYG_TEST_NA(N_A_MSG);
}
开发者ID:houzhenggang,项目名称:mt7688_mips_ecos,代码行数:6,代码来源:nc_test_slave.c
示例17: cyg_start
void cyg_start(void)
{
CYG_TEST_INIT();
CYG_TEST_NA(NA_MSG);
}
开发者ID:SQGiggsHuang,项目名称:ecosgit,代码行数:6,代码来源:pselect.c
示例18: finish
//.........这里部分代码省略.........
static void entry0( cyg_addrword_t data )
{
cyg_mutex_lock( &m0 ); {
CHECK( ! cyg_mutex_trylock( &m0 ) );
cyg_mutex_lock( &m1 ); {
CHECK( ! cyg_mutex_trylock( &m0 ) );
} cyg_mutex_unlock( &m1 );
} cyg_mutex_unlock( &m0 );
cyg_mutex_lock( &m0 ); {
while ( 0 == m0d )
cyg_cond_wait( &cvar0 );
CHECK( 1 == m0d++ );
cyg_cond_signal( &cvar0 );
while ( 4 != m0d )
cyg_cond_wait( &cvar1 );
CHECK( 4 == m0d );
} cyg_mutex_unlock( &m0 );
finish( (cyg_ucount8)data );
}
static void entry1( cyg_addrword_t data )
{
cyg_mutex_lock( &m0 ); {
CHECK( cyg_mutex_trylock( &m1 ) ); {
} cyg_mutex_unlock( &m1 );
} cyg_mutex_unlock( &m0 );
cyg_mutex_lock( &m0 ); {
CHECK( 0 == m0d++ );
cyg_cond_broadcast( &cvar0 );
} cyg_mutex_unlock( &m0 );
cyg_mutex_lock( &m0 ); {
while( 1 == m0d )
cyg_cond_wait( &cvar0 );
CHECK( 2 == m0d++ );
cyg_cond_signal( &cvar0 );
while( 3 == m0d )
cyg_cond_wait( &cvar1 );
} cyg_mutex_unlock( &m0 );
finish( (cyg_ucount8)data );
}
static void entry2( cyg_addrword_t data )
{
cyg_mutex_lock( &m0 ); {
while( 3 != m0d ) {
cyg_cond_wait( &cvar0 );
}
CHECK( 3 == m0d++ );
cyg_cond_broadcast( &cvar1 );
} cyg_mutex_unlock( &m0 );
finish( (cyg_ucount8)data );
}
void kmutex1_main( void )
{
CYG_TEST_INIT();
cyg_thread_create(4, entry0 , (cyg_addrword_t)0, "kmutex1-0",
(void *)stack[0], STACKSIZE, &thread[0], &thread_obj[0]);
cyg_thread_resume(thread[0]);
cyg_thread_create(4, entry1 , (cyg_addrword_t)1, "kmutex1-1",
(void *)stack[1], STACKSIZE, &thread[1], &thread_obj[1]);
cyg_thread_resume(thread[1]);
cyg_thread_create(4, entry2 , (cyg_addrword_t)2, "kmutex1-2",
(void *)stack[2], STACKSIZE, &thread[2], &thread_obj[2]);
cyg_thread_resume(thread[2]);
cyg_mutex_init( &m0 );
cyg_mutex_init( &m1 );
cyg_cond_init( &cvar0, &m0 );
cyg_cond_init( &cvar1, &m0 );
cyg_cond_init( &cvar2, &m1 );
cyg_scheduler_start();
CYG_TEST_FAIL_FINISH("Not reached");
}
externC void
cyg_start( void )
{
kmutex1_main();
}
#else /* def CYGFUN_KERNEL_API_C */
externC void
cyg_start( void )
{
CYG_TEST_INIT();
CYG_TEST_NA("Kernel C API layer disabled");
}
开发者ID:lijinlei,项目名称:Kernel_BOOX60,代码行数:101,代码来源:kmutex1.c
示例19: main
int main (void)
#endif // __ECOS__
/*****/
/* main program, corresponds to procedures */
/* Main and Proc_0 in the Ada version */
{
#ifndef __ECOS__
double dtime();
#endif // __ECOS__
One_Fifty Int_1_Loc;
REG One_Fifty Int_2_Loc;
One_Fifty Int_3_Loc;
REG char Ch_Index;
Enumeration Enum_Loc;
Str_30 Str_1_Loc;
Str_30 Str_2_Loc;
REG int Run_Index;
REG int Number_Of_Runs;
#ifdef __ECOS__
CYG_TEST_INIT();
#ifdef CYG_HAL_I386_LINUX
CYG_TEST_NA("Only runs on hardware...");
#else
if (cyg_test_is_simulator)
CYG_TEST_NA("Only runs on hardware...");
#endif
#else // __ECOS__
FILE *Ap;
/* Initializations */
if ((Ap = fopen("dhry.res","a+")) == NULL)
{
printf("Can not open dhry.res\n\n");
exit(1);
}
#endif // __ECOS__
Next_Ptr_Glob = (Rec_Pointer) malloc (sizeof (Rec_Type));
Ptr_Glob = (Rec_Pointer) malloc (sizeof (Rec_Type));
Ptr_Glob->Ptr_Comp = Next_Ptr_Glob;
Ptr_Glob->Discr = Ident_1;
Ptr_Glob->variant.var_1.Enum_Comp = Ident_3;
Ptr_Glob->variant.var_1.Int_Comp = 40;
strcpy (Ptr_Glob->variant.var_1.Str_Comp,
"DHRYSTONE PROGRAM, SOME STRING");
strcpy (Str_1_Loc, "DHRYSTONE PROGRAM, 1'ST STRING");
Arr_2_Glob [8][7] = 10;
/* Was missing in published program. Without this statement, */
/* Arr_2_Glob [8][7] would have an undefined value. */
/* Warning: With 16-Bit processors and Number_Of_Runs > 32000, */
/* overflow may occur for this array element. */
printf ("\n");
printf ("Dhrystone Benchmark, Version 2.1 (Language: C)\n");
printf ("\n");
/*
if (Reg)
{
printf ("Program compiled with 'register' attribute\n");
printf ("\n");
}
else
{
printf ("Program compiled without 'register' attribute\n");
printf ("\n");
}
*/
#ifdef __ECOS__
Number_Of_Runs = PASSES;
#else // __ECOS__
printf ("Please give the number of runs through the benchmark: ");
{
int n;
scanf ("%d", &n);
Number_Of_Runs = n;
}
printf ("\n");
#endif // __ECOS__
printf ("Execution starts, %d runs through Dhrystone\n",Number_Of_Runs);
/***************/
/* Start timer */
/***************/
Begin_Time = dtime();
for (Run_Index = 1; Run_Index <= Number_Of_Runs; ++Run_Index)
{
//.........这里部分代码省略.........
开发者ID:JoshDi,项目名称:dd-wrt,代码行数:101,代码来源:dhrystone.c
示例20: task1
//.........这里部分代码省略.........
#ifdef CYGSEM_UITRON_BAD_PARAMS_RETURN_ERRORS
// now try creating it (badly)
#ifndef CYGSEM_UITRON_PARAMS_NULL_IS_GOOD_PTR
ercd = cre_mpl( 3, NULL );
CYG_TEST_CHECK( E_PAR == ercd, "cre_mpl bad ercd !E_PAR" );
#endif
ercd = cre_mpl( 3, NADR );
CYG_TEST_CHECK( E_PAR == ercd, "cre_mpl bad ercd !E_PAR" );
t_cmpl.mplatr = 0xfff;
ercd = cre_mpl( 3, &t_cmpl );
CYG_TEST_CHECK( E_RSATR == ercd, "cre_mpl bad ercd !E_RSATR" );
#endif // we can test bad param error returns
t_cmpl.mplatr = 0;
t_cmpl.mplsz = 100000000;
ercd = cre_mpl( 3, &t_cmpl );
CYG_TEST_CHECK( E_NOMEM == ercd, "cre_mpl bad ercd" );
// now create it well
t_cmpl.mplatr = 0;
t_cmpl.mplsz = 1000;
ercd = cre_mpl( 3, &t_cmpl );
CYG_TEST_CHECK( E_OK == ercd, "cre_mpl bad ercd" );
// and check we can use it
ercd = pget_blk( &vp, 3, 100 );
CYG_TEST_CHECK( E_OK == ercd, "pget_blk bad ercd" );
ercd = pget_blk( &vp, 3, 100000000 ); // way too large
CYG_TEST_CHECK( E_TMOUT == ercd, "pget_blk bad ercd !E_TMOUT" );
ercd = tget_blk( &vp, 3, 100, 10 );
CYG_TEST_CHECK( E_OK == ercd, "tget_blk bad ercd" );
ercd = get_blk( &vp, 3, 100 );
CYG_TEST_CHECK( E_OK == ercd, "get_blk bad ercd" );
ercd = rel_blk( 3, vp ); // vp did come from new pool
CYG_TEST_CHECK( E_OK == ercd, "rel_blk bad ercd" );
ercd = rel_blk( 3, vp ); // vp already freed
CYG_TEST_CHECK( E_PAR == ercd, "rel_blk bad ercd !E_PAR" );
ercd = ref_mpl( &t_rmpl, 3 );
CYG_TEST_CHECK( E_OK == ercd, "ref_mpl bad ercd" );
// In order to wait on the pools, we must first consume all they have:
while ( E_OK == (ercd = pget_blk( &vp, 1, 100 )) ) /* nothing */;
CYG_TEST_CHECK( E_TMOUT == ercd, "pget_blk bad ercd !E_TMOUT" );
while ( E_OK == (ercd = tget_blk( &vp, 2, 100, 1 )) ) /* nothing */;
CYG_TEST_CHECK( E_TMOUT == ercd, "tget_blk bad ercd !E_TMOUT" );
// now wait while task 2 deletes the wait objects
ercd = wup_tsk( 2 );
CYG_TEST_CHECK( E_OK == ercd, "wup_tsk bad ercd" );
ercd = get_blk( &vp, 1, 200 );
CYG_TEST_CHECK( E_DLT == ercd, "get_blk bad ercd !E_DLT" );
ercd = wup_tsk( 2 );
CYG_TEST_CHECK( E_OK == ercd, "wup_tsk bad ercd" );
ercd = tget_blk( &vp, 2, 100, 20 );
CYG_TEST_CHECK( E_DLT == ercd, "tget_blk bad ercd !E_DLT" );
// check they are deleted
ercd = get_blk( &vp, 1, 200 );
CYG_TEST_CHECK( E_NOEXS == ercd, "get_blk bad ercd !E_NOEXS" );
ercd = pget_blk( &vp, 2, 20 );
CYG_TEST_CHECK( E_NOEXS == ercd, "pget_blk bad ercd !E_NOEXS" );
// re-create and do it again
ercd = cre_mpl( 1, &t_cmpl );
CYG_TEST_CHECK( E_OK == ercd, "cre_mpl bad ercd" );
ercd = cre_mpl( 2, &t_cmpl );
CYG_TEST_CHECK( E_OK == ercd, "cre_mpl bad ercd" );
// In order to wait on the pools, we must first consume all they have:
while ( E_OK == (ercd = pget_blk( &vp, 1, 20 )) ) /* nothing */;
CYG_TEST_CHECK( E_TMOUT == ercd, "pget_blk bad ercd !E_TMOUT" );
while ( E_OK == (ercd = tget_blk( &vp, 2, 400, 1 )) ) /* nothing */;
CYG_TEST_CHECK( E_TMOUT == ercd, "tget_blk bad ercd !E_TMOUT" );
// now wait while task 2 deletes the wait objects
ercd = wup_tsk( 2 );
CYG_TEST_CHECK( E_OK == ercd, "wup_tsk bad ercd" );
ercd = get_blk( &vp, 1, 200 );
CYG_TEST_CHECK( E_DLT == ercd, "get_blk bad ercd !E_DLT" );
ercd = wup_tsk( 2 );
CYG_TEST_CHECK( E_OK == ercd, "wup_tsk bad ercd" );
ercd = tget_blk( &vp, 2, 500, 20 );
CYG_TEST_CHECK( E_DLT == ercd, "tget_blk bad ercd !E_DLT" );
// check they are deleted
ercd = tget_blk( &vp, 1, 200, 1 );
CYG_TEST_CHECK( E_NOEXS == ercd, "get_blk bad ercd !E_NOEXS" );
ercd = get_blk( &vp, 2, 20 );
CYG_TEST_CHECK( E_NOEXS == ercd, "pget_blk bad ercd !E_NOEXS" );
CYG_TEST_PASS("create/delete variable mempools");
#endif // CYGPKG_UITRON_MEMPOOLVAR_CREATE_DELETE
ercd = ter_tsk( 2 );
CYG_TEST_CHECK( E_OK == ercd, "ter_tsk bad ercd" );
ercd = dly_tsk( 5 );
CYG_TEST_CHECK( E_OK == ercd, "dly_tsk bad ercd" );
// all done
if ( 0 == tests ) {
CYG_TEST_NA( "No objects have create/delete enabled" );
}
else {
CYG_TEST_EXIT( "All done" );
}
ext_tsk();
}
开发者ID:0xCA5A,项目名称:dd-wrt,代码行数:101,代码来源:test9.c
注:本文中的CYG_TEST_NA函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论