From 4134a372335d02eb7adb9a8b07a835fec36d077f Mon Sep 17 00:00:00 2001
From: karta0807913 <karta0807913@gmail.com>
Date: Tue, 6 Dec 2022 01:25:54 +0000
Subject: [PATCH] Fix test

Signed-off-by: karta0807913 <karta0807913@gmail.com>
---
 pkg/specgen/generate/container_create.go | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/pkg/specgen/generate/container_create.go b/pkg/specgen/generate/container_create.go
index f1bcabf40f..1cb3731859 100644
--- a/pkg/specgen/generate/container_create.go
+++ b/pkg/specgen/generate/container_create.go
@@ -614,6 +614,11 @@ func Inherit(infra libpod.Container, s *specgen.SpecGenerator, rt *libpod.Runtim
 		return nil, nil, nil, err
 	}
 
+	// podman pod container can override pod ipc NS
+	if !s.IpcNS.IsDefault() {
+		inheritSpec.IpcNS = s.IpcNS
+	}
+
 	// this causes errors when shmSize is the default value, it will still get passed down unless we manually override.
 	if inheritSpec.IpcNS.NSMode == specgen.Host && (compatibleOptions.ShmSize != nil && compatibleOptions.IsDefaultShmSize()) {
 		s.ShmSize = nil