working test: write and read xattr with c-api