X-Git-Url: http://git.apps.os.sepia.ceph.com/?p=xfstests-dev.git;a=blobdiff_plain;f=common%2Ffuzzy;h=d70964f4766133649ddf13e9947f2eafd60a7b94;hp=3d86e1c8654f14f0d6938a8d5b1d605748bfbae5;hb=01140c76e4854634b6ec0c94eadc2045864e7fb1;hpb=c0c26cecab8a39e9c16ac57018a51e8f021dcf06 diff --git a/common/fuzzy b/common/fuzzy index 3d86e1c8..d70964f4 100644 --- a/common/fuzzy +++ b/common/fuzzy @@ -179,9 +179,14 @@ _scratch_xfs_fuzz_metadata_field() { for arg in "$@"; do cmds+=("-c" "${arg}") done - _scratch_xfs_db -x "${cmds[@]}" -c "fuzz ${fuzz_arg} ${key} ${value}" - echo - newval="$(_scratch_xfs_get_metadata_field "${key}" "$@" 2> /dev/null)" + while true; do + _scratch_xfs_db -x "${cmds[@]}" -c "fuzz ${fuzz_arg} ${key} ${value}" + echo + newval="$(_scratch_xfs_get_metadata_field "${key}" "$@" 2> /dev/null)" + if [ "${key}" != "random" ] || [ "${oldval}" != "${newval}" ]; then + break; + fi + done if [ "${oldval}" = "${newval}" ]; then echo "Field ${key} already set to ${newval}, skipping test." return 1