From b6c8960b01f9e5366814b0dada57a0b1e6a031d9 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Mon, 2 Apr 2018 18:32:30 +0200 Subject: fsck: clean up log output Make sure we get only 1 warning output per problem. Also, add new corruption types to broken_fs_v1.4. --- .../Ef-68icxbQ-TuvmnWHuItB1BeLB92dNCXMXiz2M-zPI | Bin 0 -> 18 bytes .../V5DjvW5BXlGl1yCIJn4lPgdjdMvW_LUfc7G-R8W1cZ0 | Bin 0 -> 8 bytes .../ejZ3FX0zlFTpSfv-FBJ2u3ojwSN1XSqpNpCHxa5VGWw | Bin 0 -> 1 bytes .../iI0MtUdzELPeOAZYwYZFee169hpGgd3l2PXQBcc9sl4 | 1 + .../broken_fs_v1.4/trqecbMNXdzLqzpk7fSfKw/gocryptfs.diriv | 1 + .../broken_fs_v1.4/yrwcjj2qoC4IYvhw9sbfRg/gocryptfs.diriv | 1 + .../yrwcjj2qoC4IYvhw9sbfRg/uC2yqKyQUXSJF-YF1Ya5nQ | 0 tests/fsck/fsck_test.go | 6 ------ 8 files changed, 3 insertions(+), 6 deletions(-) create mode 100644 tests/fsck/broken_fs_v1.4/Ef-68icxbQ-TuvmnWHuItB1BeLB92dNCXMXiz2M-zPI create mode 100644 tests/fsck/broken_fs_v1.4/V5DjvW5BXlGl1yCIJn4lPgdjdMvW_LUfc7G-R8W1cZ0 create mode 100644 tests/fsck/broken_fs_v1.4/ejZ3FX0zlFTpSfv-FBJ2u3ojwSN1XSqpNpCHxa5VGWw create mode 120000 tests/fsck/broken_fs_v1.4/iI0MtUdzELPeOAZYwYZFee169hpGgd3l2PXQBcc9sl4 create mode 100644 tests/fsck/broken_fs_v1.4/trqecbMNXdzLqzpk7fSfKw/gocryptfs.diriv create mode 100644 tests/fsck/broken_fs_v1.4/yrwcjj2qoC4IYvhw9sbfRg/gocryptfs.diriv create mode 100644 tests/fsck/broken_fs_v1.4/yrwcjj2qoC4IYvhw9sbfRg/uC2yqKyQUXSJF-YF1Ya5nQ (limited to 'tests/fsck') diff --git a/tests/fsck/broken_fs_v1.4/Ef-68icxbQ-TuvmnWHuItB1BeLB92dNCXMXiz2M-zPI b/tests/fsck/broken_fs_v1.4/Ef-68icxbQ-TuvmnWHuItB1BeLB92dNCXMXiz2M-zPI new file mode 100644 index 0000000..84b9a70 Binary files /dev/null and b/tests/fsck/broken_fs_v1.4/Ef-68icxbQ-TuvmnWHuItB1BeLB92dNCXMXiz2M-zPI differ diff --git a/tests/fsck/broken_fs_v1.4/V5DjvW5BXlGl1yCIJn4lPgdjdMvW_LUfc7G-R8W1cZ0 b/tests/fsck/broken_fs_v1.4/V5DjvW5BXlGl1yCIJn4lPgdjdMvW_LUfc7G-R8W1cZ0 new file mode 100644 index 0000000..6101efa Binary files /dev/null and b/tests/fsck/broken_fs_v1.4/V5DjvW5BXlGl1yCIJn4lPgdjdMvW_LUfc7G-R8W1cZ0 differ diff --git a/tests/fsck/broken_fs_v1.4/ejZ3FX0zlFTpSfv-FBJ2u3ojwSN1XSqpNpCHxa5VGWw b/tests/fsck/broken_fs_v1.4/ejZ3FX0zlFTpSfv-FBJ2u3ojwSN1XSqpNpCHxa5VGWw new file mode 100644 index 0000000..f76dd23 Binary files /dev/null and b/tests/fsck/broken_fs_v1.4/ejZ3FX0zlFTpSfv-FBJ2u3ojwSN1XSqpNpCHxa5VGWw differ diff --git a/tests/fsck/broken_fs_v1.4/iI0MtUdzELPeOAZYwYZFee169hpGgd3l2PXQBcc9sl4 b/tests/fsck/broken_fs_v1.4/iI0MtUdzELPeOAZYwYZFee169hpGgd3l2PXQBcc9sl4 new file mode 120000 index 0000000..4b707cb --- /dev/null +++ b/tests/fsck/broken_fs_v1.4/iI0MtUdzELPeOAZYwYZFee169hpGgd3l2PXQBcc9sl4 @@ -0,0 +1 @@ +%%%broken_symlink%%% \ No newline at end of file diff --git a/tests/fsck/broken_fs_v1.4/trqecbMNXdzLqzpk7fSfKw/gocryptfs.diriv b/tests/fsck/broken_fs_v1.4/trqecbMNXdzLqzpk7fSfKw/gocryptfs.diriv new file mode 100644 index 0000000..41f0034 --- /dev/null +++ b/tests/fsck/broken_fs_v1.4/trqecbMNXdzLqzpk7fSfKw/gocryptfs.diriv @@ -0,0 +1 @@ +Wc diff --git a/tests/fsck/broken_fs_v1.4/yrwcjj2qoC4IYvhw9sbfRg/gocryptfs.diriv b/tests/fsck/broken_fs_v1.4/yrwcjj2qoC4IYvhw9sbfRg/gocryptfs.diriv new file mode 100644 index 0000000..29198ce --- /dev/null +++ b/tests/fsck/broken_fs_v1.4/yrwcjj2qoC4IYvhw9sbfRg/gocryptfs.diriv @@ -0,0 +1 @@ +LOã/;pl]Ù×n·ÌÙfooo diff --git a/tests/fsck/broken_fs_v1.4/yrwcjj2qoC4IYvhw9sbfRg/uC2yqKyQUXSJF-YF1Ya5nQ b/tests/fsck/broken_fs_v1.4/yrwcjj2qoC4IYvhw9sbfRg/uC2yqKyQUXSJF-YF1Ya5nQ new file mode 100644 index 0000000..e69de29 diff --git a/tests/fsck/fsck_test.go b/tests/fsck/fsck_test.go index 7506636..b5bbf84 100644 --- a/tests/fsck/fsck_test.go +++ b/tests/fsck/fsck_test.go @@ -2,7 +2,6 @@ package fsck import ( "os/exec" - "strings" "testing" "github.com/rfjakob/gocryptfs/internal/exitcodes" @@ -18,9 +17,4 @@ func TestBrokenFsV14(t *testing.T) { if code != exitcodes.FsckErrors { t.Errorf("wrong exit code, have=%d want=%d", code, exitcodes.FsckErrors) } - lines := strings.Split(out, "\n") - summaryLine := lines[len(lines)-2] - if summaryLine != "fsck: found 5 problems" { - t.Errorf("wrong summary line: %q", summaryLine) - } } -- cgit v1.2.3