monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] problem with tester on WIN32 MinGW


From: Zack Weinberg
Subject: Re: [Monotone-devel] problem with tester on WIN32 MinGW
Date: Thu, 30 Aug 2007 09:50:51 -0700

On 8/30/07, Stephen Leake <address@hidden> wrote:
[...]
> So I added an error message in the exception handler:
>
>   catch (std::exception & e)
>     {
>       E(false, F("error running test %s: %s") % testname % e.what());
>       retcode = 124;
>
> It reports:
>
> address@hidden ./tester.exe -r  c:/Gnu/monotone/tester-testsuite.lua 
> c:/Gnu/monotone-build_mingw/tester_dir cleanup-1
> error: error running test cleanup-1: lua error: [string "testlib.lua"]:1054: 
> bad argument #-1 to 'posix_umask' (number expected, got nil)
>
> That appears to be from testlib.lua, line 1054, which is in run_one_test:
>
>       local oldmask = posix_umask(0)
>       posix_umask(oldmask)
>
> it's the second call to posix_umask that's dying, so apparently the
> first call is returning nil.
>
> posix_umask is defined in tester.cc; it can return nil. I suspect it
> should return 0 instead; I've changed it to that locally; that lets
> tests run.
>
> Should I commit that change in tester.cc posix_umask, or is there a
> better solution? I think 'umask' isn't meaningful on Win32.

Yes, please commit the change to posix_umask. It is indeed not
meaningful on Win32, and it is supposed to be a no-op there, so we
don't have to have #ifdefs in the higher layers.

It'd be nice if you could commit the more detailed error message change too.

zw




reply via email to

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