-
[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…
-
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…
-
Parasoft tool dynamic analysis
I run the parasoft tool in CubeIDE. i Run IAR EW Tests. When i load the test results(files) it gives me this setup problem : Test execution: error reading test log for Test unit for selected sources.
-
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…
-
Testsuite - Datasource error at 1st row
Hi, I am currently trying to run test cases with excel as datasource, in sum 3 rows (test cases). But the test fails at 1st row, the error log isn't helpfull. The datasource setup recognizes the input columns without any issue. In the result report it is showing "test execution problem". The test runs on the hardware,…
-
When installing Parasoft, the option to install the Visual Studio plug-in is not shown
First off, I hope that this is the correct forum. I am referring to the static code analysis tool, which we just refer to as Parasoft in our team. I am following a How To guide, complete with screenshots, which shows the option to install a plug-in into VIsual studio. I do not see this option. Can anyone advise?
-
MakeFile connect problem
I want to proceed with the project static analysis in the built-in version of visual studio. IDE has been delivered to MLXIDE (based on eclipse) and compiler information to eclipse 4.3, and there is an error that does not currently receive #define content. As the header file containing #define content is #included and…
-
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,…
-
C/C++test + CMake -> bdf file generation issue
Hello, I am using the CMake extension for creating C/C++ Test projects and what I noticed is, that the extension is also capturing commands which compile/link temporary files during a CMake build. This is especially, or maybe only, the case when the build has dependencies on other static libraries. These commands will also…
-
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…
-
Can Parasoft detect signed/unsigned role of variables in code?
Hi, I have tested my code by various static tests of parasoft. My code had somthing like the following: uint8_t a; a = input_from_a _port(); // this function returns a signed char value if(a > 0) do_something1(); else do_somthing2(); This code has fault. when "a" is set to a negative value using input_from_a _port(), fault…
-
C/C++test 2023.2 Product Release Announcement
We are excited to announce the launch of C/C++test 2023.2, featuring an array of new functionalities and improvements. Notably, our latest release incorporates complete support for MISRA C++ 2023, the cutting-edge coding standard in C++ designed to address safety and security concerns. Industries prioritizing safety,…
-
Stub function are not executing.
In our test application, We have multiple test suits, We created stub for mq_timerecived function used in file many source file. When we executed test application, Stub is called only on 1 test suites and for other test suites even though we registered Stub callback function in test cases, Its not calling stub and stub…
-
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)…
-
unknown target 'gcc_ntoaarch64'
While running the Unit Testing for QNX app I am facing the below issue: * Test execution: error linking test executable for Test unit for selected sources. cc: unknown target 'gcc_ntoaarch64' cc: targets available in C:/Users/t0075a4/qnx710/host/win64/x86_64/etc/qcc/gcc: 8.3.0,gcc_ntoaarch64le 8.3.0,gcc_ntoaarch64le_cxx…
-
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…
-
password encode
I am asking for you assistance to successfully encode via cpptestcli.exe (PC client) a password containing a "space" character. Thank you.
-
Changing compiler options in settings
I'm trying to use cpptestcli for Unit Testing and I need to add the -DCPPTEST_THREADS=1 option during compilation. The documentation only describes how to add this option inside the IDE and for a single project, but by exporting its build settings and by locating the property to modify I managed to use it on the CLI by…
-
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…
-
Cannot connect to license server error
Hello, I have the setup, where I'm connected to the RedHat server from my Windows machine through the Visual Code. I am using the OIDC authentication to connect to the parasoft license server. When I run the parasoft docker image from the RedHat server, the license is obtained from my employers server, but when I run the…
-
How to solve the error: "Invalid compiler config file"
Hi I am using Flow Analysis Standard in parasoft 10. My c project has been compiled in keil without any error and I imported it to parasoft using uvision keil project file. Then I run the Flow Analysis Standard but it issued this error "Invalid compiler config file" for all source files. Two tipical error messages are as…
-
Unable to execute tests
Hi, I could successfully create automated Tests for my dummy C Project using Parasoft. But on executing these tests, I get message in console: Collecting tests to be executed... Skipping test suite(s) - invalid CPPTEST_TEST_SUITE_INCLUDED_TO value detected: /Addition/tests/autogenerated/TestSuite_add_c.c ...done. Preparing…
-
change license retrieving timeout and retries
Hi We run parasoft cppclitest in our CI flows as "best effort". In some cases, when there is no available license, cpptestcli sleeps for 600 seconds and then tries again. This will try several times in a loop until end of retries or available license found. In some cases this adds lots of time to our CI flow and users…
-
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++…
-
What license do I need for "Run IAR EW Tests"?
I am trying to run unit test by executing "Run IAR EW Tests" but I am getting this error Your current license is not sufficient to use non standard test execution flow Build and run tests on IAR C-SPY Simulator (license required) My current license indicates that "Runtime Error Detection", "Static analysis", "Unit test",…
-
incremental scan on docker container
Hi We are running cpptestcli to scan our code inside a docker container. Since we start with clean workspace every time, the scan takes too much time. To try to resolve it, we copied ".cpptest" folder to a shared location, then, on the next run, downloaded it to the workspace. the problem is that we still see long scans…
-
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…
-
cpptest failing on command line but working with Eclipse
Using the Parasoft plugin for Eclipse, I am able to run Parasoft test configurations successfully. Trying to run the same test configuration using cpptestcli results in a error message and a stack trace in the error log. The Parasoft version is C++test Professional 2020.2.0 (10.5.0.20201022B1126). The error output is…
-
Amount of issues found with eclipse is different than with cpptestcli
When we analyze our code from Eclipse we use the compile_commands.json file as input. Then we click on the project name and start the analyzation. When we use cpptestcli on terminal the build_commands.json file is also used as input. We set the -workspace argument and the ruleset which should be used. The result is…
-
Nothing to do. Please use -help to get more information. 21(error) exit
If you met some console like above while Generating a executable. Do worry, try this solution. Check your project properties configuration, and check the linker configration. Then check the path of .o file, maybe your miss a ". the code maybe like this:${cpptest:original_options} C:/code/startip.o" Add the missing ", try…
-
[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.…
-
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.
-
Test unitaire en c
Bonjour s’il vous plaît je suis débutante en c et j’aimerais apprendre à ecrire des programmes test
-
How to solve the "Test execution: error precompiling file" problem?
I am using visual studio plugin for unit test generation and cannot execute test. It identifies some test files and drop "Test execution: error precompiling file" error message. Attaching the screenshots of test explorer. Generated test file also throws the error "fuction is inaccessible". I would be very grateful if…
-
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 remove warnings from IAR Embedded Workbench
warnings are: Warning[w29]: Parts of segment data are initialized (as in module XYZ), even though it is of type XDATA (and thus not promable) Warning[w29]: Parts of segment ?FILL3 are initialized (as in module ?FILLER_BYTES), even though it is of type XDATA (and thus not promable) Warning[w29]: Parts of segment EEPROM_AN…
-
Anyone used MCUXpresso and Parasoft?
My target platform is an NXP 1064, MCUXpressso is an Eclipse based IDE from NXP. It takes the Parasoft Plugin.
-
cpptestcli -input cpptest.bdf : Bypass desktop open
Hello, I created bdf from Makefile and ran cpptestcli. I'm running this from an ssh console connected to a virtual Centos 7.2 host. All I need is a report. But for some reason, cpptestcli is trying to open a display and fails. Can you please advise ? Thank you, Zvika
-
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…
-
Why trying to build runtime library in uVision (Keil) IDE fails?
Hi, I am trying to build the runtime library project provided by Parasoft for Vision Keil IDE. I chose a different MCU than the original one set in the project. I chose cypress CYBLE-224110-00. When I try to compile there are compilation errors that result from missing definitions for UART2 etc which I will fix. But the…
-
How parasoft calculates Code Complexity ?
What is the math behind complexity calculation ? Does Parasoft consider Macro Expansion while calculating overall code complexity ?
-
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.
-
Kernel Modules Unit Testing
Hello, I want to compile kernel code and unit test with Parasoft tool Please tell me how can i generate bdf and perform testing with parasoft tool I am using the below version of the tool: 1. Products: C/C++test 2. Platform: Linux 3. Version: 2021.2.1 4. Installer: C/C++test Professional for Linux x64(standalone) If i…
-
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…
-
"No Projects Found" when trying to import IAR project to parasoft C/C++test
Hi, I am trying to import an IAR project into parasoft according to the instructions written here: https://docs.parasoft.com/display/CPPDESKE1033/Importing+Projects+with+IAR+Embedded+Workbench+Support I enter the path and click refresh and no project is found. I even tried selecting in the path the actual project files…
-
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 switch between licenses that are on a DTP server?
Hi, I have Parasoft C/C++ test Professional version 2021.1.0 (10.5.1.20210505B1390) I also have DTP server installed on a local network server. On the DTP server we have two client licenses each with access to different features. Basically, the first license is for unit tests and the second license is for static analysis.…