Skip to contentSkip to conversation

make check results differ in gadget_sorting_hook

cocci Olaf Hering 3 participants 3 messages Mar 17, 2025 – Mar 18, 2025

lore
Share & tools
lore
#0 lore raw

Hello,

a copy of coccinelle built with ocaml-pcre and another one build without ocaml-pcre give different results in make check in gadget_sorting_hook.res. This is the only difference, Str.regex fails to pass while Pcre works.

Any idea why that is the case, with git commit cca22217d1b4316224e80a18d0b08dd351234497?

 gadget_soa_select.res         : CORRECT
-gadget_sorting_hook.res       : CORRECT
+gadget_sorting_hook.res       : INCORRECT: diff token: any_sort_func VS soa_gather__particle_data_soa_t

+File <COCCIOUTPUTFILE>, line 21, column 1, charpos = 555
+ around = 'any_sort_func',
+ whole content = any_sort_func(P);
+File "tests/gadget_sorting_hook.res", line 22, column 1, charpos = 624
+ around = 'soa_gather__particle_data_soa_t',
+ whole content = soa_gather__particle_data_soa_t(P, P_soa, 0, NumPart);
+
+ diff (result(-) vs expected_result(+)) =
+ @@ -18,7 +18,12 @@
+
+ int main()
+ {

+    +  /* FIXME: this is a transitory gather-sort-scatter hook solution */
+    +  soa_gather__particle_data_soa_t(P, P_soa, 0, NumPart);
+    +  soa_invalidate_soa__particle_data_soa_t(&P_soa, 0, NumPart);
+       any_sort_func(P);
+    +  soa_scatter__particle_data_soa_t(P_soa, P, 0, NumPart);
+    +  soa_invalidate_aos__particle_data(P, 0, NumPart);

+
+
+ /* FIXME: this is a transitory gather-sort-scatter hook solution */
gadget_triplets_typedef.res : CORRECT

Olaf

#1 lore raw

Hi Olaf,

Thanks for the report. This should be fixed as of 350974c47, which is not yet on the GitHub master branch. I can't reproduce the error on the latest commit on GitLab, 4093aad2.

Cheers,
Victor

Quoted 36 lines · Olaf Hering

Hello,

a copy of coccinelle built with ocaml-pcre and another one build without ocaml-pcre give different results in make check in gadget_sorting_hook.res. This is the only difference, Str.regex fails to pass while Pcre works.

Any idea why that is the case, with git commit cca22217d1b4316224e80a18d0b08dd351234497?

gadget_soa_select.res : CORRECT

(quoted diff) +22 -1
-gadget_sorting_hook.res       : CORRECT
+gadget_sorting_hook.res       : INCORRECT: diff token: any_sort_func VS soa_gather__particle_data_soa_t
+File <COCCIOUTPUTFILE>, line 21, column 1, charpos = 555
+  around = 'any_sort_func',
+  whole content =      any_sort_func(P);
+File "tests/gadget_sorting_hook.res", line 22, column 1, charpos = 624
+  around = 'soa_gather__particle_data_soa_t',
+  whole content =      soa_gather__particle_data_soa_t(P, P_soa, 0, NumPart);
+
+    diff (result(-) vs expected_result(+)) =
+    @@ -18,7 +18,12 @@
+
+     int main()
+     {
+    +  /* FIXME: this is a transitory gather-sort-scatter hook solution */
+    +  soa_gather__particle_data_soa_t(P, P_soa, 0, NumPart);
+    +  soa_invalidate_soa__particle_data_soa_t(&P_soa, 0, NumPart);
+       any_sort_func(P);
+    +  soa_scatter__particle_data_soa_t(P_soa, P, 0, NumPart);
+    +  soa_invalidate_aos__particle_data(P, 0, NumPart);
+
+
+       /* FIXME: this is a transitory gather-sort-scatter hook solution */
  gadget_triplets_typedef.res   : CORRECT

Olaf

#2 lore raw
Quoted 5 lines · Victor Gambier

Hi Olaf,

Thanks for the report. This should be fixed as of 350974c47, which is not yet on the GitHub master branch. I can't reproduce the error on the latest commit on GitLab, 4093aad2.

I just updated github. Thanks for the report.

julia

Quoted 45 lines

Cheers,
Victor

Quoted 39 lines · Olaf Hering

Hello,

a copy of coccinelle built with ocaml-pcre and another one build without ocaml-pcre give different results in make check in gadget_sorting_hook.res. This is the only difference, Str.regex fails to pass while Pcre works.

Any idea why that is the case, with git commit
cca22217d1b4316224e80a18d0b08dd351234497?

gadget_soa_select.res : CORRECT

(quoted diff) +1 -1
-gadget_sorting_hook.res       : CORRECT
+gadget_sorting_hook.res       : INCORRECT: diff token: any_sort_func VS

soa_gather__particle_data_soa_t

(quoted diff) +6 -0
+File <COCCIOUTPUTFILE>, line 21, column 1, charpos = 555
+  around = 'any_sort_func',
+  whole content =      any_sort_func(P);
+File "tests/gadget_sorting_hook.res", line 22, column 1, charpos = 624
+  around = 'soa_gather__particle_data_soa_t',
+  whole content =      soa_gather__particle_data_soa_t(P, P_soa, 0,

NumPart);

(quoted diff) +15 -0
+
+    diff (result(-) vs expected_result(+)) =
+    @@ -18,7 +18,12 @@
+
+     int main()
+     {
+    +  /* FIXME: this is a transitory gather-sort-scatter hook solution */
+    +  soa_gather__particle_data_soa_t(P, P_soa, 0, NumPart);
+    +  soa_invalidate_soa__particle_data_soa_t(&P_soa, 0, NumPart);
+       any_sort_func(P);
+    +  soa_scatter__particle_data_soa_t(P_soa, P, 0, NumPart);
+    +  soa_invalidate_aos__particle_data(P, 0, NumPart);
+
+
+       /* FIXME: this is a transitory gather-sort-scatter hook solution */
  gadget_triplets_typedef.res   : CORRECT

Olaf