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

Rust program fails to pass a test, but works just fine when using makepkg #1478

Closed
guihkx opened this issue Mar 23, 2021 · 4 comments
Closed

Comments

@guihkx
Copy link

guihkx commented Mar 23, 2021

Affected Version

yay v10.2.0 - libalpm v12.0.2

Describe the bug

The sfz package has a check() function that runs tests from upstream, but this specific test is failing only when building with yay:

$ RUST_BACKTRACE=1 yay -S sfz
[... suppressed output ...]
==> Starting check()...
[... suppressed output ...]
failures:

---- extensions::t_extensions::path_is_not_relatively_hidden stdout ----
thread 'extensions::t_extensions::path_is_not_relatively_hidden' panicked at 'assertion failed: !file_txt_path().is_relatively_hidden()', src/extensions.rs:146:9
stack backtrace:
   0: rust_begin_unwind
             at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/std/src/panicking.rs:493:5
   1: core::panicking::panic_fmt
             at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/core/src/panicking.rs:92:14
   2: core::panicking::panic
             at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/core/src/panicking.rs:50:5
   3: sfz::extensions::t_extensions::path_is_not_relatively_hidden
   4: core::ops::function::FnOnce::call_once
             at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.


failures:
    extensions::t_extensions::path_is_not_relatively_hidden

test result: FAILED. 69 passed; 1 failed; 3 ignored; 0 measured; 0 filtered out; finished in 0.01s

error: test failed, to rerun pass '--bin sfz'
==> ERROR: A failure occurred in check().
    Aborting...
error making: sfz

Reproduction Steps

  1. Set the RUST_BACKTRACE=1 environment variable (optional)
  2. Run yay -S sfz
  3. Wait for completion of the check() function
  4. Package fails to build

Expected behavior

The package builds just fine with makepkg -s, so I assume this test failure is somewhat related to yay (?)

Output

$ yay -S sfz
:: Checking for conflicts...
:: Checking for inner conflicts...
[Aur:1]  sfz-0.4.0-1

:: Downloaded PKGBUILD (1/1): sfz
:: (1/1) Parsing SRCINFO: sfz
  1 sfz                              (Installed) (Build Files Exist)
==> PKGBUILDs to edit?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> 
==> Making package: sfz 0.4.0-1 (seg 22 mar 2021 23:22:49)
==> Retrieving sources...
  -> Downloading sfz-0.4.0.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   121  100   121    0     0    230      0 --:--:-- --:--:-- --:--:--   230
100  129k    0  129k    0     0  80880      0 --:--:--  0:00:01 --:--:--  198k
==> Validating source files with sha512sums...
    sfz-0.4.0.tar.gz ... Passed
==> Making package: sfz 0.4.0-1 (seg 22 mar 2021 23:22:51)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found sfz-0.4.0.tar.gz
==> Validating source files with sha512sums...
    sfz-0.4.0.tar.gz ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting sfz-0.4.0.tar.gz with bsdtar
==> Sources are ready.
==> Making package: sfz 0.4.0-1 (seg 22 mar 2021 23:22:53)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting build()...
   Compiling cfg-if v1.0.0
   Compiling autocfg v1.0.1
   Compiling proc-macro2 v1.0.24
   Compiling memchr v2.3.4
   Compiling unicode-xid v0.2.1
   Compiling libc v0.2.86
   Compiling syn v1.0.60
   Compiling log v0.4.14
   Compiling fnv v1.0.7
   Compiling version_check v0.9.2
   Compiling once_cell v1.5.2
   Compiling typenum v1.12.0
   Compiling itoa v0.4.7
   Compiling lazy_static v1.4.0
   Compiling getrandom v0.2.2
   Compiling bitflags v1.2.1
   Compiling regex-syntax v0.6.22
   Compiling ucd-trie v0.1.3
   Compiling serde_derive v1.0.123
   Compiling bytes v1.0.1
   Compiling crc32fast v1.2.1
   Compiling byteorder v1.4.2
   Compiling ryu v1.0.5
   Compiling serde v1.0.123
   Compiling same-file v1.0.6
   Compiling maplit v1.0.2
   Compiling byte-tools v0.3.1
   Compiling unic-char-range v0.9.0
   Compiling unic-common v0.9.0
   Compiling pin-project-lite v0.2.4
   Compiling ppv-lite86 v0.2.10
   Compiling alloc-no-stdlib v2.0.1
   Compiling serde_json v1.0.62
   Compiling adler32 v1.2.0
   Compiling httparse v1.3.5
   Compiling futures-core v0.3.12
   Compiling deunicode v0.4.3
   Compiling try-lock v0.2.3
   Compiling cfg-if v0.1.10
   Compiling percent-encoding v2.1.0
   Compiling pin-utils v0.1.0
   Compiling mime v0.3.16
   Compiling futures-task v0.3.12
   Compiling fake-simd v0.1.2
   Compiling unicode-width v0.1.8
   Compiling opaque-debug v0.2.3
   Compiling humansize v1.1.0
   Compiling tower-service v0.3.1
   Compiling httpdate v0.3.2
   Compiling base64 v0.13.0
   Compiling num-traits v0.2.14
   Compiling num-integer v0.1.44
   Compiling crossbeam-utils v0.8.1
   Compiling tokio v1.2.0
   Compiling thread_local v1.1.3
   Compiling tracing-core v0.1.17
   Compiling unicase v2.6.0
   Compiling pest v2.1.3
   Compiling http v0.2.3
   Compiling walkdir v2.3.1
   Compiling block-padding v0.1.5
   Compiling unic-char-property v0.9.0
   Compiling unic-ucd-version v0.9.0
   Compiling alloc-stdlib v0.2.1
   Compiling miniz_oxide v0.3.7
   Compiling futures-channel v0.3.12
   Compiling slug v0.1.4
   Compiling qstring v0.7.2
   Compiling futures-util v0.3.12
   Compiling textwrap v0.11.0
   Compiling tracing v0.1.24
   Compiling pest_meta v2.1.3
   Compiling unic-ucd-segment v0.9.0
   Compiling brotli-decompressor v2.3.1
   Compiling http-body v0.4.0
   Compiling headers-core v0.2.0
   Compiling aho-corasick v0.7.15
   Compiling bstr v0.2.15
   Compiling quote v1.0.9
   Compiling want v0.3.0
   Compiling time v0.1.43
   Compiling mio v0.7.8
   Compiling socket2 v0.3.19
   Compiling clap v2.33.3
   Compiling flate2 v1.0.14
   Compiling generic-array v0.12.3
   Compiling unic-segment v0.9.0
   Compiling brotli v3.3.0
   Compiling regex v1.4.3
   Compiling rand_core v0.6.2
   Compiling mime_guess v2.0.3
   Compiling block-buffer v0.7.3
   Compiling digest v0.8.1
   Compiling globset v0.4.6
   Compiling parse-zoneinfo v0.3.0
   Compiling pest_generator v2.1.3
   Compiling chrono v0.4.19
   Compiling rand_chacha v0.3.0
   Compiling thiserror-impl v1.0.23
   Compiling tokio-macros v1.1.0
   Compiling pin-project-internal v1.0.5
   Compiling sha-1 v0.8.2
   Compiling ignore v0.4.17
   Compiling chrono-tz v0.5.3
   Compiling pest_derive v2.1.0
   Compiling rand v0.8.3
   Compiling thiserror v1.0.23
   Compiling headers v0.3.3
   Compiling globwalk v0.8.1
   Compiling pin-project v1.0.5
   Compiling zip v0.5.10
   Compiling hyper v0.14.4
   Compiling tera v1.6.1
   Compiling sfz v0.4.0 (/home/gui/.cache/yay/sfz/src/sfz-0.4.0)
    Finished release [optimized] target(s) in 2m 48s
==> Starting check()...
   Compiling cfg-if v1.0.0
   Compiling fnv v1.0.7
   Compiling itoa v0.4.7
   Compiling lazy_static v1.4.0
   Compiling once_cell v1.5.2
   Compiling regex-syntax v0.6.22
   Compiling bytes v1.0.1
   Compiling same-file v1.0.6
   Compiling byteorder v1.4.2
   Compiling ppv-lite86 v0.2.10
   Compiling byte-tools v0.3.1
   Compiling unic-common v0.9.0
   Compiling pin-project-lite v0.2.4
   Compiling unic-char-range v0.9.0
   Compiling futures-core v0.3.12
   Compiling alloc-no-stdlib v2.0.1
   Compiling adler32 v1.2.0
   Compiling cfg-if v0.1.10
   Compiling fake-simd v0.1.2
   Compiling deunicode v0.4.3
   Compiling futures-task v0.3.12
   Compiling percent-encoding v2.1.0
   Compiling opaque-debug v0.2.3
   Compiling mime v0.3.16
   Compiling pin-utils v0.1.0
   Compiling try-lock v0.2.3
   Compiling ucd-trie v0.1.3
   Compiling unicode-width v0.1.8
   Compiling httpdate v0.3.2
   Compiling humansize v1.1.0
   Compiling remove_dir_all v0.5.3
   Compiling base64 v0.13.0
   Compiling tower-service v0.3.1
   Compiling tracing-core v0.1.17
   Compiling thread_local v1.1.3
   Compiling walkdir v2.3.1
   Compiling http v0.2.3
   Compiling block-padding v0.1.5
   Compiling unic-ucd-version v0.9.0
   Compiling unic-char-property v0.9.0
   Compiling futures-channel v0.3.12
   Compiling alloc-stdlib v0.2.1
   Compiling miniz_oxide v0.3.7
   Compiling slug v0.1.4
   Compiling qstring v0.7.2
   Compiling futures-util v0.3.12
   Compiling pest v2.1.3
   Compiling textwrap v0.11.0
   Compiling libc v0.2.86
   Compiling memchr v2.3.4
   Compiling log v0.4.14
   Compiling typenum v1.12.0
   Compiling bitflags v1.2.1
   Compiling tracing v0.1.24
   Compiling crc32fast v1.2.1
   Compiling ryu v1.0.5
   Compiling unic-ucd-segment v0.9.0
   Compiling httparse v1.3.5
   Compiling brotli-decompressor v2.3.1
   Compiling http-body v0.4.0
   Compiling headers-core v0.2.0
   Compiling getrandom v0.2.2
   Compiling time v0.1.43
   Compiling socket2 v0.3.19
   Compiling num-traits v0.2.14
   Compiling crossbeam-utils v0.8.1
   Compiling aho-corasick v0.7.15
   Compiling bstr v0.2.15
   Compiling mio v0.7.8
   Compiling want v0.3.0
   Compiling unicase v2.6.0
   Compiling clap v2.33.3
   Compiling flate2 v1.0.14
   Compiling generic-array v0.12.3
   Compiling unic-segment v0.9.0
   Compiling rand_core v0.6.2
   Compiling brotli v3.3.0
   Compiling num-integer v0.1.44
   Compiling regex v1.4.3
   Compiling block-buffer v0.7.3
   Compiling digest v0.8.1
   Compiling rand_chacha v0.3.0
   Compiling chrono v0.4.19
   Compiling sha-1 v0.8.2
   Compiling rand v0.8.3
   Compiling globset v0.4.6
   Compiling serde v1.0.123
   Compiling tokio v1.2.0
   Compiling pin-project v1.0.5
   Compiling thiserror v1.0.23
   Compiling mime_guess v2.0.3
   Compiling headers v0.3.3
   Compiling tempfile v3.2.0
   Compiling ignore v0.4.17
   Compiling serde_json v1.0.62
   Compiling zip v0.5.10
   Compiling globwalk v0.8.1
   Compiling chrono-tz v0.5.3
   Compiling hyper v0.14.4
   Compiling tera v1.6.1
   Compiling sfz v0.4.0 (/home/gui/.cache/yay/sfz/src/sfz-0.4.0)
    Finished release [optimized] target(s) in 1m 44s
     Running target/release/deps/sfz-1920102d9b28e947

running 73 tests
test cli::args::t::parse_absolute_path ... ok
test cli::args::t::parse_addresses ... ok
test cli::app::t::get_matches ... ok
test cli::args::t::parse_default ... ok
test extensions::t_extensions::mime_is_compressed ... ok
test extensions::t_extensions::path_filename_str ... ok
test extensions::t_extensions::path_is_relatively_hidden ... ok
test cli::args::t::parse_relative_path ... ok
test extensions::t_extensions::path_mtime ... ignored
test extensions::t_extensions::path_mime ... ok
test extensions::t_extensions::path_is_not_relatively_hidden ... FAILED
test extensions::t_extensions::path_size ... ok
test extensions::t_extensions::system_time_to_timestamp ... ok
test extensions::t_extensions::path_type_ ... ok
test http::conditional_requests::t_fresh::no_precondition_header_fields ... ok
test http::conditional_requests::t_precondition::failed_with_if_match_not_passes ... ok
test http::conditional_requests::t_precondition::ok_without_any_precondition ... ok
test http::conditional_requests::t_precondition::with_if_match_passes ... ok
test http::conditional_requests::t_fresh::if_none_match_precedes_if_modified_since ... ok
test http::conditional_requests::t_fresh::only_if_modified_since ... ok
test http::conditional_requests::t_precondition::failed_with_if_unmodified_since_not_passes ... ok
test http::conditional_requests::t_precondition::with_if_unmodified_since_passes ... ok
test http::content_encoding::t_compress::failed ... ok
test http::content_encoding::t_parse_qvalue::parse_successfully ... ok
test http::content_encoding::t_prior::filter_out_zero_quality ... ok
test http::content_encoding::t_prior::pick_highest_priority ... ok
test http::content_encoding::t_sort::same_qualities ... ok
test http::content_encoding::t_sort::second_item_with_greater_quality ... ok
test http::content_encoding::t_prior::with_unsupported_encoding ... ok
test http::range_requests::t_range::no_if_range_header ... ok
test http::range_requests::t_range::no_range_header ... ok
test http::range_requests::t_range::only_accept_exact_match_mtime ... ok
test http::range_requests::t_range::strong_validator ... ok
test http::range_requests::t_range::weak_validator_as_falsy ... ok
test http::range_requests::t_satisfiable::multiple_byte_ranges ... ok
test http::range_requests::t_satisfiable::one_satisfiable_byte_range ... ok
test http::range_requests::t_satisfiable::one_unsatisfiable_byte_range ... ok
test http::content_encoding::t_compress::compressed ... ok
test http::range_requests::t_satisfiable::zero_byte_range ... ok
test server::res::t::response_304 ... ok
test server::res::t::response_403 ... ok
test server::res::t::response_404 ... ok
test server::res::t::response_412 ... ok
test server::res::t::response_500 ... ok
test server::send::t::breadcrumbs ... ok
test server::send::t::breadcrumbs_from_root ... ok
test server::send::t::breadcrumbs_with_slashes ... ok
test server::send::t::prefixed_breadcrumbs ... ok
test server::send::t_send::t_send_dir ... ignored
test server::send::t_send::t_send_file_not_found ... ok
test server::send::t_send::t_send_file_with_range_invalid_range ... ok
test server::send::t_send::t_send_file_success ... ok
test server::send::t_send::t_send_file_with_range_multiple_bytes ... ok
test server::send::t_send::t_send_file_with_range_not_found ... ok
test server::send::t::render_successfully ... ok
test server::send::t_send::t_send_file_with_range_one_byte ... ok
test server::serve::t_server::disable_cors ... ok
test server::serve::t_server::can_compress ... ok
test server::send::t_send::t_send_dir_as_zip ... ok
test server::serve::t_server::cannot_compress ... ok
test server::serve::t_server::guess_path_mime ... ok
test server::serve::t_server::handle_request ... ignored
test server::serve::t_server::enable_cache_control ... ok
test server::serve::t_server::enable_cors ... ok
test server::serve::t_server::file_path_from_path ... ok
test server::serve::t_server::path_is_hidden ... ok
test server::serve::t_server::path_is_not_hidden ... ok
test server::serve::t_server::path_does_not_exists ... ok
test server::serve::t_server::path_exists ... ok
test server::serve::t_server::path_is_under_basepath ... ok
test server::serve::t_server::path_is_ignored ... ok
test server::serve::t_server::strips_path_prefix ... ok
test server::serve::t_server::path_is_not_ignored ... ok

failures:

---- extensions::t_extensions::path_is_not_relatively_hidden stdout ----
thread 'extensions::t_extensions::path_is_not_relatively_hidden' panicked at 'assertion failed: !file_txt_path().is_relatively_hidden()', src/extensions.rs:146:9
stack backtrace:
   0: rust_begin_unwind
             at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/std/src/panicking.rs:493:5
   1: core::panicking::panic_fmt
             at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/core/src/panicking.rs:92:14
   2: core::panicking::panic
             at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/core/src/panicking.rs:50:5
   3: sfz::extensions::t_extensions::path_is_not_relatively_hidden
   4: core::ops::function::FnOnce::call_once
             at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.


failures:
    extensions::t_extensions::path_is_not_relatively_hidden

test result: FAILED. 69 passed; 1 failed; 3 ignored; 0 measured; 0 filtered out; finished in 0.01s

error: test failed, to rerun pass '--bin sfz'
==> ERROR: A failure occurred in check().
    Aborting...
error making: sfz
@grandchild
Copy link

path_is_not_relatively_hidden

This probably happens because yay builds in ~/.cache/yay/... by default. ~/.cache is a hidden directory and I guess the test fails because of that.

I would argue the test should be fixed, because it's dependent on where the software builds, which is... not good.

@grandchild
Copy link

You can try and reproduce the issue with makepkg by cloning the git repo inside some (maybe temporary) directory that starts with a ., like ~/.mytemp/ and see if the issue occurs with plain makepkg there as well.

@guihkx
Copy link
Author

guihkx commented Mar 23, 2021

You can try and reproduce the issue with makepkg by cloning the git repo inside some (maybe temporary) directory that starts with a ., like ~/.mytemp/ and see if the issue occurs with plain makepkg there as well.

That was spot on! This indeed seems like it should be fixed on sfz's side, so I'll report there.

Thanks!

@salman-farooq-sh
Copy link

The same issue happens with aur.archlinux.org/packages/helix-git. It builds and installs fine with makepkg -si even when done in a hidden directory but has been failing for some people (but not for others) with yay --devel. The comments on the AUR package page might be of help.

This might just be a bad config issue on my machine. Any help with debugging this will be appreciated. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants