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
0001392 [BusyBox] Standards Compliance major always 06-13-07 19:11 07-14-07 18:21
Reporter bvoigt View Status public  
Assigned To BusyBox
Priority normal Resolution fixed  
Status closed   Product Version svn
Summary 0001392: -f test not working
Description # [ -f /bin/busybox ] && echo ok || echo bad
bad
# ls -Al /bin/busybox
-rwxr-xr-x 1 root root 296736 Jun 14 02:07 /bin/busybox

I think I have the syntax right because this used to work, and it also works in GNU bash.
Additional Information # [ --help
BusyBox v1.7.0.svn (2007-06-13 21:05:21 CDT) multi-call binary

Usage: [ EXPRESSION
  or [ EXPRESSION ]

Check file types and compares values returning an exit code
determined by the value of EXPRESSION
Attached Files

- Relationships

- Notes
(0002482)
bvoigt
06-13-07 20:43

This bug is caused by revision 18801

------------------------------------------------------------------------
r18801 | aldot | 2007-06-12 08:21:08 -0500 (Tue, 12 Jun 2007) | 2 lines
Changed paths:
   M /trunk/busybox/coreutils/test.c

- fix testing primary expressions like '"-u" = "-u"'

------------------------------------------------------------------------

Index: test.c
===================================================================
--- test.c (revision 18800)
+++ test.c (revision 18801)
@@ -224,7 +224,7 @@
        if (argc == 2)
                return *argv[1] == '\0';
 //assert(argc);
- if (LONE_CHAR(argv[1], '!')) {
+ {
                bool _off;
                if (argc == 3)
                        return *argv[2] != '\0';
@@ -232,7 +232,7 @@
                t_lex(argv[2 + _off]);
                if (t_wp_op && t_wp_op->op_type == BINOP) {
                        t_wp = &argv[1 + _off];
- return binop() == 1;
+ return binop() == (LONE_CHAR(argv[1], '!'));
                }
        }
        t_wp = &argv[1];
 
(0002603)
vda
07-14-07 18:20

Works in svn (probably fixed in 1.6.1).
 

- Issue History
Date Modified Username Field Change
06-13-07 19:11 bvoigt New Issue
06-13-07 19:11 bvoigt Status new => assigned
06-13-07 19:11 bvoigt Assigned To  => BusyBox
06-13-07 20:43 bvoigt Note Added: 0002482
07-14-07 18:20 vda Status assigned => closed
07-14-07 18:20 vda Note Added: 0002603
07-14-07 18:21 vda Resolution open => fixed


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker