aboutsummaryrefslogtreecommitdiff
path: root/test.bash
diff options
context:
space:
mode:
authorJakob Unterwurzacher2021-03-12 19:25:25 +0100
committerJakob Unterwurzacher2021-03-12 19:25:25 +0100
commit952d45ce84f63de963a1727e439e95883f9e65c1 (patch)
tree597027fcc77ea447318ee5ff7008cdfc63d160ec /test.bash
parentd47bf9976f1eab67e53aaeebbd6de02b69a39a09 (diff)
tests: add TestDiskFull
Also fix incomplete uid restoration in TestSupplementaryGroups and replace syscall.Setregid and friends with unix.Setregid and friends. This test is added to check if have problems handling a full disk. The ticket https://github.com/rfjakob/gocryptfs/issues/550 states that the full disk was not where the backing gocryptfs filesystem was, but this has no effect on gocryptfs, so we test the harder case.
Diffstat (limited to 'test.bash')
-rwxr-xr-xtest.bash3
1 files changed, 1 insertions, 2 deletions
diff --git a/test.bash b/test.bash
index 266a875..091f0ac 100755
--- a/test.bash
+++ b/test.bash
@@ -85,8 +85,7 @@ if grep -R "panic(" ./*.go internal ; then
fi
# All functions from the commit msg in https://go-review.googlesource.com/c/go/+/210639
-if grep -R -E 'syscall.(Setegid|Seteuid|Setgroups|Setgid|Setregid|Setreuid|Setresgid|Setresuid|Setuid)\(' \
- ./*.go internal ; then
+if find . -type f -name \*.go -print0 | xargs -0 grep -E 'syscall.(Setegid|Seteuid|Setgroups|Setgid|Setregid|Setreuid|Setresgid|Setresuid|Setuid)\(' ; then
echo "$MYNAME: You probably want to use unix.Setgroups and friends. See the comments in OpenatUser() for why."
exit 1
fi