raindrops RubyGem user+dev discussion/patches/pulls/bugs/help
 help / Atom feed
* [PATCH] test/test_linux.rb: use plain ASCII in tempfile name
@ 2016-02-22 17:49 Antonio Terceiro
  2016-02-22 18:28 ` Hleb Valoshka
  0 siblings, 1 reply; 6+ messages in thread
From: Antonio Terceiro @ 2016-02-22 17:49 UTC (permalink / raw)
  To: raindrops-public; +Cc: Antonio Terceiro

From: Antonio Terceiro <terceiro@debian.org>

On Debian, this fixes the build against ruby2.3, which otherwise fails
with errors like:

RegexpError: /.../n has a non escaped non ASCII character in non ASCII-8BIT script
---
 test/test_linux.rb | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/test/test_linux.rb b/test/test_linux.rb
index 0e79a86..a56a07d 100644
--- a/test/test_linux.rb
+++ b/test/test_linux.rb
@@ -20,7 +20,7 @@ class TestLinux < Test::Unit::TestCase
   end
 
   def test_unix
-    tmp = Tempfile.new("\xde\xad\xbe\xef") # valid path, really :)
+    tmp = Tempfile.new('raindrops')
     File.unlink(tmp.path)
     us = UNIXServer.new(tmp.path)
     stats = unix_listener_stats([tmp.path])
@@ -48,7 +48,7 @@ class TestLinux < Test::Unit::TestCase
   end
 
   def test_unix_all
-    tmp = Tempfile.new("\xde\xad\xbe\xef") # valid path, really :)
+    tmp = Tempfile.new('raindrops')
     File.unlink(tmp.path)
     us = UNIXServer.new(tmp.path)
     @to_close << UNIXSocket.new(tmp.path)
@@ -68,7 +68,7 @@ class TestLinux < Test::Unit::TestCase
   end
 
   def test_unix_all_unused
-    tmp = Tempfile.new("\xde\xad\xbe\xef") # valid path, really :)
+    tmp = Tempfile.new('raindrops')
     File.unlink(tmp.path)
     us = UNIXServer.new(tmp.path)
     stats = unix_listener_stats
@@ -79,7 +79,7 @@ class TestLinux < Test::Unit::TestCase
   end
 
   def test_unix_resolves_symlinks
-    tmp = Tempfile.new("\xde\xad\xbe\xef") # valid path, really :)
+    tmp = Tempfile.new('raindrops')
     File.unlink(tmp.path)
     us = UNIXServer.new(tmp.path)
 
-- 
2.7.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] test/test_linux.rb: use plain ASCII in tempfile name
  2016-02-22 17:49 [PATCH] test/test_linux.rb: use plain ASCII in tempfile name Antonio Terceiro
@ 2016-02-22 18:28 ` Hleb Valoshka
  2016-02-23  1:51   ` Eric Wong
  0 siblings, 1 reply; 6+ messages in thread
From: Hleb Valoshka @ 2016-02-22 18:28 UTC (permalink / raw)
  To: raindrops-public

On 2/22/16, Antonio Terceiro <terceiro@softwarelivre.org> wrote:
> On Debian, this fixes the build against ruby2.3, which otherwise fails
> with errors like:
>
> RegexpError: /.../n has a non escaped non ASCII character in non ASCII-8BIT
> script
> -    tmp = Tempfile.new("\xde\xad\xbe\xef") # valid path, really :)
> +    tmp = Tempfile.new('raindrops')

I suspect that such names were created intentionally, so your patch
may not be correct.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] test/test_linux.rb: use plain ASCII in tempfile name
  2016-02-22 18:28 ` Hleb Valoshka
@ 2016-02-23  1:51   ` Eric Wong
  2016-02-23 11:00     ` Antonio Terceiro
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Wong @ 2016-02-23  1:51 UTC (permalink / raw)
  To: Hleb Valoshka, Antonio Terceiro; +Cc: raindrops-public, Antonio Terceiro

Hleb Valoshka <375gnu@gmail.com> wrote:

Hleb: please reply-to-all, we don't require subscription
since moving off librelist.  This also prevents the list server
being a single-point-of-failure(-or-censorship).

> On 2/22/16, Antonio Terceiro <terceiro@softwarelivre.org> wrote:
> > On Debian, this fixes the build against ruby2.3, which otherwise fails
> > with errors like:
> >
> > RegexpError: /.../n has a non escaped non ASCII character in non ASCII-8BIT
> > script
> > -    tmp = Tempfile.new("\xde\xad\xbe\xef") # valid path, really :)
> > +    tmp = Tempfile.new('raindrops')
> 
> I suspect that such names were created intentionally, so your patch
> may not be correct.

Right; raindrops should work with any paths the FS may throw at it.
I posted an alternate RFC patch for this problem a few weeks ago:

http://bogomips.org/raindrops-public/20160202183136.21549-1-e@80x24.org/raw

I'm tempted to apply the above as Ruby might continue with existing
behavior.

Antonio: thoughts?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] test/test_linux.rb: use plain ASCII in tempfile name
  2016-02-23  1:51   ` Eric Wong
@ 2016-02-23 11:00     ` Antonio Terceiro
  2016-02-29 12:47       ` Eric Wong
  0 siblings, 1 reply; 6+ messages in thread
From: Antonio Terceiro @ 2016-02-23 11:00 UTC (permalink / raw)
  To: Eric Wong; +Cc: Hleb Valoshka, raindrops-public

[-- Attachment #1: Type: text/plain, Size: 1385 bytes --]

On Tue, Feb 23, 2016 at 01:51:38AM +0000, Eric Wong wrote:
> Hleb Valoshka <375gnu@gmail.com> wrote:
> 
> Hleb: please reply-to-all, we don't require subscription
> since moving off librelist.  This also prevents the list server
> being a single-point-of-failure(-or-censorship).
> 
> > On 2/22/16, Antonio Terceiro <terceiro@softwarelivre.org> wrote:
> > > On Debian, this fixes the build against ruby2.3, which otherwise fails
> > > with errors like:
> > >
> > > RegexpError: /.../n has a non escaped non ASCII character in non ASCII-8BIT
> > > script
> > > -    tmp = Tempfile.new("\xde\xad\xbe\xef") # valid path, really :)
> > > +    tmp = Tempfile.new('raindrops')
> > 
> > I suspect that such names were created intentionally, so your patch
> > may not be correct.
> 
> Right; raindrops should work with any paths the FS may throw at it.

I did realize it was on purpose, but didn't have the time to dig it the
root cause and wen't with the easiest fix I could find.

> I posted an alternate RFC patch for this problem a few weeks ago:
> 
> http://bogomips.org/raindrops-public/20160202183136.21549-1-e@80x24.org/raw
> 
> I'm tempted to apply the above as Ruby might continue with existing
> behavior.
> 
> Antonio: thoughts?

Works for me as well.

-- 
Antonio Terceiro <terceiro@softwarelivre.org>
http://softwarelivre.org/terceiro




[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 820 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] test/test_linux.rb: use plain ASCII in tempfile name
  2016-02-23 11:00     ` Antonio Terceiro
@ 2016-02-29 12:47       ` Eric Wong
  2016-03-01 12:01         ` Antonio Terceiro
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Wong @ 2016-02-29 12:47 UTC (permalink / raw)
  To: Antonio Terceiro; +Cc: Hleb Valoshka, raindrops-public

Antonio Terceiro <terceiro@softwarelivre.org> wrote:
> On Tue, Feb 23, 2016 at 01:51:38AM +0000, Eric Wong wrote:
> > http://bogomips.org/raindrops-public/20160202183136.21549-1-e@80x24.org/raw
> > 
> > I'm tempted to apply the above as Ruby might continue with existing
> > behavior.
> > 
> > Antonio: thoughts?
> 
> Works for me as well.

Thanks for confirming, just released raindrops 0.16.0 with that change
and a few more:

http://bogomips.org/raindrops-public/20160229-raindrops-0.16.0-released%40bogomips/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] test/test_linux.rb: use plain ASCII in tempfile name
  2016-02-29 12:47       ` Eric Wong
@ 2016-03-01 12:01         ` Antonio Terceiro
  0 siblings, 0 replies; 6+ messages in thread
From: Antonio Terceiro @ 2016-03-01 12:01 UTC (permalink / raw)
  To: Eric Wong; +Cc: Hleb Valoshka, raindrops-public

[-- Attachment #1: Type: text/plain, Size: 896 bytes --]

On Mon, Feb 29, 2016 at 12:47:30PM +0000, Eric Wong wrote:
> Antonio Terceiro <terceiro@softwarelivre.org> wrote:
> > On Tue, Feb 23, 2016 at 01:51:38AM +0000, Eric Wong wrote:
> > > http://bogomips.org/raindrops-public/20160202183136.21549-1-e@80x24.org/raw
> > > 
> > > I'm tempted to apply the above as Ruby might continue with existing
> > > behavior.
> > > 
> > > Antonio: thoughts?
> > 
> > Works for me as well.
> 
> Thanks for confirming, just released raindrops 0.16.0 with that change
> and a few more:
> 
> http://bogomips.org/raindrops-public/20160229-raindrops-0.16.0-released%40bogomips/

cool, thanks. Hleb even already imported that in the git repository of
the debian package, and will upload it soon.

Hleb, you forgot to push upstream/pristine-tar branches. :)

-- 
Antonio Terceiro <terceiro@softwarelivre.org>
http://softwarelivre.org/terceiro




[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 820 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, back to index

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-22 17:49 [PATCH] test/test_linux.rb: use plain ASCII in tempfile name Antonio Terceiro
2016-02-22 18:28 ` Hleb Valoshka
2016-02-23  1:51   ` Eric Wong
2016-02-23 11:00     ` Antonio Terceiro
2016-02-29 12:47       ` Eric Wong
2016-03-01 12:01         ` Antonio Terceiro

raindrops RubyGem user+dev discussion/patches/pulls/bugs/help

Archives are clonable:
	git clone --mirror https://bogomips.org/raindrops-public
	git clone --mirror http://ou63pmih66umazou.onion/raindrops-public

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.raindrops
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.raindrops

 note: .onion URLs require Tor: https://www.torproject.org/
       or Tor2web: https://www.tor2web.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox