Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Jowett <[email protected]>
  • Loading branch information
Alan Jowett committed Oct 25, 2024
1 parent 499572d commit 3d79b66
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/crab_verifier.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ bool ebpf_check_constraints_at_label(std::ostream& os, const std::string& label,
/**
* @brief Get the invariants at a given label. Requires the `store_pre_invariants` option to be set.
*
* @param[in] label
* @param[in] label The label in the CFG where invariants should be retrieved
* @return The set of invariants at the given label.
* Each invariant represents a constraint on the program state at this point.
* @throw std::out_of_range If the label is not found.
*/
std::set<std::string> ebpf_get_invariants_at_label(const std::string& label);
2 changes: 1 addition & 1 deletion src/test/ebpf_yaml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ std::optional<Failure> run_yaml_test_case(TestCase test_case, bool debug) {
actual_messages.insert(label + ": Concrete invariants do not match abstract invariants");
}
} catch (const std::exception& e) {
actual_messages.insert(label + ": Exception occurred during invariant check - " + std::string(e.what()));
actual_messages.insert(label + ": Exception occurred during invariant check");
}
}

Expand Down
3 changes: 2 additions & 1 deletion test-data/add.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ invariants-to-check:
- r2.svalue=2
- r2.uvalue=2

3: # After the addition, r1 should be 3. Invalid invariant to test negative case.
3: # After the addition, r1 should be 3.

Check warning on line 245 in test-data/add.yaml

View workflow job for this annotation

GitHub Actions / validate-yaml

245:6 [comments] too few spaces before comment
# Using a value of 2 instead of 3 to ensure that the test fails (this is a negative test case).

Check warning on line 246 in test-data/add.yaml

View workflow job for this annotation

GitHub Actions / validate-yaml

246:6 [comments-indentation] comment not indented like content
- r1.type=number
- r1.svalue=2
- r1.uvalue=2
Expand Down

0 comments on commit 3d79b66

Please sign in to comment.