| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This hasn't been considered before (hence the bug being fixed), and
it seems best if --dist in "global options" (prior to cmd spec) is the
only to influence command alias resolution, whereas --dist as "command
option" can influence some specifics for the command itself.
This way, natural causality on the command line is preserved.
Alternatively, we could look-ahead if there is dist defined as command
option and considered it in the alias resolution. But rather than
that, it would more bearable to remove --dist/--sys from command options
altogether but that would prevent injecting them when command-by-symlink
is exercised, so do not do this either.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
| |
See <https://bugzilla.redhat.com/1230368>.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
...found by static analysis
Account for simplistic logic of the call site (our goal is not
"read as many bytes as you can, stop on first allocation error,
but be fine with what was read so far, if any" -- that is not
intended when you need to read whole parseable XML).
There are more considerations:
- realloc(p, 0) may or may not free p, one shouldn't free it manually
to prevent double-free (do I understand "man 3p realloc" right?)
- length (size_t) can overflow, leading realloc to actually decrease
the allocated memory, perhaps even to zero, i.e., possible free
as mentioned above)
- realloc(NULL, size) == malloc(size)
- check in "if (x) free(x);" is redundant
- if read_pipe returns OK, we can now safely assume: size > 0
Also following principles are followed:
- there should be just one cleanup on error
- notable code branches and otherwise silent assumptions commented upon
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
| |
Also add the unit test(s).
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
| |
See <https://bugzilla.redhat.com/show_bug.cgi?id=593721>.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
| |
Cf. SAP{Database,Instance}.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
| |
Open source infrastructure FTW!
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
| |
Cf. http://clusterlabs.org/pipermail/users/2015-June/000576.html
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
| |
Also included are respective unit tests (that needed code adjustments
and fixtures spanning several past commits).
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
| |
Now, the injection can be prevented by either specifying paths as None
or by initial item in the non-empty iterable being None.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
| |
... on output format instantiation (needless and unhelpful).
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
| |
In that case, these directly passed kwargs take the precedence.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Properly report an inconsistency, such as when nothing corresponding to
xml_root is found under root_dir directory, making the walk tree empty.
Also turn a following INFLOOP exception into a dedicated Format one.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Similar to hybridproperty: first parameter of the decorated method
is flexibly bound to either the instance or the class depending
on the context of invokation. Effectively, the only difference
is that hybridmethod is expected to be passed arguments, unlike
with property where it is called directly (w/o parameters) upon
access.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
| |
Likewise, this a "ground preparation" for upcoming new unit test.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
| |
Preparing ground for nested test and unittest not playing well with
symlinked _common.py in such the respective nested directory.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
| |
> WARNING:clufter.formats.command:'command' format: not backed by
> OrderedDict
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
| |
See https://bugzilla.redhat.com/show_bug.cgi?id=1225946.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
| |
In a wait for https://bugzilla.redhat.com/show_bug.cgi?id=1250744.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
|
| |
...in filterdict_* lambdas where (now) _fn_ is a special key.
Also adjust the callers where needed.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Apparently, rule is supposed to accompany the actual nvpair that will be
applied in case such condition holds (otherwise it's a no-op).
Adjust a check script respectively.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
| |
Also fixes assertion error for two equal (but non-identical) tuples
later on.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|