aboutsummaryrefslogtreecommitdiff
path: root/decoder
diff options
context:
space:
mode:
authorMike Leach <mike.leach@linaro.org>2020-06-10 21:05:28 +0100
committerMike Leach <mike.leach@linaro.org>2021-01-08 17:05:25 +0000
commit37029ff4a29dfe356a5951d31d5aed90d8d30e3c (patch)
tree841e56e71225438999afec6b981449e8fac06175 /decoder
parent441aafd04770beadd2eb2f1594e0e63ef4fc1958 (diff)
downloadOpenCSD-37029ff4a29dfe356a5951d31d5aed90d8d30e3c.tar.gz
tests: ete: Add test for ETE timestamp marker packet.
Signed-off-by: Mike Leach <mike.leach@linaro.org>
Diffstat (limited to 'decoder')
-rwxr-xr-xdecoder/tests/run_pkt_decode_tests-ete.bash32
-rw-r--r--decoder/tests/snapshots-ete/ts_marker/ETE_0_s1.ini15
-rw-r--r--decoder/tests/snapshots-ete/ts_marker/bindir_64/OTHERS_execbin0 -> 423744 bytes
-rw-r--r--decoder/tests/snapshots-ete/ts_marker/bindir_64/VAL_NON_DET_CODE_execbin0 -> 132256 bytes
-rw-r--r--decoder/tests/snapshots-ete/ts_marker/cpu_0.ini22
-rw-r--r--decoder/tests/snapshots-ete/ts_marker/session1.binbin0 -> 1378 bytes
-rw-r--r--decoder/tests/snapshots-ete/ts_marker/snapshot.ini11
-rw-r--r--decoder/tests/snapshots-ete/ts_marker/trace.ini15
8 files changed, 90 insertions, 5 deletions
diff --git a/decoder/tests/run_pkt_decode_tests-ete.bash b/decoder/tests/run_pkt_decode_tests-ete.bash
index 509438e..c00631e 100755
--- a/decoder/tests/run_pkt_decode_tests-ete.bash
+++ b/decoder/tests/run_pkt_decode_tests-ete.bash
@@ -35,10 +35,20 @@
# may change due to bugfix / enhancements) or assess the validity of the trace output.
#
#################################################################################
+# Usage options:-
+# * default: run tests on binary + libs in ./bin/linux64/rel
+# run_pkt_decode_tests.bash
+#
+# * use installed opencsd libraries & program
+# run_pkt_decode_tests.bash use-installed
+#
+# * use supplied path for binary + libs (must have trailing /)
+# run_pkt_decode_tests.bash <custom>/<path>/
+#
OUT_DIR=./results-ete
SNAPSHOT_DIR=./snapshots-ete
-BIN_DIR=./bin/linux64/rel
+BIN_DIR=./bin/linux64/rel/
# directories for tests using full decode
declare -a test_dirs_decode=( "001-ack_test"
@@ -57,6 +67,7 @@ declare -a test_dirs_decode=( "001-ack_test"
"tme_test"
"trace_file_cid_vmid"
"trace_file_vmid"
+ "ts_marker"
)
@@ -71,19 +82,30 @@ echo "Running trc_pkt_lister on snapshot directories."
mkdir -p ${OUT_DIR}
-# === test the decode set ===
-export LD_LIBRARY_PATH=${BIN_DIR}/.
+if [ "$1" == "use-installed" ]; then
+ BIN_DIR=""
+elif [ "$1" != "" ]; then
+ BIN_DIR=$1
+fi
+echo "Tests using BIN_DIR = ${BIN_DIR}"
+
+if [ "${BIN_DIR}" != "" ]; then
+ export LD_LIBRARY_PATH=${BIN_DIR}.
+ echo "LD_LIBRARY_PATH set to ${BIN_DIR}"
+fi
+
+# === test the decode set ===
for test_dir in "${test_dirs_decode[@]}"
do
echo "Testing $test_dir..."
- ${BIN_DIR}/trc_pkt_lister -ss_dir "${SNAPSHOT_DIR}/$test_dir" -decode -logfilename "${OUT_DIR}/$test_dir.ppl"
+ ${BIN_DIR}trc_pkt_lister -ss_dir "${SNAPSHOT_DIR}/$test_dir" -decode -logfilename "${OUT_DIR}/$test_dir.ppl"
echo "Done : Return $?"
done
for test_dir_n in "${test_dirs_decode_src_addr_opt[@]}"
do
echo "Testing with -src_addr_n $test_dir_n..."
- ${BIN_DIR}/trc_pkt_lister -ss_dir "${SNAPSHOT_DIR}/$test_dir_n" -decode -src_addr_n -logfilename "${OUT_DIR}/${test_dir_n}_src_addr_N.ppl"
+ ${BIN_DIR}trc_pkt_lister -ss_dir "${SNAPSHOT_DIR}/$test_dir_n" -decode -src_addr_n -logfilename "${OUT_DIR}/${test_dir_n}_src_addr_N.ppl"
echo "Done : Return $?"
done
diff --git a/decoder/tests/snapshots-ete/ts_marker/ETE_0_s1.ini b/decoder/tests/snapshots-ete/ts_marker/ETE_0_s1.ini
new file mode 100644
index 0000000..5c4e1af
--- /dev/null
+++ b/decoder/tests/snapshots-ete/ts_marker/ETE_0_s1.ini
@@ -0,0 +1,15 @@
+[device]
+name=ETE_0_s1
+class=trace_source
+type=ETE
+
+
+[regs]
+TRCCONFIGR=0x8801
+TRCTRACEIDR=0x1
+TRCDEVARCH=0x47715a13
+TRCIDR0=0x2881cea1
+TRCIDR1=0x4100fff0
+TRCIDR2=0xd0001088
+TRCIDR8=0x0
+
diff --git a/decoder/tests/snapshots-ete/ts_marker/bindir_64/OTHERS_exec b/decoder/tests/snapshots-ete/ts_marker/bindir_64/OTHERS_exec
new file mode 100644
index 0000000..384f5d7
--- /dev/null
+++ b/decoder/tests/snapshots-ete/ts_marker/bindir_64/OTHERS_exec
Binary files differ
diff --git a/decoder/tests/snapshots-ete/ts_marker/bindir_64/VAL_NON_DET_CODE_exec b/decoder/tests/snapshots-ete/ts_marker/bindir_64/VAL_NON_DET_CODE_exec
new file mode 100644
index 0000000..004a17c
--- /dev/null
+++ b/decoder/tests/snapshots-ete/ts_marker/bindir_64/VAL_NON_DET_CODE_exec
Binary files differ
diff --git a/decoder/tests/snapshots-ete/ts_marker/cpu_0.ini b/decoder/tests/snapshots-ete/ts_marker/cpu_0.ini
new file mode 100644
index 0000000..481a6e9
--- /dev/null
+++ b/decoder/tests/snapshots-ete/ts_marker/cpu_0.ini
@@ -0,0 +1,22 @@
+[device]
+name=cpu_0
+class=core
+type=ARM-AA64
+
+[regs]
+PC(size:64)=0x0
+SP(size:64)=0
+SCTLR_EL1=0x0
+CPSR=0x0
+
+
+[dump1]
+file=bindir_64/OTHERS_exec
+address=0x00060000
+length=0x67740
+
+[dump2]
+file=bindir_64/VAL_NON_DET_CODE_exec
+address=0x00010000
+length=0x204a0
+
diff --git a/decoder/tests/snapshots-ete/ts_marker/session1.bin b/decoder/tests/snapshots-ete/ts_marker/session1.bin
new file mode 100644
index 0000000..da3a425
--- /dev/null
+++ b/decoder/tests/snapshots-ete/ts_marker/session1.bin
Binary files differ
diff --git a/decoder/tests/snapshots-ete/ts_marker/snapshot.ini b/decoder/tests/snapshots-ete/ts_marker/snapshot.ini
new file mode 100644
index 0000000..fae7cd1
--- /dev/null
+++ b/decoder/tests/snapshots-ete/ts_marker/snapshot.ini
@@ -0,0 +1,11 @@
+[snapshot]
+version=1.0
+description=checker_metadata.ini
+
+[device_list]
+device0=cpu_0.ini
+device1=ETE_0_s1.ini
+
+[trace]
+metadata=trace.ini
+
diff --git a/decoder/tests/snapshots-ete/ts_marker/trace.ini b/decoder/tests/snapshots-ete/ts_marker/trace.ini
new file mode 100644
index 0000000..7e95dab
--- /dev/null
+++ b/decoder/tests/snapshots-ete/ts_marker/trace.ini
@@ -0,0 +1,15 @@
+[trace_buffers]
+buffers=buffer1
+
+[buffer1]
+name=ETB_1
+file=session1.bin
+format=source_data
+
+
+[source_buffers]
+ETE_0_s1=ETB_1
+
+[core_trace_sources]
+cpu_0=ETE_0_s1
+