app/test: count tests skipped at setup
[dpdk.git] / app / test / test_lpm6.c
index 0d66454..1f44392 100644 (file)
@@ -2,15 +2,26 @@
  * Copyright(c) 2010-2014 Intel Corporation
  */
 
+#include "test.h"
+
 #include <stdio.h>
 #include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
 
 #include <rte_memory.h>
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_lpm6(void)
+{
+       printf("lpm6 not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
+
 #include <rte_lpm6.h>
 
-#include "test.h"
 #include "test_lpm6_data.h"
 
 #define TEST_LPM_ASSERT(cond) do {                                            \
@@ -261,7 +272,7 @@ test4(void)
        status = rte_lpm6_add(NULL, ip, depth, next_hop);
        TEST_LPM_ASSERT(status < 0);
 
-       /*Create vaild lpm to use in rest of test. */
+       /*Create valid lpm to use in rest of test. */
        lpm = rte_lpm6_create(__func__, SOCKET_ID_ANY, &config);
        TEST_LPM_ASSERT(lpm != NULL);
 
@@ -299,7 +310,7 @@ test5(void)
        status = rte_lpm6_delete(NULL, ip, depth);
        TEST_LPM_ASSERT(status < 0);
 
-       /*Create vaild lpm to use in rest of test. */
+       /*Create valid lpm to use in rest of test. */
        lpm = rte_lpm6_create(__func__, SOCKET_ID_ANY, &config);
        TEST_LPM_ASSERT(lpm != NULL);
 
@@ -337,7 +348,7 @@ test6(void)
        status = rte_lpm6_lookup(NULL, ip, &next_hop_return);
        TEST_LPM_ASSERT(status < 0);
 
-       /*Create vaild lpm to use in rest of test. */
+       /*Create valid lpm to use in rest of test. */
        lpm = rte_lpm6_create(__func__, SOCKET_ID_ANY, &config);
        TEST_LPM_ASSERT(lpm != NULL);
 
@@ -375,7 +386,7 @@ test7(void)
        status = rte_lpm6_lookup_bulk_func(NULL, ip, next_hop_return, 10);
        TEST_LPM_ASSERT(status < 0);
 
-       /*Create vaild lpm to use in rest of test. */
+       /*Create valid lpm to use in rest of test. */
        lpm = rte_lpm6_create(__func__, SOCKET_ID_ANY, &config);
        TEST_LPM_ASSERT(lpm != NULL);
 
@@ -413,7 +424,7 @@ test8(void)
        status = rte_lpm6_delete_bulk_func(NULL, ip, depth, 10);
        TEST_LPM_ASSERT(status < 0);
 
-       /*Create vaild lpm to use in rest of test. */
+       /*Create valid lpm to use in rest of test. */
        lpm = rte_lpm6_create(__func__, SOCKET_ID_ANY, &config);
        TEST_LPM_ASSERT(lpm != NULL);
 
@@ -433,7 +444,7 @@ test8(void)
 /*
  * Call add, lookup and delete for a single rule with depth < 24.
  * Check all the combinations for the first three bytes that result in a hit.
- * Delete the rule and check that the same test returs a miss.
+ * Delete the rule and check that the same test returns a miss.
  */
 int32_t
 test9(void)
@@ -1738,7 +1749,7 @@ test27(void)
  * Call add, lookup and delete for a single rule with maximum 21bit next_hop
  * size.
  * Check that next_hop returned from lookup is equal to provisioned value.
- * Delete the rule and check that the same test returs a miss.
+ * Delete the rule and check that the same test returns a miss.
  */
 int32_t
 test28(void)
@@ -1792,4 +1803,6 @@ test_lpm6(void)
        return global_status;
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(lpm6_autotest, test_lpm6);