Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixosTests.avahi: add avahi-with-resolved #100267

Merged
merged 1 commit into from Oct 11, 2020
Merged

nixosTests.avahi: add avahi-with-resolved #100267

merged 1 commit into from Oct 11, 2020

Conversation

@flokli
Copy link
Contributor

@flokli flokli commented Oct 11, 2020

This allows testing avahi works with resolved being enabled, as a
regression test for #99530.

I cherry-picked this into a nixpkgs before the merge of #99530 and successfully verified nixosTests.avahi-with-resolved failed there, so this should be fine.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
This allows testing avahi works with resolved being enabled, as a
regression test for #99530.
@flokli
Copy link
Contributor Author

@flokli flokli commented Oct 11, 2020

In the longterm, we might just want to have some generic mdns test with different resolvers and configurations, but this seemed to be a more straightforward intermediate solution.

@doronbehar
Copy link
Contributor

@doronbehar doronbehar commented Oct 11, 2020

Testing the test now.

@doronbehar doronbehar merged commit bfbed5a into master Oct 11, 2020
16 checks passed
aszlig added a commit that referenced this issue Oct 20, 2020
In commit a61ca03 (#100267), the avahi
test expression got an additional attribute, but instead of wrapping the
function, the attributes were introduced by nesting the function one
level deeper.

To illustrate this:

  Before: attrs: <testdrv>
  After:  newattrs: attrs: <testdrv>

So when instantiating tests.avahi.x86_64-linux from nixos/release.nix we
get "value is a function while a set was expected" instead of the
derivation.

I simply re-passed the attributes to make-test-python.nix, since the
function already allows (via "...") arbitrary attributes to be passed.

The reason why I'm pushing this directly to master is because evaluation
for the test is already broken and the worst that could happen here is
that things are *still* broken.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @flokli, @doronbehar
@aszlig
Copy link
Member

@aszlig aszlig commented Oct 20, 2020

@doronbehar: How exactly did you evaluate the test?

@doronbehar
Copy link
Contributor

@doronbehar doronbehar commented Oct 20, 2020

With either nix-build -A nixosTests.avahi-with-resolved or nix build -L .#nixosTests.avahi-with-resolved (nixUnstable). IIRC ofborg's eval tests passed when I pressed the merge button.

@aszlig
Copy link
Member

@aszlig aszlig commented Oct 20, 2020

@doronbehar: Ah, okay, then the nested function is auto-called and evaluation works, that explains why it has worked for you.

@aszlig
Copy link
Member

@aszlig aszlig commented Oct 20, 2020

Just to see whether ofborg evaluates them in the same way:

@ofborg test avahi avahi-with-resolved

@flokli flokli deleted the avahi-networkd-test branch Oct 21, 2020
sdier added a commit to sdier/nixpkgs that referenced this issue Oct 23, 2020
In commit a61ca03 (NixOS#100267), the avahi
test expression got an additional attribute, but instead of wrapping the
function, the attributes were introduced by nesting the function one
level deeper.

To illustrate this:

  Before: attrs: <testdrv>
  After:  newattrs: attrs: <testdrv>

So when instantiating tests.avahi.x86_64-linux from nixos/release.nix we
get "value is a function while a set was expected" instead of the
derivation.

I simply re-passed the attributes to make-test-python.nix, since the
function already allows (via "...") arbitrary attributes to be passed.

The reason why I'm pushing this directly to master is because evaluation
for the test is already broken and the worst that could happen here is
that things are *still* broken.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @flokli, @doronbehar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants