unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Basil L. Contovounesios" via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: 58984@debbugs.gnu.org
Subject: bug#58984: 29.0.50; M-x compile misinterprets libcheck error message format
Date: Fri, 04 Nov 2022 19:08:04 +0200	[thread overview]
Message-ID: <87edui3ax7.fsf@tcd.ie> (raw)
In-Reply-To: <CD67E053-8AD7-45EC-B314-6E11E7FEC600@acm.org> ("Mattias Engdegård"'s message of "Fri, 4 Nov 2022 12:30:17 +0100")

[-- Attachment #1: Type: text/plain, Size: 553 bytes --]

Mattias Engdegård [2022-11-04 12:30 +0100] wrote:

> Is this bug conditional on the patches you mentioned?

Yes, but only inasmuch as the tests did not compile previously.  Both
referenced patches are in now, so anyone who has Check installed (in
Debian the package is called... -moments pass- ...'check') should be
able to run the tests and play with their output.

> Can the bug be reproduced from a simple text file that, when presented in
> compilation-mode, results in the incorrect behaviour?

Like this compile log, for instance?


[-- Attachment #2: errors.txt --]
[-- Type: text/plain, Size: 922 bytes --]

-*- mode: compilation; default-directory: "~/.local/src/emacs-check/test/manual/noverlay/" -*-
Compilation started at Fri Nov  4 19:00:15

make
gcc -O0 -g3 -pthread -I ../../../src  -c -o itree-tests.o itree-tests.c
gcc   itree-tests.o  -lcheck_pic -pthread -lrt -lm -lsubunit -lm -o itree-tests
./itree-tests
Running suite(s): basic
../../../src/itree.c:1359:eassert condition failed: g && g->running
92%: Checks: 51, Failures: 3, Errors: 1
itree-tests.c:71:F:insert1:test_insert_1:0: Assertion 'N_50.red' failed
itree-tests.c:91:F:insert1:test_insert_2:0: Assertion 'N_50.right != NULL' failed: N_50.right == 0
itree-tests.c:740:F:remove3:test_remove_10:0: Assertion 'tree.size != 0' failed: tree.size == 0, 0 == 0
itree-tests.c:749:E:generator:test_generator_1:0: (after this point) Early exit with return value 1
make: *** [Makefile:36: check] Error 1

Compilation exited abnormally with code 2 at Fri Nov  4 19:00:16

[-- Attachment #3: Type: text/plain, Size: 36 bytes --]


I got it from applying this diff:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: errors.diff --]
[-- Type: text/x-diff, Size: 1874 bytes --]

diff --git a/test/manual/noverlay/Makefile.in b/test/manual/noverlay/Makefile.in
index 3c8dba1ce1..c0fa705174 100644
--- a/test/manual/noverlay/Makefile.in
+++ b/test/manual/noverlay/Makefile.in
@@ -33,7 +33,7 @@ .PHONY:
 all: check
 
 check: $(PROGRAM)
-	./check-sanitize.sh ./$(PROGRAM)
+	./$(PROGRAM)
 
 itree-tests.o: emacs-compat.h $(top_srcdir)/src/itree.c $(top_srcdir)/src/itree.h
 
diff --git a/test/manual/noverlay/itree-tests.c b/test/manual/noverlay/itree-tests.c
index 278e65f9bf..e3cbaffb0f 100644
--- a/test/manual/noverlay/itree-tests.c
+++ b/test/manual/noverlay/itree-tests.c
@@ -68,8 +68,8 @@ START_TEST (test_insert_1)
    */
 
   interval_tree_insert (&tree, &N_50);
-  ck_assert (! N_50.red);
-  ck_assert_ptr_eq (&N_50, tree.root);
+  ck_assert (N_50.red);
+  ck_assert_ptr_ne (&N_50, tree.root);
 }
 END_TEST
 
@@ -88,7 +88,7 @@ START_TEST (test_insert_2)
   ck_assert_ptr_eq (&N_50, tree.root);
   ck_assert_ptr_eq (N_30.parent, &N_50);
   ck_assert_ptr_eq (N_50.left, &N_30);
-  ck_assert_ptr_null (N_50.right);
+  ck_assert_ptr_nonnull (N_50.right);
   ck_assert_ptr_null (N_30.left);
   ck_assert_ptr_null (N_30.right);
 }
@@ -737,7 +737,7 @@ START_TEST (test_remove_10)
       itree_remove (&tree, &nodes[index[i]]);
     }
   ck_assert_ptr_null (tree.root);
-  ck_assert_int_eq (tree.size, 0);
+  ck_assert_int_ne (tree.size, 0);
 }
 END_TEST
 
@@ -749,11 +749,11 @@ START_TEST (test_remove_10)
 START_TEST (test_generator_1)
 {
   struct itree_node node, *n;
-  struct itree_iterator *g;
+  struct itree_iterator *g = NULL;
   interval_tree_init (&tree);
 
   itree_insert (&tree, &node, 10, 20);
-  g = itree_iterator_start (&tree, 0, 30, ITREE_ASCENDING, NULL, 0);
+  /* g = itree_iterator_start (&tree, 0, 30, ITREE_ASCENDING, NULL, 0); */
   n = itree_iterator_next (g);
   ck_assert_ptr_eq (n, &node);
   ck_assert_int_eq (n->begin, 10);

[-- Attachment #5: Type: text/plain, Size: 487 bytes --]


Then building Emacs and finally running 'make' in the
test/manual/noverlay directory.

> If not, what about a simple script that emits the text piecemeal with the
> correct timing for the bug to occur and that can be run in M-x compile?

Let me know if the information above is insufficient and I will try
providing such a script.

> (Not really going to OCR your screenshots to extract the text myself!)

Sorry, that was just an attempt to convey fontification :).

Thanks,

-- 
Basil

  reply	other threads:[~2022-11-04 17:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-03 13:07 bug#58984: 29.0.50; M-x compile misinterprets libcheck error message format Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-04 11:30 ` Mattias Engdegård
2022-11-04 17:08   ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-11-04 17:49     ` Mattias Engdegård
2022-11-06 12:10       ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-06 14:26         ` Mattias Engdegård
2022-11-08 18:24           ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-09 11:14             ` Mattias Engdegård

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87edui3ax7.fsf@tcd.ie \
    --to=bug-gnu-emacs@gnu.org \
    --cc=58984@debbugs.gnu.org \
    --cc=contovob@tcd.ie \
    --cc=mattiase@acm.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).