Add some error testing to srch-basic-functionality

When the xattr inode searchs fail the test will eventually fail when the
output differs, but that could take a while.  Have it fail much sooner
so that we can have tighter debugging interations and trace ring buffer
contents that are likely to be a lot closer to the first failure.

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2021-08-25 10:14:38 -07:00
parent 3740c0a995
commit 2a33b9faf0
+4 -2
View File
@@ -17,8 +17,10 @@ diff_srch_find()
local n="$1"
sync
scoutfs search-xattrs "$n" -p "$T_M0" > "$T_TMP.srch"
find_xattrs -d "$T_D0" -m "$T_M0" -n "$n" > "$T_TMP.find"
scoutfs search-xattrs "$n" -p "$T_M0" > "$T_TMP.srch" || \
t_fail "search-xattrs failed"
find_xattrs -d "$T_D0" -m "$T_M0" -n "$n" > "$T_TMP.find" || \
t_fail "find_xattrs failed"
diff -u "$T_TMP.srch" "$T_TMP.find"
}