Skip to content

Commit bd6e427

Browse files
committed
Add || true to handle how cmp was returning a non-zero code for the (expectedly) different files
1 parent 1ed4261 commit bd6e427

1 file changed

Lines changed: 1 addition & 20 deletions

File tree

.github/workflows/stack_size.yml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,6 @@ jobs:
4949
rm ./sh
5050
done
5151
52-
find . -iname "monerod-*" | while read -r bin; do
53-
readelf $bin -l
54-
sha256sum $bin
55-
done
56-
57-
echo "Verifying artifacts are equivalent"
58-
5952
sha256() {
6053
sha256sum "$1" | cut -d' ' -f1
6154
}
@@ -68,8 +61,6 @@ jobs:
6861
fi
6962
done
7063
71-
echo "Verified artifacts are equivalent"
72-
7364
read_stack() {
7465
STACK_INFO=$(readelf "$1" -l | grep STACK -A1)
7566
MEMSZ=$(echo "$STACK_INFO" | tail -n1 | sed -E s/^[[:space:]]*//g | cut -f2 -d' ')
@@ -81,25 +72,15 @@ jobs:
8172
exit 2
8273
fi
8374
84-
echo "Verified \`read_stack\` agrees the binary started with 0"
85-
8675
UPDATED_STACK=$(read_stack monerod-chelf)
8776
if [ "$UPDATED_STACK" -ne "$STACK" ]; then
8877
echo "Updated \`PT_GNU_STACK\` ($UPDATED_STACK) wasn't 8 MB ($STACK)"
8978
exit 3
9079
fi
9180
92-
echo "Verified \`read_stack\` agrees the binary's stack is now 8 MB"
93-
9481
# Only one byte should be different due to the bit pattern of 8 MB
95-
ls monerod
96-
ls monerod-chelf
97-
cmp --help
98-
BYTES_DIFFERENT=$(cmp -l monerod monerod-chelf | wc -l)
99-
echo $BYTES_DIFFERENT
82+
BYTES_DIFFERENT=$(cmp -l monerod monerod-chelf | wc -l || true)
10083
if [ "$BYTES_DIFFERENT" -ne 1 ]; then
10184
echo "More than one byte was different between the two binaries"
10285
exit 4
10386
fi
104-
105-
echo "Verified only a single byte is different between the two binaries"

0 commit comments

Comments
 (0)