From b1c634071cd4ba6acbf088b723aac12c2ae0d5bc Mon Sep 17 00:00:00 2001 From: spashabk-in Date: Thu, 22 Dec 2016 03:14:02 -0600 Subject: PBA and ADU interface implementation Restructuring needed for sending SBE FFDC over PBA. Change-Id: I001e808b5bf135407566ff3d55863e61398ef9a3 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/34171 Tested-by: Jenkins Server Reviewed-by: RAJA DAS Tested-by: FSP CI Jenkins Reviewed-by: AMIT J. TENDOLKAR --- src/test/testcases/testAduMem_124B.py | 14 +++++++++----- src/test/testcases/testMemUtil.py | 16 +++++++++++++++- 2 files changed, 24 insertions(+), 6 deletions(-) (limited to 'src/test') diff --git a/src/test/testcases/testAduMem_124B.py b/src/test/testcases/testAduMem_124B.py index 100f7bb4..82336896 100644 --- a/src/test/testcases/testAduMem_124B.py +++ b/src/test/testcases/testAduMem_124B.py @@ -6,6 +6,7 @@ # OpenPOWER sbe Project # # Contributors Listed Below - COPYRIGHT 2017 +# [+] International Business Machines Corp. # # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -29,8 +30,6 @@ import testUtil import testMemUtil as testMemProcUtil err = False - - # MAIN Test Run Starts Here... #------------------------------------------------- def main( ): @@ -45,7 +44,7 @@ def main( ): # GetMemAdu test readData = testMemProcUtil.getmem(0x08000000, 1, 0xA5) if(data == readData): - print ("Success - Write-Read ADU") + print ("Success - Write-Read ADU 1byte") else: print data print readData @@ -60,7 +59,7 @@ def main( ): # GetMemAdu test readData = testMemProcUtil.getmem(0x08000000, 2, 0xA5) if(data == readData): - print ("Success - Write-Read ADU") + print ("Success - Write-Read ADU 2byte") else: print data print readData @@ -75,12 +74,17 @@ def main( ): # GetMemAdu test readData = testMemProcUtil.getmem(0x08000000, 4, 0xA5) if(data == readData): - print ("Success - Write-Read ADU") + print ("Success - Write-Read ADU 4byte") else: print data print readData raise Exception('data mistmach') +# Test case 4: Invalid length - 3 + # GetMemAdu test + testMemProcUtil.getmem_failure(0x08000000, 3, 0xA5) + print ("Success - invalid length test") + #------------------------------------------------- # Calling all test code #------------------------------------------------- diff --git a/src/test/testcases/testMemUtil.py b/src/test/testcases/testMemUtil.py index 48d1876a..d44c56ea 100644 --- a/src/test/testcases/testMemUtil.py +++ b/src/test/testcases/testMemUtil.py @@ -91,7 +91,6 @@ def getmem(addr, len, flags): req = (getsingleword(6) + [0, 0, 0xA4, 0x01] + getsingleword(flags) - #[0,0,0x0,0xA5] + getdoubleword(addr) + getsingleword(len)) testUtil.writeUsFifo(req) @@ -119,3 +118,18 @@ def getmem(addr, len, flags): testUtil.readDsFifo(expResp) testUtil.readEot( ) return data[:lenExp] + +def getmem_failure(addr, len, flags): + req = (getsingleword(6) + + [0, 0, 0xA4, 0x01] + + getsingleword(flags) + + getdoubleword(addr) + + getsingleword(len)) + testUtil.writeUsFifo(req) + testUtil.writeEot( ) + expResp = [0x0, 0x0, 0x0, 0x0, + 0xc0,0xde,0xa4,0x01, + 0x0,0x2,0x0,0xa, + 0x0,0x0,0x0,0x03]; + testUtil.readDsFifo(expResp) + testUtil.readEot( ) -- cgit v1.2.1