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

Create CTP (Cert Test Plan) backend #418

Draft
wants to merge 74 commits into
base: main
Choose a base branch
from

Conversation

james-ball-qualcomm
Copy link
Collaborator

No description provided.

… updated $ref syntax (matching certificates).
…if a different design was passed to it which seems bizzare since it goes out of its way to support having a different type for different designs. So, I modified it to work like the type cache in ast and do what I think it wanted to do in the first place.
…ke it clearer the return type since I found bugs in the code related to this.
…n't have (i.e. in @config). Also true for implemented and prohibited.
…ns, CSRs, and traps that aren't in the configuration). Still need to fix traps and interrupts.
…o frontend /arch files. And, also igore *.bak files in Git.
… (especially rakefiles). Now use cfg "_" instead of rv32 or rv64 since there really is no difference in the generated design.
lib/backend_helpers.rb Fixed Show fixed Hide fixed
lib/backend_helpers.rb Fixed Show fixed Hide fixed
lib/backend_helpers.rb Fixed Show fixed Hide fixed
lib/backend_helpers.rb Fixed Show resolved Hide resolved
lib/backend_helpers.rb Fixed Show resolved Hide resolved
lib/backend_helpers.rb Fixed Show resolved Hide resolved
lib/backend_helpers.rb Fixed Show fixed Hide fixed
"xref:csrs:#{csr_name}.adoc#udb:doc:csr_field:#{csr_name}:#{field_name}[#{link_text.gsub(']', '\]')}]"
when "func"
# All functions are in the same file called "funcs.adoc".
"xref:funcs:funcs.adoc#udb:doc:func:#{name}[#{link_text.gsub(']', '\]')}]"

Check failure

Code scanning / CodeQL

Incomplete string escaping or encoding High

This does not escape backslash characters in the input.

Copilot Autofix AI 5 days ago

To fix the problem, we need to ensure that backslashes in the link_text are also escaped. This can be done by first escaping backslashes and then escaping the ] character. We will use the gsub method to replace all occurrences of backslashes with double backslashes and then replace ] with \].

Suggested changeset 1
lib/backend_helpers.rb

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/lib/backend_helpers.rb b/lib/backend_helpers.rb
--- a/lib/backend_helpers.rb
+++ b/lib/backend_helpers.rb
@@ -291,3 +291,3 @@
           # All functions are in the same file called "funcs.adoc".
-          "xref:funcs:funcs.adoc#udb:doc:func:#{name}[#{link_text.gsub(']', '\]')}]"
+          "xref:funcs:funcs.adoc#udb:doc:func:#{name}[#{link_text.gsub('\\', '\\\\').gsub(']', '\]')}]"
         else
EOF
@@ -291,3 +291,3 @@
# All functions are in the same file called "funcs.adoc".
"xref:funcs:funcs.adoc#udb:doc:func:#{name}[#{link_text.gsub(']', '\]')}]"
"xref:funcs:funcs.adoc#udb:doc:func:#{name}[#{link_text.gsub('\\', '\\\\').gsub(']', '\]')}]"
else
Copilot is powered by AI and may make mistakes. Always verify output.
Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
lib/backend_helpers.rb Fixed Show fixed Hide fixed
…or colophons and now the isa manuals are proper adoc "parts" in the overall "book").
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

Successfully merging this pull request may close these issues.

Create certification test plan generator backend
1 participant