lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] wx_test_expiry_dates.cpp


From: Greg Chicares
Subject: Re: [lmi] wx_test_expiry_dates.cpp
Date: Fri, 12 Dec 2014 20:45:02 +0000
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

On 2014-12-07 14:36, Vadim Zeitlin wrote:
[...]
>  OK, this seems to have been easy -- and didn't even result in any
> questions.

Yes, you did exactly what we asked, and, even though we try to think
everything through beforehand, in this case we surprised ourselves.

If we run the test with '--ash_nazg', everything works. And that's
the way I myself would generally run it; but I would never specify
'--distribution' because I don't prepare the distributions, so I'd
never run this test anyway.

On the other hand, Kim prepares binary distributions, so she'll run
the tests with '--distribution' before each release...and for that
purpose she'll never use '--ash_nazg', because we don't tell end
users about that trapdoor. She needs to test the system as end users
will run it, but with a special twist: the January distribution she
is now getting ready to prepare must work in [2015-01-01, 2015-01-31]
(the 'expiry' file), but she has to test it before releasing it. Yet
running it today, with that 'expiry' range, without '--ash_nazg',
will prevent lmi (and hence wx_test) from running at all.

Running 'wx_test --ash_nazg' is not acceptable because that option
causes lmi to behave differently.

To test this manually, we've altered the computer's clock. That is
effective, but extremely distasteful; and someday the corporation may
withdraw the privilege to do that, so that's not acceptable either.

The best solution we see, which we would like to ask you to implement
if you see no better solution, is to add a command-line option to lmi
itself that conditionally demotes the fatal error to a dire warning.
Here's a sketch:

Index: authenticity.cpp
===================================================================
--- authenticity.cpp    (revision 6059)
+++ authenticity.cpp    (working copy)
@@ -183,7 +183,7 @@
     if(candidate < begin)
         {
         oss
-            << "Current date "
+            << "Invalid date. Current date "
             << candidate.str()
             << " is invalid: this system cannot be used before "
             << begin.str()
@@ -194,7 +194,7 @@
     if(end <= candidate)
         {
         oss
-            << "Current date "
+            << "Invalid date. Current date "
             << candidate.str()
             << " is invalid: this system cannot be used after "
             << (-1 + end).str()
@@ -285,6 +285,21 @@
         )
         {
         warning() << diagnostic_message << LMI_FLUSH;
+// bool override =
+//     diagnostic_message begins "Invalid date"
+//   &&
+//     command line option '--pyx=prospicience' was given
+// if(override)
+//     {
+//       show a shocking messagebox, ideally with blinking red text,
+//       with a title like "Willfully sidestep compliance safeguards",
+//       and a nondefault pushbutton "I choose to break the rules";
+//       selecting that pushbutton causes
+//     return;
+//       and any other choice (including pressing the Enter or Cancel
+//       keys) causes
+//     std::exit(99); // or any other unique exit code
+//     {
         std::exit(EXIT_FAILURE);
         }
 }

Obviously you're better qualified to craft the desired messagebox
than I, as I've never explored wxMessageBox exotica; just try to
make it repugnant.

No one should stumble across this by accident; but if anyone does,
we can't let them say they weren't warned. Only Kim should ever
use it. "Metachronism" would have been a more precise word, but
I wanted one that no native English speaker can spell.

This has to be done in lmi itself. For one thing, I think the
authenticity test has already failed before 'wx_test' gets control.
More importantly, this option will actually be useful for some
exceedingly rare but legitimate business purposes, and will work
even if time-setting privileges are revoked.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]