BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001046 [BusyBox] Standards Compliance minor always 09-24-06 05:46 02-14-08 08:25
Reporter walter View Status public  
Assigned To BusyBox
Priority normal Resolution fixed  
Status closed   Product Version 1.2.x
Summary 0001046: ash does not handle quotes propperly (aka like /bin/sh)
Description The following tests are part of the bash-test suite posix2. the bb ash passed all other posix2 tests.


SQUOTE="'"
val1=$(set | sed -n 's:^SQUOTE=::p')
if [ "$val1" != "''\\'''" ]; then
        echo testfail "variable quoting 1"
fi


VHASH=ab#cd
val1=$(set | sed -n 's:^VHASH=::p')
if [ "$val1" != "ab#cd" ]; then
        echo testfail "variable quoting 3"
fi


Additional Information
VHASH
when adding a 'tee' to catch the output of 'set' i see the following:
ash: val1=''"'"'ab#cd'"'"
sh: val1=ab#cd

 SQUOTE
using sh -x (ash -x) shows:
ash: + [ ''"'" != ''\''' ]
sh : + '[' ''\'''\''\'\'''\'''\''' '!=' ''\'''\''\'\'''\'''\''' ']'
Attached Files

- Relationships

- Notes
(0004694)
vda
02-14-08 08:24

Basically, when variable contains a value which is just one single quote,
set builtin shows it as:

bash: SQUOTE=''\'''
ash: SQUOTE=''"'"

Both seem to be ok. I don't see where ash violates SUSv3:

SYNOPSIS
    [XSI] set [-abCefmnuvx][-h][-o option][argument...]
    [XSI] set [+abCefmnuvx][+h][+o option][argument...]
    set -- [argument...]
    set -o
    set +o
DESCRIPTION
If no options or arguments are specified, set shall write the names and values of all shell variables in the collation sequence of the current locale. Each name shall start on a separate line, using the format:

    "%s=%s\n", <name>, <value>

The value string shall be written with appropriate quoting; see the description of shell quoting in Quoting.
 
(0004704)
vda
02-14-08 08:25

As far as I can see, this is not a bug, just difference in set output between bash and ash. Reopen if you think it's a bug.
 

- Issue History
Date Modified Username Field Change
09-24-06 05:46 walter New Issue
09-24-06 05:46 walter Status new => assigned
09-24-06 05:46 walter Assigned To  => BusyBox
02-14-08 08:24 vda Note Added: 0004694
02-14-08 08:25 vda Status assigned => closed
02-14-08 08:25 vda Note Added: 0004704
02-14-08 08:25 vda Resolution open => fixed


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker