diff options
Diffstat (limited to 'test/test.c')
| -rw-r--r-- | test/test.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/test.c b/test/test.c index f4e4846..34b0793 100644 --- a/test/test.c +++ b/test/test.c @@ -6,7 +6,7 @@ #include "cJSON.h" -#include "osfp.h" +#include "MESA_osfp.h" #include "osfp_fingerprint.h" #include "osfp_score_db.h" #include "osfp_log.h" @@ -105,7 +105,7 @@ void test_miss_rate() osfp_log_level_set(OSFP_LOG_LEVEL_DEBUG); } - struct osfp_db *osfp_db = osfp_db_new(db_file_path); + struct osfp_db *osfp_db = MESA_osfp_db_new(db_file_path); if (osfp_db == NULL) { printf("could not create osfp context. fingerprints file: %s\n", db_file_path); exit(1); @@ -123,7 +123,7 @@ void test_miss_rate() const char *fp_str = cJSON_PrintUnformatted(entry); - struct osfp_result *result = osfp_json_identify(osfp_db, fp_str); + struct osfp_result *result = MESA_osfp_json_identify(osfp_db, fp_str); if (result == NULL) { identify_failed_count++; continue; @@ -131,7 +131,7 @@ void test_miss_rate() if (os_class == result->likely_os_class) { verified_count++; - osfp_result_free(result); + MESA_osfp_result_free(result); continue; } @@ -145,16 +145,16 @@ void test_miss_rate() unknown_count++; } - fprintf(log_file_ptr, "expect: %s, result: %s\n", os_class_json->valuestring, osfp_result_os_name_get(result)); + fprintf(log_file_ptr, "expect: %s, result: %s\n", os_class_json->valuestring, MESA_osfp_result_os_name_get(result)); - char *result_json = osfp_result_score_detail_export(result); + char *result_json = MESA_osfp_result_score_detail_export(result); if (result_json) { fprintf(log_file_ptr, "%s\n", result_json); } else { fprintf(log_file_ptr, "result detail error:%p\n", result); } fflush(log_file_ptr); - osfp_result_free(result); + MESA_osfp_result_free(result); } } @@ -165,7 +165,7 @@ void test_miss_rate() printf("details in: %s\n", LOG_FILE_PATH); - osfp_db_free(osfp_db); + MESA_osfp_db_free(osfp_db); } int main(int argc, char **argv) |
