Re: RFR: 6402201: ProcessAttachTest.sh needs better synchronization

2013-11-21 Thread Alan Bateman
On 21/11/2013 11:41, Erik Gahlin wrote: Thanks, didn't know about ATOMIC_MOVE. it will be useful for other tests as well. http://cr.openjdk.java.net/~egahlin/6402201_3/ Erik This looks very good. -Alan.

Re: RFR: 6402201: ProcessAttachTest.sh needs better synchronization

2013-11-21 Thread Erik Gahlin
Thanks, didn't know about ATOMIC_MOVE. it will be useful for other tests as well. http://cr.openjdk.java.net/~egahlin/6402201_3/ Erik Alan Bateman skrev 2013-11-20 12:43: On 20/11/2013 11:25, Erik Gahlin wrote: Thanks for your feedback Here is an updated webrev where the file is renamed. ht

Re: RFR: 6402201: ProcessAttachTest.sh needs better synchronization

2013-11-20 Thread Alan Bateman
On 20/11/2013 11:25, Erik Gahlin wrote: Thanks for your feedback Here is an updated webrev where the file is renamed. http://cr.openjdk.java.net/~egahlin/6402201_2/ That looks okay to me. One small improvement would be to use try-with-resources around the file write. Alternatively you could use

Re: RFR: 6402201: ProcessAttachTest.sh needs better synchronization

2013-11-20 Thread Erik Gahlin
Thanks for your feedback Here is an updated webrev where the file is renamed. http://cr.openjdk.java.net/~egahlin/6402201_2/ Erik Alan Bateman skrev 2013-11-19 09:45: On 18/11/2013 23:29, Erik Gahlin wrote: Could I have a review of this test fix. It appears it takes more than 10 s to write t

Re: RFR: 6402201: ProcessAttachTest.sh needs better synchronization

2013-11-19 Thread Dmitry Samersoff
Alan, It works on linux, solaris and macos. fuser should work on Windows/CYGWIN, No ideas what happens with Windows/MKS For Windows it might be better to use handle.exe from sysinternals - it do exactly the same and very reiliable in my experience. -Dmitry On 2013-11-19 14:58, Alan Bateman w

Re: RFR: 6402201: ProcessAttachTest.sh needs better synchronization

2013-11-19 Thread Alan Bateman
On 19/11/2013 09:33, Dmitry Samersoff wrote: Jaroslav, Use fuser command to wait until file being closed is better way to do it if fuser -s filename; then Busy; else Ready; fi -Dmitry Do you know if this works on all platforms? -Alan

Re: RFR: 6402201: ProcessAttachTest.sh needs better synchronization

2013-11-19 Thread Jaroslav Bachorik
On 19.11.2013 10:33, Dmitry Samersoff wrote: Jaroslav, Use fuser command to wait until file being closed is better way to do it if fuser -s filename; then Busy; else Ready; fi Thanks. Will try it. Currently I am rewriting such tests to java and using stdout redirection instead. -JB- -Dm

Re: RFR: 6402201: ProcessAttachTest.sh needs better synchronization

2013-11-19 Thread Dmitry Samersoff
Jaroslav, Use fuser command to wait until file being closed is better way to do it if fuser -s filename; then Busy; else Ready; fi -Dmitry On 2013-11-19 13:00, Jaroslav Bachorik wrote: > On 19.11.2013 09:45, Alan Bateman wrote: >> On 18/11/2013 23:29, Erik Gahlin wrote: >>> Could I have a revi

Re: RFR: 6402201: ProcessAttachTest.sh needs better synchronization

2013-11-19 Thread Alan Bateman
On 19/11/2013 09:00, Jaroslav Bachorik wrote: I think it is. Writing to a file does not guarantee that it's creation and actual write are atomic :( What I used to do was to write the data to one file and the use a second signaling file to notify the other party that the data has been succes

Re: RFR: 6402201: ProcessAttachTest.sh needs better synchronization

2013-11-19 Thread Jaroslav Bachorik
On 19.11.2013 09:45, Alan Bateman wrote: On 18/11/2013 23:29, Erik Gahlin wrote: Could I have a review of this test fix. It appears it takes more than 10 s to write to a file on slow machines. Instead of sleeping 10 s the test now polls for the file to appear. There may be other issues with the

Re: RFR: 6402201: ProcessAttachTest.sh needs better synchronization

2013-11-19 Thread Alan Bateman
On 18/11/2013 23:29, Erik Gahlin wrote: Could I have a review of this test fix. It appears it takes more than 10 s to write to a file on slow machines. Instead of sleeping 10 s the test now polls for the file to appear. There may be other issues with the test, but it's hard to know without ru

RFR: 6402201: ProcessAttachTest.sh needs better synchronization

2013-11-18 Thread Erik Gahlin
Could I have a review of this test fix. It appears it takes more than 10 s to write to a file on slow machines. Instead of sleeping 10 s the test now polls for the file to appear. There may be other issues with the test, but it's hard to know without ruling this race out. Thanks Erik Testin