#!/bin/sh

. $(dirname "$0")/driver.sh

test_group "traverse tests for fake.dts"

test_result 0 <<EOF
/proc0
/proc0/fsi
/proc0/pib
/proc0/pib/core@10010
/proc0/pib/core@10010/thread@0
/proc0/pib/core@10010/thread@1
/proc0/pib/core@10020
/proc0/pib/core@10020/thread@0
/proc0/pib/core@10020/thread@1
/proc0/pib/core@10030
/proc0/pib/core@10030/thread@0
/proc0/pib/core@10030/thread@1
/proc0/pib/core@10040
/proc0/pib/core@10040/thread@0
/proc0/pib/core@10040/thread@1
EOF

test_run libpdbg_traverse_test /proc0

test_result 0 <<EOF
/
/proc0
/proc0/fsi
/proc0/pib
/proc0/pib/core@10010
/proc0/pib/core@10010/thread@0
/proc0/pib/core@10010/thread@1
/proc0/pib/core@10020
/proc0/pib/core@10020/thread@0
/proc0/pib/core@10020/thread@1
/proc0/pib/core@10030
/proc0/pib/core@10030/thread@0
/proc0/pib/core@10030/thread@1
/proc0/pib/core@10040
/proc0/pib/core@10040/thread@0
/proc0/pib/core@10040/thread@1
/proc1
/proc1/fsi
/proc1/pib
/proc1/pib/core@10010
/proc1/pib/core@10010/thread@0
/proc1/pib/core@10010/thread@1
/proc1/pib/core@10020
/proc1/pib/core@10020/thread@0
/proc1/pib/core@10020/thread@1
/proc1/pib/core@10030
/proc1/pib/core@10030/thread@0
/proc1/pib/core@10030/thread@1
/proc1/pib/core@10040
/proc1/pib/core@10040/thread@0
/proc1/pib/core@10040/thread@1
/proc2
/proc2/fsi
/proc2/pib
/proc2/pib/core@10010
/proc2/pib/core@10010/thread@0
/proc2/pib/core@10010/thread@1
/proc2/pib/core@10020
/proc2/pib/core@10020/thread@0
/proc2/pib/core@10020/thread@1
/proc2/pib/core@10030
/proc2/pib/core@10030/thread@0
/proc2/pib/core@10030/thread@1
/proc2/pib/core@10040
/proc2/pib/core@10040/thread@0
/proc2/pib/core@10040/thread@1
/proc3
/proc3/fsi
/proc3/pib
/proc3/pib/core@10010
/proc3/pib/core@10010/thread@0
/proc3/pib/core@10010/thread@1
/proc3/pib/core@10020
/proc3/pib/core@10020/thread@0
/proc3/pib/core@10020/thread@1
/proc3/pib/core@10030
/proc3/pib/core@10030/thread@0
/proc3/pib/core@10030/thread@1
/proc3/pib/core@10040
/proc3/pib/core@10040/thread@0
/proc3/pib/core@10040/thread@1
/proc4
/proc4/fsi
/proc4/pib
/proc4/pib/core@10010
/proc4/pib/core@10010/thread@0
/proc4/pib/core@10010/thread@1
/proc4/pib/core@10020
/proc4/pib/core@10020/thread@0
/proc4/pib/core@10020/thread@1
/proc4/pib/core@10030
/proc4/pib/core@10030/thread@0
/proc4/pib/core@10030/thread@1
/proc4/pib/core@10040
/proc4/pib/core@10040/thread@0
/proc4/pib/core@10040/thread@1
/proc5
/proc5/fsi
/proc5/pib
/proc5/pib/core@10010
/proc5/pib/core@10010/thread@0
/proc5/pib/core@10010/thread@1
/proc5/pib/core@10020
/proc5/pib/core@10020/thread@0
/proc5/pib/core@10020/thread@1
/proc5/pib/core@10030
/proc5/pib/core@10030/thread@0
/proc5/pib/core@10030/thread@1
/proc5/pib/core@10040
/proc5/pib/core@10040/thread@0
/proc5/pib/core@10040/thread@1
/proc6
/proc6/fsi
/proc6/pib
/proc6/pib/core@10010
/proc6/pib/core@10010/thread@0
/proc6/pib/core@10010/thread@1
/proc6/pib/core@10020
/proc6/pib/core@10020/thread@0
/proc6/pib/core@10020/thread@1
/proc6/pib/core@10030
/proc6/pib/core@10030/thread@0
/proc6/pib/core@10030/thread@1
/proc6/pib/core@10040
/proc6/pib/core@10040/thread@0
/proc6/pib/core@10040/thread@1
/proc7
/proc7/fsi
/proc7/pib
/proc7/pib/core@10010
/proc7/pib/core@10010/thread@0
/proc7/pib/core@10010/thread@1
/proc7/pib/core@10020
/proc7/pib/core@10020/thread@0
/proc7/pib/core@10020/thread@1
/proc7/pib/core@10030
/proc7/pib/core@10030/thread@0
/proc7/pib/core@10030/thread@1
/proc7/pib/core@10040
/proc7/pib/core@10040/thread@0
/proc7/pib/core@10040/thread@1
EOF

test_run libpdbg_traverse_test
