-
[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…
-
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.…
-
Parasoft C/C++Test 9.4 , error: invalid type conversion
When I used Parasoft c/c++test9.4 with Cygwin gcc11.3 to run unit test, there is such a problem: C++test analysis errors in /example_debug 1. Test execution: error preparing instrumentation / symbols data for file."/usr/lib/gcc/x86_64-pc-cygwin/11/include/mmintrin.h", line 79: error: invalid type conversion return (__m64)…
-
Error reading test log for Test unit for xx.cpp.
I run "Run Unit Tests (File Scope)" configuration on eclipse base ide vs2013 ,then get a error :"Test execution: error reading test log for Test unit for xx.cpp". How can I Solve this problem?
-
Preconfiguration for cpptest Professional Eclipse Plugin custom compiler setting not working
In tried to preconfigure the eclipse Plugin settings with the parasoft.ini file. The documention https://docs.parasoft.com/display/CPPTESTPROVS20212/Configuring+Localsettings shows that i have to set the custom.compilers.dir=[Directory]. But it does not set anything in the Parasoft|Configuration|Customs Directories|Custom…
-
C/C++ Test Case Report Macros
Hi, I'm trying to include some logging into test cases using the CPPTEST_REPORT_* macros and I can't seem to find a way to view those log messages. When I generate a report, I can see messages included in a failure message with CPPTEST_FAIL("my failure") but nothing regarding from the CPPTEST_REPORT_* logs. Ideally, I'd…
-
cpptestcli: files to analyse not found
We are using cpptestcli from eclipse Plugin and on the terminal. Using from eclipse and the cpptestcli based on eclipse is working too. But we want to use cpptestcli in standard version for automation purpose. The cpptestcli is not working. Our Project is a makefile project with a lot of software modules.…
-
Exclude autogenerated code from coverage report
I have project with custom configurations for running and generation stubs/tests. My project contains autogenerated files that I want to exclude from coverage report as we are not interested in their coverage and it affects total coverage of the project. I use standalone version of C++ test and tried: * add them to…
-
Why Is Collect Stub Information Failing?
We are using ParaSoft with GreenHills development environment. When we try to collect stub information we get the following error in the console: "Could not preprocess source file" (See the attached file for full error description) Can someone tell us what is wrong?
-
Displaying Code Coverage Results on Jenkins
Hi, I've been trying to visually display code coverage results on Jenkins but can't seem to find a way to do it with the Parasoft Findings plugin. Currently I can only graph the number of tests that have passed/failed but I would like to have a visual of the coverage percentages. This is the plugin I've been trying to use…
-
Extension tool for supporting Parasoft C/C++ test
Hi, Our company is focusing on analyzing software requirements due to Parasoft features. We would like to use Parasoft to do static code analysis for C, C++ and also assembler code. There is one requirement that we have to check if all assembler code is documented in the code but it seems that this check is not included in…
-
License issue for the version 2021.2.1
We have a linux OS running the parasoft cpptestcli, the version is "Parasoft C/C++ test Professional 2021.2.1" and the machineId is given to the license server. But sometimes the cpptestcli program failed with ERROR: License: Main feature "C++test" status: No more tokens available.ERROR: Error: No valid license (MachineId:…
-
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?
-
Need a faster way to merge results from clog files
I am attempting to merge 20k clog and tlog files using the load archive test configuration but it is simply taking too long for this to be feasible. Merging 20 files alone takes 40mins. Is there a better way to do this?
-
Parasoft not using autogenerated stubs
Hello, I am currently trying to use Parasoft with a colleague and I am running into problems with the autogenerated stubs. I wrote a unit-test suite and let parasoft generate the stubs for them. I then gave the files to my colleague and when he tries to run the tests it doesn't work because it won't use the autogenerated…
-
How to properly set up a unit test with a data source?
I'm trying to set up a unit test that imports a file of inputs and outputs as a data source. I think i've got the columns mapped properly, but every line reports "Signal SIGSEGV caught: segmentation fault [CPPTEST_SIGSEGV]", coming from the suite .cpp file where the data source is declared:…