aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2021-11-12 15:37:48 -0500
committerEryu Guan <guaneryu@gmail.com>2021-11-14 20:50:03 +0800
commit090e349abcbb31dcde14618290bf0fdd8b4eca61 (patch)
tree2fc3199d837e98bdec9d7c998e6e3038cc3e08e1
parent16bd4336604c3d9b414252a75696f30d449730a5 (diff)
downloadxfstests-dev-090e349abcbb31dcde14618290bf0fdd8b4eca61.tar.gz
fstests: print symbolic names for fiemap flags
My nightly btrfs tests are failing on my configs with -o compress because the extents have FIEMAP_EXTENT_ENCODED set, which throws the golden output off. Fix this by changing the filter helper to spit out symbolic names for SHARED and LAST (these tests only care about SHARED). Then change the golden output to match the new output of the filter. With this patch my -o compress configs now pass these tests. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
-rw-r--r--common/punch16
-rw-r--r--tests/generic/352.out4
-rw-r--r--tests/generic/353.out8
3 files changed, 21 insertions, 7 deletions
diff --git a/common/punch b/common/punch
index b6c337e733..b6b8a0b9aa 100644
--- a/common/punch
+++ b/common/punch
@@ -119,7 +119,21 @@ _filter_fiemap_flags()
next;
}
$5 ~ /0x[[:xdigit:]]+/ {
- print $1, $2, $5;
+ flags = strtonum($5);
+ flag_str = "none";
+ set = 0;
+
+ if (and(flags, 0x2000)) {
+ flag_str = "shared";
+ set = 1;
+ }
+ if (and(flags, 0x1)) {
+ if (set) {
+ flag_str = flag_str"|";
+ }
+ flag_str = flag_str"last";
+ }
+ print $1, $2, flag_str
}' |
_coalesce_extents
}
diff --git a/tests/generic/352.out b/tests/generic/352.out
index a87c5073c2..4ff66c21fa 100644
--- a/tests/generic/352.out
+++ b/tests/generic/352.out
@@ -1,5 +1,5 @@
QA output created by 352
wrote 131072/131072 bytes at offset 0
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-0: [0..2097151]: 0x2000
-1: [2097152..2097407]: 0x2001
+0: [0..2097151]: shared
+1: [2097152..2097407]: shared|last
diff --git a/tests/generic/353.out b/tests/generic/353.out
index b7184a613c..4f6e0b9242 100644
--- a/tests/generic/353.out
+++ b/tests/generic/353.out
@@ -5,11 +5,11 @@ linked 65536/65536 bytes at offset 0
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
before sync:
SCRATCH_MNT/file1
-0: [0..127]: 0x2001
+0: [0..127]: shared|last
SCRATCH_MNT/file2
-0: [0..127]: 0x2001
+0: [0..127]: shared|last
after sync:
SCRATCH_MNT/file1
-0: [0..127]: 0x2001
+0: [0..127]: shared|last
SCRATCH_MNT/file2
-0: [0..127]: 0x2001
+0: [0..127]: shared|last