<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/test/unit/os, branch v0.4.3</title>
<subtitle>Neovim fork with Rahm's personal hacks.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/'/>
<entry>
<title>build/tests: remove pre/uv.h #10531</title>
<updated>2019-07-28T09:10:22+00:00</updated>
<author>
<name>Daniel Hahler</name>
<email>git@thequod.de</email>
</author>
<published>2019-07-28T09:10:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=f4942a63f93e44470d9a7d979b3fb88408d584d1'/>
<id>f4942a63f93e44470d9a7d979b3fb88408d584d1</id>
<content type='text'>
Initially done in 28e59cb22, but does not appear to be necessary
anymore.

Uses UV_EEXIST directly, just like UV_ENOENT.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Initially done in 28e59cb22, but does not appear to be necessary
anymore.

Uses UV_EEXIST directly, just like UV_ENOENT.</pre>
</div>
</content>
</entry>
<entry>
<title>test: cleanup, reduce verbosity</title>
<updated>2019-06-01T19:59:42+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2019-06-01T19:59:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=2e171a6fd163e0d74c80d21a893cb6a3c3394b1f'/>
<id>2e171a6fd163e0d74c80d21a893cb6a3c3394b1f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>os/env: use libuv v1.12 getenv/setenv API</title>
<updated>2019-02-27T22:29:07+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2019-02-24T19:09:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=89515304e4eb81ff9eb65f3a582136fc658de139'/>
<id>89515304e4eb81ff9eb65f3a582136fc658de139</id>
<content type='text'>
- Minimum required libuv is now v1.12
- Because `uv_os_getenv` requires allocating, we must manage a map
  (`envmap` in `env.c`) to maintain the old behavior of `os_getenv` .
- free() map-items after removal. khash.h does not make copies of
  anything, so even its keys must be memory-managed by the caller.

closes #8398
closes #9267
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Minimum required libuv is now v1.12
- Because `uv_os_getenv` requires allocating, we must manage a map
  (`envmap` in `env.c`) to maintain the old behavior of `os_getenv` .
- free() map-items after removal. khash.h does not make copies of
  anything, so even its keys must be memory-managed by the caller.

closes #8398
closes #9267
</pre>
</div>
</content>
</entry>
<entry>
<title>shell/logging: Fix E730 with verbose system({List}) #9009</title>
<updated>2018-09-21T07:20:04+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2018-09-21T07:20:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=ecdd2df88ab52ed6e39057e2a8fb9eabfbb90bd5'/>
<id>ecdd2df88ab52ed6e39057e2a8fb9eabfbb90bd5</id>
<content type='text'>
ref https://github.com/neovim/neovim/issues/9001#issuecomment-421843790

Steps to reproduce:
    :set verbose=9
    :call system(['echo'])
    E730: using List as a String</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ref https://github.com/neovim/neovim/issues/9001#issuecomment-421843790

Steps to reproduce:
    :set verbose=9
    :call system(['echo'])
    E730: using List as a String</pre>
</div>
</content>
</entry>
<entry>
<title>test: Rename includes/pre/uv-errno.h to includes/pre/uv.h</title>
<updated>2018-07-11T04:26:07+00:00</updated>
<author>
<name>James McCoy</name>
<email>jamessan@jamessan.com</email>
</author>
<published>2018-07-09T15:00:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=ba7704ab4ea6186f0a3090b930a4be7e3aa9857c'/>
<id>ba7704ab4ea6186f0a3090b930a4be7e3aa9857c</id>
<content type='text'>
libuv users are only supposed to directly include uv.h.  In v1.21.0, all
the uv-*.h headers were renamed to uv/*.h, which caused the unit tests
to fail with

    [123/125] Generating post/uv-errno.h
    FAILED: test/includes/post/uv-errno.h
    cd «SRCDIR»/src/neovim/build/test/includes &amp;&amp; /usr/bin/clang -std=c99 -E -P «SRCDIR»/src/neovim/test/includes/pre/uv-errno.h -I/usr/include -I/usr/include -o «SRCDIR»/neovim/build/test/includes/post/uv-errno.h
    «SRCDIR»/src/neovim/test/includes/pre/uv-errno.h:1:10: error: 'uv-errno.h' file not found with &lt;angled&gt; include; use "quotes" instead
    #include &lt;uv-errno.h&gt;
             ^~~~~~~~~~~~
             "uv-errno.h"

The intention of the file is to extend libuv's error constants with more
values used by the unit tests.  This can just as easily be achieved
without poking into pseudo-private header files.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
libuv users are only supposed to directly include uv.h.  In v1.21.0, all
the uv-*.h headers were renamed to uv/*.h, which caused the unit tests
to fail with

    [123/125] Generating post/uv-errno.h
    FAILED: test/includes/post/uv-errno.h
    cd «SRCDIR»/src/neovim/build/test/includes &amp;&amp; /usr/bin/clang -std=c99 -E -P «SRCDIR»/src/neovim/test/includes/pre/uv-errno.h -I/usr/include -I/usr/include -o «SRCDIR»/neovim/build/test/includes/post/uv-errno.h
    «SRCDIR»/src/neovim/test/includes/pre/uv-errno.h:1:10: error: 'uv-errno.h' file not found with &lt;angled&gt; include; use "quotes" instead
    #include &lt;uv-errno.h&gt;
             ^~~~~~~~~~~~
             "uv-errno.h"

The intention of the file is to extend libuv's error constants with more
values used by the unit tests.  This can just as easily be achieved
without poking into pseudo-private header files.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'master' into s-dash-stdin</title>
<updated>2018-04-14T19:17:51+00:00</updated>
<author>
<name>b-r-o-c-k</name>
<email>brockmammen@gmail.com</email>
</author>
<published>2018-04-14T19:17:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=ad999eaa775d7d4b0cacedb30c6ea3a0ee699a6f'/>
<id>ad999eaa775d7d4b0cacedb30c6ea3a0ee699a6f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor/rename: path_is_absolute()</title>
<updated>2018-03-24T13:17:40+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2018-03-24T10:21:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=998a16c926623a667ecb0228f4a6cd8ba1e90201'/>
<id>998a16c926623a667ecb0228f4a6cd8ba1e90201</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'master' into s-dash-stdin</title>
<updated>2017-12-03T13:49:30+00:00</updated>
<author>
<name>ZyX</name>
<email>kp-pav@yandex.ru</email>
</author>
<published>2017-12-03T13:49:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=c49e22d3964d6c7ae1c24e8ad01b5fec4ca40b57'/>
<id>c49e22d3964d6c7ae1c24e8ad01b5fec4ca40b57</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>os_stat: return ENOENT on NULL filename arg</title>
<updated>2017-08-09T22:56:07+00:00</updated>
<author>
<name>James McCoy</name>
<email>jamessan@jamessan.com</email>
</author>
<published>2017-08-08T20:18:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=ac055d677aa9eff9fca11cecb5ac7f7a4edb0265'/>
<id>ac055d677aa9eff9fca11cecb5ac7f7a4edb0265</id>
<content type='text'>
Closes #4370

Explication:

    In the backtrace in #4370, we see that `buf_write()` was called with
    non-NULL `fname` and `sfname` arguments, but they've since _become_
    NULL.

    #7  0x00000000004de09d in buf_write (buf=0x1dee040, fname=0x0, fname@entry=0x1e985b0 "/home/sean/src/github.com/snczl/virta/pkg/meld/segment.go",
                                         sfname=0x0, sfname@entry=0x1ddfa60 "segment.go", start=1, end=72, eap=eap@entry=0x7ffc6b032e60, append=0,
                                         forceit=0, reset_changed=1, filtering=0)
    at /home/travis/build/neovim/bot-ci/build/neovim/src/nvim/fileio.c:2576

    This is most likely due to the code that restores those values from
    `buf`, which happens just before the fatal call to `os_fileinfo`

    ```c
        /*
         * The autocommands may have changed the name of the buffer, which may
         * be kept in fname, ffname and sfname.
         */
        if (buf_ffname)
          ffname = buf-&gt;b_ffname;
        if (buf_sfname)
          sfname = buf-&gt;b_sfname;
        if (buf_fname_f)
          fname = buf-&gt;b_ffname;
        if (buf_fname_s)
          fname = buf-&gt;b_sfname;
    ```

    It's worth noting that at this point `ffname` is still non-NULL, so
    it _could_ be used.  However, our current code is purely more strict
    than Vim in this area, which has caused us problems before (e.g.,
    `getdigits()`).  The commentary for `struct file_buffer` clearly
    indicate that all of `b_ffname`, `b_sfname`, and `b_fname` may be
    NULL:

    ```c
      /*
       * b_ffname has the full path of the file (NULL for no name).
       * b_sfname is the name as the user typed it (or NULL).
       * b_fname is the same as b_sfname, unless ":cd" has been done,
       *		then it is the same as b_ffname (NULL for no name).
       */
      char_u      *b_ffname;        /* full path file name */
      char_u      *b_sfname;        /* short file name */
      char_u      *b_fname;         /* current file name */
    ```

    Vim directly calls `stat(2)` which, although it is annotated to tell
    the compiler that the path argument is non-NULL, does handle a NULL
    pointer by returning a `-1` value and setting `errno` to `EFAULT`.
    This satisfies Vim's check, since it treats any `-1` return from
    `stat(2)` to mean the file doesn't exist (at least in this code
    path).

    Note that Vim's mch_stat() implementations on win32 and solaris
    clearly cannot accept NULL `name`. But the codepaths that call
    mch_stat will NULL `name` tend to be unix-only (eg: u_read_undo)!
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes #4370

Explication:

    In the backtrace in #4370, we see that `buf_write()` was called with
    non-NULL `fname` and `sfname` arguments, but they've since _become_
    NULL.

    #7  0x00000000004de09d in buf_write (buf=0x1dee040, fname=0x0, fname@entry=0x1e985b0 "/home/sean/src/github.com/snczl/virta/pkg/meld/segment.go",
                                         sfname=0x0, sfname@entry=0x1ddfa60 "segment.go", start=1, end=72, eap=eap@entry=0x7ffc6b032e60, append=0,
                                         forceit=0, reset_changed=1, filtering=0)
    at /home/travis/build/neovim/bot-ci/build/neovim/src/nvim/fileio.c:2576

    This is most likely due to the code that restores those values from
    `buf`, which happens just before the fatal call to `os_fileinfo`

    ```c
        /*
         * The autocommands may have changed the name of the buffer, which may
         * be kept in fname, ffname and sfname.
         */
        if (buf_ffname)
          ffname = buf-&gt;b_ffname;
        if (buf_sfname)
          sfname = buf-&gt;b_sfname;
        if (buf_fname_f)
          fname = buf-&gt;b_ffname;
        if (buf_fname_s)
          fname = buf-&gt;b_sfname;
    ```

    It's worth noting that at this point `ffname` is still non-NULL, so
    it _could_ be used.  However, our current code is purely more strict
    than Vim in this area, which has caused us problems before (e.g.,
    `getdigits()`).  The commentary for `struct file_buffer` clearly
    indicate that all of `b_ffname`, `b_sfname`, and `b_fname` may be
    NULL:

    ```c
      /*
       * b_ffname has the full path of the file (NULL for no name).
       * b_sfname is the name as the user typed it (or NULL).
       * b_fname is the same as b_sfname, unless ":cd" has been done,
       *		then it is the same as b_ffname (NULL for no name).
       */
      char_u      *b_ffname;        /* full path file name */
      char_u      *b_sfname;        /* short file name */
      char_u      *b_fname;         /* current file name */
    ```

    Vim directly calls `stat(2)` which, although it is annotated to tell
    the compiler that the path argument is non-NULL, does handle a NULL
    pointer by returning a `-1` value and setting `errno` to `EFAULT`.
    This satisfies Vim's check, since it treats any `-1` return from
    `stat(2)` to mean the file doesn't exist (at least in this code
    path).

    Note that Vim's mch_stat() implementations on win32 and solaris
    clearly cannot accept NULL `name`. But the codepaths that call
    mch_stat will NULL `name` tend to be unix-only (eg: u_read_undo)!
</pre>
</div>
</content>
</entry>
<entry>
<title>os/fileio: Add ability to use os/fileio.c for file descriptors</title>
<updated>2017-07-04T15:37:01+00:00</updated>
<author>
<name>ZyX</name>
<email>kp-pav@yandex.ru</email>
</author>
<published>2017-07-04T14:08:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=72b3fd96642e7b2c268e17953de3b2ed995eb3b4'/>
<id>72b3fd96642e7b2c268e17953de3b2ed995eb3b4</id>
<content type='text'>
Code imported from #6299
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Code imported from #6299
</pre>
</div>
</content>
</entry>
</feed>
