> My intent was that you call enter_dns_test_ns from the test process > itself, not from a separate wrapper to exec it. This is so you don't > end up having a program in the tests dir that, when executed > independently as root, clobbers the host system's resolv.conf or hosts > file (which would be really really bad). By entering the namespace in > the same process and testing for error, you can bail out before doing > anything if the namespace setup failed. This also avoids the need to > add extra control machinery to run the tests. No problems, understood, I saw the exec call in the unshare-ns.c file and got confused. I have refactored the test attached, and added the unshare-ns.c file to the src/common/ directory in libc-test, and exposed the enter_dns_test_ns method in the test.h header file. Is this an appropriate solution? The attached res_query test tests for expected domain names, classes, types and response data from given requests. I'm yet to implement TCP or IPV6, and wanted to ask if v4/v6 should be in separate test files, as to ensure the test files aren't too long-winded. I've tried to structure the test so it's as simple as specifying a domain name, and its expected RR data. The test just then iterates through the domains to test, the server returns the hardcoded packets, and checks are performed. Is this somewhat along the lines of what you are looking for? Thanks, rw