Skip to content

Commit

Permalink
Merge pull request #190 from Gottox/fix/racy-tests
Browse files Browse the repository at this point in the history
test: fix race condition in tools tests
  • Loading branch information
Gottox authored Dec 13, 2023
2 parents d0e21a6 + 4c6b6dd commit 92a573c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions test/tools/ls/large-tree.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

######################################################################
# @author : Enno Boland ([email protected])
# @file : repack.sh
# @file : large-tree.sh
# @created : Friday Mar 17, 2023 15:11:09 CET
#
# @description : This script creates a squashfs image, mounts it, and
Expand All @@ -14,9 +14,9 @@
: "${SOURCE_ROOT:?SOURCE_ROOT is not set}"
: "${SQSH_LS:?SQSH_UNPACK is not set}"

MKSQUASHFS_OPTS="-no-xattrs -noappend -all-root -mkfs-time 0"
MKSQUASHFS_OPTS="-no-xattrs -noappend -all-root -mkfs-time 0 -noI -noD -noF -noX"

WORK_DIR="$BUILD_DIR/unpack-repack"
WORK_DIR="$BUILD_DIR/large-tree"

mkdir -p "$WORK_DIR"
cd "$WORK_DIR"
Expand Down
6 changes: 3 additions & 3 deletions test/tools/ls/utc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

MKSQUASHFS_OPTS="-no-xattrs -noappend -all-root -mkfs-time 0"

WORK_DIR="$BUILD_DIR/unpack-repack"
WORK_DIR="$BUILD_DIR/utc"

mkdir -p "$WORK_DIR"
cd "$WORK_DIR"
Expand All @@ -27,10 +27,10 @@ mkdir -p "$PWD/empty"
for i in $(seq 1 3641); do
echo "dir$i d 777 0 0";
echo "dir$i/file c 776 0 0 100 1";
done
done > "$PWD/utc.pseudo";

# shellcheck disable=SC2086
$MKSQUASHFS "$PWD/empty" "$PWD/large_tree.squashfs" -pf "$PWD/large_tree.pseudo" \
$MKSQUASHFS "$PWD/empty" "$PWD/large_tree.squashfs" -pf "$PWD/utc.pseudo" \
$MKSQUASHFS_OPTS
$SQSH_LS -r -l --utc "$PWD/large_tree.squashfs"
$SQSH_LS -r "$PWD/large_tree.squashfs"

0 comments on commit 92a573c

Please sign in to comment.