| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
memRouter: test: Add missing header file I ran into this warning when building on openEuler 20.03, --------------------------------------------------------------------- In file included from /usr/include/CUnit/Automated.h:41:0, from /root/dev/etmem/memRouter/test/Unit/memdcd_cmd_llt_test/memdcd_cmd_llt.c:18: /root/dev/etmem/memRouter/test/Unit/memdcd_cmd_llt_test/memdcd_cmd_llt.c: In function ‘test_memdcd_cmd’: /root/dev/etmem/memRouter/test/Unit/memdcd_cmd_llt_test/memdcd_cmd_llt.c:39:21: warning: implicit declaratio n of function ‘handle_recv_buffer’ [-Wimplicit-function-declaration] CU_ASSERT_EQUAL(handle_recv_buffer((void *)wrong_msg, sizeof(struct memdcd_message) + 1), -1); ^ --------------------------------------------------------------------- Fix this by adding the missing header file, as it is obvious. Tested on x86_64 openEuler 20.03, 22.03 and 24.03. Signed-off-by: Enze Li <lienze@kylinos.cn> | 2 年前 | |
Add unit test of memRouter. Signed-off-by: yangxin <245051644@qq.com> | 3 年前 | |
Add unit test of memRouter. Signed-off-by: yangxin <245051644@qq.com> | 3 年前 | |
Add unit test of memRouter. Signed-off-by: yangxin <245051644@qq.com> | 3 年前 | |
memRouter: test: Add missing header file Without this patch, GCC warns, --------------------------------------------------------------------- In file included from /usr/include/CUnit/Automated.h:41:0, from /root/dev/etmem/memRouter/test/Unit/memdcd_threshold_llt_test/memdcd_threshold_llt.c:18: /root/dev/etmem/memRouter/test/Unit/memdcd_threshold_llt_test/memdcd_threshold_llt.c: In function ‘test_memdcd_threshlod’: /root/dev/etmem/memRouter/test/Unit/memdcd_threshold_llt_test/memdcd_threshold_llt.c:67:57: warning: implicit declaration of function ‘getpid’; did you mean ‘getpt’? [-Wimplicit-function-declaration] CU_ASSERT_EQUAL(threshold_policy_opt->parse(policy, getpid(), pages, &pages_to_numa, &pages_to_swap), 0); ^ ... /root/dev/etmem/memRouter/test/Unit/memdcd_policy_llt_test/memdcd_policy_llt.c: In function ‘test_memdcd_policy’: /root/dev/etmem/memRouter/test/Unit/memdcd_policy_llt_test/memdcd_policy_llt.c:60:5: warning: implicit declaration of function ‘chown’ [-Wimplicit-function-declaration] chown("./config/policy_threshold_invalid_unit_str.json", 1, 1); ^~~~~ --------------------------------------------------------------------- Although it doesn't have much impact, it's better to squash them anyway. Tested by rebuilding on x86_64 openEuler 20.03, 22.03 and 24.03. Signed-off-by: Enze Li <lienze@kylinos.cn> | 2 年前 | |
memRouter: test: Fix -Wincompatible-pointer-types warnings I ran into the following warnings, --------------------------------------------------------------------- In file included from /usr/include/CUnit/Automated.h:41:0, from /root/dev/etmem/memRouter/test/Unit/memdcd_process_llt_test/memdcd_process_llt.c:18: /root/dev/etmem/memRouter/test/Unit/memdcd_process_llt_test/memdcd_process_llt.c: In function ‘test_memdcd_process’: /root/dev/etmem/memRouter/test/Unit/memdcd_process_llt_test/memdcd_process_llt.c:38:51: warning: passing argument 2 of ‘migrate_process_get_pages’ from incompatible pointer type [-Wincompatible-pointer-types] CU_ASSERT_EQUAL(migrate_process_get_pages(-1, wrong_msg->memory_msg.vma.vma_addrs), -1); ^ In file included from /root/dev/etmem/memRouter/test/Unit/memdcd_process_llt_test/memdcd_process_llt.c:19:0: /root/dev/etmem/memRouter/test/Unit/memdcd_process_llt_test/../../../src/memdcd_process.c:323:5: note: expected ‘const struct swap_vma_with_count *’ but argument is of type ‘struct vma_addr_with_count *’ int migrate_process_get_pages(int pid, const struct swap_vma_with_count *vma) ^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/CUnit/Automated.h:41:0, from /root/dev/etmem/memRouter/test/Unit/memdcd_process_llt_test/memdcd_process_llt.c:18: /root/dev/etmem/memRouter/test/Unit/memdcd_process_llt_test/memdcd_process_llt.c:39:66: warning: passing argument 2 of ‘migrate_process_get_pages’ from incompatible pointer type [-Wincompatible-pointer-types] CU_ASSERT_EQUAL(migrate_process_get_pages(get_pid_max() + 1, wrong_msg->memory_msg.vma.vma_addrs), -1); ^ In file included from /root/dev/etmem/memRouter/test/Unit/memdcd_process_llt_test/memdcd_process_llt.c:19:0: /root/dev/etmem/memRouter/test/Unit/memdcd_process_llt_test/../../../src/memdcd_process.c:323:5: note: expected ‘const struct swap_vma_with_count *’ but argument is of type ‘struct vma_addr_with_count *’ int migrate_process_get_pages(int pid, const struct swap_vma_with_count *vma) ^~~~~~~~~~~~~~~~~~~~~~~~~ --------------------------------------------------------------------- The reason for this warning is the use of the wrong member variable, and that must be an oversight. Tested on x86_64 openEuler 20.03, 22.03 and 24.03. Signed-off-by: Enze Li <lienze@kylinos.cn> | 2 年前 | |
memRouter: test: Add missing header file Without this patch, GCC warns, --------------------------------------------------------------------- In file included from /usr/include/CUnit/Automated.h:41:0, from /root/dev/etmem/memRouter/test/Unit/memdcd_threshold_llt_test/memdcd_threshold_llt.c:18: /root/dev/etmem/memRouter/test/Unit/memdcd_threshold_llt_test/memdcd_threshold_llt.c: In function ‘test_memdcd_threshlod’: /root/dev/etmem/memRouter/test/Unit/memdcd_threshold_llt_test/memdcd_threshold_llt.c:67:57: warning: implicit declaration of function ‘getpid’; did you mean ‘getpt’? [-Wimplicit-function-declaration] CU_ASSERT_EQUAL(threshold_policy_opt->parse(policy, getpid(), pages, &pages_to_numa, &pages_to_swap), 0); ^ ... /root/dev/etmem/memRouter/test/Unit/memdcd_policy_llt_test/memdcd_policy_llt.c: In function ‘test_memdcd_policy’: /root/dev/etmem/memRouter/test/Unit/memdcd_policy_llt_test/memdcd_policy_llt.c:60:5: warning: implicit declaration of function ‘chown’ [-Wimplicit-function-declaration] chown("./config/policy_threshold_invalid_unit_str.json", 1, 1); ^~~~~ --------------------------------------------------------------------- Although it doesn't have much impact, it's better to squash them anyway. Tested by rebuilding on x86_64 openEuler 20.03, 22.03 and 24.03. Signed-off-by: Enze Li <lienze@kylinos.cn> | 2 年前 | |
Add unit test of memRouter. Signed-off-by: yangxin <245051644@qq.com> | 3 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 2 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 3 年前 |