LDADD = ../snapper/libsnapper.la
if HAVE_XATTRS
-TMP_XATST = xattrs1 xattrs2
+TMP_XATST = xattrs1 xattrs2 xattrs3
endif
noinst_SCRIPTS = run-all
xattrs1_SOURCES = xattrs1.cc xattrs_utils.cc xattrs_utils.h common.h common.cc
xattrs2_SOURCES = xattrs2.cc xattrs_utils.cc xattrs_utils.h common.h common.cc
+xattrs3_SOURCES = xattrs3.cc xattrs_utils.cc xattrs_utils.h common.h common.cc
EXTRA_DIST = $(noinst_SCRIPTS)
--- /dev/null
+
+#include <stdlib.h>
+#include <iostream>
+
+#include "common.h"
+#include "xattrs_utils.h"
+
+using namespace std;
+
+int
+main()
+{
+ setup();
+
+ run_command("touch foo");
+ run_command("touch bar");
+
+ xattr_create("user.empty", "", SUBVOLUME "/foo");
+ xattr_create("user.empty", "not-yet", SUBVOLUME "/bar");
+
+ first_snapshot();
+
+ xattr_replace("user.empty", "not-anymore", SUBVOLUME "/foo");
+ xattr_replace("user.empty", "", SUBVOLUME "/bar");
+
+ second_snapshot();
+
+ undo();
+
+ check_undo_statistics(0, 2, 0);
+
+ check_xa_undo_statistics(0, 2, 0);
+
+ check_undo_errors(0, 0, 0);
+
+ check_first();
+
+ cleanup();
+
+ exit(EXIT_SUCCESS);
+}