-
C/C++test 2024.2 Product Release Announcement
We’re happy to introduce you to C/C++test 2024.2, a release packed with features designed to streamline safety-critical software development, improve code quality, and increase your team's efficiency. Enhancements AI-driven code violation fixing in VS Code extension. Our Copilot integration in the VS Code extension now…
-
C/C++test 2024.2 Product Release Announcement
We’re happy to introduce you to C/C++test 2024.2, a release packed with features designed to streamline safety-critical software development, improve code quality, and increase your team's efficiency. Enhancements AI-driven code violation fixing in VS Code extension. Our Copilot integration in the VS Code extension now…
-
[ERROR] Code Analysis for ... finished with code 1 (ipro)
Hello, My group is in the process of moving from v9.5 to v10.3. After converting one of our projects to v10.3, we are encountering numerous preprocessing errors during Code Analysis that we did not encounter while running v9.5. We have successfully converted many other projects to v10.3 that do not encounter this error.…
-
Configure Proxy for DTP
Hello, I am using the C/C++Test commandline tool, and I have configured the cpptestcli.properties file to connect to a DTP server. Unfortunately, a connection is not possible, as the server is only reachable through a proxy. I searched for proxy settings, but found only proxy configurations for the used JRE…
-
C: return in macro doesn't seem to be considered
Hi, I am running Parasoft for MISRA. Following a simplified code example: define RC(func) \ do { \ rc_t rc_ = func; \ if is_error(rc_) return rc_; } while (0) struct info_t { rc_t (*handler)(); }; rc_t caller() { struct info_t info = {0}; RC(called_function(&info)); // From this point, info is well initialized by the…
-
License issue for CPPTEST 2021.1.1
I have a container image running the parasoft cpptestcli, the version is "Parasoft C/C++test Professional 2021.1.1 (10.5.1.20211218B1401)" that connects to standalone license server with floating license type. Everytime i run the command, the error shows: Using default workspace "/home/parasoft/parasoft/workspace" ERROR:…
-
C/C++test 2024.1 Product Release Announcement
We‘re excited to announce the launch of C/C++test 2024.1, featuring an array of product improvements. Organizations need to stay current with the persistent changes in the latest security coding guidelines, so Parasoft made updates in support of static analysis for: * CWE Top 25 + On the Cusp 2023 * OWASP API Security Top…
-
C/C++test 2024.1 Product Release Announcement
We‘re excited to announce the launch of C/C++test 2024.1, featuring an array of product improvements. Organizations need to stay current with the persistent changes in the latest security coding guidelines, so Parasoft made updates in support of static analysis for: * CWE Top 25 + On the Cusp 2023 * OWASP API Security Top…
-
Error collecting information about available definitions
I am trying to write unit tests for a STM32CubeIDE project. I have build the .bdf file and imported it to Parasoft C/C++Test (Standalone). I was able to generate some unit tests, however if I try to run the unit tests or collect stub information I get the following error: "C/C++test analysis errors in /project_folder 1.…
-
stm32 generate unit test cases and run
I'm encountering errors when attempting to perform unit tests on an STM32 project![] . The issue seems to stem from xHarness not recognizing .obj files, resulting in an error message stating "line 1: error: unrecognized token." I've included the error details for reference. help me with this
-
Vscode c/c++ extension
I tried to use the vscode extension version 2023.2.0. The documentation says i have to use c/c++test standard. But I am using the professional version (2023.2.0). It is works partly. But when i am trying to open the rule documention i get "Cannot find rule documentation for C..." Does this feature only works with the…
-
cpptesttrace: command not found
I have used Ubuntu OS and tried to create bdf file with command cpptesttrace. But it turns out like cpptesttrace: command not found. (I have already added PATH in .bashrc as well) Here is the command I executed. $ projectName=test1234 $ bdfOutPath=$gitHubWork/$projectName.bdf $ rm -rf $bdfOutPath $ cpptesttrace…
-
How do you stub a function to return a different value each time it's called in a single test
I've got a function with the following code: if (ext_test() == true) { ext_mod(); if (ext_test() == true) { ext_in(); } ext_out();} and I need to make a test that executes out_func() BUT NOT in_func() (the ext_test(), ext_mod(), ext_in() and ext_out() functions access data outside the function; I didn't design this BTW,…
-
How to add a stub for a Class member function?
For example, class A has a public function foo(). class A { public: int Foo(); } I add the stub like this: void CppTest_Stub_Foo() { CPPTEST_STUB_CALLED("A::Foo"); int __return = 0; if (CPPTEST_STUB_HAS_CALLBACK()) { CPPTEST_STUB_CALLBACK(int __return, const A __this); CPPTEST_STUB_INVOKE_CALLBACK(&__return, this); } } But…
-
AUTOSAR A7-1-3 - False positive on "const" qualifier
I'm using Parasoft C++Test Professional 2023.1 and I'm getting false positives on AUTOSAR Rule A7-1-3 which states that "CV-qualifiers shall be placed on the right hand side of the type that is a typedef or a using name" Take this example: #include <cstdint>#include <typeinfo>#include <iostream>#include <string>namespace…
-
How does cpptestcli choose MSVC compiler and the purpose of compiler configuration files
Hi all, I am trying to understand the behaviour and relationship of cpptestcli with Microsoft Visual C++ (MSVC) compiler. My question is: * How does Parasoft choose the default MSVC compiler to use? When specifying the compiler configuration using the -compiler property, specifying vc_14_2-64 (64 bit version of compiler)…
-
Why does the C/C++ test link to files not in scope when running unit test (file scope)?
I am following the instructions at this link: https://docs.parasoft.com/pages/viewpage.action?pageId=134835090 I am doing a unit test only on a single file selected in the project explorer. I am creating stubs for this file and then running unit test. However, on executing run unit test (file scope), the C/C++ test is…
-
AUTOSAR A2-7-3 - False positive on implementation
I'm using Parasoft C++Test Professional 2023.1 and I'm getting false positives on AUTOSAR Rule A2-7-3 which states that "Every declaration needs to provide a proper documentation." The false positives happen when a function is declared in a .hpp file, while being defined/implemented in the corresponding .cpp file, but it…
-
Report generation with a list of suppressions
I want to include a list of suppressions in the report. When i am running c/c++ from eclipse and enable the 'Supressions Details' option the report contains a list of suppressions. But when i run the analysis from cli with -property report.suppressed_msgs=true the report does not contains the list of suppressions.
-
CMake project in Eclipse C/C++ Test checks 0 files
We have a CMake buildable project (C source) which we have just imported into Eclipse. The project builds successfully in Eclipse. When trying to run the MISRA 2012 checks via the Eclipse IDE C/C++Test plugin, it reports many files and source lines are available under 'Scope' but under 'Static' it says Files Checked: C/C++…
-
cpptesttrace option --cpptesttraceRun-OrigCmd=[yes|no] does not exist
Tool: Parasoft C/C++test Standard 2022.2 Per the documentation below for cpptesttrace, if the option --cpptesttraceRun-OrigCmd is set to "no", then the original command line will not be executed. However, this option is not recognized by the tool (verified via cpptesttrace --cpptesttraceHelp). Was support for this feature…
-
C/C++ Test Desktop: Set the ruleset inside project.properties
I'm using C/C++ Test Professional 2022.1 (Eclipse). Is there a possibility to set the ruleset inside the project.properties and execute the tests from the GUI without having to select a ruleset every time? We want to make sure that the same ruleset is always used.
-
WARNING: invalid compiler option -E (ignored)
How do i resolve this issue? All the files in my current execution are being skipped. [ERROR] Code Analysis for .c finished with code 1 (ipro) 1. >> WARNING: invalid compiler option -E (ignored) error: argument to option -x (#) is out of range Error preprocessing file ".c": Process exited with code: 1 Could not preprocess…
-
How to resolve unnamed structures/unions are undefined when running unit tests?
I have something like this in my header file which is included to project. extern struct{ uint32_t a; uint16_t b; } ex_var; ex_var is used in the functions which I am trying to test. When I am trying to run unit tests using Built In configuration I receive: undefined reference to `ex_var' In stub view I can find this…
-
How can we generate a .properties file in desired location?
Using: Eclipse with parasoft plugin. I am using Data source as input for my test suite (test cases), while adding data source to test suite level a .properties file gets generated. Issue I am facing is: to generated Test Suite I am using a external folder which was initially not inside the project scope, I have added the…
-
Test execution: error preparing instrumentation / symbols data for file upon including glib header
**Test execution: error preparing instrumentation / symbols data for file. "/usr/include/glib-2.0/glib/gspawn.h", line 76: error: expected a "}" G_SPAWN_ERROR_2BIG __attribute__((__deprecated__("Use '" "G_SPAWN_ERROR_TOO_BIG" "' instead"))) = G_SPAWN_ERROR_TOO_BIG, ^* Test execution of my code fails in parasoft tool…
-
There is no Run Tests button in the toolbar after installing Parasoft C/C++ Test
There is no Run Tests button in the toolbar after installing Parasoft C/C++ Test. Is there anything wrong during installation? Any hints? Thanks in advance.
-
Unit Testing Loadable Kernel Module
I just wrote my first character device and wanted to write some unit test for it using parasoft c++test. I know how to use parasoft for my regular user c code but being searching the net and can't find any example for creating unit tests, stubs, etc for this kernel module that i have. Is it even possible in parasoft? can…
-
Parasoft C/C++ Test error: expected an identifier extern "C" {
When I tried to run unit test for a simple main program in C++: #include <iostream>int main(){ std::cout << "hello world" << std::endl; return 0;} it occurred the following problem: C++test analysis errors in /Demo_aCpp 1. Test execution: error preparing instrumentation / symbols data for…
-
How to create a rule using RuleWizard to identify a comparison operator?
I am creating a Parasoft rule for C/C++test using RuleWizard that flags whenever a type std::string is used as an argument within certain function calls. For example, this line should be a violation since it uses the variable 'mytestString' without a call to .c_str() LOG_TRACE(7, "ParasoftTestProj::main() Some TRACE…
-
How to create a rule in RuleWizard to check if the filename contains the foldername?
I want to create a rule that checks if a filename contains the foldername at the beginning of the file, for example: I have a folder named "folder1" containing a folder named "folder2" which contains a c file. This file should be named: "folder1_folder2_myFile.c" Is it possible to create such a rule with the rule wizard?
-
[Updated] Regarding log4j CVE-2021-44228 with C/C++test
NIST recently released several Apache's log4j Zero-Day vulnerability cases, a very popular Java library to log messages in Java Applications. * CVE-2021-44228 (https://nvd.nist.gov/vuln/detail/CVE-2021-44228) * Parasoft products released this year (2021) include log4j 2.14.0 library. Parasoft confirms that these releases…
-
Licensing: Unstable/changing Machine-ID
Changes in the network environment may affect the interface that is used to compute your machine ID (used to identify your license) and result in machine ID instability. You can use the PARASOFT_SUPPORT_NET_INTERFACES environment variable to specify a stable interface and prevent the machine ID from floating. * Set up the…
-
Parasoft C/C++ test not appearing on the VS toolbar
Is any experiencing an issue where Parasoft C/C++ test is not appearing on the VS 2019 toolbar? I can see that Parasoft is installed as it's showing in the VS About box. Also if I launch VS2019 without code, maybe one in every ten times Parasoft will appear in the toolbar. I can then load a project and successfully run…
-
Keil uVision Unit Testing ITM Simulator Starter Guide
In this tutorial, we'll be going over how to get C++test to run Unit Tests on Keil uVision projects. * In this example, I will be using the following: * Keil uVision MDK-ARM 5.26 * C++test 10.4.2 * Windows 7 64-bit * If you are familiar on how to import your Keil project and/or create a bdf file for Keil skip to step 7. *…
-
Missing symbol definition
I have created project using .bdf file for KEIL project. I am able to generate Unit tests successfully. I am facing issue for "Build and Run test executable using uVesion Simulator". It gives me error for not able to find variable from startup file even though startup file is included in project folder. Is there specific…
-
Guide and exercise for uploading the correct artifacts for Source Control
What Files should be Checked into Source Control? When using Source control with C/C++test, make sure to have the following files checked-in: * .parasoft * .cproject * .project * All source files that are needed for the project * Test Folders or other folder(s) you use for your Test Suites * Stubs Folders or other…
-
Undefined Reference to Time: C/C++ testing
I am doing a cross platform testing to generate runtime executable with compiler TricoreGCC . I could generate the test cases but am not able to run them or to create the runtime executable. * I have also built the runtime library with the compiler which i am using and added it in to the linker options. * Added the include…
-
Structural code coverage with Code Composer Studio
I try to carry out structural code coverage with Parasoft code composer plugin I am using Code Composer Studio v8, My target has Flash memory (KB)=32 , RAM (KB)=12. Parasoft C/C++ makes static analsys very well (And also Visual studio plugin works very well) but when I try to carry out " Run TI CCS v4+ application with…
-
Data and Control Coupling
Hi parasoft family, Do you know whether or not parasoft c/c++ test encompass data and control coupling? Best Regards, -BA
-
error #10010: errors encountered during linking;
Hi great parasoft family First of all I wish good and health days, I really need help,the errors and warning as follows, C/C++test analysis errors in /deneme09042021 1. Test execution: error linking test executable for Test unit for selected sources. error #10198-D: no input section is linked in warning #10202-D: no…
-
generating BDF files.
I have an ubuntu1804 system, I am using docker for Parasoft integration with Jenkins. The Parasoft version I use is "parasoft_cpptest_standard-2020.1.0-linux.x86_64.tar.gz" and I have a flutter project and I build a project with Makefile's make commands. I have a DTP server connected and when I try to run cpptestcli…
-
Parasoft Clion Support
Hi, May I plug Parasoft with Clion IDE. Is it possible?
-
C++ test Report: Could not build Analysis data
I have a C++ project that is built in Eclipse with GCC/G++ compiler. The project can be compiled successfully and run without problems, but when I try to perform static analysis via cpptestcli, the report generated show the following error: ........./ConfigMgr/Common/ConfigParser.cppBugDetective checker: could not build…