1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(c) 2010-2014 Intel Corporation 3 */ 4 5 #include <stdio.h> 6 #include <string.h> 7 #include <stdint.h> 8 9 #include <rte_common.h> 10 #include <rte_version.h> 11 12 #include "test.h" 13 14 15 static int test_version(void)16test_version(void) 17 { 18 const char *version = rte_version(); 19 if (version == NULL) 20 return -1; 21 printf("Version string: '%s'\n", version); 22 if (*version == '\0' || 23 strncmp(version, RTE_VER_PREFIX, sizeof(RTE_VER_PREFIX)-1) != 0) 24 return -1; 25 return 0; 26 } 27 28 REGISTER_FAST_TEST(version_autotest, true, true, test_version); 29