From 14a51c828ef04f782eb5f7f0aee3e62f7f700724 Mon Sep 17 00:00:00 2001 From: Dan Crowell Date: Thu, 21 Nov 2019 10:18:48 -0600 Subject: Add more rc values to vmmpagetest Adds a little more ffdc to some testcases Change-Id: If6a69506c0c88e1c3c3d3affc764cad72ff3418a Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/87576 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Corey V Swenson Reviewed-by: Matt Derksen Reviewed-by: Nicholas E Bofferding --- src/usr/testcore/kernel/vmmpagetest.H | 38 ++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 18 deletions(-) (limited to 'src/usr/testcore/kernel/vmmpagetest.H') diff --git a/src/usr/testcore/kernel/vmmpagetest.H b/src/usr/testcore/kernel/vmmpagetest.H index 80d2b9c9a..c1c21068b 100644 --- a/src/usr/testcore/kernel/vmmpagetest.H +++ b/src/usr/testcore/kernel/vmmpagetest.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2014 */ +/* Contributors Listed Below - COPYRIGHT 2011,2019 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -50,13 +52,13 @@ class vmmpagetest: public CxxTest::TestSuite rc = mm_alloc_block(iv_mq,reinterpret_cast(iv_va),iv_size); if (rc != 0) { - TS_FAIL("Unable to allocate block.\n"); + TS_FAIL("Unable to allocate block - rc=%d.\n",rc); } rc = mm_set_permission(reinterpret_cast(iv_va),iv_size, initPerm); if (rc != 0) { - TS_FAIL("Failed to set block permissions to READ_ONLY.\n"); + TS_FAIL("Failed to set block permissions to READ_ONLY - rc=%d.\n",rc); } task_create(testDaemon, NULL); } @@ -76,7 +78,7 @@ class vmmpagetest: public CxxTest::TestSuite reinterpret_cast(iv_va),iv_size); if (rc != 0) { - TS_FAIL("Failed to release read pages\n"); + TS_FAIL("Failed to release read pages - rc=%d.\n",rc); } } @@ -86,7 +88,7 @@ class vmmpagetest: public CxxTest::TestSuite if (rc != 0) { TS_FAIL( - "Failed to set WRITE_TRACKED permissions on first page.\n"); + "Failed to set WRITE_TRACKED permissions on first page - rc=%d.\n",rc); } (*(volatile uint64_t *)iv_va) = 0x12345678; sync(); @@ -99,13 +101,13 @@ class vmmpagetest: public CxxTest::TestSuite if (rc != 0) { TS_FAIL( - "Failed to set WRITE_TRACKED permissions on second page.\n"); + "Failed to set WRITE_TRACKED permissions on second page - rc=%d.\n",rc); } rc = mm_remove_pages(FLUSH, reinterpret_cast(iv_va),iv_size); if (rc != 0) { - TS_FAIL("Failed to flush write tracked pages\n"); + TS_FAIL("Failed to flush write tracked pages - rc=%d.\n",rc); } } @@ -115,7 +117,7 @@ class vmmpagetest: public CxxTest::TestSuite if (rc != 0) { TS_FAIL( - "Failed to set WRITE_TRACKED permissions on first page.\n"); + "Failed to set WRITE_TRACKED permissions on first page - rc=%d.\n",rc); } (*(volatile uint64_t *)(iv_va+2*PAGESIZE)) = 0x33333333; sync(); @@ -126,14 +128,14 @@ class vmmpagetest: public CxxTest::TestSuite if (rc != 0) { TS_FAIL( - "Failed to set WRITE_TRACKED permissions on first page.\n"); + "Failed to set WRITE_TRACKED permissions on first page - rc=%d.\n",rc); } rc = mm_remove_pages(RELEASE, reinterpret_cast(iv_va),iv_size); if (rc != 0) { - TS_FAIL("Failed to release write track pages\n"); + TS_FAIL("Failed to release write track pages - rc=%d.\n",rc); } } @@ -143,7 +145,7 @@ class vmmpagetest: public CxxTest::TestSuite rc = mm_set_permission(reinterpret_cast(iv_va+4*PAGESIZE), 3*PAGESIZE, READ_ONLY); if (rc != 0) { - TS_FAIL(" 1 Failed to Update permissions.\n"); + TS_FAIL(" 1 Failed to Update permissions - rc=%d.\n",rc); } // try to write to a read_only page @@ -153,13 +155,13 @@ class vmmpagetest: public CxxTest::TestSuite if ((child != task_wait_tid(child, &status, NULL)) || (status != TASK_STATUS_CRASHED)) { - TS_FAIL("ERROR! Write to READ_ONLY address not caught."); + TS_FAIL("ERROR! Write to READ_ONLY address not caught - status=%d.",status); } rc = mm_set_permission(reinterpret_cast(iv_va+4*PAGESIZE), 3*PAGESIZE, EXECUTABLE); if (rc != 0) { - TS_FAIL("2 Failed to Update permissions.\n"); + TS_FAIL("2 Failed to Update permissions - rc=%d.\n",rc); } // try to write to an executable page @@ -168,13 +170,13 @@ class vmmpagetest: public CxxTest::TestSuite if ((child != task_wait_tid(child, &status, NULL)) || (status != TASK_STATUS_CRASHED)) { - TS_FAIL("ERROR! Write to EXECUTABLE address not caught."); + TS_FAIL("ERROR! Write to EXECUTABLE address not caught - status=%d",status); } rc = mm_set_permission(reinterpret_cast(iv_va+4*PAGESIZE), 3*PAGESIZE, NO_ACCESS); if (rc != 0) { - TS_FAIL("3 Failed to Update permissions.\n"); + TS_FAIL("3 Failed to Update permissions - rc=%d.\n",rc); } // try to write to a no access page @@ -183,7 +185,7 @@ class vmmpagetest: public CxxTest::TestSuite if ((child != task_wait_tid(child, &status, NULL)) || (status != TASK_STATUS_CRASHED)) { - TS_FAIL("ERROR! write to a NO_ACCESS addr not caught.\n"); + TS_FAIL("ERROR! write to a NO_ACCESS addr not caught - status=%d",status); } // test that you cannot set WRITABLE and EXECUTABLE permissions @@ -191,13 +193,13 @@ class vmmpagetest: public CxxTest::TestSuite if (rc == 0) { printk("Error .. invalid combination that did not get detected\n"); - TS_FAIL(" ERROR..Failed to detect a bad parm condition.\n"); + TS_FAIL(" ERROR..Failed to detect a bad parm condition - rc=%d.\n",rc); } rc = mm_set_permission(reinterpret_cast(iv_va+4*PAGESIZE), 3*PAGESIZE, WRITABLE); if (rc != 0) { - TS_FAIL(" 4 Failed to detect a bad parm condition.\n"); + TS_FAIL(" 4 Failed to detect a bad parm condition - rc=%d.\n",rc); } -- cgit v1.2.1