summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-07-21 16:40:44 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-07-21 16:40:44 +0200
commit80cc3970e97ec71b5e645ca5132bebf115423fb2 (patch)
tree76f80517ef5190103a3875b223b641ffdb6ccda9 /tests
parent653469062abd091b08ed9c5986f8f6024c2958d9 (diff)
Add simplistic test case for xattr reference counting
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tests')
-rw-r--r--tests/fstree_xattr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/fstree_xattr.c b/tests/fstree_xattr.c
index edafd8c..36b90ec 100644
--- a/tests/fstree_xattr.c
+++ b/tests/fstree_xattr.c
@@ -71,6 +71,11 @@ int main(void)
assert(a->xattr != b->xattr);
assert(a->xattr != c->xattr);
+ assert(str_table_get_ref_count(&fs.xattr_keys,
+ a->xattr->attr[0].key_index) == 3);
+ assert(str_table_get_ref_count(&fs.xattr_values,
+ a->xattr->attr[0].value_index) == 2);
+
fstree_cleanup(&fs);
return EXIT_SUCCESS;
}