summaryrefslogtreecommitdiff
path: root/mkfunnyfarm
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2014-01-26 14:10:03 +0000
committerLars Wirzenius <liw@liw.fi>2014-01-26 14:10:03 +0000
commitf5502b638093291eb9cf39c1506f77ef391ff270 (patch)
treeb28648641eb82ced1e003ae0caa38497c3ac2fdd /mkfunnyfarm
parentfa9baf45dcdb2437a53e9da58ddc10a16382573e (diff)
downloadobnam-f5502b638093291eb9cf39c1506f77ef391ff270.tar.gz
Add empty xattr value to mkfunnyfarm
Diffstat (limited to 'mkfunnyfarm')
-rwxr-xr-xmkfunnyfarm10
1 files changed, 10 insertions, 0 deletions
diff --git a/mkfunnyfarm b/mkfunnyfarm
index 38973d64..5d4163ee 100755
--- a/mkfunnyfarm
+++ b/mkfunnyfarm
@@ -138,5 +138,15 @@ class MakeFunnyFarm(cliapp.Application):
['setfattr', '-n', 'user.foo', '-v', 'some value',
self.J('file-xattr-user')])
+ def farm_regular_file_xattr_user_empty_value(self):
+ # This is a special case: a key exists, but has an empty value.
+ # Some tools treat such keys as non-existing, but others do not,
+ # so Obnam needs to handle them.
+ with open(self.J('file-xattr-user-empty-value'), 'w'):
+ pass
+ cliapp.runcmd(
+ ['setfattr', '-n', 'user.foo', '-v', '""',
+ self.J('file-xattr-user')])
+
MakeFunnyFarm(description=__doc__).run()