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

Tests fail on WSL with no obvious difference in diffs #40

Closed
cppietime opened this issue Aug 10, 2023 · 1 comment
Closed

Tests fail on WSL with no obvious difference in diffs #40

cppietime opened this issue Aug 10, 2023 · 1 comment

Comments

@cppietime
Copy link

When building Lantern on WSL and running make test, the first test debug_helpers fails. diffing the generated output file with the expected output in test/expected/debug_helpers.out produces the following:

5,7c5,7
< CREATE TABLE small_world (
<     id varchar(3),
<     vector vector(3)
---
> CREATE TABLE small_world (
>     id varchar(3),
>     vector vector(3)
10,17c10,17
< INSERT INTO small_world (id, vector) VALUES 
< ('000', '[0,0,0]'),
< ('001', '[0,0,1]'),
< ('010', '[0,1,0]'),
< ('011', '[0,1,1]'),
< ('100', '[1,0,0]'),
< ('101', '[1,0,1]'),
< ('110', '[1,1,0]'),
---
> INSERT INTO small_world (id, vector) VALUES 
> ('000', '[0,0,0]'),
> ('001', '[0,0,1]'),
> ('010', '[0,1,0]'),
> ('011', '[0,1,1]'),
> ('100', '[1,0,0]'),
> ('101', '[1,0,1]'),
> ('110', '[1,1,0]'),

These appear to be identical, but running cat -net debug_helpers.out on the generated output shows the following:

     1  CREATE EXTENSION IF NOT EXISTS vector;$
     2  CREATE EXTENSION$
     3  CREATE EXTENSION IF NOT EXISTS lanterndb;$
     4  CREATE EXTENSION$
     5  CREATE TABLE small_world (^M$
     6      id varchar(3),^M$
     7      vector vector(3)^M$
     8  );$
     9  CREATE TABLE$
    10  INSERT INTO small_world (id, vector) VALUES ^M$
    11  ('000', '[0,0,0]'),^M$
    12  ('001', '[0,0,1]'),^M$
    13  ('010', '[0,1,0]'),^M$
    14  ('011', '[0,1,1]'),^M$
    15  ('100', '[1,0,0]'),^M$
    16  ('101', '[1,0,1]'),^M$
    17  ('110', '[1,1,0]'),^M$
    18  ('111', '[1,1,1]');$
    19  INSERT 0 8$
    20  SHOW hnsw.init_k;$
    21   hnsw.init_k $
...

So apparently some lines of the generated output have windows-style CRLF, while most of the file has unix-style LF.

@Ngalstyan4
Copy link
Contributor

Thanks for reporting this issue, @cppietime!
Could you add -w flag to diff on this line and see if the issue is fixed?

The -w flag instructs diff to ignore whitespace in regression tests. This approach is also used in Postgres's pg_regress regression tool.

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

No branches or pull requests

2 participants