uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
46
nixos/tests/resolv.nix
Normal file
46
nixos/tests/resolv.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
# Test whether DNS resolving returns multiple records and all address families.
|
||||
import ./make-test-python.nix ({ pkgs, ... } : {
|
||||
name = "resolv";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [ ckauhaus ];
|
||||
};
|
||||
|
||||
nodes.resolv = { ... }: {
|
||||
networking.extraHosts = ''
|
||||
# IPv4 only
|
||||
192.0.2.1 host-ipv4.example.net
|
||||
192.0.2.2 host-ipv4.example.net
|
||||
# IP6 only
|
||||
2001:db8::2:1 host-ipv6.example.net
|
||||
2001:db8::2:2 host-ipv6.example.net
|
||||
# dual stack
|
||||
192.0.2.1 host-dual.example.net
|
||||
192.0.2.2 host-dual.example.net
|
||||
2001:db8::2:1 host-dual.example.net
|
||||
2001:db8::2:2 host-dual.example.net
|
||||
'';
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
def addrs_in(hostname, addrs):
|
||||
res = resolv.succeed("getent ahosts {}".format(hostname))
|
||||
for addr in addrs:
|
||||
assert addr in res, "Expected output '{}' not found in\n{}".format(addr, res)
|
||||
|
||||
|
||||
start_all()
|
||||
resolv.wait_for_unit("nscd")
|
||||
|
||||
ipv4 = ["192.0.2.1", "192.0.2.2"]
|
||||
ipv6 = ["2001:db8::2:1", "2001:db8::2:2"]
|
||||
|
||||
with subtest("IPv4 resolves"):
|
||||
addrs_in("host-ipv4.example.net", ipv4)
|
||||
|
||||
with subtest("IPv6 resolves"):
|
||||
addrs_in("host-ipv6.example.net", ipv6)
|
||||
|
||||
with subtest("Dual stack resolves"):
|
||||
addrs_in("host-dual.example.net", ipv4 + ipv6)
|
||||
'';
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue