]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
coverity: Update README.md
authorAndreas Schneider <asn@samba.org>
Fri, 3 Feb 2023 10:30:34 +0000 (11:30 +0100)
committerAnoop C S <anoopcs@samba.org>
Tue, 5 Aug 2025 06:07:37 +0000 (06:07 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
coverity/README.md

index 84795d9fe102d51ae49437f4776dfdd9d9ce3992..31f1e4e4d611caf76c89764910fc3ad5b4955958 100644 (file)
@@ -1,6 +1,27 @@
-coverity_assert_model.c:
+# Coverity Scan Modelling File
 
-This file is a Coverity Modeling file for which currently adds the needed models
-for using the cmocka unit test framework. The assert functions could create
-false positives, to avoid that you can load this modeling file in the Coverity
-web interface. If needed add models for torture_ and talloc_ macros.
+The `coverity_assert_model.c` is a file for
+(Coverity Models)[https://scan.coverity.com/models]. You can find the
+documentation for it
+(here)[https://documentation.blackduck.com/bundle/coverity-docs/page/customizing_coverity/topics/models_primitives/c_models_primitives.html]
+
+- A model file can't import any header files.
+- Therefore only some built-in primitives like int, char and void are
+  available but not NULL etc.
+- Modeling doesn't need full structs and typedefs. Rudimentary structs
+  and similar types are sufficient.
+- An uninitialized local pointer is not an error. It signifies that the
+  variable could be either NULL or have some data.
+
+Coverity Scan doesn't pick up modifications automatically. The model file must
+be uploaded by an admin.
+
+## Testing the coverity_assert_model.c
+
+Whenever you modify the `coverity_assert_model.c` please run:
+
+```sh
+make -C coverity
+```
+
+This will check if the file compiles with gcc.