[PATCH] crypt32/tests: Fix a registerOIDInfo() failure when missing elevated privileges.

Francois Gouget fgouget at codeweavers.com
Mon Dec 14 11:09:38 CST 2020


On Mon, 14 Dec 2020, Dmitry Timoshkov wrote:
[...]
> If the intent to add is_process_elevated() checks to every place where
> ERROR_ACCESS_DENIED error returned then it's not justified.

Ok.

> > > > @@ -645,7 +661,11 @@ static void test_registerOIDInfo(void)
> > > >      info1.pszOID = test_oid;
> > > >      SetLastError(0xdeadbeef);
> > > >      ret = CryptUnregisterOIDInfo(&info1);
> > > > -    ok(!ret, "should fail\n");
> > > > +    if (!ret && GetLastError() == ERROR_ACCESS_DENIED && !is_process_elevated())
> > > > +    {
> > > > +        skip("Need admin rights FIXME\n");
> > > > +        return;
> > > > +    }    ok(!ret, "should fail\n");
> > > 
> > > This change doesn't look right. Most likely it's not needed here.
> > 
> > It is needed:
> > https://test.winehq.org/data/3acb0b3326c4120ea0c4c6076bd03c9cfe82c744/win10_newtb-w1064-adm-64/crypt32:oid.html
> 
> In addition to broken indentation and strange skip message the test bot
> results seem not related, in both cases !ret is the only accepted value.

Oh, right. I missed the cleanup step and mixed it up with the fix 
for another test too. I will resubmit it.

-- 
Francois Gouget <fgouget at codeweavers.com>



More information about the wine-devel mailing list