diff options
author | Ian Campbell <ijc@hellion.org.uk> | 2016-10-26 14:07:57 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2016-10-29 11:36:47 +0300 |
commit | c1368a997e541d4fa45f0ac97a0ec06466995428 (patch) | |
tree | 007bcdc9fb0e527a06bf618796e60a94b56dba56 | |
parent | 13052199bfb11b9ada8282252e334cac9ddee519 (diff) | |
download | obnam-c1368a997e541d4fa45f0ac97a0ec06466995428.tar.gz |
kdirstat: Correct output syntax for FIFO
There needs to be some whitspace after the FIFO tag, otherwise k4dirstat
(silently!) stops parsing at this entry.
This was wrong in the initial commit to add FIFO support to kdirstat
4ce858d7c593 ("kdirstat: Handled named pipes (fifos)"), manual testing at the
time apparently only verified that the file was generated, not that it was
valid, sorry.
I updated the test yarns to also check for FIFO, however this is only run
"ASSUMING extended attributes are allowed for users", which does not appear to
be the case on my system. Also the testshould probably test for all sorts of
files, not just regular and FIFO.
Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
-rw-r--r-- | obnamlib/plugins/show_plugin.py | 2 | ||||
-rw-r--r-- | yarns/0300-kdirstat-integration.yarn | 4 | ||||
-rw-r--r-- | yarns/9000-implements.yarn | 5 |
3 files changed, 7 insertions, 4 deletions
diff --git a/obnamlib/plugins/show_plugin.py b/obnamlib/plugins/show_plugin.py index 31a241ac..995a958c 100644 --- a/obnamlib/plugins/show_plugin.py +++ b/obnamlib/plugins/show_plugin.py @@ -303,7 +303,7 @@ class ShowPlugin(obnamlib.ObnamPlugin): elif stat.S_ISCHR(mode): mode_str = "CharDev\t" elif stat.S_ISFIFO(mode): - mode_str = "FIFO" + mode_str = "FIFO\t" elif stat.S_ISSOCK(mode): mode_str = "Socket\t" else: diff --git a/yarns/0300-kdirstat-integration.yarn b/yarns/0300-kdirstat-integration.yarn index 695994fe..6408908b 100644 --- a/yarns/0300-kdirstat-integration.yarn +++ b/yarns/0300-kdirstat-integration.yarn @@ -15,7 +15,7 @@ file. WHEN user U backs up directory L to repository R AND user U creates a kdirstat cache file C of repository R THEN first line of C matches [kdirstat 4.0 cache file] - AND for each file in directory L a line in the kdircache C matches it + AND for each entry in directory L a line in the kdircache C matches it Now a backup containing some interesting objects @@ -25,7 +25,7 @@ Now a backup containing some interesting objects WHEN user U backs up directory L to repository R AND user U creates a kdirstat cache file C of repository R THEN first line of C matches [kdirstat 4.0 cache file] - AND for each file in directory L a line in the kdircache C matches it + AND for each entry in directory L a line in the kdircache C matches it Validating the cache file ------------------------- diff --git a/yarns/9000-implements.yarn b/yarns/9000-implements.yarn index 1d898d7c..e77b7852 100644 --- a/yarns/9000-implements.yarn +++ b/yarns/9000-implements.yarn @@ -773,7 +773,10 @@ Check that the cache mentions each file in the repository. Since grep -E cannot specifically match a tab we check only for one character of whitespace. - IMPLEMENTS THEN for each file in directory (\S+) a line in the kdircache (\S+) matches it + IMPLEMENTS THEN for each entry in directory (\S+) a line in the kdircache (\S+) matches it find "$DATADIR/$MATCH_1" -type f | while read f ; do \ grep -E -e "^F[[:space:]]$f" "$DATADIR/$MATCH_2" || exit 1; \ done + find "$DATADIR/$MATCH_1" -type p | while read p ; do \ + grep -E -e "^FIFO[[:space:]]$p" "$DATADIR/$MATCH_2" || exit 1; \ + done |