[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-devel] MTN crash [testcase and patch included]
From: |
Tobias Hunger |
Subject: |
[Monotone-devel] MTN crash [testcase and patch included] |
Date: |
Sat, 20 Oct 2007 17:59:52 +0200 |
User-agent: |
KMail/1.9.6 (enterprise 0.20070907.709405) |
Hello monotone developers!
I looked into other testcases for a bit and have come up with an improved
testcase for the crash I reported earlier: This version cleans up the
unreadable file it created and will get skipped when chmod is not available.
You can find this testcase in
mtn_test_unreadable_file_in_workspace_v2.tar.gz. Just untar it in your source
mtn source directory and it should create a subdirectory under tests/ with
the __driver__ file.
Having done that I started to poke around the code for a bit to find out how
to fix this issue. I came up with a patch that adds no_permissions to the
path::status enum whenever a file is not read/writeable. That should be fine
for everything in the workspace.
But then this function is in places outside the workspace as well: mtn uses it
e.g. to check its database. I do see some uses for a RO database, which this
patch breaks.
I think the proper way to address the issue would be to have a path::status
struct with the current information (file/directory/non_existent) plus some
bits for read/write permissions. Such a change requires medium surgery all
over mtn (I think), so I would love to get some feedback on the idea before
diving into the code.
Attached you will find the patch that adds "no_permissions" to path::status.
The patch compiles (for me), the lua testsuite runs through cleanly with the
exception of the following testcases:
fail_cleanly_on_unreadable_db
log_quits_on_SIGPIPE (which fails sporadically but is ok most of
the time)
include()_includedir()_and_includedirpattern()_lua_functions
_--rcfile=directory
I am not sure whether I broke those, but I think I did;-) I'll fix the patch
if there is any interest in it.
Best Regards,
Tobias
mtn_test_unreadable_file_in_workspace_v2.tar.gz
Description: application/tgz
mtn_permission.patch.gz
Description: GNU Zip compressed data
signature.asc
Description: This is a digitally signed message part.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Monotone-devel] MTN crash [testcase and patch included],
Tobias Hunger <=