classification: spelling

pull/8829/head
Victor Julien 2 years ago
parent 26ffaf99d3
commit 1a0af685e2

@ -595,7 +595,7 @@ FILE *SCClassConfGenerateValidDummyClassConfigFD01(void)
FILE *fd = SCFmemopen((void *)buffer, strlen(buffer), "r"); FILE *fd = SCFmemopen((void *)buffer, strlen(buffer), "r");
if (fd == NULL) if (fd == NULL)
SCLogDebug("Error with SCFmemopen() called by Classifiation Config test code"); SCLogDebug("Error with SCFmemopen() called by Classification Config test code");
return fd; return fd;
} }
@ -606,7 +606,7 @@ FILE *SCClassConfGenerateValidDummyClassConfigFD01(void)
* *
* \file_path Pointer to the file_path for the dummy classification file. * \file_path Pointer to the file_path for the dummy classification file.
*/ */
FILE *SCClassConfGenerateInValidDummyClassConfigFD02(void) FILE *SCClassConfGenerateInvalidDummyClassConfigFD02(void)
{ {
const char *buffer = const char *buffer =
"config classification: not-suspicious,Not Suspicious Traffic,3\n" "config classification: not-suspicious,Not Suspicious Traffic,3\n"
@ -619,7 +619,7 @@ FILE *SCClassConfGenerateInValidDummyClassConfigFD02(void)
FILE *fd = SCFmemopen((void *)buffer, strlen(buffer), "r"); FILE *fd = SCFmemopen((void *)buffer, strlen(buffer), "r");
if (fd == NULL) if (fd == NULL)
SCLogDebug("Error with SCFmemopen() called by Classifiation Config test code"); SCLogDebug("Error with SCFmemopen() called by Classification Config test code");
return fd; return fd;
} }
@ -630,7 +630,7 @@ FILE *SCClassConfGenerateInValidDummyClassConfigFD02(void)
* *
* \file_path Pointer to the file_path for the dummy classification file. * \file_path Pointer to the file_path for the dummy classification file.
*/ */
FILE *SCClassConfGenerateInValidDummyClassConfigFD03(void) FILE *SCClassConfGenerateInvalidDummyClassConfigFD03(void)
{ {
const char *buffer = const char *buffer =
"conig classification: not-suspicious,Not Suspicious Traffic,3\n" "conig classification: not-suspicious,Not Suspicious Traffic,3\n"
@ -640,7 +640,7 @@ FILE *SCClassConfGenerateInValidDummyClassConfigFD03(void)
FILE *fd = SCFmemopen((void *)buffer, strlen(buffer), "r"); FILE *fd = SCFmemopen((void *)buffer, strlen(buffer), "r");
if (fd == NULL) if (fd == NULL)
SCLogDebug("Error with SCFmemopen() called by Classifiation Config test code"); SCLogDebug("Error with SCFmemopen() called by Classification Config test code");
return fd; return fd;
} }
@ -683,7 +683,7 @@ static int SCClassConfTest02(void)
if (de_ctx == NULL) if (de_ctx == NULL)
return result; return result;
FILE *fd = SCClassConfGenerateInValidDummyClassConfigFD03(); FILE *fd = SCClassConfGenerateInvalidDummyClassConfigFD03();
SCClassConfLoadClassificationConfigFile(de_ctx, fd); SCClassConfLoadClassificationConfigFile(de_ctx, fd);
if (de_ctx->class_conf_ht == NULL) if (de_ctx->class_conf_ht == NULL)
@ -698,7 +698,7 @@ static int SCClassConfTest02(void)
/** /**
* \test Check that only valid classtypes are loaded into the hash table from * \test Check that only valid classtypes are loaded into the hash table from
* the classfication.config file. * the classification.config file.
*/ */
static int SCClassConfTest03(void) static int SCClassConfTest03(void)
{ {
@ -706,7 +706,7 @@ static int SCClassConfTest03(void)
FAIL_IF_NULL(de_ctx); FAIL_IF_NULL(de_ctx);
FILE *fd = SCClassConfGenerateInValidDummyClassConfigFD02(); FILE *fd = SCClassConfGenerateInvalidDummyClassConfigFD02();
FAIL_IF(SCClassConfLoadClassificationConfigFile(de_ctx, fd)); FAIL_IF(SCClassConfLoadClassificationConfigFile(de_ctx, fd));
DetectEngineCtxFree(de_ctx); DetectEngineCtxFree(de_ctx);
@ -759,7 +759,7 @@ static int SCClassConfTest05(void)
if (de_ctx == NULL) if (de_ctx == NULL)
return 0; return 0;
FILE *fd = SCClassConfGenerateInValidDummyClassConfigFD03(); FILE *fd = SCClassConfGenerateInvalidDummyClassConfigFD03();
SCClassConfLoadClassificationConfigFile(de_ctx, fd); SCClassConfLoadClassificationConfigFile(de_ctx, fd);
if (de_ctx->class_conf_ht == NULL) if (de_ctx->class_conf_ht == NULL)

@ -31,7 +31,7 @@
* \brief Container for a Classtype from the Classification.config file. * \brief Container for a Classtype from the Classification.config file.
*/ */
typedef struct SCClassConfClasstype_ { typedef struct SCClassConfClasstype_ {
/* The index of the classification within classification.confg */ /* The index of the classification within classification.config */
uint16_t classtype_id; uint16_t classtype_id;
/* The priority this classification type carries */ /* The priority this classification type carries */
@ -58,8 +58,8 @@ void SCClassConfDeinit(void);
#ifdef UNITTESTS #ifdef UNITTESTS
void SCClassConfRegisterTests(void); void SCClassConfRegisterTests(void);
FILE *SCClassConfGenerateValidDummyClassConfigFD01(void); FILE *SCClassConfGenerateValidDummyClassConfigFD01(void);
FILE *SCClassConfGenerateInValidDummyClassConfigFD02(void); FILE *SCClassConfGenerateInvalidDummyClassConfigFD02(void);
FILE *SCClassConfGenerateInValidDummyClassConfigFD03(void); FILE *SCClassConfGenerateInvalidDummyClassConfigFD03(void);
#endif #endif
#endif /* __UTIL_CLASSIFICATION_CONFIG_H__ */ #endif /* __UTIL_CLASSIFICATION_CONFIG_H__ */

Loading…
Cancel
Save