<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/ruby/test_file_exhaustive.rb, branch v3_3_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Use `File::NULL` instead of hard coded null device names</title>
<updated>2023-07-10T10:21:47+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-07-10T10:18:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c8d0470bb0888bcb6719ba536e5f3f6a8b6551bb'/>
<id>c8d0470bb0888bcb6719ba536e5f3f6a8b6551bb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Skip time-related assertions on /dev/null</title>
<updated>2023-01-13T03:26:16+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-01-13T03:26:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5b36fefc4e7d0bbaf714fd230c409193d544bcfc'/>
<id>5b36fefc4e7d0bbaf714fd230c409193d544bcfc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for `sockaddr_un` on Windows. (#6513)</title>
<updated>2022-11-17T22:50:25+00:00</updated>
<author>
<name>Samuel Williams</name>
<email>samuel.williams@oriontransfer.co.nz</email>
</author>
<published>2022-11-17T22:50:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ea8a7287e2b96b9c24e5e89fe863e5bfa60bfdda'/>
<id>ea8a7287e2b96b9c24e5e89fe863e5bfa60bfdda</id>
<content type='text'>
* Windows: Fix warning about undefined if_indextoname()

* Windows: Fix UNIXSocket on MINGW and make .pair more reliable

* Windows: Use nonblock=true for read tests with scheduler

* Windows: Move socket detection from File.socket? to File.stat

Add S_IFSOCK to Windows and interpret reparse points accordingly.
Enable tests that work now.

* Windows: Use wide-char functions to UNIXSocket

This fixes behaviour with non-ASCII characters.
It also fixes deletion of temporary UNIXSocket.pair files.

* Windows: Add UNIXSocket tests for specifics of Windows impl.

* Windows: fix VC build due to missing _snwprintf

Avoid usage of _snwprintf, since it fails linking ruby.dll like so:

  linking shared-library x64-vcruntime140-ruby320.dll
  x64-vcruntime140-ruby320.def : error LNK2001: unresolved external symbol snwprintf
  x64-vcruntime140-ruby320.def : error LNK2001: unresolved external symbol vsnwprintf_l

whereas linking miniruby.exe succeeds.

This patch uses snprintf on the UTF-8 string instead.

Also remove branch GetWindowsDirectoryW, since it doesn't work.

* Windows: Fix dangling symlink test failures

Co-authored-by: Lars Kanis &lt;kanis@comcard.de&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Windows: Fix warning about undefined if_indextoname()

* Windows: Fix UNIXSocket on MINGW and make .pair more reliable

* Windows: Use nonblock=true for read tests with scheduler

* Windows: Move socket detection from File.socket? to File.stat

Add S_IFSOCK to Windows and interpret reparse points accordingly.
Enable tests that work now.

* Windows: Use wide-char functions to UNIXSocket

This fixes behaviour with non-ASCII characters.
It also fixes deletion of temporary UNIXSocket.pair files.

* Windows: Add UNIXSocket tests for specifics of Windows impl.

* Windows: fix VC build due to missing _snwprintf

Avoid usage of _snwprintf, since it fails linking ruby.dll like so:

  linking shared-library x64-vcruntime140-ruby320.dll
  x64-vcruntime140-ruby320.def : error LNK2001: unresolved external symbol snwprintf
  x64-vcruntime140-ruby320.def : error LNK2001: unresolved external symbol vsnwprintf_l

whereas linking miniruby.exe succeeds.

This patch uses snprintf on the UTF-8 string instead.

Also remove branch GetWindowsDirectoryW, since it doesn't work.

* Windows: Fix dangling symlink test failures

Co-authored-by: Lars Kanis &lt;kanis@comcard.de&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Skip failing test on FreeBSD [ci skip]</title>
<updated>2022-06-17T05:37:15+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-06-17T05:37:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=20d4168250fb1f534cf2db7c44998b25252a70f8'/>
<id>20d4168250fb1f534cf2db7c44998b25252a70f8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Skip failing test with freebsd</title>
<updated>2022-05-30T09:40:31+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2022-05-30T09:40:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a78f003c30dde0a303eb15fc073bc6c57df1cfc2'/>
<id>a78f003c30dde0a303eb15fc073bc6c57df1cfc2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Compare predicate methods as a boolean value</title>
<updated>2022-04-15T08:14:29+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-04-15T02:17:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9db7d95968a832dd095eccf9cfe29255ac15b2c2'/>
<id>9db7d95968a832dd095eccf9cfe29255ac15b2c2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[Win32] Fix mode of character/pipe device stat [Bug #18732]</title>
<updated>2022-04-15T08:14:29+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-04-14T17:33:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a0040af6715d85f416f1282588974e151a8164eb'/>
<id>a0040af6715d85f416f1282588974e151a8164eb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Use an empty string when building File.expand_path</title>
<updated>2022-04-12T13:54:57+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2022-04-12T13:18:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=381475f02e6b44ae729f9403637b30c445b622e5'/>
<id>381475f02e6b44ae729f9403637b30c445b622e5</id>
<content type='text'>
Allocating a string of length MAXPATHLEN and then shrinking the string
is inefficient when the resulting path is short. Preallocating a large
string is also a problem for Variable Width Allocation since we can't
easily downsize the capacity.

I ran the following benchmark:

```ruby
Benchmark.ips do |x|
  {
    "empty" =&gt; "",
    "short" =&gt; "a/" * 10,
    "medium" =&gt; "a/" * 100,
    "long" =&gt; "a/" * 500
  }.each do |name, path|
    x.report(name) do |times|
      i = 0
      while i &lt; times
        File.expand_path(path)
        i += 1
      end
    end
  end
end
```

On this commit:

```
 empty     97.486k (± 0.7%) i/s -    492.915k in   5.056507s
 short     96.026k (± 2.4%) i/s -    486.489k in   5.068966s
medium     86.304k (± 1.3%) i/s -    435.336k in   5.045112s
  long     59.395k (± 1.7%) i/s -    302.175k in   5.089026s
```

On master:

```
 empty     94.138k (± 1.4%) i/s -    472.158k in   5.016590s
 short     92.043k (± 1.4%) i/s -    468.180k in   5.087496s
medium     84.910k (± 2.3%) i/s -    425.750k in   5.017007s
  long     61.503k (± 2.7%) i/s -    309.723k in   5.039429s
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allocating a string of length MAXPATHLEN and then shrinking the string
is inefficient when the resulting path is short. Preallocating a large
string is also a problem for Variable Width Allocation since we can't
easily downsize the capacity.

I ran the following benchmark:

```ruby
Benchmark.ips do |x|
  {
    "empty" =&gt; "",
    "short" =&gt; "a/" * 10,
    "medium" =&gt; "a/" * 100,
    "long" =&gt; "a/" * 500
  }.each do |name, path|
    x.report(name) do |times|
      i = 0
      while i &lt; times
        File.expand_path(path)
        i += 1
      end
    end
  end
end
```

On this commit:

```
 empty     97.486k (± 0.7%) i/s -    492.915k in   5.056507s
 short     96.026k (± 2.4%) i/s -    486.489k in   5.068966s
medium     86.304k (± 1.3%) i/s -    435.336k in   5.045112s
  long     59.395k (± 1.7%) i/s -    302.175k in   5.089026s
```

On master:

```
 empty     94.138k (± 1.4%) i/s -    472.158k in   5.016590s
 short     92.043k (± 1.4%) i/s -    468.180k in   5.087496s
medium     84.910k (± 2.3%) i/s -    425.750k in   5.017007s
  long     61.503k (± 2.7%) i/s -    309.723k in   5.039429s
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Decouple GC slot sizes from RVALUE</title>
<updated>2022-02-02T14:52:04+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2022-02-01T14:25:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7b77d46671685c837adc33b39ae0210e04cd8b24'/>
<id>7b77d46671685c837adc33b39ae0210e04cd8b24</id>
<content type='text'>
Add a new macro BASE_SLOT_SIZE that determines the slot size.

For Variable Width Allocation (compiled with USE_RVARGC=1), all slot
sizes are powers-of-2 multiples of BASE_SLOT_SIZE.

For USE_RVARGC=0, BASE_SLOT_SIZE is set to sizeof(RVALUE).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a new macro BASE_SLOT_SIZE that determines the slot size.

For Variable Width Allocation (compiled with USE_RVARGC=1), all slot
sizes are powers-of-2 multiples of BASE_SLOT_SIZE.

For USE_RVARGC=0, BASE_SLOT_SIZE is set to sizeof(RVALUE).
</pre>
</div>
</content>
</entry>
<entry>
<title>Use omit instead of skip: test/ruby/**/*.rb</title>
<updated>2022-01-04T08:25:30+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2022-01-04T08:25:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=47bf64a26d3d95a312ea5cf5d94ee1d2104f5e26'/>
<id>47bf64a26d3d95a312ea5cf5d94ee1d2104f5e26</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
