*** C1259T01 start *******************************
** xpmem_attach to Huge mapped memory range
** end of range is aligned with Large page size
pageshift: 21
** [ OK ] seg_addr (100000400000) is allocated until xpmem_attach
** [ OK ] xpmem_addr (100000400000) is allocated using large pages
pageshift: 29
** [ OK ] seg_addr (100020000000) is allocated until xpmem_attach
** [ OK ] xpmem_addr (100020000000) is allocated using large pages
pageshift: 34
** [ OK ] seg_addr (100400000000) is allocated until xpmem_attach
** [ OK ] xpmem_addr (100400000000) is allocated using large pages
*** C1259T01: PASSED

*** C1259T02 start *******************************
** xpmem_attach to Huge mapped memory range
** end of range is NOT aligned with Large page size
pageshift: 21
** [ OK ] seg_addr (100000400000) is allocated until xpmem_attach
** [ OK ] xpmem_addr (100000400000) is allocated using large pages
pageshift: 29
** [ OK ] seg_addr (100020000000) is allocated until xpmem_attach
** [ OK ] xpmem_addr (100020000000) is allocated using large pages
pageshift: 34
** [ OK ] seg_addr (100400000000) is allocated until xpmem_attach
** [ OK ] xpmem_addr (100400000000) is allocated using large pages
*** C1259T02: PASSED

*** C1259T03 start *******************************
** xpmem_attach to small mapped memory range
pageshift: small page
** [ OK ] xpmem_addr (100000210000) is allocated using small pages
*** C1259T03: PASSED

*** C1259T04 start *******************************
** xpmem_attach to multi pagesize range
pageshift: 21
** [ OK ] xpmem_addr (100000600000) is allocated using large pages
*** C1259T04: PASSED

*** C1259T05 start *******************************
** xpmem testsuite
XPMEM version = 26003

==== test_base STARTS ====
xpmem_proc1: mypid = 38514
xpmem_proc1: sharing 262144 bytes
xpmem_proc1: segid = 200009672 at 0x100000210000

xpmem_proc2: mypid = 38711
xpmem_proc2: segid = 200009672
xpmem_proc2: attached at 0x100000210000
xpmem_proc2: adding 1 to all elems

xpmem_proc1: verifying data...done
==== test_base PASSED ====

==== test_two_attach STARTS ====
xpmem_proc1: mypid = 39028
xpmem_proc1: sharing 262144 bytes
xpmem_proc1: segid = 200009874 at 0x100000210000

xpmem_proc2: mypid = 39233
xpmem_proc2: segid = 200009874
xpmem_proc2: attached at 0x100000210000
xpmem_proc2: attached at 0x100000250000
xpmem_proc2: adding 1 to all elems using 0x100000210000
xpmem_proc2: adding 1 to all elems using 0x100000250000

xpmem_proc1: verifying data...done
==== test_two_attach PASSED ====

==== test_two_shares STARTS ====
xpmem_proc1: mypid = 39429
xpmem_proc1: sharing 2 segments, 262144 bytes each
xpmem_proc1: segid[0] = 200009a05 at 0x100000210000
xpmem_proc1: segid[1] = 400009a05 at 0x100000250000

xpmem_proc2: mypid = 39625
xpmem_proc2: segid[0] = 200009a05
xpmem_proc2: segid[1] = 400009a05
xpmem_proc2: data[0] attached at 0x100000210000
xpmem_proc2: data[1] attached at 0x100000250000
xpmem_proc2: adding 1 to all elems using 0x100000210000
xpmem_proc2: adding 1 to all elems using 0x100000250000

xpmem_proc1: verifying data...done
==== test_two_shares PASSED ====

==== test_fork STARTS ====
xpmem_proc1: mypid = 39831
xpmem_proc1: sharing 262144 bytes
xpmem_proc1: segid = 200009b97 at 0x100000210000

xpmem_proc2: mypid = 40027
xpmem_proc2: segid = 200009b97
xpmem_proc2: attached at 0x100000220000
xpmem_proc2: reading to pin pages
xpmem_proc2: waiting for COW...

xpmem_proc1: forking a child
xpmem_proc1: adding 1 to all elems to induce COW

xpmem_child: hello from pid 40224

xpmem_proc1: give control back to xpmem_proc2

xpmem_proc2: adding 1 to all elems

xpmem_proc1: verifying data...done
==== test_fork PASSED ====

*** XTP_001 start ***
 [OK] xpmem_make
 [OK] xpmem_get
 [OK] xpmem_attach
 [OK] xpmem_detach
 [OK] xpmem_remove
*** XTP_001 PASSED

*** XTP_002 start ***
 [OK] xpmem_make in child
 [OK] xpmem_get in child
 [OK] xpmem_attach in child
 [OK] xpmem_detach in child
 [OK] xpmem_remove in child
*** XTP_002 PASSED

*** XTP_003 start ***
 [OK] xpmem_make
 [OK] xpmem_get in child
 [OK] xpmem_attach in child
 [OK] xpmem_detach in child
 [OK] validate TEST_VAL
 [OK] xpmem_remove
*** XTP_003 PASSED

*** XTP_004 start ***
 [OK] xpmem_make
 [OK] xpmem_get in child
 [OK] xpmem_attach in child
 [OK] xpmem_detach in child
 [OK] validate TEST_VAL
 [OK] xpmem_remove
*** XTP_004 PASSED

*** XTP_005 start ***
 [OK] xpmem_make
 [OK] xpmem_get in child
 [OK] xpmem_attach in child
 [OK] validate TEST_VAL
 [OK] xpmem_remove
*** XTP_005 PASSED

*** XTP_006 start ***
 [OK] xpmem_make
 [OK] xpmem_get in child failed (parent process exited already
*** XTP_006 PASSED

*** XTP_007 start ***
 [OK] xpmem_make failed (invalid address)
 [OK] xpmem_make succeed(do twice to same address)
*** XTP_007 PASSED

*** XTP_008 start ***
 [OK] xpmem_get in child failed (invalid segid)
 [OK] xpmem_get in child (do twice to same segid
*** XTP_008 PASSED

*** XTP_009 start ***
 [OK] xpmem_attach in childi failed (invalid apid)
 [OK] xpmem_attach in child succeed (do twice to same apid)
*** XTP_009 PASSED

*** XTP_010 start ***
 [OK] xpmem_detach in child succeed (invalid address)
 [OK] xpmem_detach in child succeed (do twice to same address)
*** XTP_010 PASSED

*** XTP_011 start ***
 [OK] xpmem_remove failed (invalid segid)
 [OK] xpmem_remove failed (do twice to same segid)
*** XTP_011 PASSED

