Use `cat -v` command instead of `catv` for the latest version of
busybox(V1.28.0) with multi-arch
Signed-off-by: Dennis Chen <dennis.chen@arm.com>
| ... | ... |
@@ -2239,7 +2239,16 @@ func (s *DockerSuite) TestRunSlowStdoutConsumer(c *check.C) {
|
| 2239 | 2239 |
// TODO Windows: This should be able to run on Windows if can find an |
| 2240 | 2240 |
// alternate to /dev/zero and /dev/stdout. |
| 2241 | 2241 |
testRequires(c, DaemonIsLinux) |
| 2242 |
- cont := exec.Command(dockerBinary, "run", "--rm", "busybox", "/bin/sh", "-c", "dd if=/dev/zero of=/dev/stdout bs=1024 count=2000 | catv") |
|
| 2242 |
+ |
|
| 2243 |
+ // TODO will remove this if issue #35963 fixed |
|
| 2244 |
+ var args []string |
|
| 2245 |
+ if runtime.GOARCH == "amd64" {
|
|
| 2246 |
+ args = []string{"run", "--rm", "busybox", "/bin/sh", "-c", "dd if=/dev/zero of=/dev/stdout bs=1024 count=2000 | catv"}
|
|
| 2247 |
+ } else {
|
|
| 2248 |
+ args = []string{"run", "--rm", "busybox", "/bin/sh", "-c", "dd if=/dev/zero of=/dev/stdout bs=1024 count=2000 | cat -v"}
|
|
| 2249 |
+ } |
|
| 2250 |
+ |
|
| 2251 |
+ cont := exec.Command(dockerBinary, args...) |
|
| 2243 | 2252 |
|
| 2244 | 2253 |
stdout, err := cont.StdoutPipe() |
| 2245 | 2254 |
if err != nil {
|