Change:
}, }, } <ins> } createAndWaitPod := func(pod *v1.Pod) error { podClient.Create(pod) return framework.WaitForPodSuccessInNamespace(f.ClientSet, pod.Name, f.Namespace.Name) } var logPodName string BeforeEach(func() { if framework.TestContext.ContainerRuntime == "docker" { // Container Log Path support requires JSON logging driver. // It does not work when Docker daemon is logging to journald. d, err := getDockerLoggingDriver() framework.ExpectNoError(err) if d != "json-file" { framework.Skipf("Skipping because Docker daemon is using a logging driver other than "json-file": %s", d) } // Even if JSON logging is in use, this test fails if SELinux support // is enabled, since the isolation provided by the SELinux policy // prevents processes running inside Docker containers (under SELinux // type svirt_lxc_net_t) from accessing the log files which are owned // by Docker (and labeled with the container_var_lib_t type.) // // Therefore, let's also skip this test when running with SELinux // support enabled. e, err := isDockerSELinuxSupportEnabled() framework.ExpectNoError(err) if e { framework.Skipf("Skipping because Docker daemon is running with SELinux support enabled") } } podClient = f.PodClient() logPodName = "log-pod-" + string(uuid.NewUUID()) err := createAndWaitPod(makeLogPod(logPodName, logString)) framework.ExpectNoError(err, "Failed waiting for pod: %s to enter success state", logPodName) }) It("should print log to correct log path", func() { logDir := kubelet.ContainerLogsDir // get containerID from created Pod createdLogPod, err := podClient.Get(logPodName, metav1.GetOptions{}) logContainerID := kubecontainer.ParseContainerID(createdLogPod.Status.ContainerStatuses[0].ContainerID) framework.ExpectNoError(err, "Failed to get pod: %s", logPodName) // build log file path expectedlogFile := logDir + "/" + logPodName + "_" + f.Namespace.Name + "_" + logContainerName + "-" + logContainerID.ID + ".log" logCheckPodName := "log-check-" + string(uuid.NewUUID()) err = createAndWaitPod(makeLogCheckPod(logCheckPodName, logString, expectedlogFile)) framework.ExpectNoError(err, "Failed waiting for pod: %s to enter success state", logCheckPodName) }) It("should print log to correct cri log path", func() { logCRIDir := "/var/log/pods" // get podID from created Pod createdLogPod, err := podClient.Get(logPodName, metav1.GetOptions{}) podID := string(createdLogPod.UID) // build log cri file path expectedCRILogFile := logCRIDir + "/" + podID + "/" + logContainerName + "/0.log" </ins> <del> podClient.Create(checkPod) err = framework.WaitForPodSuccessInNamespace(f.ClientSet, checkPodName, ns) framework.ExpectNoError(err, "Failed waiting for pod: %s to enter success state", checkPodName) </del> <ins> logCRICheckPodName := "log-cri-check-" + string(uuid.NewUUID()) err = createAndWaitPod(makeLogCheckPod(logCRICheckPodName, logString, expectedCRILogFile)) framework.ExpectNoError(err, "Failed waiting for pod: %s to enter success state", logCRICheckPodName) </ins> }) }) })

Discussion:
The should be updated to check CRI log paths.
Issues go stale after 90d of inactivity. Mark the issue as fresh with . Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with . Send feedback to sig-testing, kubernetes/test-infra and/or . /lifecycle stale
Stale issues rot after 30d of inactivity. Mark the issue as fresh with . Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with . Send feedback to sig-testing, kubernetes/test-infra and/or . /lifecycle rotten
May I try to help with this?
GitHub didn't allow me to assign the following users: fatsheep9146. Note that only and repo collaborators can be assigned. For more information please see <detailsIn response to : /assign Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details