tree-wide: various terminal related fixlets (#38544)
Fixes #38524. Fixes #38527. Fixes #38552.
This commit is contained in:
@@ -54,15 +54,18 @@ at_exit() {
|
||||
trap at_exit EXIT
|
||||
|
||||
update_checksums() {
|
||||
(cd "$WORKDIR/source" && sha256sum uki* part* dir-*.tar.gz >SHA256SUMS)
|
||||
(cd "$WORKDIR/source" && sha256sum uki* part* dir-*.tar.gz >SHA256SUMS)
|
||||
}
|
||||
|
||||
new_version() {
|
||||
local sector_size="${1:?}"
|
||||
local version="${2:?}"
|
||||
|
||||
# Create a pair of random partition payloads, and compress one
|
||||
dd if=/dev/urandom of="$WORKDIR/source/part1-$version.raw" bs="$sector_size" count=2048
|
||||
# Create a pair of random partition payloads, and compress one.
|
||||
# To make not the initial bytes of part1-xxx.raw accidentally match one of the compression header,
|
||||
# let's make the first sector filled by zero.
|
||||
dd if=/dev/zero of="$WORKDIR/source/part1-$version.raw" bs="$sector_size" count=1
|
||||
dd if=/dev/urandom of="$WORKDIR/source/part1-$version.raw" bs="$sector_size" count=2047 conv=notrunc oflag=append
|
||||
dd if=/dev/urandom of="$WORKDIR/source/part2-$version.raw" bs="$sector_size" count=2048
|
||||
gzip -k -f "$WORKDIR/source/part2-$version.raw"
|
||||
|
||||
@@ -354,7 +357,7 @@ EOF
|
||||
updatectl check
|
||||
rm -r /run/sysupdate.test.d
|
||||
fi
|
||||
|
||||
|
||||
# Create seventh version, and update through a file:// URL. This should be
|
||||
# almost as good as testing HTTP, but is simpler for us to set up. file:// is
|
||||
# abstracted in curl for us, and since our main goal is to test our own code
|
||||
|
||||
Reference in New Issue
Block a user