diff options
author | Michal Minar <miminar@redhat.com> | 2014-01-09 14:59:35 +0100 |
---|---|---|
committer | Michal Minar <miminar@redhat.com> | 2014-01-09 15:32:56 +0100 |
commit | 68567e7e27c66e499aed185c58503e65572c891a (patch) | |
tree | 111d6889ad14a9a146009c04d6e91c65f5b65424 /src/software | |
parent | 67d5db8908afbd40bf290ad9e771453cc099abc5 (diff) | |
download | openlmi-providers-68567e7e27c66e499aed185c58503e65572c891a.tar.gz openlmi-providers-68567e7e27c66e499aed185c58503e65572c891a.tar.xz openlmi-providers-68567e7e27c66e499aed185c58503e65572c891a.zip |
software: SoftwareIdentityFileCheck test fixes
Under some environments umask may be set to 0077 which caused
unexpected results in tests. File mode checks did not pass.
Diffstat (limited to 'src/software')
-rw-r--r-- | src/software/test/test_software_identity_file_check.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/software/test/test_software_identity_file_check.py b/src/software/test/test_software_identity_file_check.py index 6c6b571..d069479 100644 --- a/src/software/test/test_software_identity_file_check.py +++ b/src/software/test/test_software_identity_file_check.py @@ -347,6 +347,7 @@ class TestSoftwareIdentityFileCheck(swbase.SwTestCase): os.remove(filepath) subprocess.call(['/usr/bin/mknod', filepath, 'b' if is_block else 'c', str(os.major(stats.st_rdev) + 1), str(os.minor(stats.st_rdev) + 1)]) + os.chmod(filepath, 0644) self.assertTrue(os.path.exists(filepath)) inst.refresh() self.assertEqual(set(inst.FailedFlags), set([FAILED_FLAGS_DEVNUM])) @@ -761,6 +762,8 @@ class TestSoftwareIdentityFileCheck(swbase.SwTestCase): # restore it os.mkfifo(fp, 0644) + # mkfifo applies umask on mode (which may sometimes contain 0077) + os.chmod(fp, 0644) os.utime(fp, (stats.st_atime, stats.st_mtime)) (rval, _, _) = inst.Invoke() self.assertEqual(rval, INVOKE_SATISFIED) |