From 80cc3970e97ec71b5e645ca5132bebf115423fb2 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 21 Jul 2019 16:40:44 +0200 Subject: Add simplistic test case for xattr reference counting Signed-off-by: David Oberhollenzer --- tests/fstree_xattr.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/fstree_xattr.c') 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; } -- cgit v1.2.3