[Skiboot] [PATCH 10/34] check: Fix bugs in mem region tests

Benjamin Herrenschmidt benh at kernel.crashing.org
Sun Jul 24 09:27:04 AEST 2016


We shouldn't delete the list element after list_pop, it's already
been deleted.

Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
---
 core/test/run-mem_region.c      | 1 -
 core/test/run-mem_region_init.c | 1 -
 2 files changed, 2 deletions(-)

diff --git a/core/test/run-mem_region.c b/core/test/run-mem_region.c
index a24e736..6b7f6fb 100644
--- a/core/test/run-mem_region.c
+++ b/core/test/run-mem_region.c
@@ -249,7 +249,6 @@ int main(void)
 	mem_dump_free();
 	assert(i == 3);
 	while ((r = list_pop(&regions, struct mem_region, list)) != NULL) {
-		list_del(&r->list);
 		lock(&skiboot_heap.free_list_lock);
 		mem_free(&skiboot_heap, r, __location__);
 		unlock(&skiboot_heap.free_list_lock);
diff --git a/core/test/run-mem_region_init.c b/core/test/run-mem_region_init.c
index d780ae5..17200c5 100644
--- a/core/test/run-mem_region_init.c
+++ b/core/test/run-mem_region_init.c
@@ -172,7 +172,6 @@ int main(void)
 	dt_free(dt_root);
 
 	while ((r = list_pop(&regions, struct mem_region, list)) != NULL) {
-		list_del(&r->list);
 		if (r != &skiboot_code_and_text &&
 		    r != &skiboot_heap &&
 		    r != &skiboot_after_heap &&
-- 
2.7.4



More information about the Skiboot mailing list