| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This patch removes trailing spaces from source files.
|
| |
|
| |
|
|
|
|
|
|
| |
Renamed LMI_ATAProtocolEndpointProvider to
LMI_DiskDriveATAProtocolEndpointProvider so the name matches the pattern used in
all disk drive classes.
|
|
|
|
|
| |
New provider:
* LMI_DiskDriveDeviceSAPImplementationProvider
|
|
|
|
|
| |
New provider:
* LMI_DiskDriveATAPortProvider
|
|
|
|
|
|
|
|
|
| |
Glibc provides convenient lock functions to protect passwd and shadow files.
This commit makes use of them for any write operation.
Read access is still unprotected for the time being for performance reasons.
https://fedorahosted.org/openlmi/ticket/205
|
|
|
|
|
| |
New provider:
* LMI_DiskDriveSAPAvailableForElement
|
|
|
|
|
| |
Set there properties on output, meaning when GetInstance() is invoked,
only when they are empty. Otherwise leave them unchanged.
|
|
|
|
|
| |
Under some environments umask may be set to 0077 which caused
unexpected results in tests. File mode checks did not pass.
|
|
|
|
|
|
|
| |
Some functions, such as readdir() and dirname(), are not
thread-safe. Use equivalent glib functions.
trac: #173
|
| |
|
|
|
|
|
| |
New Provider:
* LMI_ATAProtocolEndpoint
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some tests expect that exceptions won't be thrown out of LMIShell's
functions. Others prefers them and enable them globally. This causes
problems when running under nosetests all provider tests at once.
Tests that modified enablement of exception throws globally caused
others to fail.
This patch makes sure that each TestCase has defined use of exceptions.
Default state is to have them disabled. If a TestCase prefers having
them enabled, just one variable needs to be overriden in its body:
class AccountBase(lmibase.LmiTestCase):
USE_EXCEPTIONS = True
|
| |
|
|
|
|
|
| |
The previous commit b915ee1ef9a4ebe bumped minor version number instead
of major one that is more suitable for symbol hiding case.
|
| |
|
|
|
|
|
|
| |
* peak() method used to lock wrong mutex, which could cause a deadlock.
* pop_reply() method could block if non-blocking access had been requested.
|
|
|
|
|
|
|
|
|
|
| |
* Suppress warnings when removing testing packages that may have been
modified by finished test. Whe some installed file were missing, rpm
produced ugly warnings and errors.
* Set LC_ALL=C when running yum and parsing its output. Otherwise
numbers get localized, which confuses the parser.
* Allow to run tests from another directory.
* Minor cleanups and docstrings corrections.
|
| |
|
| |
|
|
|
|
|
| |
Historically indication tests have been using pywbem machinery, which
is now obsolete as lmishell gained proper indication support recently.
|
|
|
|
| |
Unused variable, unused assignment.
|
| |
|
|
|
|
|
|
| |
The commit c98f09a865f1b made some exported symbols hidden which can be
considered an ABI break. Let's bump the library soname version to indicate
a stable ABI for now.
|
|
|
|
|
|
| |
- annotate functions that are supposed to be called with mutex held
- mark functions static if not exported public
- remove unused declarations
|
|
|
|
|
|
|
|
|
| |
Accomplished that by registering a pthread cleanup handler that gets
called on thread cancellation as well as on normal exit.
A minor code shuffle had to be done since the cleanup handlers are macros
in fact and no control flow commands (return, continue) should be called
within.
|
|
|
|
|
| |
Our test framework logs stderr and stdout separately and it's hard to match
them together.
|
|
|
|
|
| |
New provider:
* LMI_DiskDriveElementSoftwareIdentity
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test cases under nosetests did not behave well. The part of class setup
method was not called due to faulty checking of test case instantiation.
It caused not-testing repositories to be enabled during running all but
first test.
This patch ensures that all not-testing repositories are disabled during
subsequents test runs.
If anyhing is missing upon intialization, testing database is recreated.
|
|
|
|
|
|
|
|
|
|
| |
* Restore repository, after the test run, only if it was previously
enabled.
* yum-config-manager, which is used to get information about
reporitories, shortens lines on its output when too long. Therefor
repository name can not be checked for exact match against data in
LMI_SoftwareIdentityResource if it is too long.
|
|
|
|
|
| |
It checks, that error description is retrievable when the asynchronous
job fails to execute.
|
|
|
|
| |
It was skipped just for debugging purposes.
|
|
|
|
|
|
|
|
|
|
| |
/usr/bin/mofcomp requires that Pegasus runs at the time the script is executed.
Therefore we could not register any MOF files into database if Pegasus was
down.
To fix this, openlmi-mof-register now does not depend on mofcomp and
contains its own MOF parser to parse just '#pragma include' directives,
comments and string literals.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The approach introduced in commit 381f4038a6a was on a good way however
turned out the pthread_cancel() actually queues a cancellation request
since we're using deferred cancellation mode and continues the code flow
until a function that is a cancellation point is called. We unlocked
the mutex before joining the thread which led to mutex acquisition by
the thread and then cancelling on a syscall, leaving the mutex locked
forever.
Having cancellation and join with mutex held was not a solution as it
would make the thread waiting for mutex leading to deadlock.
Instead, this patch introduces a private flag that will indicate the
thread should cancel itself. Two scenarios are possible:
- the thread is doing unlocked stuff, typically waiting for events
using syscalls that are cancellation points. In this case the
pthread_cancel() will take effect immediately, breaking the syscall
and quitting the thread. We're still in unlocked state.
- the thread is holding the lock, in that case the im_stop_ind() will
wait until that work is finished. It's better to leave the manage
thread finish its job, it's mostly CMPI stuff and breaking in the
middle would leak some memory. Once the main thread acquires the
mutex, it cancels the thread, sets a private flag and unlocks again.
While waiting for thread join is finished, the thread picks up the
lock again as it was waiting for it and as a first thing it will
check the private flag and quits gracefully, unlocking the mutex.
As a side effect, the pthread cancellation machinery has no chance
to kick in as there was no cancellation point on the way.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and References.
This simple test calls EnumerateInstances and EnumerateInstanceNames on all
LMI_* classes and then calls GetInstance, AssociatorNames, Associators,
ReferenceNames and References on all instances.
It does not check actual content of returned names and instances, it just
checks that the above calls do not crash and are consistent (e.g.
EnumerateInstanceNames returns the same set as EnumerateInstances).
|
|
|
|
|
|
| |
Added openlmi-python-test subpackage with contents taken from
src/python/lmi/test. This allows for testing code charing among verious
openlmi* git repositories.
|
|
|
|
|
|
| |
Power provider didn't call power_ref to init itself when enumerating some
"static" objects like LMI_HostedPowerManagementService. But it has to be
called because of obtaining hostname from ComputerSystem instance.
|
|
|
|
|
| |
New provider:
* LMI_DiskDriveSoftwareIdentity
|
|
|
|
|
|
|
|
| |
Fixed package installation tests that did not ensure that particular package is
uninstalled before test begins.
Speeded up test set up phase for TestSoftwareIdentityFileChecks and
TestSoftwareIdentityChecks.
|
|
|
|
|
|
|
| |
Environment needs to be propagated to factory function of CIMError when
error occurs while handling asynchronous job.
Resolves: rhbz#1043243
|
|
|
|
|
| |
Packages with empty source tarballs failed to build on rhel7. Added
empty readmes to previously empty packages to fix it.
|
|
|
|
|
|
|
|
|
|
|
| |
In some rare cases, digest algorithm is not set in rpm packages (happens
on rhel7). Try to deduce it from hash digest stored for installed files
and fallback to some sane default.
In case it's not set, package use md5 digest algorithm for its files.
Provider failed to generate it correctly. The Checksum was doubled.
Resolves: rhbz#1032590
|
|
|
|
|
|
|
|
| |
get_target_operating_system returns a tuple which can not be equal to
integer. Due to this error, GetInstance() call failed on on
LMI_SoftwareIdentityFileCheck objects on rhel7.
Resolves: rhbz#1032590
|
|
|
|
|
|
|
|
|
|
|
| |
Files residing on nodevice or remote filesystems now correctly set these
properties. FSCreationClassName is set to "LMI_TransientFileSystem" and
FSName is set to "PATH=<path to file>". This behavior is consistent with
how storage providers set those properties. To check for filesystem, the
provider uses udev and checks for ID_FS_UUID_ENC and DEVNAME fields. If
these are not found, filesystem is then considered nodevice or remote.
Additional test for files on transient filesystems has been added.
|
| |
|
|
|
|
|
|
| |
This should belong in commit 2b22e29 that reworked job handling.
Resolves: rhbz#1039018
|
|
|
|
|
| |
$RPM_BUILD_DIR is not created before %install phase on rhel7. It needs
to be done explicitly.
|
|
|
|
| |
Test installation, removal and updating of rpm packages.
|
|
|
|
|
| |
Assert that InstallDate is filled properly for available packages that
are installed.
|