[BusyBox 0001285]: Test suite: ash does not recognize shell script keyword "function"

bugs at busybox.net bugs at busybox.net
Fri Jul 13 23:24:50 UTC 2007


The following issue has been CLOSED 
====================================================================== 
http://busybox.net/bugs/view.php?id=1285 
====================================================================== 
Reported By:                kiltedknight
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   1285
Category:                   Other
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     closed
Resolution:                 reopened
Fixed in Version:           
====================================================================== 
Date Submitted:             03-23-2007 12:24 PDT
Last Modified:              07-13-2007 16:24 PDT
====================================================================== 
Summary:                    Test suite:  ash does not recognize shell script
keyword "function"
Description: 
The busybox test suite cannot be run on a system that uses busybox ash as
its shell.

It would be nice to be able to run the test suite on a busybox-native
system on which you can also build busybox.
====================================================================== 

---------------------------------------------------------------------- 
 kiltedknight - 06-05-07 09:55  
---------------------------------------------------------------------- 
Any updates? 

---------------------------------------------------------------------- 
 bernhardf - 06-05-07 10:11  
---------------------------------------------------------------------- 
I once fixed this but landley yelled at me and reverted it.

Care to send a patch which drops those silly "function" keywords and makes
the scripts overall nicer?
Nicer as in testing integers with -lt, -eq et al, making sure that
assignments of strings are quoted (foo="$blah" and not foo=${blah}  )

TIA 

---------------------------------------------------------------------- 
 kiltedknight - 06-05-07 10:41  
---------------------------------------------------------------------- 
Well, I can try... but it also apparently wants pushd and popd, both of
which are bash internals. :/ 

---------------------------------------------------------------------- 
 bernhardf - 06-05-07 10:50  
---------------------------------------------------------------------- 
saving the pwd away and later cd'ing there should do, or cd -

See? 

---------------------------------------------------------------------- 
 kiltedknight - 06-05-07 10:55  
---------------------------------------------------------------------- 
I've been trying to find a man page for ash so I could see what the
equivalent is... you may have just saved me a little time.  Let me see
what I can do. 

---------------------------------------------------------------------- 
 kiltedknight - 06-05-07 11:15  
---------------------------------------------------------------------- 
OK... we also do not have the equivalent of the -I option in grep...

-I     Process a binary file as if it did not contain matching data; this
is equivalent to the --binary-files=without-match option. 

---------------------------------------------------------------------- 
 kiltedknight - 06-05-07 11:26  
---------------------------------------------------------------------- 
The uploaded diff will alter how two shell script functions are declared...
using "funcname ()" instead of "function funcname" 

---------------------------------------------------------------------- 
 vda - 06-05-07 15:29  
---------------------------------------------------------------------- 
Aplied to rev 18750, thanks! 

---------------------------------------------------------------------- 
 kiltedknight - 06-05-07 15:50  
---------------------------------------------------------------------- 
The keyword "function" is not the only issue with not being able to run the
test suite under ash.

There are keywords "pushd," "popd," the fact that you must have xargs
compiled to support the "-0" (zero) option, and a whole bunch of other
things. 

---------------------------------------------------------------------- 
 vda - 07-13-07 16:24  
---------------------------------------------------------------------- 
Testsuite indeed now runs with full-blovn busybox. Making it work with any
conceivable .config is a big task, don't think we can do it. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
03-23-07 12:24  kiltedknight   New Issue                                    
03-23-07 12:24  kiltedknight   Status                   new => assigned     
03-23-07 12:24  kiltedknight   Assigned To               => BusyBox         
03-23-07 12:25  kiltedknight   Issue Monitored: kiltedknight                    
06-05-07 09:55  kiltedknight   Note Added: 0002446                          
06-05-07 10:11  bernhardf      Note Added: 0002448                          
06-05-07 10:41  kiltedknight   Note Added: 0002450                          
06-05-07 10:50  bernhardf      Note Added: 0002451                          
06-05-07 10:55  kiltedknight   Note Added: 0002452                          
06-05-07 11:15  kiltedknight   Note Added: 0002453                          
06-05-07 11:26  kiltedknight   File Added: bb-no-kw-function.diff               
    
06-05-07 11:26  kiltedknight   Note Added: 0002454                          
06-05-07 15:29  vda            Status                   assigned => closed  
06-05-07 15:29  vda            Note Added: 0002455                          
06-05-07 15:29  vda            Resolution               open => fixed       
06-05-07 15:50  kiltedknight   Status                   closed => feedback  
06-05-07 15:50  kiltedknight   Resolution               fixed => reopened   
06-05-07 15:50  kiltedknight   Note Added: 0002456                          
07-13-07 16:24  vda            Status                   feedback => closed  
07-13-07 16:24  vda            Note Added: 0002602                          
======================================================================




More information about the busybox-cvs mailing list