Skip to content

Commit

Permalink
Skip some debugging tests on arm64
Browse files Browse the repository at this point in the history
Not sure why they had disappeared a few weeks ago only to re-appear
again :(
  • Loading branch information
omajid committed Nov 8, 2023
1 parent 570b38b commit aa9cb6f
Showing 1 changed file with 30 additions and 20 deletions.
50 changes: 30 additions & 20 deletions debugging-via-dotnet-dump/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -458,15 +458,18 @@ done
heading "gcroot"
dump-analyze 'dso' > dump.out
cat dump.out
mapfile -t object_ids < <(grep -F 'System.Threading.Tasks' dump.out | awk '{ print $2 }')
id="${object_ids[0]}"
dump-analyze "gcroot ${id}" > dump.out
cat dump.out
grep -E 'Found [[:digit:]]* (unique )?roots' dump.out
count=$(grep -E 'Found [[:digit:]]* (unique )?roots' dump.out | sed -E 's|Found ([[:digit:]]*) (unique )?roots.*|\1|')
if [[ $count -le 0 ]]; then
echo "fail: $count unique roots found"
exit 2
# Skipped on aarch64 due to https://github.com/dotnet/diagnostics/issues/4388
if [[ "$(uname -m)" != "aarch64" ]]; then
mapfile -t object_ids < <(grep -F 'System.Threading.Tasks' dump.out | awk '{ print $2 }')
id="${object_ids[0]}"
dump-analyze "gcroot ${id}" > dump.out
cat dump.out
grep -E 'Found [[:digit:]]* (unique )?roots' dump.out
count=$(grep -E 'Found [[:digit:]]* (unique )?roots' dump.out | sed -E 's|Found ([[:digit:]]*) (unique )?roots.*|\1|')
if [[ $count -le 0 ]]; then
echo "fail: $count unique roots found"
exit 2
fi
fi


Expand Down Expand Up @@ -677,18 +680,25 @@ grep -E '^ +[0-9]+ timers$' dump.out


heading "traverseheap"
dump-analyze 'help traverseheap' > dump.out
if grep -F -- '-verify' dump.out; then
dump-analyze 'traverseheap -xml -verify full-heap' > dump.out
else
dump-analyze 'traverseheap -xml full-heap' > dump.out
if [[ "$(uname -m)" != "aarch64" ]]; then
dump-analyze 'help traverseheap' > dump.out
# Disable exit on error for traverseheap. Reported as https://github.com/dotnet/diagnostics/issues/3842
if grep -F -- '-verify' dump.out; then
set +e
dump-analyze 'traverseheap -xml -verify full-heap' > dump.out
set -e
else
set +e
dump-analyze 'traverseheap -xml full-heap' > dump.out
set -e
fi
cat dump.out
head full-heap
tail full-heap
grep -E '<type id="[[:digit:]]+" name="System.Object\[\]" */>' full-heap
grep -E '<object address="[^"]+" typeid="1" size="[0-9]+"' full-heap
grep -E '<object address="[^"]+" typeid="2" size="[0-9]+"' full-heap
fi
cat dump.out
head full-heap
tail full-heap
grep -E '<type id="[[:digit:]]+" name="System.Object\[\]" */>' full-heap
grep -E '<object address="[^"]+" typeid="1" size="[0-9]+"' full-heap
grep -E '<object address="[^"]+" typeid="2" size="[0-9]+"' full-heap


heading "verifyheap"
Expand Down

0 comments on commit aa9cb6f

Please sign in to comment.