From: anton Date: Mon, 10 Jul 2023 17:46:29 +0000 (+0000) Subject: The rsync tests are unstable since the directory listing includes the X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a8f40aaabdece475f767f6597c872fcd117fcf4b;p=openbsd The rsync tests are unstable since the directory listing includes the last modification timestamp. One directory represents the one rsync is operating on and the other is our reference to compare against. If the current time managed to tick up to the next minute between creation of the two directories, the timestamps will differ. Improving the normalization in the findme helper makes the tests stable. ok bluhm@ claudio@ --- diff --git a/regress/usr.bin/rsync/lib.sh b/regress/usr.bin/rsync/lib.sh index 37732b686d3..6d7b51b88eb 100644 --- a/regress/usr.bin/rsync/lib.sh +++ b/regress/usr.bin/rsync/lib.sh @@ -65,9 +65,14 @@ findme () fi ( cd "$1" ; shift - # Cut out the inode number and blocks used. - # Maybe later also cut out size in bytes for directories. - find "$@" -ls | sed 's/^ *[0-9]* *[0-9]* *//' | sort + # Remove unstable fields: + # 1: inode + # 2: size in blocks + # 8-10: last modification time + find "$@" -ls | + sed -e 's/[[:space:]][[:space:]]*/ /g' | + cut -d ' ' -f 3-7,11- | + sort ) }