Hi Dan,
On 07/ 9/12 12:18 PM, Dan Price wrote:
https://cr.opensolaris.org/action/browse/pkg/dp/pkg-progress-cleanup/
src/um/update-refresh.sh
It could be worthwhile to redirect stdout as well as stderr too if we
really want root to never get spammed by this script (though that should
never happen, I know :) Perhaps bonus points for using $DEBUG to
determine whether to redirect the streams and use the "-q" option, but
I'm not really particularly bothered either way.
src/tests/api/t_printengine.py
Rather than using sys.stdout, could you use a StringIO? If you did that,
I wonder would you be able to then check for some of the test patterns
written by printengine.py?
src/modules/client/printengine.py
Not this bug, but was hoping this would fix a minor pkglint-related
glitch that when finishing lint runs against a repository, we don't
print a newline at the end:
---
$ pkglint -c /tmp/cache.$$ -l http://localhost:9090
Lint engine setup...
Ignoring -l option, existing image found.
Starting lint run...
Lint phase 1 0/1$
---
src/tests/api/t_elf.py, line 55
Do we really want this?
The tests will fail on any test box that has, say
/kernel/drv/amd64/README.nvidia, or /kernel/drv/amd64/nvidia.snv_100.gz
- I know we don't package those files, but is it valid to assume
everything in 'scan_dirs' is going to be an elf binary? Perhaps it
would be ok to run on every file in 'scan_dirs' that has an 'elfhash'
attribute under the current image, but that feels a bit weird too..
If you still feel we should have this, could we improve the error
messages a user would encounter if the tests hit a non-elf file? Perhaps
as simple as line 74:
self.assertEqual(
elf.is_elf_object(p), True,
"%s was expected to be an elf object" % p)
running the tests without that gave us:
======================================================================
ERROR: api.t_elf.py TestElf.test_get_dynamic
----------------------------------------------------------------------
Traceback (most recent call last):
File "./pkg5unittest.py", line 568, in run
testMethod()
File "./api/t_elf.py", line 86, in test_get_dynamic
elf.get_dynamic(p)
ElfError: Request error: class file/memory mismatch
======================================================================
ERROR: api.t_elf.py TestElf.test_get_info
----------------------------------------------------------------------
Traceback (most recent call last):
File "./pkg5unittest.py", line 568, in run
testMethod()
File "./api/t_elf.py", line 98, in test_get_info
elf.get_info(p)
ElfError: Request error: class file/memory mismatch
======================================================================
FAIL: api.t_elf.py TestElf.test_is_elf_object
----------------------------------------------------------------------
Traceback (most recent call last):
File "./pkg5unittest.py", line 568, in run
testMethod()
File "./api/t_elf.py", line 74, in test_is_elf_object
self.assertEqual(elf.is_elf_object(p), True)
AssertionError: 0 != True
The other changes look good to me.
cheers,
tim
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss