tests/detach-remove.sh: fix for i386 pecoff size problems
pecoff for i386 can be too short, so it gets padded for an accurate signature. Make sure the size comparison takes this into account to avoid spurious failures. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:
parent
bc6ff99d36
commit
cbbafe244b
1 changed files with 5 additions and 1 deletions
|
@ -10,6 +10,10 @@ cp "$signed" "$unsigned"
|
||||||
# ensure that there is no security directory
|
# ensure that there is no security directory
|
||||||
objdump -p $unsigned | grep -q '0\+ 0\+ Security Directory'
|
objdump -p $unsigned | grep -q '0\+ 0\+ Security Directory'
|
||||||
|
|
||||||
|
##
|
||||||
|
# somewhat tricky: i386 pecoff binaries can be too short, so we add padding
|
||||||
|
# when signing, so make sure the sizes match modulo the padding
|
||||||
|
##
|
||||||
# ensure that the unsigned file is the same size as our original binary
|
# ensure that the unsigned file is the same size as our original binary
|
||||||
[ $(stat --format=%s "$image") -eq $(stat --format=%s "$unsigned") ]
|
[ $(( ($(stat --format=%s "$image")+7)&~7)) -eq $(( ($(stat --format=%s "$unsigned")+7)&~7)) ]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue