/** * \brief Creates a dummy classification file, with all valid Classtypes, for * testing purposes. * * \file_path Pointer to the file_path for the dummy classification file. */ void SCClassConfGenerateValidDummyClassConfigFD01(void) { const char *buffer = "config classification: nothing-wrong,Nothing Wrong With Us,3\n" "config classification: unknown,Unknown are we,3\n" "config classification: bad-unknown,We think it's bad, 2\n"; fd = SCFmemopen((void *)buffer, strlen(buffer), "r"); if (fd == NULL) SCLogDebug("Error with SCFmemopen() called by Classifiation Config test code"); return; }
/** * \brief Creates a dummy classification file, with all invalid Classtypes, for * testing purposes. * * \file_path Pointer to the file_path for the dummy classification file. */ void SCClassConfGenerateInValidDummyClassConfigFD03(void) { const char *buffer = "conig classification: not-suspicious,Not Suspicious Traffic,3\n" "onfig classification: unknown,Unknown Traffic,3\n" "config classification: _badunknown,Potentially Bad Traffic, 2\n" "config classification: misc-activity,Misc activity,-1\n"; fd = SCFmemopen((void *)buffer, strlen(buffer), "r"); if (fd == NULL) SCLogDebug("Error with SCFmemopen() called by Classifiation Config test code"); return; }
/** * \brief Creates a dummy reference config, with all invalid references, for * testing purposes. */ void SCRConfGenerateInValidDummyReferenceConfigFD03(void) { const char *buffer = "config reference one http://www.one.com\n" "config_ reference: two http://www.two.com\n" "config reference_: three http://www.three.com\n" "config reference: four\n"; fd = SCFmemopen((void *)buffer, strlen(buffer), "r"); if (fd == NULL) SCLogDebug("Error with SCFmemopen() called by Reference Config test code"); return; }