- 06 12月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
On a number of situations, sudo is being missed as a parameter for command executions that need to run privileged. Examples include when writing to mountpoint, using a Python interpreter, and when trying to listing open files during a forceful unmount of the disk. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 01 12月, 2018 2 次提交
-
-
由 Cleber Rosa 提交于
Because the test test_force_unmount_get_pids_fail() mocks the inner behavior of the the unmount() method, let's add a call to non-mocked version before the process attempts to terminate itself. Note: this is a hot fix for the problem described in the comment, and referenced below. Reference: https://trello.com/c/7OnKaLoG/1446-bug-procterminate-not-reliableSigned-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
The goal of the shell command used in these tests is to simply have the mountpoint as being used, and for that, there's no need to keep creating/removing files (it's actually an invitation to race conditions). Let's replace that approach with a more stable/predictable command, which opens a single file for writing at the mount point location. The original motivation for the change was caused by failures on the test when run in certain environments. I believe the fact that trying to kill the shell process while it's spawning "echo" and "rm" in a busy loop could be causing a race condition. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 30 11月, 2018 6 次提交
-
-
由 Cleber Rosa 提交于
The only goal of many of the "with open()" blocks, is to read a file. Let's move the rest of the outside that context. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
On 03d81fea, we let the Avocado developer choose the Python version to use by setting a PYTHON variable that gets passed to `make` commands. But, we missed the case when the execution of the selftests is not done in parallel. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Given that the setUp() phase is not useful for test_disk_space, and the custom cleanup done in the test is better had at the tearDown() phase. Additionally, the following changes where made to make it more reliable: * Avoid the busy loop giving modprobe some time between attempts * Use "modprobe -r" instead of rmmod, which handlers module dependencies * Do an explicit check for status * If "modprobe -r" doesn't succeed, it's not a test failure, but a test a test error (given that the get_diskspace() function already ran and succeeded). Ideally, the module removal would be done by the linux_modules.unload_module() but there are some issues with that function that needs addressing first (such as returning a meaningful result). Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
As we don't need to support Python < 2.7 anymore. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 28 11月, 2018 3 次提交
-
-
由 Lukáš Doktor 提交于
Currently we use "avocado" as a suite name, let's use job-dir which is quite useful when matching xml results to output directories. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Cleber Rosa 提交于
The related command line option is "--keep-tmp", and it keeps the setting on "keep_tmp", so it just makes sense, for easier reading of the code, to name the variable in a similar way. While at it, let's prevent crash if "os.path.exists()" in "cleanup()" is given a tmpdir that is None. This was not caught before because the default value of "__remove_tmp" would prevent "os.path.exists()" to be reached. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
A gzip file doesn't have all the "archive" properties that a tarfile or zipfile has, but still, it could be useful to wrap in the archive module. At this point, support is being added to allow for files compressed with gzip, to be acknowledged as valid in avocado.utils.is_archive() and transparently handled with avocado.util.uncompress(). The goal of this implementation is to allow for gzip files, which are compressed tarbals, to be properly handled at uncompress() time. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 27 11月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
The newly released pylint version 2.2.0, changed its default behavior (enabled) the following checks: * :unnecessary-pass (W0107): *Unnecessary pass statement* Used when a "pass" statement that can be avoided is encountered. * :unused-import (W0611): *Unused %s* Used when an imported module or variable is not used. Let's apply fixes to those checks, and at the same time, pin the pylint versions so that our CI environment is more stable (code that test our code -- pylint -- doesn't change, while our code changes). For Python 2, the latest release was 1.9.3, so let's use that. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 22 11月, 2018 1 次提交
-
-
由 Lukáš Doktor 提交于
Python3 only allows seek from the beginning of the file when the file is opened in text mode. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 20 11月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
On some environments, we can not count on the reference count and automatic cleanup of that instance, and consequently, the left over temporary directory constitutes a failure. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 17 11月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
The Makefile is used mostly on development related work flows, and has up to know stick to Python 2 by default. I think it's time to flip the switch, and look for a Python 3 binary by default. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 14 11月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
The correct name of the exception is TestAbortError, and not TestAbortedError. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 06 11月, 2018 1 次提交
-
-
由 Caio Carrara 提交于
The current utils kernel module has no tests. Recently it was added a fix[1] to the process of kernel url building. To keep this process without future regressions, this change adds a proper test for it. It's important to note that a new internal method was added to the KernelBuild class to make easier to test it. Indirectly it's an improvement of download method that now is shorter and more explicit. [1] - commit c84ac6baSigned-off-by: NCaio Carrara <ccarrara@redhat.com>
-
- 31 10月, 2018 1 次提交
-
-
由 lolyu 提交于
1. rewrite MtabLock, as a proxy class for filelock.FileLock. 2. update related unit test. Signed-off-by: Nlolyu <lolyu@redhat.com>
-
- 04 10月, 2018 1 次提交
-
-
由 Caio Carrara 提交于
This change adds a functional version of OpenSUSE vmimage provider. Because of some specific aspects of OpenSUSE versioning this provider version works properly with most recent known versions (42.3, 42.2. 42.1 and 15.0) and should work properly with future versions as well (15+). This provider version also don't work with Tumbleweed (rolling release) versions, only with Leap versions. Because for tests it's better to change one thing at time, the rolling release is not a version supported right now. Reference: https://trello.com/c/i2TSbT3MSigned-off-by: NCaio Carrara <ccarrara@redhat.com>
-
- 02 10月, 2018 2 次提交
-
-
由 Cleber Rosa 提交于
Currently, the only way to pass parameters to Avocado is by using the variants layer, that is, one of the existing varianter plugin implementations. This was based on earlier design decisions, that we're trying to fix without breaking expectation and compatibility. While it'd makes sense to support parameters created by the varianter layer itself, together with non-varianter parameters, it seems that we can start by adding support for one or the other being used at a time. This commit does exactly that: add support for a method of passing parameters via the command line for all tests in a job, without having to resort to the varianter. When the varianter is used, it takes precedence and the core test parameter passing support is ignored. This should solve a number of use cases that require one-time executions of tests with different parameters, especially executions during test development and debugging. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
The lv_utils functional tests, which usually don't run because they require privileged execution, revealed a number of broken expectations when it comes to bytes and text handling. Let's fix both the module and the test. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 30 9月, 2018 1 次提交
-
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 28 9月, 2018 1 次提交
-
-
由 Caio Carrara 提交于
This change focus mostly on increasing tests for VmImageHtmlParser and ImageProviderBase. During the tests implementation some improvements were detected: the process of feed a html parser run both for get an image version and image url was duplicated so it was unified in a single method. Besides that the process of get a best version for an image was put on a specific method so each provider can override it if required. Today the default rule for a best version is based on calling max() function on found versions. However we can't assume it's the default for every provider. As far as we know, for a possible OpenSuse provider in future this rule will not be valid. Reference: https://trello.com/c/vtM1SPpJSigned-off-by: NCaio Carrara <ccarrara@redhat.com>
-
- 26 9月, 2018 1 次提交
-
-
由 Lukáš Doktor 提交于
This allows us to detect when someone imports avocado multiple times with different names. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com> Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 25 9月, 2018 5 次提交
-
-
由 Caio Carrara 提交于
This change makes possible to call kill_process_tree() function with pid of sudo enabled processes and it also makes possible handle timeout of subprocesses called with sudo=True. Both cases now use a new function created in process module to return the user owner id of a pid (get_owner_id). For the case of subprocesses run with sudo=True it was necessary adjust the send_signal() method of SubProcess class so it can send the signal for sudo process child. Reference: https://trello.com/c/ROPWdFFrSigned-off-by: NCaio Carrara <ccarrara@redhat.com>
-
由 Lukáš Doktor 提交于
Currently there is a typo and a bug. Let's fix the typo, add selftest to document the current behavior and deal with the bug (should detect 4 classes) later. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com> Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Caio Carrara 提交于
Seems that is important have a default way to get a process owner id in process utils module. This function will be useful soon when we have to deal with timeout of sudo enabled processes. Reference: https://trello.com/c/ROPWdFFrSigned-off-by: NCaio Carrara <ccarrara@redhat.com>
-
由 Cleber Rosa 提交于
To non-parallel execution script. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Caio Carrara 提交于
There was a functional test on avocado that depended on html plugin. This change moves this test to proper plugin instead of run the test only if the plugin is available during test execution. Reference: https://trello.com/c/EVggIZzjSigned-off-by: NCaio Carrara <ccarrara@redhat.com>
-
- 24 9月, 2018 1 次提交
-
-
由 Caio Carrara 提交于
There was a functional test on avocado that depended on remote plugin. This change moves this test to proper plugin instead of run the test only if the plugin is available during test execution. Reference: https://trello.com/c/NPEUj0wZSigned-off-by: NCaio Carrara <ccarrara@redhat.com>
-
- 19 9月, 2018 2 次提交
-
-
由 Cleber Rosa 提交于
Which doesn't depend on running `ps`, but is still Linux specific. In the future, it'd be nice to have a multi-platform abstraction. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
That returns the parent PID for the given process. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 18 9月, 2018 7 次提交
-
-
由 Lukáš Doktor 提交于
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Junxiang Li 提交于
Let's provide the "__str__" method for "CmdError" to be able to see the actual content on print(error). Signed-off-by: NJunxiang Li <junli@redhat.com> Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Instead of executing `lsmod`, the same information is available in /proc/modules. Also, add test to that function. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
The same checks are performed repeated times. Let's remove those. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
This simply moves the recent_mock() function to a common location so that it can be used by other test modules. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Caio Carrara 提交于
Signed-off-by: NCaio Carrara <ccarrara@redhat.com>
-