mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: Ryan Ward <rwardd@outlook.com.au>
Cc: Szabolcs Nagy <nsz@port70.net>,
	"musl@lists.openwall.com" <musl@lists.openwall.com>
Subject: Re: [musl] Adding dns/resolver tests to libc-test
Date: Tue, 27 Aug 2024 17:34:36 -0400	[thread overview]
Message-ID: <20240827213435.GG10433@brightrain.aerifal.cx> (raw)
In-Reply-To: <SG2PR01MB4566A3271510061330286E57F0942@SG2PR01MB4566.apcprd01.prod.exchangelabs.com>

On Tue, Aug 27, 2024 at 03:30:37PM +0000, Ryan Ward wrote:
> Hello,
> 
> I have made an attempt at fleshing out the resolver tests, please
> see the file attached. It still needs some polishing, and I am keen
> to keep building out the necessary tests, attached is a simple
> rudimentary res_query() test.. I need to improve the packet and RR
> parsing, but sending this out to get some early feedback before I
> build out more tests.
> 
> I have just been building the test and the unshare-ns.c framework
> with the libc-test build system, executing unshare-ns.exe and
> passing in resolv_query.exe as intended.

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.

Rich

  reply	other threads:[~2024-08-27 21:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-18  2:03 Rich Felker
2024-08-18  9:38 ` Szabolcs Nagy
2024-08-27 15:30   ` Ryan Ward
2024-08-27 21:34     ` Rich Felker [this message]
2024-09-09 14:46       ` Ryan Ward
2024-09-11 20:38         ` Szabolcs Nagy
2024-09-11 21:33           ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240827213435.GG10433@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    --cc=nsz@port70.net \
    --cc=rwardd@outlook.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).