docker_cli_exec_test.go 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646
  1. // +build !test_no_exec
  2. package main
  3. import (
  4. "bufio"
  5. "fmt"
  6. "os"
  7. "os/exec"
  8. "path/filepath"
  9. "reflect"
  10. "sort"
  11. "strings"
  12. "sync"
  13. "time"
  14. "github.com/go-check/check"
  15. )
  16. func (s *DockerSuite) TestExec(c *check.C) {
  17. runCmd := exec.Command(dockerBinary, "run", "-d", "--name", "testing", "busybox", "sh", "-c", "echo test > /tmp/file && top")
  18. if out, _, _, err := runCommandWithStdoutStderr(runCmd); err != nil {
  19. c.Fatal(out, err)
  20. }
  21. execCmd := exec.Command(dockerBinary, "exec", "testing", "cat", "/tmp/file")
  22. out, _, err := runCommandWithOutput(execCmd)
  23. if err != nil {
  24. c.Fatal(out, err)
  25. }
  26. out = strings.Trim(out, "\r\n")
  27. if expected := "test"; out != expected {
  28. c.Errorf("container exec should've printed %q but printed %q", expected, out)
  29. }
  30. }
  31. func (s *DockerSuite) TestExecInteractive(c *check.C) {
  32. runCmd := exec.Command(dockerBinary, "run", "-d", "--name", "testing", "busybox", "sh", "-c", "echo test > /tmp/file && top")
  33. if out, _, _, err := runCommandWithStdoutStderr(runCmd); err != nil {
  34. c.Fatal(out, err)
  35. }
  36. execCmd := exec.Command(dockerBinary, "exec", "-i", "testing", "sh")
  37. stdin, err := execCmd.StdinPipe()
  38. if err != nil {
  39. c.Fatal(err)
  40. }
  41. stdout, err := execCmd.StdoutPipe()
  42. if err != nil {
  43. c.Fatal(err)
  44. }
  45. if err := execCmd.Start(); err != nil {
  46. c.Fatal(err)
  47. }
  48. if _, err := stdin.Write([]byte("cat /tmp/file\n")); err != nil {
  49. c.Fatal(err)
  50. }
  51. r := bufio.NewReader(stdout)
  52. line, err := r.ReadString('\n')
  53. if err != nil {
  54. c.Fatal(err)
  55. }
  56. line = strings.TrimSpace(line)
  57. if line != "test" {
  58. c.Fatalf("Output should be 'test', got '%q'", line)
  59. }
  60. if err := stdin.Close(); err != nil {
  61. c.Fatal(err)
  62. }
  63. finish := make(chan struct{})
  64. go func() {
  65. if err := execCmd.Wait(); err != nil {
  66. c.Fatal(err)
  67. }
  68. close(finish)
  69. }()
  70. select {
  71. case <-finish:
  72. case <-time.After(1 * time.Second):
  73. c.Fatal("docker exec failed to exit on stdin close")
  74. }
  75. }
  76. func (s *DockerSuite) TestExecAfterContainerRestart(c *check.C) {
  77. runCmd := exec.Command(dockerBinary, "run", "-d", "busybox", "top")
  78. out, _, err := runCommandWithOutput(runCmd)
  79. if err != nil {
  80. c.Fatal(out, err)
  81. }
  82. cleanedContainerID := strings.TrimSpace(out)
  83. runCmd = exec.Command(dockerBinary, "restart", cleanedContainerID)
  84. if out, _, err = runCommandWithOutput(runCmd); err != nil {
  85. c.Fatal(out, err)
  86. }
  87. runCmd = exec.Command(dockerBinary, "exec", cleanedContainerID, "echo", "hello")
  88. out, _, err = runCommandWithOutput(runCmd)
  89. if err != nil {
  90. c.Fatal(out, err)
  91. }
  92. outStr := strings.TrimSpace(out)
  93. if outStr != "hello" {
  94. c.Errorf("container should've printed hello, instead printed %q", outStr)
  95. }
  96. }
  97. func (s *DockerDaemonSuite) TestExecAfterDaemonRestart(c *check.C) {
  98. testRequires(c, SameHostDaemon)
  99. if err := s.d.StartWithBusybox(); err != nil {
  100. c.Fatalf("Could not start daemon with busybox: %v", err)
  101. }
  102. if out, err := s.d.Cmd("run", "-d", "--name", "top", "-p", "80", "busybox:latest", "top"); err != nil {
  103. c.Fatalf("Could not run top: err=%v\n%s", err, out)
  104. }
  105. if err := s.d.Restart(); err != nil {
  106. c.Fatalf("Could not restart daemon: %v", err)
  107. }
  108. if out, err := s.d.Cmd("start", "top"); err != nil {
  109. c.Fatalf("Could not start top after daemon restart: err=%v\n%s", err, out)
  110. }
  111. out, err := s.d.Cmd("exec", "top", "echo", "hello")
  112. if err != nil {
  113. c.Fatalf("Could not exec on container top: err=%v\n%s", err, out)
  114. }
  115. outStr := strings.TrimSpace(string(out))
  116. if outStr != "hello" {
  117. c.Errorf("container should've printed hello, instead printed %q", outStr)
  118. }
  119. }
  120. // Regression test for #9155, #9044
  121. func (s *DockerSuite) TestExecEnv(c *check.C) {
  122. runCmd := exec.Command(dockerBinary, "run",
  123. "-e", "LALA=value1",
  124. "-e", "LALA=value2",
  125. "-d", "--name", "testing", "busybox", "top")
  126. if out, _, _, err := runCommandWithStdoutStderr(runCmd); err != nil {
  127. c.Fatal(out, err)
  128. }
  129. execCmd := exec.Command(dockerBinary, "exec", "testing", "env")
  130. out, _, err := runCommandWithOutput(execCmd)
  131. if err != nil {
  132. c.Fatal(out, err)
  133. }
  134. if strings.Contains(out, "LALA=value1") ||
  135. !strings.Contains(out, "LALA=value2") ||
  136. !strings.Contains(out, "HOME=/root") {
  137. c.Errorf("exec env(%q), expect %q, %q", out, "LALA=value2", "HOME=/root")
  138. }
  139. }
  140. func (s *DockerSuite) TestExecExitStatus(c *check.C) {
  141. runCmd := exec.Command(dockerBinary, "run", "-d", "--name", "top", "busybox", "top")
  142. if out, _, _, err := runCommandWithStdoutStderr(runCmd); err != nil {
  143. c.Fatal(out, err)
  144. }
  145. // Test normal (non-detached) case first
  146. cmd := exec.Command(dockerBinary, "exec", "top", "sh", "-c", "exit 23")
  147. ec, _ := runCommand(cmd)
  148. if ec != 23 {
  149. c.Fatalf("Should have had an ExitCode of 23, not: %d", ec)
  150. }
  151. }
  152. func (s *DockerSuite) TestExecPausedContainer(c *check.C) {
  153. defer unpauseAllContainers()
  154. runCmd := exec.Command(dockerBinary, "run", "-d", "--name", "testing", "busybox", "top")
  155. out, _, err := runCommandWithOutput(runCmd)
  156. if err != nil {
  157. c.Fatal(out, err)
  158. }
  159. ContainerID := strings.TrimSpace(out)
  160. pausedCmd := exec.Command(dockerBinary, "pause", "testing")
  161. out, _, _, err = runCommandWithStdoutStderr(pausedCmd)
  162. if err != nil {
  163. c.Fatal(out, err)
  164. }
  165. execCmd := exec.Command(dockerBinary, "exec", "-i", "-t", ContainerID, "echo", "hello")
  166. out, _, err = runCommandWithOutput(execCmd)
  167. if err == nil {
  168. c.Fatal("container should fail to exec new command if it is paused")
  169. }
  170. expected := ContainerID + " is paused, unpause the container before exec"
  171. if !strings.Contains(out, expected) {
  172. c.Fatal("container should not exec new command if it is paused")
  173. }
  174. }
  175. // regression test for #9476
  176. func (s *DockerSuite) TestExecTtyCloseStdin(c *check.C) {
  177. cmd := exec.Command(dockerBinary, "run", "-d", "-it", "--name", "exec_tty_stdin", "busybox")
  178. if out, _, err := runCommandWithOutput(cmd); err != nil {
  179. c.Fatal(out, err)
  180. }
  181. cmd = exec.Command(dockerBinary, "exec", "-i", "exec_tty_stdin", "cat")
  182. stdinRw, err := cmd.StdinPipe()
  183. if err != nil {
  184. c.Fatal(err)
  185. }
  186. stdinRw.Write([]byte("test"))
  187. stdinRw.Close()
  188. if out, _, err := runCommandWithOutput(cmd); err != nil {
  189. c.Fatal(out, err)
  190. }
  191. cmd = exec.Command(dockerBinary, "top", "exec_tty_stdin")
  192. out, _, err := runCommandWithOutput(cmd)
  193. if err != nil {
  194. c.Fatal(out, err)
  195. }
  196. outArr := strings.Split(out, "\n")
  197. if len(outArr) > 3 || strings.Contains(out, "nsenter-exec") {
  198. // This is the really bad part
  199. if out, _, err := runCommandWithOutput(exec.Command(dockerBinary, "rm", "-f", "exec_tty_stdin")); err != nil {
  200. c.Fatal(out, err)
  201. }
  202. c.Fatalf("exec process left running\n\t %s", out)
  203. }
  204. }
  205. func (s *DockerSuite) TestExecTtyWithoutStdin(c *check.C) {
  206. cmd := exec.Command(dockerBinary, "run", "-d", "-ti", "busybox")
  207. out, _, err := runCommandWithOutput(cmd)
  208. if err != nil {
  209. c.Fatalf("failed to start container: %v (%v)", out, err)
  210. }
  211. id := strings.TrimSpace(out)
  212. if err := waitRun(id); err != nil {
  213. c.Fatal(err)
  214. }
  215. defer func() {
  216. cmd := exec.Command(dockerBinary, "kill", id)
  217. if out, _, err := runCommandWithOutput(cmd); err != nil {
  218. c.Fatalf("failed to kill container: %v (%v)", out, err)
  219. }
  220. }()
  221. done := make(chan struct{})
  222. go func() {
  223. defer close(done)
  224. cmd := exec.Command(dockerBinary, "exec", "-ti", id, "true")
  225. if _, err := cmd.StdinPipe(); err != nil {
  226. c.Fatal(err)
  227. }
  228. expected := "cannot enable tty mode"
  229. if out, _, err := runCommandWithOutput(cmd); err == nil {
  230. c.Fatal("exec should have failed")
  231. } else if !strings.Contains(out, expected) {
  232. c.Fatalf("exec failed with error %q: expected %q", out, expected)
  233. }
  234. }()
  235. select {
  236. case <-done:
  237. case <-time.After(3 * time.Second):
  238. c.Fatal("exec is running but should have failed")
  239. }
  240. }
  241. func (s *DockerSuite) TestExecParseError(c *check.C) {
  242. runCmd := exec.Command(dockerBinary, "run", "-d", "--name", "top", "busybox", "top")
  243. if out, _, err := runCommandWithOutput(runCmd); err != nil {
  244. c.Fatal(out, err)
  245. }
  246. // Test normal (non-detached) case first
  247. cmd := exec.Command(dockerBinary, "exec", "top")
  248. if _, stderr, code, err := runCommandWithStdoutStderr(cmd); err == nil || !strings.Contains(stderr, "See '"+dockerBinary+" exec --help'") || code == 0 {
  249. c.Fatalf("Should have thrown error & point to help: %s", stderr)
  250. }
  251. }
  252. func (s *DockerSuite) TestExecStopNotHanging(c *check.C) {
  253. if out, err := exec.Command(dockerBinary, "run", "-d", "--name", "testing", "busybox", "top").CombinedOutput(); err != nil {
  254. c.Fatal(out, err)
  255. }
  256. if err := exec.Command(dockerBinary, "exec", "testing", "top").Start(); err != nil {
  257. c.Fatal(err)
  258. }
  259. wait := make(chan struct{})
  260. go func() {
  261. if out, err := exec.Command(dockerBinary, "stop", "testing").CombinedOutput(); err != nil {
  262. c.Fatal(out, err)
  263. }
  264. close(wait)
  265. }()
  266. select {
  267. case <-time.After(3 * time.Second):
  268. c.Fatal("Container stop timed out")
  269. case <-wait:
  270. }
  271. }
  272. func (s *DockerSuite) TestExecCgroup(c *check.C) {
  273. var cmd *exec.Cmd
  274. cmd = exec.Command(dockerBinary, "run", "-d", "--name", "testing", "busybox", "top")
  275. _, err := runCommand(cmd)
  276. if err != nil {
  277. c.Fatal(err)
  278. }
  279. cmd = exec.Command(dockerBinary, "exec", "testing", "cat", "/proc/1/cgroup")
  280. out, _, err := runCommandWithOutput(cmd)
  281. if err != nil {
  282. c.Fatal(out, err)
  283. }
  284. containerCgroups := sort.StringSlice(strings.Split(string(out), "\n"))
  285. var wg sync.WaitGroup
  286. var mu sync.Mutex
  287. execCgroups := []sort.StringSlice{}
  288. // exec a few times concurrently to get consistent failure
  289. for i := 0; i < 5; i++ {
  290. wg.Add(1)
  291. go func() {
  292. cmd := exec.Command(dockerBinary, "exec", "testing", "cat", "/proc/self/cgroup")
  293. out, _, err := runCommandWithOutput(cmd)
  294. if err != nil {
  295. c.Fatal(out, err)
  296. }
  297. cg := sort.StringSlice(strings.Split(string(out), "\n"))
  298. mu.Lock()
  299. execCgroups = append(execCgroups, cg)
  300. mu.Unlock()
  301. wg.Done()
  302. }()
  303. }
  304. wg.Wait()
  305. for _, cg := range execCgroups {
  306. if !reflect.DeepEqual(cg, containerCgroups) {
  307. fmt.Println("exec cgroups:")
  308. for _, name := range cg {
  309. fmt.Printf(" %s\n", name)
  310. }
  311. fmt.Println("container cgroups:")
  312. for _, name := range containerCgroups {
  313. fmt.Printf(" %s\n", name)
  314. }
  315. c.Fatal("cgroups mismatched")
  316. }
  317. }
  318. }
  319. func (s *DockerSuite) TestInspectExecID(c *check.C) {
  320. out, exitCode, err := runCommandWithOutput(exec.Command(dockerBinary, "run", "-d", "busybox", "top"))
  321. if exitCode != 0 || err != nil {
  322. c.Fatalf("failed to run container: %s, %v", out, err)
  323. }
  324. id := strings.TrimSuffix(out, "\n")
  325. out, err = inspectField(id, "ExecIDs")
  326. if err != nil {
  327. c.Fatalf("failed to inspect container: %s, %v", out, err)
  328. }
  329. if out != "[]" {
  330. c.Fatalf("ExecIDs should be empty, got: %s", out)
  331. }
  332. exitCode, err = runCommand(exec.Command(dockerBinary, "exec", "-d", id, "ls", "/"))
  333. if exitCode != 0 || err != nil {
  334. c.Fatalf("failed to exec in container: %s, %v", out, err)
  335. }
  336. out, err = inspectField(id, "ExecIDs")
  337. if err != nil {
  338. c.Fatalf("failed to inspect container: %s, %v", out, err)
  339. }
  340. out = strings.TrimSuffix(out, "\n")
  341. if out == "[]" || out == "<no value>" {
  342. c.Fatalf("ExecIDs should not be empty, got: %s", out)
  343. }
  344. }
  345. func (s *DockerSuite) TestLinksPingLinkedContainersOnRename(c *check.C) {
  346. var out string
  347. out, _ = dockerCmd(c, "run", "-d", "--name", "container1", "busybox", "top")
  348. idA := strings.TrimSpace(out)
  349. if idA == "" {
  350. c.Fatal(out, "id should not be nil")
  351. }
  352. out, _ = dockerCmd(c, "run", "-d", "--link", "container1:alias1", "--name", "container2", "busybox", "top")
  353. idB := strings.TrimSpace(out)
  354. if idB == "" {
  355. c.Fatal(out, "id should not be nil")
  356. }
  357. execCmd := exec.Command(dockerBinary, "exec", "container2", "ping", "-c", "1", "alias1", "-W", "1")
  358. out, _, err := runCommandWithOutput(execCmd)
  359. if err != nil {
  360. c.Fatal(out, err)
  361. }
  362. dockerCmd(c, "rename", "container1", "container_new")
  363. execCmd = exec.Command(dockerBinary, "exec", "container2", "ping", "-c", "1", "alias1", "-W", "1")
  364. out, _, err = runCommandWithOutput(execCmd)
  365. if err != nil {
  366. c.Fatal(out, err)
  367. }
  368. }
  369. func (s *DockerSuite) TestRunExecDir(c *check.C) {
  370. testRequires(c, SameHostDaemon)
  371. cmd := exec.Command(dockerBinary, "run", "-d", "busybox", "top")
  372. out, _, err := runCommandWithOutput(cmd)
  373. if err != nil {
  374. c.Fatal(err, out)
  375. }
  376. id := strings.TrimSpace(out)
  377. execDir := filepath.Join(execDriverPath, id)
  378. stateFile := filepath.Join(execDir, "state.json")
  379. {
  380. fi, err := os.Stat(execDir)
  381. if err != nil {
  382. c.Fatal(err)
  383. }
  384. if !fi.IsDir() {
  385. c.Fatalf("%q must be a directory", execDir)
  386. }
  387. fi, err = os.Stat(stateFile)
  388. if err != nil {
  389. c.Fatal(err)
  390. }
  391. }
  392. stopCmd := exec.Command(dockerBinary, "stop", id)
  393. out, _, err = runCommandWithOutput(stopCmd)
  394. if err != nil {
  395. c.Fatal(err, out)
  396. }
  397. {
  398. _, err := os.Stat(execDir)
  399. if err == nil {
  400. c.Fatal(err)
  401. }
  402. if err == nil {
  403. c.Fatalf("Exec directory %q exists for removed container!", execDir)
  404. }
  405. if !os.IsNotExist(err) {
  406. c.Fatalf("Error should be about non-existing, got %s", err)
  407. }
  408. }
  409. startCmd := exec.Command(dockerBinary, "start", id)
  410. out, _, err = runCommandWithOutput(startCmd)
  411. if err != nil {
  412. c.Fatal(err, out)
  413. }
  414. {
  415. fi, err := os.Stat(execDir)
  416. if err != nil {
  417. c.Fatal(err)
  418. }
  419. if !fi.IsDir() {
  420. c.Fatalf("%q must be a directory", execDir)
  421. }
  422. fi, err = os.Stat(stateFile)
  423. if err != nil {
  424. c.Fatal(err)
  425. }
  426. }
  427. rmCmd := exec.Command(dockerBinary, "rm", "-f", id)
  428. out, _, err = runCommandWithOutput(rmCmd)
  429. if err != nil {
  430. c.Fatal(err, out)
  431. }
  432. {
  433. _, err := os.Stat(execDir)
  434. if err == nil {
  435. c.Fatal(err)
  436. }
  437. if err == nil {
  438. c.Fatalf("Exec directory %q is exists for removed container!", execDir)
  439. }
  440. if !os.IsNotExist(err) {
  441. c.Fatalf("Error should be about non-existing, got %s", err)
  442. }
  443. }
  444. }
  445. func (s *DockerSuite) TestRunMutableNetworkFiles(c *check.C) {
  446. testRequires(c, SameHostDaemon)
  447. for _, fn := range []string{"resolv.conf", "hosts"} {
  448. deleteAllContainers()
  449. content, err := runCommandAndReadContainerFile(fn, exec.Command(dockerBinary, "run", "-d", "--name", "c1", "busybox", "sh", "-c", fmt.Sprintf("echo success >/etc/%s && top", fn)))
  450. if err != nil {
  451. c.Fatal(err)
  452. }
  453. if strings.TrimSpace(string(content)) != "success" {
  454. c.Fatal("Content was not what was modified in the container", string(content))
  455. }
  456. out, _, err := runCommandWithOutput(exec.Command(dockerBinary, "run", "-d", "--name", "c2", "busybox", "top"))
  457. if err != nil {
  458. c.Fatal(err)
  459. }
  460. contID := strings.TrimSpace(out)
  461. netFilePath := containerStorageFile(contID, fn)
  462. f, err := os.OpenFile(netFilePath, os.O_WRONLY|os.O_SYNC|os.O_APPEND, 0644)
  463. if err != nil {
  464. c.Fatal(err)
  465. }
  466. if _, err := f.Seek(0, 0); err != nil {
  467. f.Close()
  468. c.Fatal(err)
  469. }
  470. if err := f.Truncate(0); err != nil {
  471. f.Close()
  472. c.Fatal(err)
  473. }
  474. if _, err := f.Write([]byte("success2\n")); err != nil {
  475. f.Close()
  476. c.Fatal(err)
  477. }
  478. f.Close()
  479. res, err := exec.Command(dockerBinary, "exec", contID, "cat", "/etc/"+fn).CombinedOutput()
  480. if err != nil {
  481. c.Fatalf("Output: %s, error: %s", res, err)
  482. }
  483. if string(res) != "success2\n" {
  484. c.Fatalf("Expected content of %s: %q, got: %q", fn, "success2\n", res)
  485. }
  486. }
  487. }
  488. func (s *DockerSuite) TestExecWithUser(c *check.C) {
  489. runCmd := exec.Command(dockerBinary, "run", "-d", "--name", "parent", "busybox", "top")
  490. if out, _, err := runCommandWithOutput(runCmd); err != nil {
  491. c.Fatal(out, err)
  492. }
  493. cmd := exec.Command(dockerBinary, "exec", "-u", "1", "parent", "id")
  494. out, _, err := runCommandWithOutput(cmd)
  495. if err != nil {
  496. c.Fatal(err, out)
  497. }
  498. if !strings.Contains(out, "uid=1(daemon) gid=1(daemon)") {
  499. c.Fatalf("exec with user by id expected daemon user got %s", out)
  500. }
  501. cmd = exec.Command(dockerBinary, "exec", "-u", "root", "parent", "id")
  502. out, _, err = runCommandWithOutput(cmd)
  503. if err != nil {
  504. c.Fatal(err, out)
  505. }
  506. if !strings.Contains(out, "uid=0(root) gid=0(root)") {
  507. c.Fatalf("exec with user by root expected root user got %s", out)
  508. }
  509. }
  510. func (s *DockerSuite) TestExecWithPrivileged(c *check.C) {
  511. runCmd := exec.Command(dockerBinary, "run", "-d", "--name", "parent", "--cap-drop=ALL", "busybox", "top")
  512. if out, _, err := runCommandWithOutput(runCmd); err != nil {
  513. c.Fatal(out, err)
  514. }
  515. cmd := exec.Command(dockerBinary, "exec", "parent", "sh", "-c", "mknod /tmp/sda b 8 0")
  516. out, _, err := runCommandWithOutput(cmd)
  517. if err == nil || !strings.Contains(out, "Operation not permitted") {
  518. c.Fatalf("exec mknod in --cap-drop=ALL container without --privileged should failed")
  519. }
  520. cmd = exec.Command(dockerBinary, "exec", "--privileged", "parent", "sh", "-c", "mknod /tmp/sda b 8 0 && echo ok")
  521. out, _, err = runCommandWithOutput(cmd)
  522. if err != nil {
  523. c.Fatal(err, out)
  524. }
  525. if actual := strings.TrimSpace(out); actual != "ok" {
  526. c.Fatalf("exec mknod in --cap-drop=ALL container with --privileged failed: %v, output: %q", err, out)
  527. }
  528. }