age: age: error: failed to wrap key for recipient #0: test plugin: write |1: broken pipe

Environment

  • OS: NixOS 23.05
  • age version: 1.1.1

What were you trying to do

Trying to run tests as part of the package’s build process.

What happened

A test failed.

building
Building subPackage .
Building subPackage ./agessh
Building subPackage ./armor
Building subPackage ./cmd/age
Building subPackage ./cmd/age-keygen
Building subPackage ./internal/bech32
Building subPackage ./internal/format
Building subPackage ./internal/plugin
Building subPackage ./internal/stream
running tests
ok      filippo.io/age  0.736s
ok      filippo.io/age/agessh   0.272s
ok      filippo.io/age/armor    0.016s
--- FAIL: TestScript (0.00s)
    --- FAIL: TestScript/plugin (0.06s)
        testscript.go:481: 
            # encrypt and decrypt a file with a test plugin (0.059s)
            > age -r age1test10qdmzv9q -o test.age input
            [stderr]
            age: error: failed to wrap key for recipient #0: test plugin: write |1: broken pipe
            age: report unexpected or unhelpful errors at https://filippo.io/age/report
            [exit status 1]
            FAIL: testdata/plugin.txt:2: unexpected command failure
            
FAIL
FAIL    filippo.io/age/cmd/age  1.008s
FAIL

The build machine’s CPU may have been overloaded at the time the tests were running (e.g. load average up to ~150 on a 16-core CPU), but it should not have caused an error AFAIK.

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Comments: 16 (2 by maintainers)

Commits related to this issue

Most upvoted comments

Sure. I’m using

    (age.overrideAttrs (finalAttrs: previousAttrs: {
      doCheck = false; # https://github.com/FiloSottile/age/issues/517
    }))

One extra data point here. It works fine for me on aarch64-darwin. It does not work for me inside GitHub actions on x86_64-darwin.

So, it seems I ended up with a working version of age when disabling the tests, but the tests keep failing reliably for me.

@ctheune would you mind sharing your solution for disabling the tests?

I’ve tried:

ageWithoutTests = pkgs.age.overrideAttrs (_: {
  doCheck = false;
});

But this doesn’t seem to work around the issue for me.

@bdd I tried both with and without your commit but I can’t reproduce this issue.