Expand the amount of shells tested with

This commit is contained in:
Luke Parker
2025-12-08 21:09:09 -05:00
parent f4efa76e3f
commit 34dbfedc5a

View File

@@ -25,10 +25,6 @@ jobs:
STACK=$((8 * 1024 * 1024)) STACK=$((8 * 1024 * 1024))
cp monerod monerod-muslstack
GOBIN=$(pwd) go install github.com/yaegashi/muslstack@d19cc5866abce3ca59dfc1666df7cc97097d0933
./muslstack -s $STACK ./monerod-muslstack
cp monerod monerod-chelf cp monerod monerod-chelf
git clone https://github.com/Gottox/chelf git clone https://github.com/Gottox/chelf
cd chelf cd chelf
@@ -37,34 +33,45 @@ jobs:
./chelf -s $STACK ../monerod-chelf ./chelf -s $STACK ../monerod-chelf
cd .. cd ..
if [ ! "$(sha256sum monerod-muslstack)" = "$(sha256sum monerod-chelf)" ]; then cp monerod monerod-muslstack
echo "monerod-muslstack != monerod-chelf" GOBIN=$(pwd) go install github.com/yaegashi/muslstack@d19cc5866abce3ca59dfc1666df7cc97097d0933
exit 1 ./muslstack -s $STACK ./monerod-muslstack
fi
cp monerod monerod-idss sudo apt install bash dash zsh busybox
./orchestration/increase_default_stack_size.sh monerod-idss for shell in sh bash dash zsh ash; do
cp monerod monerod-idss-$shell
$shell ./orchestration/increase_default_stack_size.sh monerod-idss-$shell
done
if [ ! "$(sha256sum monerod-muslstack)" = "$(sha256sum monerod-idss)" ]; then find . -iname "monerod-*" | while read -r bin; do
echo "monerod-muslstack != monerod-idss" readelf $bin -l
sha256sum $bin
done
find . -iname "monerod-*" | while read -r bin; do
if [ ! $(sha256sum monerod-chelf) = $(sha256sum $bin) ]; then
exit 1
fi
done
read_stack() {
printf "%i" $((readelf $1 -l | grep STACK -A1 | tail -n1 | sed -E s/^[[:space:]]*//g | cut -f2 -d' '))
}
INITIAL_STACK=$(read_stack monerod)
if [ "$INITIAL_STACK" -ne "0" ]; then
echo "Initial \`PT_GNU_STACK\` wasn't 0"
exit 2 exit 2
fi fi
INITIAL_STACK=$((readelf monerod -l | grep STACK -A1 | tail -n1 | sed -E s/^[[:space:]]*//g | cut -f2 -d' ')) UPDATED_STACK=$(read_stack monerod-chelf)
if [ "$INITIAL_STACK" -ne "0" ]; then if [ "$UPDATED_STACK" -ne "$STACK" ]; then
echo "Initial \`PT_GNU_STACK\` wasn't 0" echo "Updated \`PT_GNU_STACK\` wasn't 8 MB"
exit 3 exit 3
fi fi
UPDATED_STACK=$((readelf monerod-idss -l | grep STACK -A1 | tail -n1 | sed -E s/^[[:space:]]*//g | cut -f2 -d' '))
if [ "$UPDATED_STACK" -ne "$STACK" ]; then
echo "Updated \`PT_GNU_STACK\` wasn't 8 MB"
exit 4
fi
# Only one byte should be different due to the bit pattern of 8 MB # Only one byte should be different due to the bit pattern of 8 MB
BYTES_DIFFERENT=$(cmp -l monerod monerod-idss | wc -l) BYTES_DIFFERENT=$(cmp -l monerod monerod-chelf | wc -l)
if [ "$BYTES_DIFFERENT" -ne 1 ]; then if [ "$BYTES_DIFFERENT" -ne 1 ]; then
echo "More than one byte was different between the two binaries" echo "More than one byte was different between the two binaries"
exit 5 exit 4
fi fi