Skip to content

Commit

Permalink
testsuite: Reformat shell scripts
Browse files Browse the repository at this point in the history
shfmt -f testsuite/ | xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <[email protected]>
Reviewed-by: Pavel Filipenský <[email protected]>
  • Loading branch information
cryptomilk authored and Pavel Filipensky committed Aug 10, 2022
1 parent db8849e commit bb2e062
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions testsuite/nsswitch/getent_r.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Verify test output. Basically we check to see if all the files generated
# in /tmp by the get{pw,gr}ent_r.c and program are identical. If there is
# some problem with the re-entrancy of the code then the information in the
# two files will be different.
# two files will be different.
#

TYPE=$1
Expand All @@ -13,7 +13,7 @@ FILES="/tmp/${TYPE}_r-${ID}.out-*"
# Sort files

for file in $FILES; do
cat $file | sort > $file.sorted
cat $file | sort >$file.sorted
done

# Diff files
Expand All @@ -22,14 +22,13 @@ SORTED="/tmp/${TYPE}_r-${ID}.out-*.sorted"
failed=0

for file1 in $SORTED; do
for file2 in $SORTED; do
if [ $file1 != $file2 ]; then
diff $file1 $file2
fi
done
for file2 in $SORTED; do
if [ $file1 != $file2 ]; then
diff $file1 $file2
fi
done
done

# Clean up

rm -f $SORTED

0 comments on commit bb2e062

Please sign in to comment.