summaryrefslogtreecommitdiffstats
path: root/src/util/profile/test_profile.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix various warningsGreg Hudson2013-06-071-9/+7
|
* Add libprofile support for vtable-backed profilesGreg Hudson2011-07-201-0/+1
| | | | | | ticket: 6929 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25024 dc483132-0cff-0310-8789-dd5450dbe970
* Mark and reindent util, with some exceptionsTom Yu2009-12-071-113/+114
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23455 dc483132-0cff-0310-8789-dd5450dbe970
* make mark-cstyleTom Yu2009-10-311-7/+5
| | | | | | make reindent git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23100 dc483132-0cff-0310-8789-dd5450dbe970
* move prof-int.h to be the first include file in order to obtainJeffrey Altman2003-12-141-1/+2
| | | | | | | | | platform specific preprocessor variables used to selectively import other header files ticket: 2068 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15921 dc483132-0cff-0310-8789-dd5450dbe970
* Checkpoint first step of merge.Ken Raeburn2002-12-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moved per-file data into a separate object from the profile handle. Dropped some old MacOS 9 code. * prof_int.h: Include Mac OS X versions of header files if appropriate. Only include prof_err.h if profile.h doesn't define ERROR_TABLE_BASE_prof. (struct _prf_data_t): Move most of contents of _prf_file_t here. Add reference count. (prf_data_t): New typedef. (struct _prf_file_t): Include an array of one _prf_data_t structure. * prof_file.c (profile_open_file): Fill in "data" field. Drop some old Mac specific code. (profile_flush_file_data): Renamed from profile_flush_file, now takes prf_data_t argument. (profile_flush_file_data): Likewise. (profile_free_file): Now calls profile_free_file_data. (profile_free_file_data): New function, with most of old profile_free_file code. * prof_init.c (profile_init_path): Removed old Mac version. (profile_ser_size, profile_ser_externalize): Get file data from new "data" field. * prof_set.c (rw_setup, profile_update_relation, profile_clear_relation, profile_rename_section, profile_add_relation): Likewise. * prof_tree.c (profile_node_iterator): Likewise. * test_profile.c (do_batchmode): Likewise. * prof_int.h (profile_flush_file): Now a macro. * prof_err.et (PROF_MAGIC_FILE_DATA): New error code value. ticket: 1237 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15037 dc483132-0cff-0310-8789-dd5450dbe970
* * test_profile.c (main): Call profile_release() before exitingEzra Peisach2001-12-051-0/+1
| | | | | | in case of error return. (memory leak testing) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14039 dc483132-0cff-0310-8789-dd5450dbe970
* Danilo also says we can get rid of _MSDOS (Win16) tests, and explicit ↵Ken Raeburn2001-10-061-10/+0
| | | | | | FAR/NEAR specs git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13786 dc483132-0cff-0310-8789-dd5450dbe970
* * test_profile.c: Include <string.h> for strcmp() prototypeEzra Peisach2001-06-111-0/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13337 dc483132-0cff-0310-8789-dd5450dbe970
* * prof_tree.c (profile_node_iterator): Fix bug where it will loopTheodore Tso1999-03-081-1/+4
| | | | | | | | | | endlessly when searching an empty section. * test_profile.c: Add code so that the "add" code will interpret "NULL" as calling profile_add_relation with a null pointer for the value. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11245 dc483132-0cff-0310-8789-dd5450dbe970
* test_profile.c: Added ability to test profile set functions, and in aTheodore Tso1999-03-031-2/+95
| | | | | | | | | | | | | | | | | | | | | | batch mode. prof_init.c (profile_flush): Add new public function for flushing changes made to the profile. prof_parse.c (profile_write_tree_file): Add official internal function for flushing out a profile tree to a FILE *. configure.in, prof_file.c (rw_access): Add new function which checks to see whether we have read/write access, and emulate this for losing non-POSIX OS's. prof_file.c (profile_flush_file): Add support for writing modified profile file's. Call profile_flush_file from profile_close_file(). Also fixed minor bugs in prof_tree.c which affected renaming sections and modifying existing relations. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11237 dc483132-0cff-0310-8789-dd5450dbe970
* Makefile.in: Set the myfulldir and mydir variables (which are relativeTheodore Tso1998-11-141-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to buildtop and thisconfigdir, respectively.) configure.in: Build the test script prtest for doing regression test suites of the profile library. prof_err.et (PROF_MAGIC_ITERATOR): Add a new error code for the magic number for the iterator structure. prof_file.c (profile_update_file): Increment the update serial number when the profile file is re-read. prof_tree.c (profile_make_node_final, profile_is_node_final): Add a new attribute for a node, which is whether or not the node is "final". This controls whether or not the next profile file should be searched when looking up a key which matches the section named by the node. (profile_node_iterator_create, profile_node_iterator_free, profile_node_iterator): New functions which take a profile_t and returns all of the names or values for a particular search key. This iterator follows the rules of doing multiple profile file lookups using the "final node" marker to stop searching subsequent profile files. prof_parse.c (parse_std_line): Add support for marking top level sections, subsections, and individual nodes as final, using the '*' character. (dump_profile_to_file): Print finalized sections with the '*' character. prof_get.c: Update routines to use the iterators provided by prof_tree.c. prof_int.c: Add upd_serial member to the prf_file_t structure. Define the symbolic flags used by the profile node iterator. Add function declarations for profile_make_node_final, profile_is_node_final, profile_node_iterator_create, profile_node_iterator_free, profile_node_iterator, and profile_get_value. test_profile.c: Add the query1 command which tests profile_get_value. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11038 dc483132-0cff-0310-8789-dd5450dbe970
* Makefile.in: Added prof_get.c to the list of files to be compiledTheodore Tso1998-11-031-14/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | profile.hin: Added declarations for profile_free_list(), profile_get_relation_names(), and profile_get_subsection_names(). (These are new public interfaces to the profile library.) prof_int.h: Removed the profile_section_t structure, which was used only by the now-defunct prof_section.c file. Added the internal interfaces for the new public interfaces. Removed unused declarations which were never implemented(profile_get, profile_update). prof_init.c: Moved all of the profile querying functions (profile_get_values(), profile_get_value(), etc.) to prof_get.c. In the process, removed the really bletcherous (and badly implemented) profile_get_first_values(), which did nothing like what the named implied. Also added to prof_get.c new functions profile_get_subsection_names() and profile_get_relation_names(). (profile_ser_internalize): Rewrote error handling to be clearer, and removed a bug where memory was not freed correctly in an error case. (profile_init): If a list of pathnames is passed in, profile_init will now try to open all of them, now that we've defined query fallback semantics in prof_get.c prof_parse.c: Fix lint warning. prof_tree.c (profile_find_node_relation, profile_find_node_subsection): Allow the returned value or subsection field to be NULL (in case the caller isn't interested in getting the returned value or subsection, and only cares about getting the name). (profile_delete_node_relation, profile_delete_interior_node_relation): Removed these functions and replaced it with profile_remove_node(), which takes a boolean argument section_flag. (profile_find_node_name): Removed this function. (This was a Cygnus/Fusion special used by the now removed profile_find_first_values() function.) test_profile.c: Added commands to test the new profile_get_subsection_names() and profile_get_relation_names() interfaces. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11011 dc483132-0cff-0310-8789-dd5450dbe970
* Only include stdlib.h if it's availableTheodore Tso1996-06-241-0/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8547 dc483132-0cff-0310-8789-dd5450dbe970
* test_profile.c: Add usage message if not enough argumentsTheodore Tso1996-06-121-0/+5
| | | | | | | | | | | | | | | prof_parse.c (dump_profile_to_file, dump_profile): Dump the profile using the correct line terminator for Windows, Macintosh, etc. prof_parse.c: prof_file.c: Change _WINDOWS to _MSDOS, and add check for _WIN32. prof_int.h: Add size #defines for _WIN32. Handle prototypes correctly for _WIN32. prof_int.h: Added comment to profile state structure git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8318 dc483132-0cff-0310-8789-dd5450dbe970
* Got the profile code to work on the PCKeith Vetter1995-04-271-2/+13
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5549 dc483132-0cff-0310-8789-dd5450dbe970
* Fix type const vs. non-const problemsTheodore Tso1995-04-211-1/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5419 dc483132-0cff-0310-8789-dd5450dbe970
* Initial checkin of the profile libraryTheodore Tso1995-04-201-0/+45
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5382 dc483132-0cff-0310-8789-dd5450dbe970