static void
utc_location_search_poi_04()
{
	guint req_id = 0;
	int ret = 0;
	tet_printf("POIName-restaurant, Max - 50 and sort by Distance");
	LocationPOIFilter *filter = location_poi_filter_new();
	gchar *key = g_strdup("POIName");
	gchar *value = g_strdup("restaurant");
	location_poi_filter_set(filter, key, value);

	LocationPOIPreference *pref = location_poi_pref_new();
	location_poi_pref_set_max_result(pref, 50);
	gchar *item = g_strdup("Distance");
	location_poi_pref_set_sort_by(pref, item);
	location_poi_pref_set_sort_order(pref, LOCATION_POI_PREF_SO_ASC);

	LocationPosition *position = location_position_new(0, 37.336723, -121.889555, 0, LOCATION_STATUS_2D_FIX);

	ret = location_search_poi(loc, filter, position, pref, __location_POI_cb, NULL, &req_id);
	if(ret != LOCATION_ERROR_NONE) {
			tet_result(TET_FAIL);
			tet_printf("Fail to search POI. Error[%d]\n", ret);
	} else {
			g_timeout_add_seconds(60, exit_loop_fail, NULL);
			tet_printf("Seach POI sucess, req_id %d\n", req_id);
	}
	location_poi_filter_free(filter);
	location_poi_pref_free(pref);
	location_position_free(position);
}
Exemplo n.º 2
0
static void
_dwarf_die_offset(Dwarf_Die die)
{
	Dwarf_Off rel_off, die_off, cu_off, cu_len;
	Dwarf_Error de;

	if (dwarf_die_CU_offset(die, &rel_off, &de) != DW_DLV_OK) {
		tet_printf("dwarf_die_CU_offset failed: %s\n",
		    dwarf_errmsg(de));
		result = TET_FAIL;
	}
	TS_CHECK_INT(rel_off);

	if (dwarf_die_CU_offset_range(die, &cu_off, &cu_len, &de) !=
	    DW_DLV_OK) {
		tet_printf("dwarf_die_CU_offset_range failed: %s\n",
		    dwarf_errmsg(de));
		result = TET_FAIL;
	}
	TS_CHECK_INT(cu_off);
	TS_CHECK_INT(cu_len);

	if (dwarf_dieoffset(die, &die_off, &de) != DW_DLV_OK) {
		tet_printf("dwarf_dieoffset failed: %s\n", dwarf_errmsg(de));
		result = TET_FAIL;
	}
	TS_CHECK_INT(die_off);
}
Exemplo n.º 3
0
void tet_run_edsv_app()
{
  int iterCount=0,listCount=0;
  gl_defs();
#if 1 
#ifndef TET_ALL

  for(iterCount=1;iterCount<=gl_iteration;iterCount++)
    {
      printf("\n---------------- ITERATION : %d --------------\n",iterCount);
      tet_printf("\n-------------- ITERATION : %d --------------\n",iterCount);
      if(gl_listNumber==-1)
        {
            {
              for(listCount=1;listCount<=4;listCount++)
                {
                  tet_test_start(gl_tCase,edsv_testlist[listCount]);
                }
            }
        }
      else
        {
          if(gl_listNumber!=4)
            {
              tet_test_start(gl_tCase,edsv_testlist[gl_listNumber]);
            }
          
        }
      printf("\nNumber of iterations: %d",iterCount);
      tet_printf("\nNumber of iterations: %d",iterCount);
      sleep(2);
    }
  printf("\nPRESS ENTER TO GET MEM DUMP");

  getchar();

  tware_mem_dump();
  sleep(2);
  tware_mem_dump();
  tet_edsv_cleanup(); 

#else

  while(1)
    {
      tet_test_start(gl_tCase,edsv_test);

      tet_test_start(gl_tCase,api_test);

      tet_test_start(gl_tCase,func_test);

      tet_test_start(gl_tCase,b03_test);
    }
#endif
#endif
}
static void __location_POI_cb(LocationError error, guint req_id, GList * landmark_list, gchar * error_code, gchar * error_msg, gpointer userdata)
{
	tet_printf("\n===== __location_POI_cb ======\n");
	if (error != LOCATION_ERROR_NONE) {
		tet_result(TET_FAIL);
		tet_printf("Failed :%d\n", error);
	}

	if (landmark_list) tet_result(TET_PASS);
	g_main_loop_quit (loop);
}
Exemplo n.º 5
0
static void
tp_dwarf_ranges(void)
{
	Dwarf_Debug dbg;
	Dwarf_Ranges *ranges;
	Dwarf_Signed range_cnt;
	Dwarf_Unsigned byte_cnt;
	Dwarf_Off off;
	Dwarf_Error de;
	int fd, r_ranges, i;

	result = TET_UNRESOLVED;

	TS_DWARF_INIT(dbg, fd, de);

	off = 0;
	for (;;) {
		tet_printf("check ranges at offset(%ju):\n", (uintmax_t) off);
		r_ranges = dwarf_get_ranges_a(dbg, off, NULL, &ranges,
		    &range_cnt, &byte_cnt, &de);
		if (r_ranges != DW_DLV_OK)
			break;
		TS_CHECK_INT(range_cnt);
		TS_CHECK_UINT(byte_cnt);
		off += byte_cnt;
		for (i = 0; i < range_cnt; i++) {
			tet_printf("check range %d:\n", i);
			TS_CHECK_INT(ranges[i].dwr_type);
			TS_CHECK_UINT(ranges[i].dwr_addr1);
			TS_CHECK_UINT(ranges[i].dwr_addr2);
		}
	}

	/*
	 * SGI libdwarf return DW_DLV_ERROR when provided offset is out of
	 * range, instead of DW_DLV_NO_ENTRY as stated in the SGI libdwarf
	 * documentation. elftoolchain libdwarf follows the SGI libdwarf
	 * documentation.
	 */
#if 0
	if (r_ranges == DW_DLV_ERROR) {
		tet_printf("dwarf_get_ranges failed: %s\n", dwarf_errmsg(de));
		result = TET_FAIL;
	}
#endif

	if (result == TET_UNRESOLVED)
		result = TET_PASS;

done:
	TS_DWARF_FINISH(dbg, de);
	TS_RESULT(result);
}
static void utc_emotion_object_video_channel_count_p(void)
{
    Evas_Object *object = init();
    int count = emotion_object_video_channel_count(object);

	if (1 != count) {
		tet_printf("[TET_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
		tet_result(TET_FAIL);
		return;
	}
	tet_printf("[TET_PASS]:: %s[%d] : Test has passed..", __FILE__, __LINE__);
	tet_result(TET_PASS);
}
static void utc_emotion_object_video_mute_set_n(void)
{
    Evas_Object *object = init();
    emotion_object_video_mute_set(object, EINA_FALSE);
    Eina_Bool res = emotion_object_video_mute_get(object);

	if (EINA_FALSE != res) {
		tet_printf("[TET_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
		tet_result(TET_FAIL);
		return;
	}
	tet_printf("[TET_PASS]:: %s[%d] : Test has passed..", __FILE__, __LINE__);
	tet_result(TET_PASS);
}
static void utc_emotion_object_smooth_scale_set_p(void)
{
    Evas_Object *object = init();
    emotion_object_smooth_scale_set(object, EINA_TRUE);
    Eina_Bool smooth = emotion_object_smooth_scale_get(object);

	if (EINA_TRUE != smooth) {
		tet_printf("[TET_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
		tet_result(TET_FAIL);
		return;
	}
	tet_printf("[TET_PASS]:: %s[%d] : Test has passed..", __FILE__, __LINE__);
	tet_result(TET_PASS);
}
// Positive test case for loading. Load lots and be sure it has succeeded.
int UtcDaliLoadCompletion(void)
{
  tet_printf("Running load completion test \n");

  DALI_ASSERT_ALWAYS( gAbstraction != 0 );

  // Start a bunch of loads that should work:

  Dali::Integration::BitmapResourceType bitmapResourceType;
  Dali::Integration::LoadResourcePriority priority = Dali::Integration::LoadPriorityNormal;
  unsigned loadsLaunched = 0;

  for( unsigned loadGroup = 0; loadGroup < NUM_LOAD_GROUPS_TO_ISSUE; ++loadGroup )
  {
    for( unsigned validImage = 0; validImage < NUM_VALID_IMAGES; ++validImage )
    {
      Dali::Integration::ResourceRequest request( loadGroup * NUM_VALID_IMAGES + validImage + 1, bitmapResourceType, VALID_IMAGES[validImage], priority );
      gAbstraction->LoadResource( request );
    }
    loadsLaunched += NUM_VALID_IMAGES;
  }

  // Drain the completed loads:
  Dali::Internal::Platform::ResourceCollector resourceSink;
  gAbstraction->GetResources( resourceSink );
  usleep( 500 * 1000 );
  gAbstraction->GetResources( resourceSink );

  const double startDrainTime = GetTimeMilliseconds( *gAbstraction );
  while( resourceSink.mGrandTotalCompletions < loadsLaunched && GetTimeMilliseconds( *gAbstraction ) - startDrainTime < MAX_MILLIS_TO_WAIT_FOR_KNOWN_LOADS )
  {
    usleep( 100 * 40 );
    gAbstraction->GetResources( resourceSink );
  }

  // Check the loads completed as expected:

  tet_printf( "Issued Loads: %u, Completed Loads: %u, Successful Loads: %u, Failed Loads: %u \n", loadsLaunched, resourceSink.mGrandTotalCompletions, unsigned(resourceSink.mSuccessCounts.size()), unsigned(resourceSink.mFailureCounts.size()) );
  DALI_TEST_CHECK( loadsLaunched == resourceSink.mGrandTotalCompletions );
  DALI_TEST_CHECK( loadsLaunched == resourceSink.mSuccessCounts.size() );
  DALI_TEST_CHECK( 0 == resourceSink.mFailureCounts.size() );

  // Check that each success was reported exactly once:
  for( ResourceCounterMap::const_iterator it = resourceSink.mSuccessCounts.begin(), end = resourceSink.mSuccessCounts.end(); it != end; ++it )
  {
    DALI_TEST_CHECK( it->second == 1u );
  }

  END_TEST;
}
static void utc_emotion_shutdown_p(void)
{
	signal(SIGSEGV, sigprocess);
	
    Eina_Bool res = emotion_shutdown();

	if (EINA_FALSE == res) {
		tet_printf("[TET_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
		tet_result(TET_FAIL);
		return;
	}

	tet_printf("[TET_PASS]:: %s[%d] : Test has passed..", __FILE__, __LINE__);
	tet_result(TET_PASS);
}
Exemplo n.º 11
0
void
tcBadElf_tpElf(void)
{
	int err;
	Elf *e;
	TS_PHDR *ph;
	char badelf[sizeof(badelftemplate)];

	TP_CHECK_INITIALIZATION();

	tet_infoline("assertion: " TS_ICNAME "() on a malformed ELF file "
	    "fails with ELF_E_HEADER.");

	(void) memcpy(badelf, badelftemplate, sizeof(badelf));
	badelf[EI_VERSION] = EV_CURRENT;
	badelf[EI_CLASS]   = TS_ELFCLASS;

	TS_OPEN_MEMORY(e, badelf);

	if ((ph = TS_ICFUNC(e)) != NULL ||
	    (err = elf_errno()) != ELF_E_HEADER) {
		tet_printf("fail: error=%d ph=%p.", err, (void *) ph);
		tet_result(TET_FAIL);
	} else
		tet_result(TET_PASS);

	(void) elf_end(e);
}
static void cleanup(void)
{
    /* end of TC */
    free(raw_image.buffer);
    free(jpeg_image.buffer);
    tet_printf("\n TC end");
}
static void
utc_location_search_poi_10()
{
	int ret = 0;
	tet_printf("POIName-restaurant, Max - 50 and sort by Distance");
	LocationPOIFilter *filter = location_poi_filter_new();
	gchar *key = g_strdup("POIName");
	gchar *value = g_strdup("restaurant");
	location_poi_filter_set(filter, key, value);

	LocationPOIPreference *pref = location_poi_pref_new();
	location_poi_pref_set_max_result(pref, 50);
	gchar *item = g_strdup("Distance");
	location_poi_pref_set_sort_by(pref, item);
	location_poi_pref_set_sort_order(pref, LOCATION_POI_PREF_SO_ASC);

	LocationPosition *position = location_position_new(0, 37.336723, -121.889555, 0, LOCATION_STATUS_2D_FIX);

	ret = location_search_poi(loc, filter, position, pref, __location_POI_cb, NULL, NULL);
	if(ret == LOCATION_ERROR_PARAMETER) {
			tet_result(TET_PASS);
	} else {
		tet_result(TET_FAIL);
	}

	location_poi_filter_free(filter);
	location_poi_pref_free(pref);
	location_position_free(position);
}
Exemplo n.º 14
0
static void
tp_dwarf_die_offset_given_cu(void)
{
	Dwarf_Debug dbg;
	Dwarf_Error de;
	Dwarf_Off cu_offset, cu_dieoff;
	Dwarf_Unsigned cu_next_offset;
	int fd;
	
	result = TET_UNRESOLVED;

	TS_DWARF_INIT(dbg, fd, de);

	cu_offset = 0;
	TS_DWARF_CU_FOREACH(dbg, cu_next_offset, de) {
		if (dwarf_get_cu_die_offset_given_cu_header_offset(dbg,
		    cu_offset, &cu_dieoff, &de) != DW_DLV_OK) {
			tet_printf("dwarf_get_cu_die_offset_given_cu_header"
			    "_offset failed: %s", dwarf_errmsg(de));
			result = TET_FAIL;
			goto done;
		}
		TS_CHECK_INT(cu_dieoff);
		cu_offset = cu_next_offset;
	}

	if (result == TET_UNRESOLVED)
		result = TET_PASS;

done:
	TS_DWARF_FINISH(dbg, de);
	TS_RESULT(result);
}
static void
utc_location_search_poi_08()
{
	guint req_id = 0;
	int ret = 0;
	tet_printf("POIName-restaurant, Max - 50 and sort by Distance");
	LocationPOIFilter *filter = location_poi_filter_new();
	gchar *key = g_strdup("POIName");
	gchar *value = g_strdup("restaurant");
	location_poi_filter_set(filter, key, value);

	LocationPOIPreference *pref = location_poi_pref_new();
	location_poi_pref_set_max_result(pref, 50);
	gchar *item = g_strdup("Distance");
	location_poi_pref_set_sort_by(pref, item);
	location_poi_pref_set_sort_order(pref, LOCATION_POI_PREF_SO_ASC);

	ret = location_search_poi(loc, filter, NULL, pref, __location_POI_cb, NULL, &req_id);
	if(ret == LOCATION_ERROR_PARAMETER) {
			tet_result(TET_PASS);
	} else {
		tet_result(TET_FAIL);
	}

	location_poi_filter_free(filter);
	location_poi_pref_free(pref);
}
static void
tp_dwarf_next_cu_header_loop(void)
{
	Dwarf_Debug dbg;
	Dwarf_Error de;
	int i, r, fd, result;
	Dwarf_Unsigned cu_next_offset;

	result = TET_UNRESOLVED;

	TS_DWARF_INIT(dbg, fd, de);

	for (i = 0; i < _LOOP_COUNT; i++) {
		tet_printf("dwarf_next_cu_header loop(%d)\n", i);
		r = dwarf_next_cu_header(dbg, NULL, NULL, NULL, NULL,
		    &cu_next_offset, &de);
		TS_CHECK_INT(r);
	}

	if (result == TET_UNRESOLVED)
		result = TET_PASS;

done:
	TS_DWARF_FINISH(dbg, de);
	TS_RESULT(result);
}
Exemplo n.º 17
0
Arquivo: tc1.c Projeto: npe9/tet3.8
void tp1()
{
 	(void) tet_printf("test case: %s, TP number: %d ",
                tet_pname, tet_thistest);
	tet_result(TET_PASS);

/*	tet_result(TET_FAIL);*/
}
static void utc_emotion_frame_resize_p(void)
{
    Evas_Object *object = init();
    _emotion_frame_resize(object, 100, 200, 0.5);

	tet_printf("[TET_PASS]:: %s[%d] : Test has passed..", __FILE__, __LINE__);
	tet_result(TET_PASS);
}
Exemplo n.º 19
0
void
tcElf_tpCorruptEhdr(void)
{
	int err, fd, result;
	char *fn;
	Elf *e;
	TS_PHDR *ph;

	TP_CHECK_INITIALIZATION();

	tet_infoline("assertion: " TS_ICNAME "(E) with corrupt phdr values "
	    "the header returns E_HEADER.");

	fn = "ehdr.msb" __XSTRING(TS_PHDRSZ);
	TS_OPEN_FILE(e, fn, ELF_C_READ, fd);

	result = TET_PASS;

	if ((ph = TS_ICFUNC(e)) != NULL ||
	    (err = (elf_errno() != ELF_E_HEADER))) {
		tet_printf("fail: \"%s\" (ph %p, error %d)", fn, (void *) ph,
		    err);
		result = TET_FAIL;
	}
	(void) elf_end(e);
	(void) close(fd);

	if (result != TET_PASS) {
		tet_result(result);
		return;
	}

	fn = "ehdr.lsb" __XSTRING(TS_PHDRSZ);
	TS_OPEN_FILE(e, fn, ELF_C_READ, fd);

	if ((ph = TS_ICFUNC(e)) != NULL ||
	    (err = (elf_errno() != ELF_E_HEADER))) {
		tet_printf("fail: \"%s\" (ph %p, error %d)", fn, (void *) ph,
		    err);
		result = TET_FAIL;
	}
	(void) elf_end(e);
	(void) close(fd);

	tet_result(result);
}
Exemplo n.º 20
0
void
tcElf_tpElfWrongSize(void)
{
	int error, fd, result;
	Elf *e;
	char *fn;
	TS_PHDR *ph;

	TP_CHECK_INITIALIZATION();

	tet_infoline("assertion: a call to " TS_ICNAME "() and a mismatched "
	    "ELF class fails with ELF_E_CLASS.");

	result = TET_PASS;

	fn = "phdr.msb" __XSTRING(TS_OTHERSIZE);
	TS_OPEN_FILE(e,fn,ELF_C_READ,fd);

	if ((ph = TS_ICFUNC(e)) != NULL ||
	    (error = elf_errno()) != ELF_E_CLASS) {
		tet_printf("fail: \"%s\" opened (error %d).", fn, error);
		result = TET_FAIL;
	}

	(void) elf_end(e);
	(void) close(fd);

	if (result != TET_PASS) {
		tet_result(result);
		return;
	}

	fn = "phdr.lsb" __XSTRING(TS_OTHERSIZE);
	TS_OPEN_FILE(e,fn,ELF_C_READ,fd);
	if ((ph = TS_ICFUNC(e)) != NULL ||
	    (error = elf_errno()) != ELF_E_CLASS) {
		tet_printf("fail: \"%s\" opened (error %d).", fn, error);
		result = TET_FAIL;
	}

	(void) elf_end(e);
	(void) close(fd);

	tet_result(result);
}
static void utc_emotion_object_smooth_scale_set_null(void)
{
	signal(SIGSEGV, sigprocess);
	
    emotion_object_smooth_scale_set(NULL, EINA_TRUE);

    tet_printf("[TET_PASS]:: %s[%d] : Test has passed..", __FILE__, __LINE__);
	tet_result(TET_PASS);
}
static void utc_emotion_object_vis_set_get_null(void)
{
	signal(SIGSEGV, sigprocess);
	
    emotion_object_vis_set(NULL, EMOTION_META_INFO_TRACK_TITLE);

	tet_printf("[TET_PASS]:: %s[%d] : Test has passed..", __FILE__, __LINE__);
	tet_result(TET_PASS);
}
static void
utc_location_get_last_velocity_04()
{
	LocationVelocity *last_vel = NULL;
	ret = location_get_velocity (loc, &last_vel, NULL);
	tet_printf("Returned value: %d", ret);
	if (ret == LOCATION_ERROR_PARAMETER) tet_result(TET_PASS);
	else tet_result(TET_FAIL);
}
Exemplo n.º 24
0
void
elfts_init_version(void)
{
	if (elf_version(EV_CURRENT) != EV_CURRENT) {
		tet_printf("setup: elf_version() failed: %s",
		    elf_errmsg(-1));
		elfts_tcinit = TET_UNRESOLVED;
	}
}
static void utc_drmclient_drm_get_content_info_func_05(void)
{
	int ret = DRM_RETURN_INTERNAL_ERROR ;
	drm_content_info_s content_info;

	ret = drm_get_content_info(FILE_PATH_INVALID_FILE_NULL,&content_info);
	if(DRM_RETURN_SUCCESS != ret){
			tet_infoline("drm_get_content_info PASS!!!");
			tet_printf ("file_path checked is %s",FILE_PATH_INVALID_FILE_NULL);
			tet_printf ("ret = 0x%x",ret);
			tet_result(TET_PASS);
	}else{
			tet_infoline("drm_get_content_info FAIL!!!");
			tet_printf ("file_path checked is %s",FILE_PATH_INVALID_FILE_NULL);
			tet_printf ("ret = 0x%x",ret);
			tet_result(TET_FAIL);
	}
}
static void utc_emotion_object_event_simple_send_null(void)
{
	signal(SIGSEGV, sigprocess);
	
    emotion_object_vis_set(NULL, EMOTION_EVENT_10 + 1);

	tet_printf("[TET_PASS]:: %s[%d] : Test has passed..", __FILE__, __LINE__);
	tet_result(TET_PASS);
}
static void utc_emotion_frame_resize_null(void)
{
	signal(SIGSEGV, sigprocess);
	
    _emotion_frame_resize(NULL, 0, 0, 0.0);

	tet_printf("[TET_PASS]:: %s[%d] : Test has passed..", __FILE__, __LINE__);
	tet_result(TET_PASS);
}
static void utc_emotion_object_video_channel_count_null(void)
{
	signal(SIGSEGV, sigprocess);
	
    emotion_object_video_channel_count(NULL);

	tet_printf("[TET_PASS]:: %s[%d] : Test has passed..", __FILE__, __LINE__);
	tet_result(TET_PASS);
}
static void utc_emotion_object_last_position_save_load_p(void)
{
    Evas_Object *object = init();
    emotion_object_position_set(object, 5.0);
    emotion_object_last_position_save(object);
    emotion_object_position_set(object, 7.0);
    emotion_object_last_position_load(object);
    double last_position = emotion_object_position_get(object);
    tet_printf("Last position: %d", last_position);

	if (5.0 != last_position) {
		tet_printf("[TET_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
		tet_result(TET_FAIL);
		return;
	}
	tet_printf("[TET_PASS]:: %s[%d] : Test has passed..", __FILE__, __LINE__);
	tet_result(TET_PASS);
}
Exemplo n.º 30
0
static void
_dwarf_srcfiles(Dwarf_Die die)
{
	Dwarf_Half tag;
	Dwarf_Error de;
	Dwarf_Signed srccount;
	char **srcfiles;
	int r_srcfiles, i;

	if (dwarf_tag(die, &tag, &de) != DW_DLV_OK) {
		tet_printf("dwarf_tag failed: %s\n", dwarf_errmsg(de));
		result = TET_FAIL;
		return;
	}

	r_srcfiles = dwarf_srcfiles(die, &srcfiles, &srccount, &de);
	TS_CHECK_INT(r_srcfiles);

	if (r_srcfiles == DW_DLV_ERROR) {
		tet_printf("dwarf_srcfiles should not fail but still failed:",
		    " %s", dwarf_errmsg(de));
		return;
	}

	if (r_srcfiles != DW_DLV_OK)
		return;

	if (dwarf_srcfiles(die, &srcfiles, &srccount, &de) != DW_DLV_OK) {
		tet_printf("dwarf_srcfiles failed: %s\n", dwarf_errmsg(de));
		result = TET_FAIL;
		return;
	}

	TS_CHECK_INT(srccount);
	for (i = 0; i < srccount; i++) {
		if (srcfiles[i] == NULL) {
			tet_printf("dwarf_srcfiles returned NULL pointer"
			    " srcfiles[%d]\n", i);
			result = TET_FAIL;
		} else
			TS_CHECK_STRING(srcfiles[i]);
	}
}