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

cryptsetup: enable and fix tests #46346

Merged
merged 1 commit into from Sep 8, 2018
Merged

cryptsetup: enable and fix tests #46346

merged 1 commit into from Sep 8, 2018

Conversation

xeji
Copy link
Contributor

@xeji xeji commented Sep 7, 2018

Motivation for this change

Some tests use O_DIRECT which is filesystem dependent and fails in a sandbox as well as on some filesystems (btrfs, zfs) without sandboxing. The tests pass when run on an ext4 fs. Tests making implicit assumptions on the underlying fs aren't really useful. (I'll open an upstream issue about that).

Patch out O_DIRECT and disable the 4 test cases that still fail in a sandbox. See discussion in #46151.

Closes #46151.

Things done
  • builds and passes tests with sandboxing enabled on NixOS

--

cc @Mic92 @oxij

@xeji
Copy link
Contributor Author

xeji commented Sep 7, 2018

This should be backported to 18.09

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: cryptsetup

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: cryptsetup

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/n3mg7jnlcfxhlf9am08yv2hwkjasqdsn-cryptsetup-2.0.4-dev
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/n3mg7jnlcfxhlf9am08yv2hwkjasqdsn-cryptsetup-2.0.4-dev/lib
patching script interpreter paths in /nix/store/n3mg7jnlcfxhlf9am08yv2hwkjasqdsn-cryptsetup-2.0.4-dev
checking for references to /build in /nix/store/n3mg7jnlcfxhlf9am08yv2hwkjasqdsn-cryptsetup-2.0.4-dev...
shrinking RPATHs of ELF executables and libraries in /nix/store/5h11lq28z0yp58l35gravnwzqdnmr738-cryptsetup-2.0.4-man
gzipping man pages under /nix/store/5h11lq28z0yp58l35gravnwzqdnmr738-cryptsetup-2.0.4-man/share/man/
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/5h11lq28z0yp58l35gravnwzqdnmr738-cryptsetup-2.0.4-man
checking for references to /build in /nix/store/5h11lq28z0yp58l35gravnwzqdnmr738-cryptsetup-2.0.4-man...

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: cryptsetup

Partial log (click to expand)

strip is /nix/store/y4ymnvgxygpq05h03kyzbj572zmh6zla-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/j7r096kskcd76d4nay6c2wrsj62wnd2a-cryptsetup-2.0.4-dev/lib
patching script interpreter paths in /nix/store/j7r096kskcd76d4nay6c2wrsj62wnd2a-cryptsetup-2.0.4-dev
checking for references to /build in /nix/store/j7r096kskcd76d4nay6c2wrsj62wnd2a-cryptsetup-2.0.4-dev...
shrinking RPATHs of ELF executables and libraries in /nix/store/bb5ml213cxf0jm5aiqi5h48dbsqnak0i-cryptsetup-2.0.4-man
gzipping man pages under /nix/store/bb5ml213cxf0jm5aiqi5h48dbsqnak0i-cryptsetup-2.0.4-man/share/man/
strip is /nix/store/y4ymnvgxygpq05h03kyzbj572zmh6zla-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/bb5ml213cxf0jm5aiqi5h48dbsqnak0i-cryptsetup-2.0.4-man
checking for references to /build in /nix/store/bb5ml213cxf0jm5aiqi5h48dbsqnak0i-cryptsetup-2.0.4-man...
/nix/store/lchayw7fghmr3x1c877hcbqjyzj39g1n-cryptsetup-2.0.4

--replace 'RUN "F" $1 read_buffer $((BSIZE-1))' "" \
--replace 'RUN "F" $1 read_buffer $((BSIZE+1))' "" \
--replace 'RUN "F" $1 write_buffer $((BSIZE-1))' "" \
--replace 'RUN "F" $1 write_buffer $((BSIZE+1))' ""
Copy link
Member

@Mic92 Mic92 Sep 8, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a patch for this one? Otherwise it is hard to see, if this file needs an update or not (if new tests are added or fail in the sandbox).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

Some tests use O_DIRECT which is filesystem dependent and fails in a
sandbox as well as on some filesystems without sandboxing.
Patch out O_DIRECT and disable the 4 test cases that still fail in a
sandbox. See discussion in NixOS#46151.
@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: cryptsetup

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: cryptsetup

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/jnav7rk8nqmxisa048y5hjcdn2daihsh-cryptsetup-2.0.4-dev
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/jnav7rk8nqmxisa048y5hjcdn2daihsh-cryptsetup-2.0.4-dev/lib
patching script interpreter paths in /nix/store/jnav7rk8nqmxisa048y5hjcdn2daihsh-cryptsetup-2.0.4-dev
checking for references to /build in /nix/store/jnav7rk8nqmxisa048y5hjcdn2daihsh-cryptsetup-2.0.4-dev...
shrinking RPATHs of ELF executables and libraries in /nix/store/z8imk9ck1w6g1ydj0bcgwvy1lhcchxkv-cryptsetup-2.0.4-man
gzipping man pages under /nix/store/z8imk9ck1w6g1ydj0bcgwvy1lhcchxkv-cryptsetup-2.0.4-man/share/man/
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/z8imk9ck1w6g1ydj0bcgwvy1lhcchxkv-cryptsetup-2.0.4-man
checking for references to /build in /nix/store/z8imk9ck1w6g1ydj0bcgwvy1lhcchxkv-cryptsetup-2.0.4-man...

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: cryptsetup

Partial log (click to expand)

strip is /nix/store/y4ymnvgxygpq05h03kyzbj572zmh6zla-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/kpykw5bdl72y3v7mlbqx6vl8m1cq1mzj-cryptsetup-2.0.4-dev/lib
patching script interpreter paths in /nix/store/kpykw5bdl72y3v7mlbqx6vl8m1cq1mzj-cryptsetup-2.0.4-dev
checking for references to /build in /nix/store/kpykw5bdl72y3v7mlbqx6vl8m1cq1mzj-cryptsetup-2.0.4-dev...
shrinking RPATHs of ELF executables and libraries in /nix/store/6vy8k1capnkapdsknf30ikl5wipjnwxd-cryptsetup-2.0.4-man
gzipping man pages under /nix/store/6vy8k1capnkapdsknf30ikl5wipjnwxd-cryptsetup-2.0.4-man/share/man/
strip is /nix/store/y4ymnvgxygpq05h03kyzbj572zmh6zla-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/6vy8k1capnkapdsknf30ikl5wipjnwxd-cryptsetup-2.0.4-man
checking for references to /build in /nix/store/6vy8k1capnkapdsknf30ikl5wipjnwxd-cryptsetup-2.0.4-man...
/nix/store/62mqf3n43h5dqlpj7mgf3n917g8kqgd4-cryptsetup-2.0.4

@oxij
Copy link
Member

oxij commented Sep 8, 2018 via email

@xeji xeji merged commit 8c6cf3d into NixOS:master Sep 8, 2018
xeji added a commit that referenced this pull request Sep 8, 2018
Some tests use O_DIRECT which is filesystem dependent and fails in a
sandbox as well as on some filesystems without sandboxing.
Patch out O_DIRECT and disable the 4 test cases that still fail in a
sandbox. See discussion in #46151.

(cherry picked from commit 8c6cf3d)
@xeji xeji deleted the p/cryptsetup branch September 8, 2018 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants