[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi] 'authenticity_test' broken years ago?
From: |
Greg Chicares |
Subject: |
[lmi] 'authenticity_test' broken years ago? |
Date: |
Thu, 26 Mar 2020 23:00:57 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
Vadim--Can you explain this puzzle? With or without
https://github.com/vadz/lmi/pull/117
one particular test in 'authenticity_test' misbehaves,
though in a way that (defectively, I suppose) isn't
counted as an error. It occurs here:
/// Postcondition: the file passes a test with the 'lmi_md5sum' program.
void PasskeyTest::InitializeMd5sumFile() const
{
...
std::string s = "lmi_md5sum --check --status " +
std::string(md5sum_file());
system_command(s);
and I would expect that command to succeed, printing something like
coleridge: OK
but here's what I observe, in all cases running wine+debian-testing;
first, without PR117:
---->--BEGIN-->----
/opt/lmi/src/lmi[0]$make unit_tests unit_test_targets=authenticity_test.exe
make[2]: Nothing to be done for 'build_unit_tests'.
List of unit-test targets that did not build successfully:
List ends.
Running authenticity_test:
Result of 'md5sum --version':
md5sum (PCP patchlevel 2) (GNU textutils) 1.22
Exit code 1 from command 'md5sum --check --status validated.md5'.
... 76 tests succeeded
----<--END--<----
Similarly, with PR117, the line corresponding to "Exit code 1" above is:
---->--BEGIN-->----
Integrity check failed for 'coleridge'
----<--END--<----
However, if I run the same command manually, after preserving the files
that it uses thus:
void PasskeyTest::RemoveTestFiles(char const* file, int line) const
{
std::vector<std::string> filenames;
filenames.push_back("expiry");
filenames.push_back("passkey");
- filenames.push_back("coleridge");
- filenames.push_back(md5sum_file());
+// filenames.push_back("coleridge");
+// filenames.push_back(md5sum_file());
then MD5 validation succeeds, both for debian's native 'md5sum',
and also for the new custom-built one run under wine:
/opt/lmi/gcc_i686-w64-mingw32/build/ship[0]$md5sum --check validated.md5
coleridge: OK
/opt/lmi/gcc_i686-w64-mingw32/build/ship[0]$md5sum --check --status
validated.md5
/opt/lmi/gcc_i686-w64-mingw32/build/ship[0]$wine lmi_md5sum.exe --check
validated.md5
coleridge: OK
/opt/lmi/gcc_i686-w64-mingw32/build/ship[0]$wine lmi_md5sum.exe --check
--status validated.md5
At this point I thought that the problem must lie in
'system_command_non_wx.cpp', which uses ::CreateProcessA(),
perhaps in some subtly incorrect way (though it seems to have
worked well for many years). But then I changed the unit test
to use '--version' without '--check', and...it says the file
is "OK", but reports that testing its integrity fails:
---->--BEGIN-->----
/opt/lmi/src/lmi[0]$make $coefficiency unit_tests
unit_test_targets=authenticity_test.exe
make[2]: Nothing to be done for 'build_unit_tests'.
List of unit-test targets that did not build successfully:
Running authenticity_test:
List ends.
Result of 'lmi_md5sum --version':
lmi_md5sum 0.9
This program is a limited functionality variant of GNU 'md5sum' utility
and is part of the 'Let Me Illustrate' project.
Command is: 'lmi_md5sum --check validated.md5'. [I added that trace statement.]
coleridge: OK
Integrity check failed for 'coleridge'
.... 72 tests succeeded
!!!! no errors detected
/opt/lmi/src/lmi[0]$
----<--END--<----
How can this be? I'm sure I'm missing something obvious.
- [lmi] 'authenticity_test' broken years ago?,
Greg Chicares <=