symbol: set public symbols prefix
This commit is contained in:
16
test/test.c
16
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)
|
||||
|
||||
Reference in New Issue
Block a user