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

[BUG] Tests failing on OpenBSD #5173

Closed
rapenne-s opened this issue May 11, 2024 · 10 comments
Closed

[BUG] Tests failing on OpenBSD #5173

rapenne-s opened this issue May 11, 2024 · 10 comments
Labels

Comments

@rapenne-s
Copy link

Version of Kakoune

v2024.05.09

Reproducer

make test

Outcome

ryzen$ make test
===>  Regression tests for kakoune-2024.05.09
ln -sf kak.opt src/kak
cd test && ./run
  test
    commands
      edit-fifo-noscroll
      edit-fifo-noscroll-noeol
    compose
      backward-search
      catch-error-desc
      complex-pipe
      del-empty-line
      discard-selections-with-itersel
      do-not-run-hooks-added-by-parent
      echo-to-file
      eof-multi-delete
      file-expansion
      history
      hook-named-captures
      inline-sort
      line-completion
      no-hook-on-unset-option-with-same-parent
      pipe-at-eof
      select-codepoints
      select-display-columns
      select-timestamp
      selections_char_desc-expansion
      undo-multi-replace-at-end
      unicode
    display
      horizontal-scroll
      horizontal-scroll-onto-tab
      horizontal-scroll-with-tab
      vertical-scroll
    highlight
      column
        multi-columns
      face-override
      named-captures
      number-lines
      ranges
      regions
      regions-recurse
      replace-empty-range
      replace-multiline-range
      replace-multiline-range-pulls-new-lines
      replace-only-fully-selected-ranges
      rust
        comment0
        doc_comment_hidden
        doc_comment_hidden_with_empty_line
        inner_block_comment1
        inner_block_doc_comment1
        inner_line_doc_comment1
        let
        line_comment1
        outer_block_doc_comment0
        pub
        todo
        value
          - { "jsonrpc": "2.0", "method": "draw", "params": [[[{ "face": { "fg": "black", "bg": "white", "underline": "default", "attributes": ["final_fg","final_bg"] }, "contents": "b" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "'\\' " }, { "face": { "fg": "red", "bg": "default", "underline": "default", "attributes": [] }, "contents": "b'\\x00'" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "red", "bg": "default", "underline": "default", "attributes": [] }, "contents": "b'0'" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "red", "bg": "default", "underline": "default", "attributes": [] }, "contents": "b'a'" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "red", "bg": "default", "underline": "default", "attributes": [] }, "contents": "b' '" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "red", "bg": "default", "underline": "default", "attributes": [] }, "contents": "b'!'" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "red", "bg": "default", "underline": "default", "attributes": [] }, "contents": "b'\\n'" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " b" }, { "face": { "fg": "red", "bg": "default", "underline": "default", "attributes": [] }, "contents": "'一'" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " b" }, { "face": { "fg": "red", "bg": "default", "underline": "default", "attributes": [] }, "contents": "'\\u{12}'" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "\u000a" }], [{ "face": { "fg": "red", "bg": "default", "underline": "default", "attributes": [] }, "contents": "'\\x00'" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "red", "bg": "default", "underline": "default", "attributes": [] }, "contents": "'0'" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "red", "bg": "default", "underline": "default", "attributes": [] }, "contents": "'a'" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "red", "bg": "default", "underline": "default", "attributes": [] }, "contents": "' '" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "red", "bg": "default", "underline": "default", "attributes": [] }, "contents": "'!'" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "red", "bg": "default", "underline": "default", "attributes": [] }, "contents": "'\\n'" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "red", "bg": "default", "underline": "default", "attributes": [] }, "contents": "'\\u{12}'" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "red", "bg": "default", "underline": "default", "attributes": [] }, "contents": "'一'" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "\u000a" }]], { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, { "fg": "blue", "bg": "default", "underline": "default", "attributes": [] }] }
          + { "jsonrpc": "2.0", "method": "draw", "params": [[[{ "face": { "fg": "black", "bg": "white", "underline": "default", "attributes": ["final_fg","final_bg"] }, "contents": "b" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "'\\' " }, { "face": { "fg": "yellow", "bg": "default", "underline": "default", "attributes": [] }, "contents": "b'\\x00'" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "yellow", "bg": "default", "underline": "default", "attributes": [] }, "contents": "b'0'" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "yellow", "bg": "default", "underline": "default", "attributes": [] }, "contents": "b'a'" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "yellow", "bg": "default", "underline": "default", "attributes": [] }, "contents": "b' '" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "yellow", "bg": "default", "underline": "default", "attributes": [] }, "contents": "b'!'" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "yellow", "bg": "default", "underline": "default", "attributes": [] }, "contents": "b'\\n'" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " b" }, { "face": { "fg": "green", "bg": "default", "underline": "default", "attributes": [] }, "contents": "'一'" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " b" }, { "face": { "fg": "green", "bg": "default", "underline": "default", "attributes": [] }, "contents": "'\\u{12}'" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "\u000a" }], [{ "face": { "fg": "green", "bg": "default", "underline": "default", "attributes": [] }, "contents": "'\\x00'" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "green", "bg": "default", "underline": "default", "attributes": [] }, "contents": "'0'" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "green", "bg": "default", "underline": "default", "attributes": [] }, "contents": "'a'" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "green", "bg": "default", "underline": "default", "attributes": [] }, "contents": "' '" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "green", "bg": "default", "underline": "default", "attributes": [] }, "contents": "'!'" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "green", "bg": "default", "underline": "default", "attributes": [] }, "contents": "'\\n'" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "green", "bg": "default", "underline": "default", "attributes": [] }, "contents": "'\\u{12}'" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "green", "bg": "default", "underline": "default", "attributes": [] }, "contents": "'一'" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "\u000a" }]], { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, { "fg": "blue", "bg": "default", "underline": "default", "attributes": [] }] }

debug buffer:
*** This is the debug buffer, where debug info will be written ***

      wrap
        avoid-odd-places
    hooks
      completion-hide
      module-loaded
      once
      remove-regex
    indent
      c-family
        align-while-expr
        close-block
--- /build/data/ports/pobj/kakoune-2024.05.09/kakoune-2024.05.09/test/./indent/c-family/close-block/out Thu May  9 13:01:53 2024
+++ out Sat May 11 12:38:52 2024
@@ -6,13 +6,13 @@
             bar();
         }
     };
-};
+}

 struct D {
     void baz() {
-    }
+    };
     int qux;
-};
+}

 if (true) {
     if (true) {

debug buffer:
*** This is the debug buffer, where debug info will be written ***

        close-function-with-struct-param
--- /build/data/ports/pobj/kakoune-2024.05.09/kakoune-2024.05.09/test/./indent/c-family/close-function-with-struct-param/out    Thu May  9 13:01:53 2024
+++ out Sat May 11 12:38:52 2024
@@ -13,10 +13,10 @@
     void h(int i,
            struct S s) const {

-    }
+           }

     void i(int i,
            struct S s) const final {

-    }
+           }
 };

debug buffer:
*** This is the debug buffer, where debug info will be written ***

        close-namespace
        comment-line-continuation
        construct-align
        deindent-function-closing-brace
        deindent-generic-closing-brace
        deindent-if-body
        deindent-if-closing-brace
        indent-after-parenthesis
        indent-else-brace
        indent-if-body
        indent-if-brace
        move-brace
        multiline-nested-align
        nested-align
        open-function
        paren-in-literal
        preserve-tabs
      clojure
        doubled-brackets
      comment
        comment-multiple-lines-indented
        comment-multiple-lines-unindented
        comment-multiple-lines-when-partially-commented
        uncomment-multiple-indented-lines
      elixir
        do-keyword
        following-blocks-should-not-prevent-end
        function-definition-shouldnt-duplicate
        insert-comment-hash
      fidl
        comments
        on-closing
        on-newline
      go
        deindent-function-closing-brace
        deindent-generic-closing-brace
        deindent-if-closing-brace
        insert-comment
      haskell
        before-comment
        indented-comment
        inside-comment
      html
        indent-closing-tag
        indent-on-new-line
      javascript
        deindent-complex-brace-structure
      lisp
        doubled-brackets
      lua
        insert-end-only-when-needed
        unindent-after-end
      markdown
        inside-complex-blockquote
        inside-list-item
        inside-nested-list-item
        inside-simple-blockquote
        inside-strong-emphasis
        list-item
        open-after-setext-heading-1
        open-after-setext-heading-2
      ruby
        deindent-on-if-else-end
        do-keyword
        following-blocks-should-not-prevent-end
        indent-after-class
        insert-comment-hash
        method-definition-shouldnt-duplicate
      rust
        after-open
        after-open-with-chars
        after-variable
        after-where
        align-closing-brace
        align-closing-brack
        align-closing-paren
        before-where
        block-comment
        block-comment-close
        dedent
        dedent-async
        dedent-function-closing-brace
        dedent-generic-closing-brace
        dedent-if-closing-brace
        empty-line
        empty-match
        line-comment
        line-comment-close
        line-start-with-operator
        on-open-paren
      sh
        deindent-after-done
        deindent-after-esac
        deindent-after-fi
        deindent-case-option
        deindent-compound-command
        deindent-one-line-case-option
        deindent-only-else
        indent-after-do
        indent-after-in
        indent-after-then
        indent-block-case
        indent-compound-command
        no-deindent-after-else
        no-deindent-after-fi
    normal
      align
      align-tab
      all
      append
      append-at-eol
      change
      clear-selections
      codepoint-width
        tab-width
        vertical-movement
      concat-paste-line
      convert-spaces-to-tabs
      convert-tabs-to-spaces
      copy-sel-above
      copy-sel-below
      copy-sel-below-multi-line
      deindent
      delete
      duplicate-selections
      extend-lines
      extra-word-chars
      facedesc-invalid-syntax
        attributes
        bg-color
      find-char-backward
      find-char-backward-extending
      find-char-forward
      find-char-forward-extending
      goto
      goto-extending
        buffer-bottom
        buffer-end
        buffer-top
        last-change
        line-begin
        line-end
        buffer-bottom
        buffer-end
        buffer-top
        file
        last-buffer
        last-change
        line-begin
        line-end
      indent
      insert
      insert-at-line-start
      insert-replace
      jump
        backward
        backward-count
        backward-invalid-count
        forward
        forward-count
        forward-invalid-count
      keep-cmd
      keep-cmd-reg
      lower-case
      match-char
      move
        down
        down-extending
        left
        left-extending
        right
        right-extending
        up
        up-extending
      next-big-word
      next-big-word-extending
      next-match
      next-match-appending
      next-word
      next-word-extending
      object
        around
        around-parent
          angle
          braces
          brackets
          parenthesis
          angle
          argument
            multi-level
            single-level
          big-word
          braces
          brackets
          double_quote
          grave_quote
          indent
          paragraph
          parenthesis
          sentence
          single_quote
          slash
          word
        drop-non-whitespace
        end
        end-extending
        end-extending-parent
          braces
          angle
          argument
          big-word
          braces
          brackets
          double_quote
          grave_quote
          indent
          paragraph
            count
            single
          parenthesis
          sentence
            count
            single
          single_quote
          word
          angle
          argument
          big-word
          braces
          brackets
          double_quote
          grave_quote
          indent
          paragraph
            count
            single
            to-buffer-end
          parenthesis
          sentence
            count
            single
            to-buffer-end
          single_quote
          word
        inner
          angle
          argument
            multi-level
            single-level
          big-word
          braces
          brackets
          double_quote
          grave_quote
          indent
          paragraph
          parenthesis
          sentence
          single_quote
          slash
          word
        on-end
          around
            angle
            braces
            brackets
            parenthesis
          inner
            angle
            braces
            brackets
            parenthesis
          to-end
            angle
            braces
            brackets
            parenthesis
        on-start
          around
            angle
            braces
            brackets
            double_quote
            grave_quote
            parenthesis
            single_quote
            slash
          inner
            angle
            braces
            brackets
            double_quote
            grave_quote
            parenthesis
            single_quote
          to-start
            angle
            braces
            brackets
            parenthesis
        start
        start-extending
          angle
          argument
          big-word
          braces
          brackets
          double_quote
          grave_quote
          indent
          paragraph
            count
            single
          parenthesis
          sentence
            count
            single
          single_quote
          word
          angle
          argument
          big-word
          braces
          brackets
          double_quote
          grave_quote
          indent
          paragraph
            count
            single
          parenthesis
          sentence
            count
            single
            to-buffer-begin
          single_quote
          word
      open-above
      open-below
      open-multiple-above
      open-multiple-below
      paste-after
      paste-all-after
      paste-all-before
      paste-all-replace
      paste-before
      pipe
      pipe-reg
      pipe-to
      pipe-to-reg
      previous-big-word
      previous-big-word-extending
      previous-word
      previous-word-extending
      previous-word-no-underscore
      record-macro
      redo
      reload
      repeat-insert
        repeat-insert
        repeat-insert-hooks
        repeat-insert-mapped
        repeat-normal-exec
        repeat-normal-movement
      repeat-select
        repeat-end-paragraph
        repeat-find-char
      replace
      replace-lines
      replay-complex-insert
      replay-macro
      restore-selections
      rotate
      rotate-content
      save-selections
      search
      search-extending
      search-reverse
      search-reverse-extending
      search-reverse-rightmost
        missed-match
        overlap
      select
      select-horizontal-whitespace
      select-line
      selection-undo
        fold-redundant-entries
        redo
        undo
        windisplay-hook
      split
      split-at-begin
      split-multiple-lines
      switch-case
      to-char-backward
      to-char-backward-extending
      to-char-forward
      to-char-forward-extending
      trim
      trim-drop-empty
      trim-lines
        table
      undo
      undo-after-replace-lines
      upper-case
      user-modes
        lock
        once
      yank
    prompt
      history-abort-previous
      history-navigate
      history-previous
      history-previous-prefix
      history-repeat-last
      history-stop-at-first
    regression
      0-assert-on-itersel
      0-autocomplete-overrules-completers
      0-comment-after-command
      0-compute-modified-range-crash
      0-crash-on-BufSetOption-hook
      0-crash-on-backspace-at-buffer-begin
      0-crash-on-delete-buffer-BufClose
      0-crash-on-pipe-with-selection-access
      0-crash-on-specialy-crafted-modeline
      0-crash-on-tab-just-before-wrap-column
      0-deindent-on-mixed-indent-line
      0-eval-creates-prompt
      0-intermediate-regex-saved-in-history
      0-mouse-during-insert
      0-no-incsearch
      0-nothing-selected-on-prompt-initial-shift-tab
      0-open-below-should-not-move-cursor-on-eol
      0-replace-last-eol-with-eol
      0-rotate-at-eof-mutates-selection
      0-select-object-with-empty-begin-match
      0-spurious-undo-group-on-external
      0-undo-change-at-eof
      1014-ambiguous-kak_selections
      1051-crash-on-empty-param
      1053-crash-on-deletion-and-paste
      1074-comment-leader-autoinsert-error
      1105-object-selection-behaviour
      1111-unexpected-behaviour-on-new-line-in-comment
      1118-misaligned-comment-start
      1129-capture-groups-are-broken
      1195-infinite-loop-in-regex-matching
      1227-segfault-on-option-access
      1233-corrent-cursor-handling-for-indent-objects
      1275-replaced-range-split
      1308-wrong-behaviour-of-kak-indent-on-newline
      1382-column-highlighter-broken-on-horizontal-scroll
      1433-scrolloff-broken-with-soft-wrap
      1435-misplaced-cursor-with-show_matching-hl
      1453-show_whitespaces-highlighter-breaks-tab-alignment
      1459-assertion-on-wrapped-long-line
      1469-assert-on-repeat-insert
      1504-assertion-on-incorrect-pipe-use
      1518-wrong-undo-handling-with-fifo-buffers
      1525-lua-indent-error
      1580-A-not-moving-to-eol
      1680-crash-with-dot-and-alt-semicolon
      1731-wrap-hidden-buffer
      1741-scrolloff-hides-end-of-lines
      1829-unicode-as-string-delimiter
      1902-regex-lookbehind-ignore-before-current-pos
      1904-select-empty-line-indent-gets-whole-buffer
      1920-crash-on-python-in-docstring
      1937-opening-missing-file-by-full-path-fails
      1964-O-does-not-position-cursor-correctly
      2030-custom-selection-nesting
      2056-assert-on-small-window
      2078-assert-on-restoring-invalid-selections
      2129-inside-parentheses
      2133-assert-on-rotate-contents
      2245-wrap-long-word
      2367-surround-with-tight-nesting
      2420-discrepancy-in-star-behaviour
      2499-html-regions-assert
      2562-column-highlighter-bleeding
      2711-weird-regex-highlighter-behaviour
      2737-segfault-on-WinDisplay-hook
      2755-segfault-on-double-wrap-highlighters
      2861-backspace-merges-selections
      2999-buggy-wrapping
      3010-extra_word_chars-fails-with-other-buffers
      3025-last-buffer-does-not-work-in-draft-context
      3041-invalid-regex-highlight-accross-regions
      3048-word-wrapping-broken
      3219-scroll-json-ui
      3270-crash-in-autocomplete
      3275-crash-on-replace-at-buffer-start
      3349-crash-in-completion
      3388-command-line-parsing-does-not-preserve-invalid-utf8
      3398-readonly-fifo-failure
      3439-parse-ascii-newline-as-return
      3472-crash-on-to-sentence-start
      3478-crash-on-scroll
      3489-crash-on-paragraph-begin
      3495-crash-highlighting-hidden-lines
      3544-capture-get-lost
      3669-pipe-adds-extra-newline
      3733-modeline-parsing-off-by-one-line
      3735-modeline-arbitrary-code-execution
      3757-crash-on-capture-group-select
      3799-incorrect-region-match
      3909-crash-on-closing-buffer-with-user-mapping
      4052-replace-range-vs-whitespace-highlighter-interaction
      4086-ruby-deindenting-other-lines-than-keywords
      4378-line-explicit-completion-buggy
      4414-crash-on-paste-all
      4460-nul-byte-in-regex
      4471-crash-on-alt-t-with-one-char-file
      4476-invalid-line-join
      4519-regex-alternation-priority
      4521-alt-mapping-broken-in-lower-case-modes
      4601-int-min-arg
      4605-fifo-hang
      4659-scroll-issue-with-replace-ranges
      4669-eol-highlight-to-column-highlighter
      4674-show-whitespaces-horizontal-scroll-assert
      4750-crash-on-append-empty-output-at-end-of-buffer
      4753-assert-in-display-line-split
      4779-crash-when-pasting-with-multiple-overlapping-selections
      4839-scroll-invalid-cursor
      4843-trim-front-split-glyph
      4844-crash-on-empty-paste
      4859-regex-invalid-behaviour
      4887-torn-utf8-sequence
      4896-remap-executing-mapping
      4896-unmap-executing-mapping
      4926-crash-with-fold-and-ranges
      4927-crash-jumping-to-eol
      4959-bad-default-region
      5001-line-highlighting-breaks-at-region
      5076-empty-text-should-not-change-prompt-history
      5118-crash-on-scroll-with-insert-completion-and-wrap
      5120-double-free-or-corruption-crash
      5122-dot-fails-after-macro-replay
      5124-assert-in-redo
      595-smart-search-unicode
      612-assertion-with-NormalBegin-hook
      633-spurious-new-line-inserted-when-replacing-at-end
      638-highlight-codepoint-with-bracket
      643-crash-on-a-@-on-specially-crafted-buffer
      654-crash-on-undo-after-macro
      699-to-eol-from-eol
      704-crash-when-using-a-hook-on-NormalBegin-and-NormalEnd
      733-selection-list-from-string-not-valid
      743-crash-on-replace-undo
      751-wrong-selection-after-undo
      787-crash-after-S
      809-alt-f-t-to-first-char
      811-double-width-codepoints
      844-prev-word-at-buffer-start
      860-python-incorrect-commenting
      872-indentation-misbeahviour-c++
      918-wrong-asterisk-inserted
      921-keep-empty-line-matches-all-lines
      993-user-text-object
      quoted-vals
    shell
      list-syntax
      prompt-shell-script-candidates
      prompt-shell-script-completion
      quoted-range
    tools
      git
        blame-in-diff (disabled)
        blame-jump-message (disabled)
      patch
        ignore-first-file
--- /build/data/ports/pobj/kakoune-2024.05.09/kakoune-2024.05.09/test/./tools/patch/ignore-first-file/out       Thu May  9 13:01:53 2024
+++ out Sat May 11 12:39:04 2024
@@ -1,12 +1,3 @@
-Applied:
-diff -ur a/file2 b/file2
---- a/file2
-+++ b/file2
-@@ -1 +1 @@
--file2 here
-+modified file2 here
-
-Updated buffer:
 diff -ur a/file1 b/file1
 --- a/file1
 +++ b/file1
@@ -16,4 +7,5 @@
 --- a/file2
 +++ b/file2
 @@ -1 +1 @@
- modified file2 here
+-file2 here
++modified file2 here

debug buffer:
*** This is the debug buffer, where debug info will be written ***
rc:1:1: 'source': /usr/local/share/kak/rc/tools/patch.kak: No such file or directory

        signature
--- /build/data/ports/pobj/kakoune-2024.05.09/kakoune-2024.05.09/test/./tools/patch/signature/out       Thu May  9 13:01:53 2024
+++ out Sat May 11 12:39:04 2024
@@ -1,4 +1,3 @@
-Applied:
 diff -ur a/file1 b/file1
 --- a/file1
 +++ b/file1
@@ -6,15 +5,6 @@
  context
 -file1 here
 +modified file1 here
- context
-
-Updated buffer:
-diff -ur a/file1 b/file1
---- a/file1
-+++ b/file1
-@@ -1,3 +1,3 @@
- context
- modified file1 here
  context
 --
 2.43.0

debug buffer:
*** This is the debug buffer, where debug info will be written ***
rc:1:1: 'source': /usr/local/share/kak/rc/tools/patch.kak: No such file or directory


Summary: 571 tests, 5 failures```

### Expectations

tests should pass

### Additional information

I disabled git tests because they were hanging.

The tests are running from our package system:

- the dedicated user has no HOME
- the dedicated user does not have networking
- the tests are running with `LC_CTYPE="en_US.UTF-8"`
@rapenne-s rapenne-s added the bug label May 11, 2024
@krobelus
Copy link
Contributor

I'm working on reproducing; did you not see this build error?

$ make CXX=clang++
...
clang++     -DKAK_BIN_PATH="/usr/local/bin/kak" -I/usr/local/include   -std=c++2a -Wall -Wextra -pedantic -Wno-unused-paramete
r -Wno-sign-compare  -O3 -g3    -fsized-deallocation  -O2 -pipe  -MD -MP -MF src/.file.opt.d -c -o src/file.opt.o src/file.cc
src/file.cc:669:12: error: expected expression               
    return KAK_BIN_PATH;                                       
           ^                                                                                                                  
<command line>:2:22: note: expanded from macro 'KAK_BIN_PATH'
#define KAK_BIN_PATH /usr/local/bin/kak

@rapenne-s
Copy link
Author

I'm working on reproducing; did you not see this build error?

$ make CXX=clang++
...
clang++     -DKAK_BIN_PATH="/usr/local/bin/kak" -I/usr/local/include   -std=c++2a -Wall -Wextra -pedantic -Wno-unused-paramete
r -Wno-sign-compare  -O3 -g3    -fsized-deallocation  -O2 -pipe  -MD -MP -MF src/.file.opt.d -c -o src/file.opt.o src/file.cc
src/file.cc:669:12: error: expected expression               
    return KAK_BIN_PATH;                                       
           ^                                                                                                                  
<command line>:2:22: note: expanded from macro 'KAK_BIN_PATH'
#define KAK_BIN_PATH /usr/local/bin/kak

I needed this change to make it compile indeed

Index: Makefile
--- Makefile.orig
+++ Makefile
@@ -54,7 +52,7 @@ LDFLAGS-os-FreeBSD = -L/usr/local/lib
 
 LIBS-os-Haiku = -lnetwork -lbe
 
-CPPFLAGS-os-OpenBSD = -DKAK_BIN_PATH="$(bindir)/kak" -I/usr/local/include
+CPPFLAGS-os-OpenBSD = -DKAK_BIN_PATH='"$(bindir)/kak"' -I/usr/local/include
 LDFLAGS-os-OpenBSD = -L/usr/local/lib
 mandir-os-OpenBSD = $(DESTDIR)$(PREFIX)/man/man1

@krobelus
Copy link
Contributor

krobelus commented May 11, 2024 via email

@Screwtapello
Copy link
Contributor

On Linux, Kakoune doesn't need to be installed; I think it looks at the path in argv[0] and adds ../share/kak/ to find the runtime data. Does that trick not work on OpenBSD?

@rapenne-s
Copy link
Author

On Linux, Kakoune doesn't need to be installed; I think it looks at the path in argv[0] and adds ../share/kak/ to find the runtime data. Does that trick not work on OpenBSD?

On OpenBSD it is not possible to know the path of a running binary. (explanations)

@Screwtapello
Copy link
Contributor

I think it looks at the path in argv[0] and adds ../share/kak/ to find the runtime data.

It turns out this is very wrong, it uses Linux Hacks to figure out the "real" binary path (where "real" is in quotes for all the reasons OpenBSD doesn't support this feature), and other platform-specific APIs on various other platforms.

I think guessing based on argv[0] would be a better fallback than a hard-coded path, despite (or indeed because) it not being the guaranteed "real" binary path, but I guess it's this way for a reason.

@krobelus
Copy link
Contributor

I guess one option is to hardcode the path to $PWD/src/kak and have make install change that (binary patch?) to $(bindir)/kak. Then we don't need platform-specific code. But I can see how that is surprising in other ways.
I guess it's not terribly important; since this is mainly about make test we can override KAK_RUNTIME_DIR if on OpenBSD.

Not sure what's wrong with the remaining test failures, AIUI OpenBSD doesn't support anything other than UTF-8
The locale is C and setting LC_ALL=C.utf-8 gives a (probably harmless) error

@rapenne-s
Copy link
Author

I don't think KAK_BIN_PATH is a problem for the tests, if I uninstall kakoune package (thus it's not available anymore), the test suite can still be used, this mean the tests are not using the binary from KAK_BIN_PATH location.

@krobelus
Copy link
Contributor

krobelus commented May 11, 2024 via email

@rapenne-s
Copy link
Author

diff --git a/Makefile b/Makefile index 362153ea6..f61eab84e 100644 --- a/Makefile +++ b/Makefile @@ -54,7 +54,7 @@ LDFLAGS-os-FreeBSD = -L/usr/local/lib LIBS-os-Haiku = -lnetwork -lbe -CPPFLAGS-os-OpenBSD = -DKAK_BIN_PATH="$(bindir)/kak" -I/usr/local/include +CPPFLAGS-os-OpenBSD = -DKAK_BIN_PATH="$(bindir)/kak" -I/usr/local/include LDFLAGS-os-OpenBSD = -L/usr/local/lib mandir-os-OpenBSD = $(DESTDIR)$(PREFIX)/man/man1 @@ -136,6 +136,9 @@ doc/kak.1.gz: doc/kak.1 check: test test: src/kak + if [ $(os) = OpenBSD ]; then \ + export KAKOUNE_RUNTIME=$$PWD/share/kak; \ + fi && \ cd test && ./run TAGS: tags diff --git a/src/file.cc b/src/file.cc index 056319b67..a293fd4c7 100644 --- a/src/file.cc +++ b/src/file.cc @@ -672,6 +672,7 @@ String get_kak_binary_path() buffer[res] = '\0'; return buffer; #elif defined(OpenBSD) + (void)buffer; return KAK_BIN_PATH; #elif defined(sun) ssize_t res = readlink("/proc/self/path/a.out", buffer, 2048);

with that diff, kakoune tests all pass, including the git one I had to disable because they were hanging.

@mawww mawww closed this as completed in 7be22f1 May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants