Zdenek Kabelac
006e5fa0ea
Add missing error path tests
2011-01-05 14:03:36 +00:00
Zdenek Kabelac
de0ae6a18f
Fail deamonization if lvmcache_init fail
...
FIXME Add proper cleanup
2011-01-05 12:59:46 +00:00
Zdenek Kabelac
1936d75b3c
Return PERCENT_INVALID for error case
...
If the percent value could not be determined return PERCENT_INVALID.
Indent function with tabs.
2011-01-05 12:33:51 +00:00
Zdenek Kabelac
a5d006d515
Remove unused variable mirr_state and its assignment
2011-01-05 12:27:56 +00:00
Zdenek Kabelac
4522d931f6
Remove dead assignment to thisfd
...
Value of 'thisfd' is not read again after its assigment
2011-01-05 12:17:19 +00:00
Petr Rockai
5d6a6bdf7b
Fix another bug in t-pvcreate-operation-md (should pass now).
2011-01-05 01:04:47 +00:00
Petr Rockai
5e79ce33d6
Add a test for RHBZ 640621 (metadata/dirs + no PV MDAs broken).
2011-01-05 01:00:34 +00:00
Petr Rockai
7271b0afea
Fix typo in t-pvcreate-operation-md.sh.
2011-01-05 00:38:41 +00:00
Petr Rockai
da6e9afebf
Move the mkdtemp functionality into test/lib/utils.sh.
2011-01-05 00:26:19 +00:00
Petr Rockai
92ebc9219e
Fix a couple of bugs in the new (test/lib/)aux.sh.
2011-01-05 00:25:07 +00:00
Petr Rockai
1b7c4b9bce
Substantial rework of the functional test support code. Some new features:
...
- somewhat neater, more consistent and more readable output
- possible to set any lvm.conf value: aux lvmconf "section/key = value"
- LVM_TEST_NODEBUG to suppress the (lengthy) "## DEBUG" output
- back-substitution on test output ($TESTDIR/$PREFIX -> @TESTDIR@/@PREFIX@)
- support code moved from test/ to test/lib/ --> less clutter
2011-01-05 00:16:18 +00:00
Jonathan Earl Brassow
63bd9ec3ff
Fix bug 635949: lvconvert man page clarification
2011-01-04 21:41:35 +00:00
Jonathan Earl Brassow
76e0e1d0eb
Change to correct cmirrord return code is user visible - update WHATS_NEW
...
file.
2011-01-04 21:33:06 +00:00
Jonathan Earl Brassow
f25f57ae75
Fix bug 632681: cmirrord shouldn't fail 'start' if already started
...
Return 0 from the cmirrord init script if the daemon is already
running.
http://refspecs.freestandards.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
2011-01-04 21:16:54 +00:00
Peter Rajnoha
8d5391f1c3
Export DM_CONTROL_NODE_UMASK and use it while creating /dev/mapper/control.
2011-01-04 14:43:53 +00:00
Petr Rockai
9a09ca42d2
Use system assert in test/api/percent.c, for now.
2011-01-03 15:07:39 +00:00
Milan Broz
fadd934150
Fix wrongly paired unlocking of global lock in pvchange. (2.02.66)
2010-12-23 14:23:30 +00:00
Zdenek Kabelac
0ddb15964a
Remove check for existance of vg pointer
...
Checking for vg being != NULL in this place is not needed.
Pointer vg is already dereferced in this function above this code line.
Also this internal function _read_pv is always called with valid 'vg' pointer.
2010-12-22 15:44:09 +00:00
Zdenek Kabelac
2ae2ca89bf
Add backtraces for backup and backup_remove fail paths
2010-12-22 15:36:41 +00:00
Zdenek Kabelac
bd43da4f9d
Hide unused code into if 0
...
Make it obvious for lcov coverage and static analyzis we
are not interested in this piece of code.
2010-12-22 15:32:15 +00:00
Zdenek Kabelac
4388a09b0f
Detect errors from dm_task_set calls
...
Check for errors in dm_task_set calls.
Use goto_bad macro with stack trace.
Replace label failed: with bad:.
2010-12-22 15:28:44 +00:00
Zdenek Kabelac
3812984422
Fix last pthread_join fix commit
...
Call for pthread_join() does not set errno value even though return values
looks like that. For now assign errno from return value and still use
strerror() to print some error message as this seems to be commonly used.
Add also log_sys_error() message for error close of local pipe.
2010-12-22 14:00:28 +00:00
Zdenek Kabelac
1102378e1c
Add backtraces for archive and backup_locally
...
If archive or back_locally fails - add stack trace.
2010-12-22 13:45:33 +00:00
Zdenek Kabelac
8382fc3e85
Fix memory leak in debug mode of restart_clvmd() error path
2010-12-22 12:14:11 +00:00
Zdenek Kabelac
1febdf9a37
Log error state from pthread_join operation
...
Value jstat is unused - so replace it with logging via log_sys_error().
2010-12-22 12:10:56 +00:00
Zdenek Kabelac
fe71257ebd
Remove dead assignment of lv_total and lv_capasity_total
...
Variables 'lv_total' and 'lv_capasity_total' are unused.
2010-12-22 12:06:54 +00:00
Alasdair Kergon
c37f0c7d7c
post-release
2010-12-21 21:08:51 +00:00
Alasdair Kergon
49e859e5a7
Copyright notices for new files.
2010-12-21 01:14:34 +00:00
Alasdair Kergon
ad18cacfa9
pre-release
2010-12-21 01:08:29 +00:00
Zdenek Kabelac
b7149bbe45
Add missing test for reallocation error.
2010-12-20 14:38:22 +00:00
Zdenek Kabelac
e1916ebbcd
Remove dead assignment
...
Variable 'r' is never read so remove it and just cast result from
_error_device function to (void).
2010-12-20 14:36:12 +00:00
Zdenek Kabelac
446e4a6a79
Verbose log old_umask value
...
Use old_umask value and print its content through verbose log.
2010-12-20 14:34:49 +00:00
Zdenek Kabelac
952cd45167
Add internal error if pointer is uninitialized
...
Add simple check for existance of 'pl' and printer internal error message
if device is missing instead of plain crash.
2010-12-20 14:20:52 +00:00
Zdenek Kabelac
6bc840fd2a
Add check for unlink errors
2010-12-20 14:08:46 +00:00
Zdenek Kabelac
4675e4f17d
Remove unused variable label
...
Variable 'label' is unused in _format1_pv_write().
2010-12-20 14:06:33 +00:00
Zdenek Kabelac
bb86f0a22a
Remove unused variable dev_dir_provided
2010-12-20 14:05:31 +00:00
Zdenek Kabelac
f2554b9d2a
Remove dead assignment of segh
...
Variable 'segh' is never read again after this assignment.
2010-12-20 14:04:43 +00:00
Zdenek Kabelac
5702dffbc3
Remove dead store in lvm_run_command
...
Variable 'ret' is not read before its next assignment.
2010-12-20 13:59:52 +00:00
Zdenek Kabelac
35ce2b332b
Removed unused pointer
...
Pointer 'duplicate' is unused.
2010-12-20 13:58:38 +00:00
Zdenek Kabelac
9d3be13f4f
Use dm_free for dm_malloc-ed areas in _clog_ctr/_clog_dtr (cmirrord).
...
Use dm_zalloc to obtain zeroed memory block.
Use dm_free for dm_ allocated memory blocks.
Test close() for error.
2010-12-20 13:57:19 +00:00
Zdenek Kabelac
f7e7f3e3ed
Add checks for allocation errors in config node clonning.
...
Add checks for clonning allocation a fail-out when something is
not allocated correctly.
Also move var declaration to the begining of the function
and fix log_error messages.
2010-12-20 13:53:10 +00:00
Zdenek Kabelac
a91a9dfaf8
Replace multiple fprintf calls with one large string parameter
2010-12-20 13:48:28 +00:00
Zdenek Kabelac
9376ec18cd
Fix error path if regex engine cannot be created in _build_matcher().
...
Fix only 'stack' printing with full function error exit.
2010-12-20 13:45:39 +00:00
Zdenek Kabelac
9b30dfb967
Use const char * for name and old_name in vg
...
Switch to use const char pointers to avoid changes of these structure
members and having better control over, were these members could
be modified.
2010-12-20 13:40:46 +00:00
Zdenek Kabelac
9e06310aab
Use const char* for offset calculation
...
As 'const' types are also passed to macro dm_list_struct_base -
keep offset calculation with const char pointers.
Fixes several gcc constness warnings.
2010-12-20 13:39:12 +00:00
Zdenek Kabelac
d40d166f91
Switch void* to char* arithmetic
2010-12-20 13:37:26 +00:00
Zdenek Kabelac
9d9de35dca
Remove const usage from destroy callbacks
...
As const segment_type or const format_type are never released
use their non-const version and remove const downcast from dm_free calls.
This change fixes many gcc warnings we were getting from them.
2010-12-20 13:32:49 +00:00
Zdenek Kabelac
66781f5d5a
Fix wrong cast to char*
...
As cmd->cmd_line is already const char pointer it's not needed to cast already
const char pointer to char pointer.
2010-12-20 13:28:04 +00:00
Zdenek Kabelac
303923fbf1
Use const char* const * for dm_regex_create()
...
Change API interface to accept even completely const array patterns.
This should present no change for libdm users and allows to pass
pattern arrays without cast to const char **.
2010-12-20 13:23:11 +00:00
Zdenek Kabelac
ba96eb24fa
Some const cleanups
...
Minor const warning fixes and internal API updates.
2010-12-20 13:19:13 +00:00