From a43d66a63c81b020dee2beef8b1ffc70c3a0e3e7 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Sat, 7 May 2011 16:10:09 +0200 Subject: [PATCH] regress: tweak hardlink-test to avoid strict counting --- regress/tests/hardlink-test | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/regress/tests/hardlink-test b/regress/tests/hardlink-test index 6d9bfd2d41..8b82e81fe1 100755 --- a/regress/tests/hardlink-test +++ b/regress/tests/hardlink-test @@ -60,11 +60,12 @@ SELECT Name, Md5 WHERE Name LIKE 'hard%' OR Name = 'normalfile'; @$out ${cwd}/tmp/log4.out -@# As we backup two times the same directory, the number should be 4 sql SELECT count(1), Md5 FROM File JOIN Filename USING (FilenameId) - WHERE Name = 'hardlink-to-normalfile' OR Name = 'normalfile' + WHERE Name = 'hardlink-to-normalfile' + OR Name = 'normalfile' + OR Name = 'another-hardlink-to-normalfile' GROUP By Md5; quit @@ -85,9 +86,8 @@ if [ $? -eq 0 ]; then estat=1 fi -# if you change the file-list, adjust the number here -grep ' 4 ' $tmp/log4.out > /dev/null -if [ $? -ne 0 ]; then +nb=`awk '/\| +[1-9]/ { print $0 } ' $tmp/log4.out | wc -l` +if [ "$nb" != 1 ]; then print_debug "ERROR: All selected hardlinks should have the same checksum" estat=1 fi -- 2.39.5