You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by "Dominic Hamon (JIRA)" <ji...@apache.org> on 2014/05/23 02:01:04 UTC

[jira] [Commented] (MESOS-1413) MesosContainerizerExecuteTest.IoRedirection fails on OSX

    [ https://issues.apache.org/jira/browse/MESOS-1413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14006632#comment-14006632 ] 

Dominic Hamon commented on MESOS-1413:
--------------------------------------

For portability, we should either avoid the '-n' flag and compare with the trailing newline or use 'printf' instead.

The former is more common in our codebase so I suggest that approach here.

> MesosContainerizerExecuteTest.IoRedirection  fails on OSX
> ---------------------------------------------------------
>
>                 Key: MESOS-1413
>                 URL: https://issues.apache.org/jira/browse/MESOS-1413
>             Project: Mesos
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 0.19.0
>         Environment: OSX
>            Reporter: Till Toenshoff
>              Labels: build, osx, unit-test
>
> {noformat}
> [----------] 1 test from MesosContainerizerExecuteTest
> [ RUN      ] MesosContainerizerExecuteTest.IoRedirection
> ../../src/tests/containerizer_tests.cpp:486: Failure
> Value of: (os::read(path::join(directory, "stderr"))).get()
>   Actual: "-n this is stderr\n"
> Expected: errMsg
> Which is: "this is stderr"
> ../../src/tests/containerizer_tests.cpp:487: Failure
> Value of: (os::read(path::join(directory, "stdout"))).get()
>   Actual: "-n this is stderr\n"
> Expected: outMsg
> Which is: "this is stderr"
> [  FAILED  ] MesosContainerizerExecuteTest.IoRedirection (2003 ms)
> [----------] 1 test from MesosContainerizerExecuteTest (2003 ms total)
> {noformat}
> OSX manpage on "echo":
>      The echo utility writes any specified operands, separated by single blank (` ') characters and followed by a newline (`\n') character, to the standard output.
>      The following option is available:
>      -n    Do not print the trailing newline character.  This may also be achieved by appending `\c' to the end of the string, as is done by iBCS2 compatible systems.  Note that this option as well as the effect of `\c' are implementation-defined in IEEE Std 1003.1-2001 (``POSIX.1'')
>            as amended by Cor. 1-2002.  {*}Applications aiming for maximum portability are strongly encouraged to use printf(1) to suppress the newline character.{*}
>      Some shells may provide a builtin echo command which is similar or identical to this utility.  Most notably, the builtin echo in sh(1) does not accept the -n option.  Consult the builtin(1) manual page.



--
This message was sent by Atlassian JIRA
(v6.2#6252)