From bb28c3b512ca11a6a9f596aec25c01b7e28ede21 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Sat, 19 Jul 2025 22:01:16 +0200 Subject: [PATCH] nsncd: Skip some tests on big-endian --- pkgs/by-name/ns/nsncd/package.nix | 32 +++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/pkgs/by-name/ns/nsncd/package.nix b/pkgs/by-name/ns/nsncd/package.nix index a39f21e3d9ec..7618db6a9df4 100644 --- a/pkgs/by-name/ns/nsncd/package.nix +++ b/pkgs/by-name/ns/nsncd/package.nix @@ -25,19 +25,27 @@ rustPlatform.buildRustPackage { useFetchCargoVendor = true; cargoHash = "sha256-9M8Y0WwXFlrpRleSQPYDpnjNnxKGvrtO6Istl9qM30M="; - checkFlags = [ - # Relies on the test environment to be able to resolve "localhost" - # on IPv4. That's not the case in the Nix sandbox somehow. Works - # when running cargo test impurely on a (NixOS|Debian) machine. - "--skip=ffi::test_gethostbyname2_r" + checkFlags = + [ + # Relies on the test environment to be able to resolve "localhost" + # on IPv4. That's not the case in the Nix sandbox somehow. Works + # when running cargo test impurely on a (NixOS|Debian) machine. + "--skip=ffi::test_gethostbyname2_r" - # Relies on /etc/services to be present? - "--skip=handlers::test::test_handle_getservbyname_name" - "--skip=handlers::test::test_handle_getservbyname_name_proto" - "--skip=handlers::test::test_handle_getservbyport_port" - "--skip=handlers::test::test_handle_getservbyport_port_proto" - "--skip=handlers::test::test_handle_getservbyport_port_proto_aliases" - ]; + # Relies on /etc/services to be present? + "--skip=handlers::test::test_handle_getservbyname_name" + "--skip=handlers::test::test_handle_getservbyname_name_proto" + "--skip=handlers::test::test_handle_getservbyport_port" + "--skip=handlers::test::test_handle_getservbyport_port_proto" + "--skip=handlers::test::test_handle_getservbyport_port_proto_aliases" + ] + ++ lib.optionals stdenv.hostPlatform.isBigEndian [ + # Expected serialisation output in tests doesn't account for endianness differences + # https://github.com/twosigma/nsncd/issues/160 + "--skip=handlers::test::test_hostent_serialization" + "--skip=handlers::test::test_innetgroup_serialization_in_group" + "--skip=handlers::test::test_netgroup_serialization" + ]; meta = with lib; { description = "Name service non-caching daemon";