Skip to content
Tcl Source Code History Of Ticket 578159ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 578159ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 578159ffffffffffffffffffffffffffffffffff

  1. Ticket change [64419d78cb] (rid 92728) by kennykb on 2002-07-06 17:50:13:

    1. assignee initialized to: "andreas_kupries"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      The 'exec-18.1' test fails under Windows NT 4.0SP6 in the
      latest HEAD:
      
      
      ==== exec-18.1 exec cat deals with weird file names FAILED
      ==== Contents of test case:
      
          set f "foo\[\{blah"
          set path(fooblah) [makeFile {} $f]
          set fout [open $path(fooblah) w]
          puts $fout "contents"
          close $fout
          set res [list [catch {exec cat $path(fooblah)} msg] $msg]
          removeFile $f
          set res
      
      ---- Result was:
      1 {/usr/bin/cat: D:/SourceForge/tcl/win/foo[\: No such file or directory}
      ---- Result should have been (exact matching):
      0 contents
      ==== exec-18.1 FAILED
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "kennykb"
    9. subsystem initialized to: "27. Channel Types"
    10. title initialized to: "exec-18.1 fails under WinNT"
    11. type initialized to: "Bug"
  2. Ticket change [07a9c1b2d7] (rid 89443) by kennykb on 2002-07-07 01:02:36:

    1. foundin changed to: "obsolete: 8.4b1"
  3. Ticket change [2655a9dd86] (rid 88326) by nobody on 2002-07-08 15:44:33:

    1. icomment:
      Logged In: NO 
      
      Given this worked a week ago, I think it is due to the 
      various tcltest and test suite changes that this has now 
      broken, and is not a channel problem at all.
      
      
      
    2. login: "nobody"
    3. mimetype: "text/plain"
    4. username: "nobody"
  4. Ticket change [01746a90b5] (rid 119487) by vincentdarley on 2002-07-08 19:24:06:

    1. icomment:
      Logged In: YES 
      user_id=32170
      
      The previous version of test 18.1:
      
      test exec-18.1 { exec cat deals with weird file names} 
      {execCommandExists} {
          set f "foo\[\{blah"
          set fout [open $f w]
          puts $fout "contents"
          close $fout
          set res [list [catch {exec cat $f} msg] $msg]
          file delete $f
          set res
      } {0 contents}
      
      works fine, so the problem is in the makeFile etc 
      changes introduced three days ago by Andreas (or in the 
      actual functions 'tcltest::makeFile' etc themselves)
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. priority changed to: "9 Immediate"
    5. subsystem changed to: "34. tcltest Package"
    6. username: "vincentdarley"
  5. Ticket change [d39ef9d149] (rid 123321) by andreas_kupries on 2002-07-09 03:33:25:

    1. assignee changed to: "vincentdarley"
    2. icomment:
      Logged In: YES 
      user_id=75003
      
      Sorry Vince. The difference the between the old and new 
      testcase is whether 'exec cat' is given a relative path (old), or 
      an absolute path (new).
      
      I added some debug output to winPipe, to get a look at the 
      actual command executed (in BuildCommandLine, just before 
      the conversion to TChar*).
      
      The old test runs:
              C:\cygwin\bin\cat.exe foo[\{blah
      
      and the new test calls
              C:\cygwin\bin\cat.exe 
      C:/cygwin/home/Administrator/84/b/foo[\{blah
      
      In the second case something cuts the path off after the '[\', 
      just before the brace. Adding a [file nativename] around the 
      absolute path does not help. The command now run is
      
             C:\cygwin\bin\cat.exe C:\cygwin\home\Administrator\84
      \b\foo[\{blah
      
      and is cut off as before.
      
      To me this looks like a quoting issue in exec, and not as a 
      problem of the testcase. Except that the testcase uncovers 
      the problem now.
      
      Handing over.
      
      
      
    3. login: "andreas_kupries"
    4. mimetype: "text/plain"
    5. username: "andreas_kupries"
  6. Ticket change [64de456c71] (rid 92845) by davygrvy on 2002-07-09 09:38:10:

    1. icomment:
      Logged In: YES 
      user_id=7549
      
      >To me this looks like a quoting issue in exec, and not as a
      >problem of the testcase. Except that the testcase uncovers
      >the problem now.
      
      If what BuildCommandline is outputing correctly, but the 
      result of what's launched is wrong, then the quoting rules 
      used for concatenating argv into a string aren't proper for 
      CreateProcess().  There's some funny stuff with how 
      CreateProcess() expects it's commandline and doesn't seem 
      to be documented well.  Esentially, it goes from
      array->string->array through the system and the last array 
      goes out wrong.  I've seen this before, but don't have a good 
      hold on why.
      
      
      
      
    2. login: "davygrvy"
    3. mimetype: "text/plain"
    4. username: "davygrvy"
  7. Ticket change [5af67be396] (rid 118236) by davygrvy on 2002-07-09 10:00:10:

    1. icomment:
      Logged In: YES 
      user_id=7549
      
      see 528669 as well.
      
      SetArgv() from tclAppInit.c should equal BuildCommandLine() 
      but in reverse.  At least, that's the concept and might be an 
      msvcrt bug...
      
      
    2. login: "davygrvy"
    3. mimetype: "text/plain"
    4. username: "davygrvy"
  8. Ticket change [e56ef8b28c] (rid 104120) by vincentdarley on 2002-07-09 16:03:33:

    1. assignee changed to: "davygrvy"
    2. icomment:
      Logged In: YES 
      user_id=32170
      
      'fraid this isn't my area of expertise at all.  All I know is 
      that this used not to work, then it was fixed recently, 
      but now this new failure seems to indicate that it was 
      only a partial fix, which worked for a simple relative 
      path, but not for an absolute one.
      
      
      
    3. login: "vincentdarley"
    4. mimetype: "text/plain"
    5. username: "vincentdarley"
  9. Ticket change [a93d4881d0] (rid 99121) by davygrvy on 2002-07-09 18:02:51:

    1. icomment:
      Logged In: YES 
      user_id=7549
      
      [exec] itself seems OK from this:
      
      % set f "foo\[\{blah"
      foo[{blah
      % exec cmd.exe /c echo $f
      foo[{blah
      %
      
      --still testing--
      
      
    2. login: "davygrvy"
    3. mimetype: "text/plain"
    4. username: "davygrvy"
  10. Ticket change [72d0a42666] (rid 104928) by vincentdarley on 2002-07-09 19:16:43:

    1. icomment:
      Logged In: YES 
      user_id=32170
      
      It would seem to be a bug in cat?
      
      % exec cat /c/foo\[\{blah
      contents
      % exec cat c:/foo\[\{blah
      /usr/bin/cat: c:/foo[\: No such file or directory
      % exec cat foo\[\{blah
      contents
      %
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"
  11. Ticket change [3e106bc7da] (rid 121199) by nobody on 2002-07-09 22:42:57:

    1. icomment:
      Logged In: NO 
      
      Since it looks as if 'exec' is working, and just 'cat' is 
      broken, perhaps this test can be marked 'knownBug' (on 
      Windows anyway) with a comment to the effect that it is 
      a problem in cat, and a new test can be added which 
      does a 'cd $tempDirectory' and only uses the file tail of 
      the [{ path.
      
      Then we can close this bug (but perhaps someone 
      should report the problem to whoever maintains 
      cygwin's 'cat').
      
      That's if my understanding of the situation is right...
      
      
      
    2. login: "nobody"
    3. mimetype: "text/plain"
    4. username: "nobody"
  12. Ticket change [3023ec2eeb] (rid 93198) by kennykb on 2002-07-09 23:50:07:

    1. icomment:
      Logged In: YES 
      user_id=99768
      
      Perhaps we could use some Tcl script in place of 'cat'?  
      Or use a Windows-supplied command in place of it? 
      (Why an extra dependency on cygwin, anyway?)
      
      
    2. login: "kennykb"
    3. mimetype: "text/plain"
    4. username: "kennykb"
  13. Ticket change [01b60692d9] (rid 119531) by andreas_kupries on 2002-07-10 00:22:09:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      Please note that all the failing commands are completely ok 
      when cat is run from the cygwin bash shell. To me this 
      indicates that there is no error in 'cat', but in the way exec 
      provides the arguments to it. The only way to be sure is to 
      get hold of the sources of cat and modify it to display the 
      arguments it gets. Speculation: Given that the filename is 
      cutoff immediately after the last \, used to quote the brace: 
      cat might get the full filename, i.e. no error in exec, but 
      interpret the \{ as path-separator + brace, and report a 
      missing directory.
      
      The original bug report which prompted this new testcase was
      
      http://sourceforge.net/tracker/index.php?
      func=detail&aid=554068&group_id=10894&atid=110894
      
      As this is about [exec] an external application is required.
      
      Wht we could do is to execute a small test script which 
      simply reports the arguments it got, instead of 'cat'.
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  14. Ticket change [c20dc03622] (rid 111434) by davygrvy on 2002-07-10 02:12:12:

    1. icomment:
      Logged In: YES 
      user_id=7549
      
      >To me this 
      >indicates that there is no error in 'cat', but in the way exec 
      >provides the arguments to it.
      
      There might be some "funny stuff" in the way cat.exe parses 
      GetCommandLine() [the string] into it's argv array that might 
      be a bit different than the "accepted way".  That's the shyly 
      documented part of CreateProcess() and seems to be left to 
      the C run-time.  Having the invoker [bash] launch the child 
      [cat], there's a very good chance the parsing rules are a pure 
      pass-through with a possibly different parsing rule set that 
      this test happens to be exercising now.
      
      I can't say for sure if `cmd.exe /c echo` is a good test either 
      for testing argv parsing.
      
      Can we assume the "accepted way" is the algorithm in 
      msvcrt's setargc.c for parse_cmdline()?
      
      
    2. login: "davygrvy"
    3. mimetype: "text/plain"
    4. username: "davygrvy"
  15. Ticket change [235c36ef03] (rid 130913) by davygrvy on 2002-07-10 07:44:29:

    1. icomment:
      Logged In: YES 
      user_id=7549
      
      >Can we assume the "accepted way" is the algorithm in 
      >msvcrt's setargc.c for parse_cmdline()?
      
      Whoops, I meant msvcrt's parse_cmdline() found in 
      crt/src/stdargv.c
      
      
    2. login: "davygrvy"
    3. mimetype: "text/plain"
    4. username: "davygrvy"
  16. Ticket change [375bb3ee1f] (rid 107256) by davygrvy on 2002-07-10 09:22:01:

    1. icomment:
      Logged In: YES 
      user_id=7549
      
      Should I put together a command in tclTest.c for asserting 
      cases for tclWinPipe.c's BuildCommandLine() vs. msvcrt's 
      parse_cmdline() ?  I did something like this for Expect and it 
      looked like this:
      
          // Test the full pass-thru
          //
          int TestPassThruCmd (int objc, struct Tcl_Obj * CONST 
      objv[])
          {
      char **argvIn = new char * [objc-1];
      int i, argc;
      char *line, **argv;
      Tcl_Obj **oobjv;
      
      // Take the array and turn it into a string.
      for (i = objc-1; i > 0; i--) argvIn[i-1] = Tcl_GetString
      (objv[i]);
      line = BuildCommandLine(objc-1, argvIn);
      // Now take the string and turn it back into an 
      array.
      SetArgv(line, &argc, &argv);
      delete [] line;
      oobjv = new Tcl_Obj * [argc];
      for (i = 0; i < argc; i++) oobjv[i] = Tcl_NewStringObj
      (argv[i], -1);
      Tcl_SetObjResult(interp, Tcl_NewListObj(argc, 
      oobjv));
      return TCL_OK;
          }
      
      
      
    2. login: "davygrvy"
    3. mimetype: "text/plain"
    4. username: "davygrvy"
  17. Ticket change [f9a2221aa8] (rid 91739) by andreas_kupries on 2002-07-10 10:13:26:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      A good idea. Yes, please.
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  18. Ticket change [bc3b85bba8] (rid 129638) by hobbs on 2002-08-08 14:14:55:

    1. priority changed to: "6"
  19. Ticket change [39133d8fb6] (rid 112325) by dgp on 2003-01-07 06:16:26:

    1. subsystem changed to: "27. Channel Types"
  20. Ticket change [ffb5196143] (rid 108800) by hobbs on 2003-11-11 04:24:05:

    1. closedate changed to: "2003-11-10T21:24:05"
    2. closer changed to: "hobbs"
    3. icomment:
      Logged In: YES 
      user_id=72656
      
      No test failure in pre-8.4.5 cvs.
      
      
    4. login: "hobbs"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "hobbs"