Skip to content
Snippets Groups Projects
Commit 053f0d3a authored by Allan Blanchard's avatar Allan Blanchard
Browse files

Merge branch 'fix/yojson-2' into 'master'

Upgrades tests to yojson 2

See merge request frama-c/frama-c!4047
parents ba8e91fe 05bf596a
No related branches found
No related tags found
No related merge requests found
{ lib, fetchurl, buildDunePackage, cppo, easy-format, biniou }: { lib, fetchurl, buildDunePackage, cppo, seq }:
buildDunePackage rec { buildDunePackage rec {
pname = "yojson"; pname = "yojson";
version = "1.7.0"; version = "2.0.2";
useDune2 = true; useDune2 = true;
src = fetchurl { src = fetchurl {
url = "https://github.com/ocaml-community/yojson/releases/download/${version}/yojson-${version}.tbz"; url = "https://github.com/ocaml-community/yojson/releases/download/${version}/yojson-${version}.tbz";
sha256 = "1iich6323npvvs8r50lkr4pxxqm9mf6w67cnid7jg1j1g5gwcvv5"; sha256 = "sha256-h2u284r3OoSilDij2jXkhXxgoUVWpgZSWxSMb9vlRhs=";
}; };
nativeBuildInputs = [ cppo ]; nativeBuildInputs = [ cppo ];
propagatedBuildInputs = [ easy-format biniou ]; propagatedBuildInputs = [ seq ];
meta = with lib; { meta = with lib; {
description = "An optimized parsing and printing library for the JSON format"; description = "An optimized parsing and printing library for the JSON format";
......
...@@ -121,7 +121,7 @@ depends: [ ...@@ -121,7 +121,7 @@ depends: [
"ocamlfind" # needed beyond build stage, used by -load-module "ocamlfind" # needed beyond build stage, used by -load-module
"ocamlgraph" { >= "1.8.8" } "ocamlgraph" { >= "1.8.8" }
"why3" { >= "1.5.1" } "why3" { >= "1.5.1" }
"yojson" {>= "1.6.0" & (< "2.0.0" | !with-test)} "yojson" {>= "1.6.0" & (>= "2.0.1" | !with-test)}
"zarith" { >= "1.5" } "zarith" { >= "1.5" }
# PPXs # PPXs
......
...@@ -14,5 +14,5 @@ compiling Frama-C+dev. ...@@ -14,5 +14,5 @@ compiling Frama-C+dev.
- ppx_deriving_yojson.3.7.0 - ppx_deriving_yojson.3.7.0
- ppx_import.1.10.0 - ppx_import.1.10.0
- why3.1.5.1 - why3.1.5.1
- yojson.1.7.0 - yojson.2.0.2
- zarith.1.12 - zarith.1.12
{ {
"$schema": "$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
"https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
"version": "2.1.0", "version": "2.1.0",
"runs": [ "runs": [
{ {
...@@ -15,8 +14,7 @@ ...@@ -15,8 +14,7 @@
}, },
"invocations": [ "invocations": [
{ {
"commandLine": "commandLine": "frama-c -check -no-autoload-plugins -add-symbolic-path=PTEST_SESSION:. -load-plugin=eva,from,scope,inout,markdown-report cwe125.c -save ./cwe125_parse.sav",
"frama-c -check -no-autoload-plugins -add-symbolic-path=PTEST_SESSION:. -load-plugin=eva,from,scope,inout,markdown-report cwe125.c -save ./cwe125_parse.sav",
"arguments": [ "arguments": [
"-check", "-no-autoload-plugins", "-check", "-no-autoload-plugins",
"-add-symbolic-path=PTEST_SESSION:.", "-add-symbolic-path=PTEST_SESSION:.",
...@@ -27,8 +25,7 @@ ...@@ -27,8 +25,7 @@
"executionSuccessful": true "executionSuccessful": true
}, },
{ {
"commandLine": "commandLine": "frama-c -check -no-autoload-plugins -add-symbolic-path=PTEST_SESSION:. -load-plugin=eva,from,scope,inout,markdown-report -load ./cwe125_parse.sav -eva -save ./cwe125_eva.sav",
"frama-c -check -no-autoload-plugins -add-symbolic-path=PTEST_SESSION:. -load-plugin=eva,from,scope,inout,markdown-report -load ./cwe125_parse.sav -eva -save ./cwe125_eva.sav",
"arguments": [ "arguments": [
"-check", "-no-autoload-plugins", "-check", "-no-autoload-plugins",
"-add-symbolic-path=PTEST_SESSION:.", "-add-symbolic-path=PTEST_SESSION:.",
...@@ -39,8 +36,7 @@ ...@@ -39,8 +36,7 @@
"executionSuccessful": true "executionSuccessful": true
}, },
{ {
"commandLine": "commandLine": "frama-c -check -no-autoload-plugins -add-symbolic-path=PTEST_SESSION:. -load-plugin=eva,from,scope,inout,markdown-report -load ./cwe125_eva.sav -then -mdr-out ./cwe125.sarif.unfiltered -mdr-gen sarif -mdr-no-print-libc -mdr-sarif-deterministic",
"frama-c -check -no-autoload-plugins -add-symbolic-path=PTEST_SESSION:. -load-plugin=eva,from,scope,inout,markdown-report -load ./cwe125_eva.sav -then -mdr-out ./cwe125.sarif.unfiltered -mdr-gen sarif -mdr-no-print-libc -mdr-sarif-deterministic",
"arguments": [ "arguments": [
"-check", "-no-autoload-plugins", "-check", "-no-autoload-plugins",
"-add-symbolic-path=PTEST_SESSION:.", "-add-symbolic-path=PTEST_SESSION:.",
...@@ -71,8 +67,7 @@ ...@@ -71,8 +67,7 @@
"level": "none", "level": "none",
"message": { "message": {
"text": "mem_access.", "text": "mem_access.",
"markdown": "markdown": "mem_access:\n\n```acsl\nassert mem_access: \\valid_read(array + index);\n```\n\n\n\nThis alarm represents a potential Invalid pointer dereferencing."
"mem_access:\n\n```acsl\nassert mem_access: \\valid_read(array + index);\n```\n\n\n\nThis alarm represents a potential Invalid pointer dereferencing."
}, },
"locations": [ "locations": [
{ {
...@@ -94,8 +89,7 @@ ...@@ -94,8 +89,7 @@
"level": "error", "level": "error",
"message": { "message": {
"text": "mem_access.", "text": "mem_access.",
"markdown": "markdown": "mem_access:\n\n```acsl\nassert mem_access: \\valid_read(array + index);\n```\n\n\n\nThis alarm represents a potential Invalid pointer dereferencing."
"mem_access:\n\n```acsl\nassert mem_access: \\valid_read(array + index);\n```\n\n\n\nThis alarm represents a potential Invalid pointer dereferencing."
}, },
"locations": [ "locations": [
{ {
......
{ {
"$schema": "$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
"https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
"version": "2.1.0", "version": "2.1.0",
"runs": [ "runs": [
{ {
...@@ -15,8 +14,7 @@ ...@@ -15,8 +14,7 @@
}, },
"invocations": [ "invocations": [
{ {
"commandLine": "commandLine": "frama-c -check -no-autoload-plugins -add-symbolic-path=PTEST_SESSION:. -load-plugin=eva,from,scope,inout,markdown-report -eva -eva-no-results -mdr-gen sarif -mdr-sarif-deterministic libc.c -mdr-out ./with-libc.sarif.unfiltered",
"frama-c -check -no-autoload-plugins -add-symbolic-path=PTEST_SESSION:. -load-plugin=eva,from,scope,inout,markdown-report -eva -eva-no-results -mdr-gen sarif -mdr-sarif-deterministic libc.c -mdr-out ./with-libc.sarif.unfiltered",
"arguments": [ "arguments": [
"-check", "-no-autoload-plugins", "-check", "-no-autoload-plugins",
"-add-symbolic-path=PTEST_SESSION:.", "-add-symbolic-path=PTEST_SESSION:.",
...@@ -1265,8 +1263,7 @@ ...@@ -1265,8 +1263,7 @@
"kind": "pass", "kind": "pass",
"level": "none", "level": "none",
"message": { "message": {
"text": "text": "from clause of term *((char *)s + (0 .. n - 1)) in function bzero."
"from clause of term *((char *)s + (0 .. n - 1)) in function bzero."
}, },
"locations": [ "locations": [
{ {
...@@ -2030,8 +2027,7 @@ ...@@ -2030,8 +2027,7 @@
"kind": "pass", "kind": "pass",
"level": "none", "level": "none",
"message": { "message": {
"text": "text": "from clause of term *((char *)dest + (0 .. n - 1)) in function memcpy."
"from clause of term *((char *)dest + (0 .. n - 1)) in function memcpy."
}, },
"locations": [ "locations": [
{ {
...@@ -2219,8 +2215,7 @@ ...@@ -2219,8 +2215,7 @@
"kind": "pass", "kind": "pass",
"level": "none", "level": "none",
"message": { "message": {
"text": "text": "from clause of term *((char *)dest + (0 .. n - 1)) in function memmove."
"from clause of term *((char *)dest + (0 .. n - 1)) in function memmove."
}, },
"locations": [ "locations": [
{ {
...@@ -2431,8 +2426,7 @@ ...@@ -2431,8 +2426,7 @@
"kind": "pass", "kind": "pass",
"level": "none", "level": "none",
"message": { "message": {
"text": "text": "from clause of term *((char *)dest + (0 .. n - 1)) in function mempcpy."
"from clause of term *((char *)dest + (0 .. n - 1)) in function mempcpy."
}, },
"locations": [ "locations": [
{ {
...@@ -2597,8 +2591,7 @@ ...@@ -2597,8 +2591,7 @@
"kind": "pass", "kind": "pass",
"level": "none", "level": "none",
"message": { "message": {
"text": "text": "from clause of term *((char *)s + (0 .. n - 1)) in function memset."
"from clause of term *((char *)s + (0 .. n - 1)) in function memset."
}, },
"locations": [ "locations": [
{ {
...@@ -2809,8 +2802,7 @@ ...@@ -2809,8 +2802,7 @@
"kind": "pass", "kind": "pass",
"level": "none", "level": "none",
"message": { "message": {
"text": "text": "from clause of term *(dest + (0 .. strlen{Old}(src))) in function stpcpy."
"from clause of term *(dest + (0 .. strlen{Old}(src))) in function stpcpy."
}, },
"locations": [ "locations": [
{ {
...@@ -3324,8 +3316,7 @@ ...@@ -3324,8 +3316,7 @@
"kind": "pass", "kind": "pass",
"level": "none", "level": "none",
"message": { "message": {
"text": "text": "from clause of term *(dest +\n (strlen{Old}(dest) ..\n strlen{Old}(dest) +\n strlen{Old}(src))) in function strcat."
"from clause of term *(dest +\n (strlen{Old}(dest) ..\n strlen{Old}(dest) +\n strlen{Old}(src))) in function strcat."
}, },
"locations": [ "locations": [
{ {
...@@ -4280,8 +4271,7 @@ ...@@ -4280,8 +4271,7 @@
"kind": "pass", "kind": "pass",
"level": "none", "level": "none",
"message": { "message": {
"text": "text": "from clause of term *(dest + (0 .. strlen{Old}(src))) in function strcpy."
"from clause of term *(dest + (0 .. strlen{Old}(src))) in function strcpy."
}, },
"locations": [ "locations": [
{ {
...@@ -4747,8 +4737,7 @@ ...@@ -4747,8 +4737,7 @@
"kind": "pass", "kind": "pass",
"level": "none", "level": "none",
"message": { "message": {
"text": "text": "from clause of term __fc_heap_status in function strdup."
"from clause of term __fc_heap_status in function strdup."
}, },
"locations": [ "locations": [
{ {
...@@ -5172,8 +5161,7 @@ ...@@ -5172,8 +5161,7 @@
"kind": "pass", "kind": "pass",
"level": "none", "level": "none",
"message": { "message": {
"text": "text": "from clause of term *(dest + (strlen{Old}(dest) .. n)) in function strlcat."
"from clause of term *(dest + (strlen{Old}(dest) .. n)) in function strlcat."
}, },
"locations": [ "locations": [
{ {
...@@ -5384,8 +5372,7 @@ ...@@ -5384,8 +5372,7 @@
"kind": "pass", "kind": "pass",
"level": "none", "level": "none",
"message": { "message": {
"text": "text": "from clause of term *(dest + (0 .. n - 1)) in function strlcpy."
"from clause of term *(dest + (0 .. n - 1)) in function strlcpy."
}, },
"locations": [ "locations": [
{ {
...@@ -6014,8 +6001,7 @@ ...@@ -6014,8 +6001,7 @@
"kind": "pass", "kind": "pass",
"level": "none", "level": "none",
"message": { "message": {
"text": "text": "from clause of term *(dest +\n (strlen{Old}(dest) ..\n strlen{Old}(dest) +\n strlen{Old}(src))) in function strncat."
"from clause of term *(dest +\n (strlen{Old}(dest) ..\n strlen{Old}(dest) +\n strlen{Old}(src))) in function strncat."
}, },
"locations": [ "locations": [
{ {
...@@ -6065,8 +6051,7 @@ ...@@ -6065,8 +6051,7 @@
"kind": "pass", "kind": "pass",
"level": "none", "level": "none",
"message": { "message": {
"text": "text": "from clause of term *(dest + (strlen{Old}(dest) .. strlen{Old}(dest) + n)) in function strncat."
"from clause of term *(dest + (strlen{Old}(dest) .. strlen{Old}(dest) + n)) in function strncat."
}, },
"locations": [ "locations": [
{ {
...@@ -6116,8 +6101,7 @@ ...@@ -6116,8 +6101,7 @@
"kind": "pass", "kind": "pass",
"level": "none", "level": "none",
"message": { "message": {
"text": "text": "from clause of term *(dest + (strlen{Old}(dest) .. strlen{Old}(dest) + n)) in function strncat."
"from clause of term *(dest + (strlen{Old}(dest) .. strlen{Old}(dest) + n)) in function strncat."
}, },
"locations": [ "locations": [
{ {
...@@ -6606,8 +6590,7 @@ ...@@ -6606,8 +6590,7 @@
"kind": "pass", "kind": "pass",
"level": "none", "level": "none",
"message": { "message": {
"text": "text": "from clause of term *(dest + (0 .. n - 1)) in function strncpy."
"from clause of term *(dest + (0 .. n - 1)) in function strncpy."
}, },
"locations": [ "locations": [
{ {
...@@ -6937,8 +6920,7 @@ ...@@ -6937,8 +6920,7 @@
"kind": "pass", "kind": "pass",
"level": "none", "level": "none",
"message": { "message": {
"text": "text": "from clause of term __fc_heap_status in function strndup."
"from clause of term __fc_heap_status in function strndup."
}, },
"locations": [ "locations": [
{ {
...@@ -8626,8 +8608,7 @@ ...@@ -8626,8 +8608,7 @@
"kind": "pass", "kind": "pass",
"level": "none", "level": "none",
"message": { "message": {
"text": "text": "from clause of term *(__fc_strtok_ptr + (0 ..)) in function strtok."
"from clause of term *(__fc_strtok_ptr + (0 ..)) in function strtok."
}, },
"locations": [ "locations": [
{ {
...@@ -8777,8 +8758,7 @@ ...@@ -8777,8 +8758,7 @@
"kind": "pass", "kind": "pass",
"level": "none", "level": "none",
"message": { "message": {
"text": "text": "from clause of term *(__fc_strtok_ptr + (0 ..)) in function strtok."
"from clause of term *(__fc_strtok_ptr + (0 ..)) in function strtok."
}, },
"locations": [ "locations": [
{ {
...@@ -9338,8 +9318,7 @@ ...@@ -9338,8 +9318,7 @@
"kind": "pass", "kind": "pass",
"level": "none", "level": "none",
"message": { "message": {
"text": "text": "from clause of term *(*saveptr + (0 ..)) in function strtok_r."
"from clause of term *(*saveptr + (0 ..)) in function strtok_r."
}, },
"locations": [ "locations": [
{ {
...@@ -9489,8 +9468,7 @@ ...@@ -9489,8 +9468,7 @@
"kind": "pass", "kind": "pass",
"level": "none", "level": "none",
"message": { "message": {
"text": "text": "from clause of term *(*saveptr + (0 ..)) in function strtok_r."
"from clause of term *(*saveptr + (0 ..)) in function strtok_r."
}, },
"locations": [ "locations": [
{ {
...@@ -9703,8 +9681,7 @@ ...@@ -9703,8 +9681,7 @@
"kind": "pass", "kind": "pass",
"level": "none", "level": "none",
"message": { "message": {
"text": "text": "from clause of term *(dest + (0 .. n - 1)) in function strxfrm."
"from clause of term *(dest + (0 .. n - 1)) in function strxfrm."
}, },
"locations": [ "locations": [
{ {
......
{ {
"$schema": "$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
"https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
"version": "2.1.0", "version": "2.1.0",
"runs": [ "runs": [
{ {
...@@ -15,8 +14,7 @@ ...@@ -15,8 +14,7 @@
}, },
"invocations": [ "invocations": [
{ {
"commandLine": "commandLine": "frama-c -check -no-autoload-plugins -add-symbolic-path=PTEST_SESSION:. -load-plugin=eva,from,scope,inout,markdown-report -eva -eva-no-results -mdr-gen sarif -mdr-sarif-deterministic libc.c -mdr-no-print-libc -mdr-out ./without-libc.sarif.unfiltered",
"frama-c -check -no-autoload-plugins -add-symbolic-path=PTEST_SESSION:. -load-plugin=eva,from,scope,inout,markdown-report -eva -eva-no-results -mdr-gen sarif -mdr-sarif-deterministic libc.c -mdr-no-print-libc -mdr-out ./without-libc.sarif.unfiltered",
"arguments": [ "arguments": [
"-check", "-no-autoload-plugins", "-check", "-no-autoload-plugins",
"-add-symbolic-path=PTEST_SESSION:.", "-add-symbolic-path=PTEST_SESSION:.",
......
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
{ "id": "unknown request", "error": "request not found" }, { "id": "unknown request", "error": "request not found" },
{ {
"id": "wrong data", "id": "wrong data",
"error": "error": "Expected string, got object:\n{ \"f1\": 1, \"f2\": { \"x\": 1, \"y\": 2 }, \"f3\": null }",
"Expected string, got object:\n{ \"f1\": 1, \"f2\": { \"x\": 1, \"y\": 2 }, \"f3\": null }",
"at": { "at": {
"id": "wrong data", "id": "wrong data",
"request": "kernel.ast.printFunction", "request": "kernel.ast.printFunction",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment