[openbeosstorage] BSymLink tests and check_*_name() added
- From: Ingo Weinhold <bonefish@xxxxxxxxxxxxxxx>
- To: openbeosstorage@xxxxxxxxxxxxx
- Date: Fri, 19 Apr 2002 20:46:54 +0200 (MET DST)
Hey guys,
I just checked in the completed test suite for BSymLink as well as some
functions in storage_support.*. As the BSymLink implementation is missing,
the tests do all fail. Unless some extraordinary problems occur, this will
be fixed by tomorrow.
The new support functions are:
* parse_first_path_component(): Given a path name it gets its first
component.
* check_entry_name(): Checks, whether an entry name is not too long and
does not contain '/'s.
* check_path_name(): Checks, whether a path name and all its components
are not too long.
The exact maximal length of entry/path names is a bit fuzzy. The constants
B_FILE_NAME_LENGTH and B_PATH_NAME_LENGTH give a good hint, but as I
found out after some tests, it seems to hold:
* strlen(entry_name) <= B_FILE_NAME_LENGTH - 1
* strlen(path_name) <= B_PATH_NAME_LENGTH
It seems to work the other way around under Linux.
I recommend 1. to use the functions, if you want to check the length of a
name (probably a function for attribute names should be added as well),
and 2. always to use a +1 sized buffer, if you work with such names.
Since I guess, I will finish the BSymLink implementation tomorrow, I'm
looking for a new task. BFilePanel and BRefFilter belong to OpenTracker,
so we shouldn't need to care about them and BQuery needs an app server.
So only BMimeType and BResources remain. BMimeType requires such classes
as BMessage, BMessenger, BBitmap to exist, thus it seems to make sense
rather to continue with BResources.
My only problem is, that I don't have any resources about resources. ;-)
Has anyone an idea, how to cope with my lack of knowledge?
Or, Tyler, do you want me rather to help you with BEntry or BPath, so
that we get the core classes done faster?
CU, Ingo
- Follow-Ups:
- [openbeosstorage] Re: BSymLink tests and check_*_name() added
- From: Tyler Dauwalder
Other related posts:
- » [openbeosstorage] BSymLink tests and check_*_name() added
- » [openbeosstorage] Re: BSymLink tests and check_*_name() added
- » [openbeosstorage] Re: BSymLink tests and check_*_name() added
- » [openbeosstorage] Re: BSymLink tests and check_*_name() added
- » [openbeosstorage] Re: BSymLink tests and check_*_name() added
- » [openbeosstorage] Re: BSymLink tests and check_*_name() added
- » [openbeosstorage] Re: BSymLink tests and check_*_name() added
- » [openbeosstorage] Re: BSymLink tests and check_*_name() added
- » [openbeosstorage] Re: BSymLink tests and check_*_name() added
- [openbeosstorage] Re: BSymLink tests and check_*_name() added
- From: Tyler Dauwalder