anomy-bugs

hidden dependency on bash in test scripts?

From: Rafal Rzeczkowski (16986@xyz.molar.is)
Date: Tue 24 Sep 2002 - 16:37:50 GMT

  • Next message: Bjarni R. Einarsson: "Re: hidden dependency on bash in test scripts?"

    testall.sh in version 1.54 fails on sanitizer.msg-crlf on my system
    (Debian GNU/Linux 3.0 ; sparc64)

    diff shows the following:

    9c9
    < X-Junk: -e DEFANGED[99] X-Evil-Header: boo

    ---
    > X-Junk:  DEFANGED[99] X-Evil-Header: boo
    [...]
    

    indicating that CRHACK= in sanitizer.msg-crlf.t is not initialised correctly, because "echo -e" is a bash-specific feature that doesn't work in ash, which happens to be my /bin/sh

    so, I recommend either:

    1) requiring /bin/bash in this test script (as opposed to generic /bin/sh), or

    2) using /bin/echo from GNU sh-utils, or

    3) generating ^M directly:

    #CRHACK=$(echo -e "\rX-Evil-Header: boo") CRHACK="^MX-Evil-Header: boo"

    where "^M" is the actual return character. Ugly but works.

    Rafal



    hosted by molar.is