Bug in testerror.bat found

Finally I was able to find out why the tests are failing
on my setup.

In testerror.bat a fragile construct is being used, that is
language dependent.

Instead of
fc /w %expect1_parsed% %actual% | find "FC: no diff" > nul

better use:
fc /w %expect1_parsed% %actual% > nul

The error level is already zero if the files compare well,
and it is not zero if they differ.

The message "no diff" is language specific, and therefore
guaranteed to fail on non English platforms.

Although the errorlevel of fc seems not to be documented
I strongly believe that it is better to rely on a not
documented, but likely to work behaviour than a documented
but proven not to work feature.

Another test that gives problems:

ohdr test:

The test failes with

Testing message deletion
*FAILED*
         at ..\..\..\test\ohdr.c:220 in main()...
HDF5-DIAG: Error detected in HDF5 (1.8.0) thread 0:
  #000: ..\..\..\src\H5Omessage.c line 995 in H5O_msg_remove(): unable
to remove object header message
    major: Object header
    minor: Can't delete message
  #001: ..\..\..\src\H5Omessage.c line 1171 in H5O_msg_remove_real():
error iterating over messages
    major: Object header
    minor: Object not found
  #002: ..\..\..\src\H5Omessage.c line 1302 in H5O_msg_iterate_real():
unable to decode message
    major: Object header
    minor: Unable to decode value
  #003: ..\..\..\src\H5Omtime.c line 220 in H5O_mtime_decode(): badly
formatted modification time message
    major: Object header
    minor: Unable to initialize object
*** TESTS FAILED ***
HDF5: infinite loop closing library

D,G,T,F,FD,P,FD,P,FD,P,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,

FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD

Is it likely that this test also fails due to language settings?

Btw.: all other tests pass fine.

···

--
_________________________________________
  _ _ | Roland Schwarz
>_)(_ | aka. speedsnail
> \__) | mailto:roland.schwarz@chello.at
________| http://www.blackspace.at

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

Hi Roland,

I did a couple short tests pertaining to the FC/FIND line being used. It seems that in recent versions of Windows, FC *does* in fact return a proper exit code. That being the case, it looks like we can remove the FIND command, which should clear up the language-dependence as well. The last thing to check will be to make sure that we don't support any old versions of Windows that still depend on this workaround (I don't believe we do.)

For now you can probably ignore or comment out these tests. Or if you prefer, I can send you a patched version of the test scripts when we have this fixed.

Scott

Roland Schwarz wrote:

···

Finally I was able to find out why the tests are failing
on my setup.

In testerror.bat a fragile construct is being used, that is
language dependent.

Instead of
fc /w %expect1_parsed% %actual% | find "FC: no diff" > nul

better use:
fc /w %expect1_parsed% %actual% > nul

The error level is already zero if the files compare well,
and it is not zero if they differ.

The message "no diff" is language specific, and therefore
guaranteed to fail on non English platforms.

Although the errorlevel of fc seems not to be documented
I strongly believe that it is better to rely on a not
documented, but likely to work behaviour than a documented
but proven not to work feature.

Another test that gives problems:

ohdr test:

The test failes with

Testing message deletion
*FAILED*
         at ..\..\..\test\ohdr.c:220 in main()...
HDF5-DIAG: Error detected in HDF5 (1.8.0) thread 0:
  #000: ..\..\..\src\H5Omessage.c line 995 in H5O_msg_remove(): unable
to remove object header message
    major: Object header
    minor: Can't delete message
  #001: ..\..\..\src\H5Omessage.c line 1171 in H5O_msg_remove_real():
error iterating over messages
    major: Object header
    minor: Object not found
  #002: ..\..\..\src\H5Omessage.c line 1302 in H5O_msg_iterate_real():
unable to decode message
    major: Object header
    minor: Unable to decode value
  #003: ..\..\..\src\H5Omtime.c line 220 in H5O_mtime_decode(): badly
formatted modification time message
    major: Object header
    minor: Unable to initialize object
*** TESTS FAILED ***
HDF5: infinite loop closing library

D,G,T,F,FD,P,FD,P,FD,P,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,

FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD

Is it likely that this test also fails due to language settings?

Btw.: all other tests pass fine.

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

Hi Scott,
What you mean the recent versions or old versions of windows. If the old version of windows is window NT or 2000. I agree with you since we have already dropped the support of those platforms. But if the old version is some version of XP; we may need to be a little cautious about it. We may have many important users that still use the old versions of windows.

Kent

Scott Wegner wrote:

···

Hi Roland,

I did a couple short tests pertaining to the FC/FIND line being used. It seems that in recent versions of Windows, FC *does* in fact return a proper exit code. That being the case, it looks like we can remove the FIND command, which should clear up the language-dependence as well. The last thing to check will be to make sure that we don't support any old versions of Windows that still depend on this workaround (I don't believe we do.)

For now you can probably ignore or comment out these tests. Or if you prefer, I can send you a patched version of the test scripts when we have this fixed.

Scott

Roland Schwarz wrote:

Finally I was able to find out why the tests are failing
on my setup.

In testerror.bat a fragile construct is being used, that is
language dependent.

Instead of
fc /w %expect1_parsed% %actual% | find "FC: no diff" > nul

better use:
fc /w %expect1_parsed% %actual% > nul

The error level is already zero if the files compare well,
and it is not zero if they differ.

The message "no diff" is language specific, and therefore
guaranteed to fail on non English platforms.

Although the errorlevel of fc seems not to be documented
I strongly believe that it is better to rely on a not
documented, but likely to work behaviour than a documented
but proven not to work feature.

Another test that gives problems:

ohdr test:

The test failes with

Testing message deletion
*FAILED*
         at ..\..\..\test\ohdr.c:220 in main()...
HDF5-DIAG: Error detected in HDF5 (1.8.0) thread 0:
  #000: ..\..\..\src\H5Omessage.c line 995 in H5O_msg_remove(): unable
to remove object header message
    major: Object header
    minor: Can't delete message
  #001: ..\..\..\src\H5Omessage.c line 1171 in H5O_msg_remove_real():
error iterating over messages
    major: Object header
    minor: Object not found
  #002: ..\..\..\src\H5Omessage.c line 1302 in H5O_msg_iterate_real():
unable to decode message
    major: Object header
    minor: Unable to decode value
  #003: ..\..\..\src\H5Omtime.c line 220 in H5O_mtime_decode(): badly
formatted modification time message
    major: Object header
    minor: Unable to initialize object
*** TESTS FAILED ***
HDF5: infinite loop closing library

D,G,T,F,FD,P,FD,P,FD,P,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,

FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD

Is it likely that this test also fails due to language settings?

Btw.: all other tests pass fine.

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

Hi Kent,
MuQun Yang wrote:

Hi Scott,
What you mean the recent versions or old versions of windows. If the old version of windows is window NT or 2000. I agree with you since we have already dropped the support of those platforms. But if the old version is some version of XP; we may need to be a little cautious about it. We may have many important users that still use the old versions of windows.

It seems that the latest versions of Windows XP have been fixed. When we first introduced the FC+FIND workaround, I was testing on Windows XP, and this was needed. However, when I try the same experiment now, FC works as desired, without FIND. The example script I use is:

TYPE NUL > tmp.txt
VERIFY INVALID 2> NUL
FC tmp.txt tmp.txt > NUL
IF ERRORLEVEL 1 (ECHO.FC BROKEN) ELSE (ECHO.FC IS OK)

The 2nd line will set the ERRORLEVEL to 1. In the 3rd line, recent versions of FC will set the ERRORLEVEL back to 0. However, old versions won't set it at all, so the ERRORLEVEL will still be 1.

So, this must have been fixed through some automatic Windows updates within the last year (we can come up with some other testing or research to verify this). I think we should update our test scripts to no longer use the workaround. That way, we can support international users. For users of "old" Windows XP, it should be a matter of simply applying the latest Windows updates. Do you expect we have users for which this would be a problem?

Scott

···

Kent

Scott Wegner wrote:

Hi Roland,

I did a couple short tests pertaining to the FC/FIND line being used. It seems that in recent versions of Windows, FC *does* in fact return a proper exit code. That being the case, it looks like we can remove the FIND command, which should clear up the language-dependence as well. The last thing to check will be to make sure that we don't support any old versions of Windows that still depend on this workaround (I don't believe we do.)

For now you can probably ignore or comment out these tests. Or if you prefer, I can send you a patched version of the test scripts when we have this fixed.

Scott

Roland Schwarz wrote:

Finally I was able to find out why the tests are failing
on my setup.

In testerror.bat a fragile construct is being used, that is
language dependent.

Instead of
fc /w %expect1_parsed% %actual% | find "FC: no diff" > nul

better use:
fc /w %expect1_parsed% %actual% > nul

The error level is already zero if the files compare well,
and it is not zero if they differ.

The message "no diff" is language specific, and therefore
guaranteed to fail on non English platforms.

Although the errorlevel of fc seems not to be documented
I strongly believe that it is better to rely on a not
documented, but likely to work behaviour than a documented
but proven not to work feature.

Another test that gives problems:

ohdr test:

The test failes with

Testing message deletion
*FAILED*
         at ..\..\..\test\ohdr.c:220 in main()...
HDF5-DIAG: Error detected in HDF5 (1.8.0) thread 0:
  #000: ..\..\..\src\H5Omessage.c line 995 in H5O_msg_remove(): unable
to remove object header message
    major: Object header
    minor: Can't delete message
  #001: ..\..\..\src\H5Omessage.c line 1171 in H5O_msg_remove_real():
error iterating over messages
    major: Object header
    minor: Object not found
  #002: ..\..\..\src\H5Omessage.c line 1302 in H5O_msg_iterate_real():
unable to decode message
    major: Object header
    minor: Unable to decode value
  #003: ..\..\..\src\H5Omtime.c line 220 in H5O_mtime_decode(): badly
formatted modification time message
    major: Object header
    minor: Unable to initialize object
*** TESTS FAILED ***
HDF5: infinite loop closing library

D,G,T,F,FD,P,FD,P,FD,P,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,

FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD

Is it likely that this test also fails due to language settings?

Btw.: all other tests pass fine.

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

Scott,

So, this must have been fixed through some automatic Windows updates within the last year (we can come up with some other testing or research to verify this). I think we should update our test scripts to no longer use the workaround. That way, we can support international users. For users of "old" Windows XP, it should be a matter of simply applying the latest Windows updates. Do you expect we have users for which this would be a problem?

I wish we would not have those users. But in fact, I am not sure. For example, will the patch work on a windows XP home version?
So I suggest we will fix this problem in the next release and add a small note in our document to explain this. As for this release, the users who wish to build by themselves may follow the patch we provide.

Kent

···

Scott

Kent

Scott Wegner wrote:

Hi Roland,

I did a couple short tests pertaining to the FC/FIND line being used. It seems that in recent versions of Windows, FC *does* in fact return a proper exit code. That being the case, it looks like we can remove the FIND command, which should clear up the language-dependence as well. The last thing to check will be to make sure that we don't support any old versions of Windows that still depend on this workaround (I don't believe we do.)

For now you can probably ignore or comment out these tests. Or if you prefer, I can send you a patched version of the test scripts when we have this fixed.

Scott

Roland Schwarz wrote:

Finally I was able to find out why the tests are failing
on my setup.

In testerror.bat a fragile construct is being used, that is
language dependent.

Instead of
fc /w %expect1_parsed% %actual% | find "FC: no diff" > nul

better use:
fc /w %expect1_parsed% %actual% > nul

The error level is already zero if the files compare well,
and it is not zero if they differ.

The message "no diff" is language specific, and therefore
guaranteed to fail on non English platforms.

Although the errorlevel of fc seems not to be documented
I strongly believe that it is better to rely on a not
documented, but likely to work behaviour than a documented
but proven not to work feature.

Another test that gives problems:

ohdr test:

The test failes with

Testing message deletion
*FAILED*
         at ..\..\..\test\ohdr.c:220 in main()...
HDF5-DIAG: Error detected in HDF5 (1.8.0) thread 0:
  #000: ..\..\..\src\H5Omessage.c line 995 in H5O_msg_remove(): unable
to remove object header message
    major: Object header
    minor: Can't delete message
  #001: ..\..\..\src\H5Omessage.c line 1171 in H5O_msg_remove_real():
error iterating over messages
    major: Object header
    minor: Object not found
  #002: ..\..\..\src\H5Omessage.c line 1302 in H5O_msg_iterate_real():
unable to decode message
    major: Object header
    minor: Unable to decode value
  #003: ..\..\..\src\H5Omtime.c line 220 in H5O_mtime_decode(): badly
formatted modification time message
    major: Object header
    minor: Unable to initialize object
*** TESTS FAILED ***
HDF5: infinite loop closing library

D,G,T,F,FD,P,FD,P,FD,P,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,

FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD,FD

Is it likely that this test also fails due to language settings?

Btw.: all other tests pass fine.

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.