You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: mount_helper_unix_test.go
    path of file: ./repos/kubernetes/staging/src/k8s.io/mount-utils
    
    the code of the file until where you have to start completion: //go:build !windows
// +build !windows

/*
Copyright 2019 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package mount

import (
	"os"
	"path/filepath"
	"reflect"
	"testing"
)

func writeFile(t *testing.T, content string) string {
	filename := filepath.Join(t.TempDir(), "mountinfo")
	err := os.WriteFile(filename, []byte(content), 0o600)
	if err != nil {
		t.Fatal(err)
	}
	return filename

    
func TestBadParseMountInfo(t *testing.T) {
	tests := []struct {
		info         string
		name         string
		id           int
		expectedInfo *MountInfo
		error        string
	}{
		{
			`224 62 253:0 /var/lib/docker/devicemapper/test/shared /var/lib/docker/devicemapper/test/shared rw,relatime master:1 shared:44 - ext4 /dev/mapper/ssd-root rw,seclabel,data=ordered`,
			"good major:minor field",
			224,
			&MountInfo{
				ID:             224,
				ParentID:       62,
				Major:          253,
				Minor:          0,
				Root:           "/var/lib/docker/devicemapper/test/shared",
				Source:         "/dev/mapper/ssd-root",
				MountPoint:     "/var/lib/docker/devicemapper/test/shared",
				OptionalFields: []string{"master:1", "shared:44"},
				FsType:         "ext4",
				MountOptions:   []string{"rw", "relatime"},
				SuperOptions:   []string{"rw", "seclabel", "data=ordered"},
			},
			"",
		},
		{
			`224 62 /var/lib/docker/devicemapper/test/shared /var/lib/docker/devicemapper/test/shared rw,relatime master:1 shared:44 - ext4 /dev/mapper/ssd-root rw,seclabel,data=ordered`,
			"missing major:minor field",
			224,
			nil,
			`parsing '224 62 /var/lib/docker/devicemapper/test/shared /var/lib/docker/devicemapper/test/shared rw,relatime master:1 shared:44 - ext4 /dev/mapper/ssd-root rw,seclabel,data=ordered' failed: unexpected minor:major pair [/var/lib/docker/devicemapper/test/shared]`,
		},
		{
			`224 62 :0 /var/lib/docker/devicemapper/test/shared /var/lib/docker/devicemapper/test/shared rw,relatime master:1 shared:44 - ext4 /dev/mapper/ssd-root rw,seclabel,data=ordered`,
			"empty major field",
			224,
			nil,
			`parsing '' failed: unable to parse major device id, err:strconv.Atoi: parsing "": invalid syntax`,
		},
		{
			`224 62 253: /var/lib/docker/devicemapper/test/shared /var/lib/docker/devicemapper/test/shared rw,relatime master:1 shared:44 - ext4 /dev/mapper/ssd-root rw,seclabel,data=ordered`,
			"empty minor field",
			224,
			nil,
			`parsing '' failed: unable to parse minor device id, err:strconv.Atoi: parsing "": invalid syntax`,
		},
		{
			`224 62 foo:0 /var/lib/docker/devicemapper/test/shared /var/lib/docker/devicemapper/test/shared rw,relatime master:1 shared:44 - ext4 /dev/mapper/ssd-root rw,seclabel,data=ordered`,
			"alphabet in major field",
			224,
			nil,
			`parsing 'foo' failed: unable to parse major device id, err:strconv.Atoi: parsing "foo": invalid syntax`,
		},
		{
			`224 62 253:bar /var/lib/docker/devicemapper/test/shared /var/lib/docker/devicemapper/test/shared rw,relatime master:1 shared:44 - ext4 /dev/mapper/ssd-root rw,seclabel,data=ordered`,
			"alphabet in minor field",
			224,
			nil,
			`parsing 'bar' failed: unable to parse minor device id, err:strconv.Atoi: parsing "bar": invalid syntax`,
		},
	}

	for _, test := range tests {
		filename := writeFile(t, test.info)

		infos, err := ParseMountInfo(filename)
		if err != nil {
			if err.Error() != test.error {
				t.Errorf("Test case %q:\n expected error: %+v\n got:      %+v", test.name, test.error, err.Error())
			}
			continue
		}

		found := false
		for _, info := range infos {
			if info.ID == test.id {
				found = true
				if !reflect.DeepEqual(info, *test.expectedInfo) {
					t.Errorf("Test case %q:\n expected: %+v\n got:      %+v", test.name, test.expectedInfo, info)
				}
				break
			}
		}
		if !found {
			t.Errorf("Test case %q: mountPoint %d not found", test.name, test.id)
		}
	}
}