summaryrefslogtreecommitdiff
path: root/tests/xattrs.script
blob: 154c2362847edf02e36947312003896e0f0eb47d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

set -eu

umask 0002
mkdir -m 0775 "$DATADIR/xattrs"
touch "$DATADIR/xattrs/file"
if setfattr -n user.foo -v "$(printf '\177')" "$DATADIR/xattrs/file" 2> /dev/null &&
   setfattr -n user.empty -v '""' "$DATADIR/xattrs/file" 2> /dev/null
then
    ./summain --exclude=mtime --exclude=uid --exclude=username \
        --exclude=gid --exclude=group --exclude=ino --exclude=dev \
        --exclude=nlink --exclude=size --exclude=sha1 \
        --relative "$DATADIR/xattrs"
else
    # Fake results when xattrs not available.
    cat "$SRCDIR/tests/xattrs.stdout"
fi