From a34da05fbb2c27569c66592c7d489f55acf7bd94 Mon Sep 17 00:00:00 2001 From: Jason Del Ponte <961963+jasdel@users.noreply.github.com> Date: Mon, 16 May 2022 12:57:40 -0700 Subject: [PATCH] internal/ini: Remove unused and stale fuzzing (#1710) Removes the fuzz testing files from the module, as they are invalid and not used. PR draft https://github.com/aws/aws-sdk-go-v2/pull/1291 looks at adding fuzzing back in. Fixes https://github.com/aws/aws-sdk-go-v2/issues/1693 --- .../8836e2ebea6a43259f1cc2a00d9acc03.json | 8 +++++ internal/ini/fuzz.go | 18 ----------- internal/ini/fuzz_test.go | 30 ------------------- 3 files changed, 8 insertions(+), 48 deletions(-) create mode 100644 .changelog/8836e2ebea6a43259f1cc2a00d9acc03.json delete mode 100644 internal/ini/fuzz.go delete mode 100644 internal/ini/fuzz_test.go diff --git a/.changelog/8836e2ebea6a43259f1cc2a00d9acc03.json b/.changelog/8836e2ebea6a43259f1cc2a00d9acc03.json new file mode 100644 index 00000000000..36e1a072734 --- /dev/null +++ b/.changelog/8836e2ebea6a43259f1cc2a00d9acc03.json @@ -0,0 +1,8 @@ +{ + "id": "8836e2eb-ea6a-4325-9f1c-c2a00d9acc03", + "type": "bugfix", + "description": "Removes the fuzz testing files from the module, as they are invalid and not used.", + "modules": [ + "internal/ini" + ] +} \ No newline at end of file diff --git a/internal/ini/fuzz.go b/internal/ini/fuzz.go deleted file mode 100644 index 6e545b63bc4..00000000000 --- a/internal/ini/fuzz.go +++ /dev/null @@ -1,18 +0,0 @@ -//go:build gofuzz -// +build gofuzz - -package ini - -import ( - "bytes" -) - -func Fuzz(data []byte) int { - b := bytes.NewReader(data) - - if _, err := Parse(b); err != nil { - return 0 - } - - return 1 -} diff --git a/internal/ini/fuzz_test.go b/internal/ini/fuzz_test.go deleted file mode 100644 index 49bea5b18d5..00000000000 --- a/internal/ini/fuzz_test.go +++ /dev/null @@ -1,30 +0,0 @@ -//go:build fuzz -// +build fuzz - -// fuzz test data is stored in Amazon S3. -package ini_test - -import ( - "path/filepath" - "testing" - - "github.com/aws/aws-sdk-go-v2/internal/ini" -) - -// TestFuzz is used to test for crashes and not validity of the input -func TestFuzz(t *testing.T) { - paths, err := filepath.Glob("testdata/fuzz/*") - if err != nil { - t.Errorf("expected no error, but received %v", err) - } - - if paths == nil { - t.Errorf("expected fuzz files, but received none") - } - - for _, path := range paths { - t.Run(path, func(t *testing.T) { - ini.OpenFile(path) - }) - } -}