Change:
<!-- This form is for bug reports and feature requests ONLY! If you're looking for help check and the . If the matter is security related, please disclose it privately via --Is this a BUG REPORT or FEATURE REQUEST?: https://k8s- What happened: The skip check for hostpath doesn't seem to be working for these test cases
can you take a look?
Oh, disruptive tests are the tests that can't be tested locally in my environment due to I will take a look.
I found that above issue is not related, I should have been checked more carefully. Sorry for that.
I found out that this was just a driver name issue, so below will fix it: hostpath -hostPath hostpathSymlink -hostPathSymlink We might be better changing the skip logic later, to make it skip not by name in order to avoid this kind of bug, though. I will make a PR for above change, soon.
I made a PR above. Also, it might be a bit out of scope of this fix, but are drivers tested with containerized volume server, like nfs, ceph, etc..., safe to be tested with subpath disruptive tests? I'm worrying about the case that test pod and containerized volume server are deployed on the same node. In such a case, the same behaviour expected or do we need to avoid this kind of situation?

Discussion:
} // Hostpath <del> type hostpathDriver struct { </del> <ins> type hostPathDriver struct { </ins> node v1.Node driverInfo DriverInfo } <del> var _ TestDriver = &hostpathDriver{} var _ PreprovisionedVolumeTestDriver = &hostpathDriver{} var _ InlineVolumeTestDriver = &hostpathDriver{} </del> <ins> var _ TestDriver = &hostPathDriver{} var _ PreprovisionedVolumeTestDriver = &hostPathDriver{} var _ InlineVolumeTestDriver = &hostPathDriver{} </ins> <del> // InitHostpathDriver returns hostpathDriver that implements TestDriver interface func InitHostpathDriver() TestDriver { return &hostpathDriver{ </del> <ins> // InitHostpathDriver returns hostPathDriver that implements TestDriver interface func InitHostPathDriver() TestDriver { return &hostPathDriver{ </ins> driverInfo: DriverInfo{ <del> Name:        "hostpath", </del> <ins> Name:        "hostPath", </ins> MaxFileSize: testpatterns.FileSizeMedium, SupportedFsType: sets.NewString( "", // Default fsType

} } <del> func (h *hostpathDriver) GetDriverInfo() *DriverInfo { </del> <ins> func (h *hostPathDriver) GetDriverInfo() *DriverInfo { </ins> return &h.driverInfo } <del> func (h *hostpathDriver) SkipUnsupportedTest(pattern testpatterns.TestPattern) { </del> <ins> func (h *hostPathDriver) SkipUnsupportedTest(pattern testpatterns.TestPattern) { </ins> } <del> func (h *hostpathDriver) GetVolumeSource(readOnly bool, fsType string) *v1.VolumeSource { // hostpath doesn't support readOnly volume </del> <ins> func (h *hostPathDriver) GetVolumeSource(readOnly bool, fsType string) *v1.VolumeSource { // hostPath doesn't support readOnly volume </ins> if readOnly { return nil }

} } <del> func (h *hostpathDriver) CreateDriver() { </del> <ins> func (h *hostPathDriver) CreateDriver() { </ins> } <del> func (h *hostpathDriver) CleanupDriver() { </del> <ins> func (h *hostPathDriver) CleanupDriver() { </ins> } <del> func (h *hostpathDriver) CreateVolume(volType testpatterns.TestVolType) { </del> <ins> func (h *hostPathDriver) CreateVolume(volType testpatterns.TestVolType) { </ins> f := h.driverInfo.Framework cs := f.ClientSet

h.driverInfo.Config.ClientNodeName = node.Name } <del> func (h *hostpathDriver) DeleteVolume(volType testpatterns.TestVolType) { </del> <ins> func (h *hostPathDriver) DeleteVolume(volType testpatterns.TestVolType) { </ins> } <del> // HostpathSymlink type hostpathSymlinkDriver struct { </del> <ins> // HostPathSymlink type hostPathSymlinkDriver struct { </ins> node       v1.Node sourcePath string targetPath string

driverInfo DriverInfo } <del> var _ TestDriver = &hostpathSymlinkDriver{} var _ PreprovisionedVolumeTestDriver = &hostpathSymlinkDriver{} var _ InlineVolumeTestDriver = &hostpathSymlinkDriver{} </del> <ins> var _ TestDriver = &hostPathSymlinkDriver{} var _ PreprovisionedVolumeTestDriver = &hostPathSymlinkDriver{} var _ InlineVolumeTestDriver = &hostPathSymlinkDriver{} </ins> <del> // InitHostpathSymlinkDriver returns hostpathSymlinkDriver that implements TestDriver interface func InitHostpathSymlinkDriver() TestDriver { return &hostpathSymlinkDriver{ </del> <ins> // InitHostPathSymlinkDriver returns hostPathSymlinkDriver that implements TestDriver interface func InitHostPathSymlinkDriver() TestDriver { return &hostPathSymlinkDriver{ </ins> driverInfo: DriverInfo{ <del> Name:        "hostpathSymlink", </del> <ins> Name:        "hostPathSymlink", </ins> MaxFileSize: testpatterns.FileSizeMedium, SupportedFsType: sets.NewString( "", // Default fsType

} } <del> func (h *hostpathSymlinkDriver) GetDriverInfo() *DriverInfo { </del> <ins> func (h *hostPathSymlinkDriver) GetDriverInfo() *DriverInfo { </ins> return &h.driverInfo } <del> func (h *hostpathSymlinkDriver) SkipUnsupportedTest(pattern testpatterns.TestPattern) { </del> <ins> func (h *hostPathSymlinkDriver) SkipUnsupportedTest(pattern testpatterns.TestPattern) { </ins> } <del> func (h *hostpathSymlinkDriver) GetVolumeSource(readOnly bool, fsType string) *v1.VolumeSource { // hostpath doesn't support readOnly volume </del> <ins> func (h *hostPathSymlinkDriver) GetVolumeSource(readOnly bool, fsType string) *v1.VolumeSource { // hostPathSymlink doesn't support readOnly volume </ins> if readOnly { return nil }

} } <del> func (h *hostpathSymlinkDriver) CreateDriver() { </del> <ins> func (h *hostPathSymlinkDriver) CreateDriver() { </ins> } <del> func (h *hostpathSymlinkDriver) CleanupDriver() { </del> <ins> func (h *hostPathSymlinkDriver) CleanupDriver() { </ins> } <del> func (h *hostpathSymlinkDriver) CreateVolume(volType testpatterns.TestVolType) { </del> <ins> func (h *hostPathSymlinkDriver) CreateVolume(volType testpatterns.TestVolType) { </ins> f := h.driverInfo.Framework cs := f.ClientSet

cmd := fmt.Sprintf("mkdir %v -m 777 && ln -s %v %v", h.sourcePath, h.sourcePath, h.targetPath) privileged := true <del> // Launch pod to initialize hostpath directory and symlink </del> <ins> // Launch pod to initialize hostPath directory and symlink </ins> h.prepPod = &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("hostpath-symlink-prep-%s", f.Namespace.Name),

} // h.prepPod will be reused in cleanupDriver. pod, err := f.ClientSet.CoreV1().Pods(f.Namespace.Name).Create(h.prepPod) <del> Expect(err).ToNot(HaveOccurred(), "while creating hostpath init pod") </del> <ins> Expect(err).ToNot(HaveOccurred(), "while creating hostPath init pod") </ins> err = framework.WaitForPodSuccessInNamespace(f.ClientSet, pod.Name, pod.Namespace) <del> Expect(err).ToNot(HaveOccurred(), "while waiting for hostpath init pod to succeed") </del> <ins> Expect(err).ToNot(HaveOccurred(), "while waiting for hostPath init pod to succeed") </ins> err = framework.DeletePodWithWait(f, f.ClientSet, pod) <del> Expect(err).ToNot(HaveOccurred(), "while deleting hostpath init pod") </del> <ins> Expect(err).ToNot(HaveOccurred(), "while deleting hostPath init pod") </ins> } <del> func (h *hostpathSymlinkDriver) DeleteVolume(volType testpatterns.TestVolType) { </del> <ins> func (h *hostPathSymlinkDriver) DeleteVolume(volType testpatterns.TestVolType) { </ins> f := h.driverInfo.Framework cmd := fmt.Sprintf("rm -rf %v&& rm -rf %v", h.targetPath, h.sourcePath) h.prepPod.Spec.Containers[0].Command = []string{"/bin/sh", "-ec", cmd} pod, err := f.ClientSet.CoreV1().Pods(f.Namespace.Name).Create(h.prepPod) <del> Expect(err).ToNot(HaveOccurred(), "while creating hostpath teardown pod") </del> <ins> Expect(err).ToNot(HaveOccurred(), "while creating hostPath teardown pod") </ins> err = framework.WaitForPodSuccessInNamespace(f.ClientSet, pod.Name, pod.Namespace) <del> Expect(err).ToNot(HaveOccurred(), "while waiting for hostpath teardown pod to succeed") </del> <ins> Expect(err).ToNot(HaveOccurred(), "while waiting for hostPath teardown pod to succeed") </ins> err = framework.DeletePodWithWait(f, f.ClientSet, pod) <del> Expect(err).ToNot(HaveOccurred(), "while deleting hostpath teardown pod") </del> <ins> Expect(err).ToNot(HaveOccurred(), "while deleting hostPath teardown pod") </ins> } // emptydir

drivers.InitISCSIDriver, drivers.InitRbdDriver, drivers.InitCephFSDriver, <del> drivers.InitHostpathDriver, drivers.InitHostpathSymlinkDriver, </del> <ins> drivers.InitHostPathDriver, drivers.InitHostPathSymlinkDriver, </ins> drivers.InitEmptydirDriver, drivers.InitCinderDriver, drivers.InitGceDriver,