1
0
mirror of https://github.com/systemd/systemd synced 2026-03-14 09:04:47 +01:00

Compare commits

...

3 Commits

Author SHA1 Message Date
Dimitri John Ledkov
e706aaa7a3 boot/efi: add ARM (THUMB) and RISCV64 machine types
Also drop defines from shared/pe-header.h, appear to be unused.
2021-05-06 15:16:29 +02:00
Yu Watanabe
a83a7d1e9e test: drop default ACL from $TESTDIR
This fixes an issue introduced by the commit 954c77c2510c0328fd98354a59f380945752c38c.

For some reasons, setting default ACL on $TESTDIR makes TEST-29-PORTABLE
fail. Let's drop the default ACL, and set ACL on saved results instead.

Fixes #19519.
2021-05-06 11:28:00 +02:00
Yu Watanabe
853401a6bc test: increase image size when static library or standalone binaries are installed 2021-05-06 11:28:00 +02:00
3 changed files with 18 additions and 5 deletions

View File

@ -31,6 +31,8 @@ struct DosFileHeader {
#define PE_HEADER_MACHINE_I386 0x014c
#define PE_HEADER_MACHINE_X64 0x8664
#define PE_HEADER_MACHINE_ARM64 0xaa64
#define PE_HEADER_MACHINE_ARM 0x01c2
#define PE_HEADER_MACHINE_RISCV64 0x5064
struct PeFileHeader {
UINT16 Machine;
UINT16 NumberOfSections;
@ -76,7 +78,9 @@ EFI_STATUS pe_memory_locate_sections(CHAR8 *base, CHAR8 **sections, UINTN *addrs
/* PE32+ Subsystem type */
if (pe->FileHeader.Machine != PE_HEADER_MACHINE_X64 &&
pe->FileHeader.Machine != PE_HEADER_MACHINE_ARM64 &&
pe->FileHeader.Machine != PE_HEADER_MACHINE_I386)
pe->FileHeader.Machine != PE_HEADER_MACHINE_I386 &&
pe->FileHeader.Machine != PE_HEADER_MACHINE_ARM &&
pe->FileHeader.Machine != PE_HEADER_MACHINE_RISCV64)
return EFI_LOAD_ERROR;
if (pe->FileHeader.NumberOfSections > 96)

View File

@ -29,9 +29,6 @@ struct DosFileHeader {
le32_t ExeHeader;
} _packed_;
#define PE_HEADER_MACHINE_I386 0x014cU
#define PE_HEADER_MACHINE_X64 0x8664U
struct PeFileHeader {
le16_t Machine;
le16_t NumberOfSections;

View File

@ -1004,6 +1004,12 @@ create_empty_image() {
fi
local size=500
if meson configure "${BUILD_DIR:?}" | grep 'static-lib\|standalone-binaries' | awk '{ print $2 }' | grep -q 'true'; then
size=$((size+=200))
fi
if meson configure "${BUILD_DIR:?}" | grep 'link-.*-shared' | awk '{ print $2 }' | grep -q 'false'; then
size=$((size+=200))
fi
if [[ "$STRIP_BINARIES" = "no" ]]; then
size=$((4 * size))
fi
@ -1125,6 +1131,10 @@ save_journal() {
rm -r "$j"
done
if [ -n "${SUDO_USER}" ]; then
setfacl -m "user:${SUDO_USER:?}:r-X" "$dest"*
fi
# we want to print this sometime later, so save this in a variable
JOURNAL_LIST="$(ls -l "$dest"*)"
}
@ -1136,6 +1146,9 @@ check_result_common() {
if [ -s "$workspace/failed" ]; then
# Non-empty …/failed has highest priority
cp -a "$workspace/failed" "${TESTDIR:?}/"
if [ -n "${SUDO_USER}" ]; then
setfacl -m "user:${SUDO_USER:?}:r-X" "${TESTDIR:?}/"failed
fi
ret=1
elif [ -e "$workspace/testok" ]; then
# …/testok always counts (but with lower priority than …/failed)
@ -2471,7 +2484,6 @@ do_test() {
if [ -n "${SUDO_USER}" ]; then
ddebug "Making ${TESTDIR:?} readable for ${SUDO_USER} (acquired from sudo)"
setfacl -m "user:${SUDO_USER:?}:r-X" "${TESTDIR:?}"
setfacl -d -m "user:${SUDO_USER:?}:r-X" "${TESTDIR:?}"
fi
testname="$(basename "$PWD")"