From 952d45ce84f63de963a1727e439e95883f9e65c1 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Fri, 12 Mar 2021 19:25:25 +0100 Subject: 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. --- test.bash | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'test.bash') 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 -- cgit v1.2.3