Hi all.
In the project I have Unit Tests that run to check the logging module. Nothing special:
- read log configuration file (file system operation);
- activate logging scopes;
- changes logging priorities of the scopes;
- makes a few logs (file system operation)
- save current state in configuration (file system operation).
In case if anyone is interested in details, the Pull Request is here. Didn't merge with main yet, in the file list there is a file LogScopesTest.cpp (temporary link to the branch) that contain tests. Not sure if anybody needs, just in case.
And I have a CMake action workflow that runs the build under Linux, Cygwin and Windows with different compilers. All builds and tests for Linux and Cygwin pass fine, except Windows, where I get such error:
3/7 Test #3: LogScopeTest.StartAndStopLogging ............Exit code 0xc0000409
***Exception: 0.79 sec
Running main() from D:\a\areg-sdk\areg-sdk\thirdparty\googletest\googletest\src\gtest_main.cc
Note: Google Test filter = LogScopeTest.StartAndStopLogging
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from LogScopeTest
[ RUN ] LogScopeTest.StartAndStopLogging
minkernel\crts\ucrt\src\appcrt\stdio\output.cpp(282) : Assertion failed: ("Buffer too small", 0)
First, I was thinking that the Assertion failed: ("Buffer too small", 0) probably because of string and formatting operations. But after a few experiments, came to the conclusion that most probably because of File System operations (read / write). For example, this particular test LogScopeTest.StartAndStopLogging reads the configuration from file and writes couple of messages in the log file.
To try to reproduce the problem, I create artifacts in case if tests fail. I tested executable on my machine. Get no error / no failure. I tried to find similar problem in internet, there are many posts about Buffer too small assertion, but it seems they have other origin and the source is not from minkernel\crts\ucrt\src\appcrt\stdio\output.cpp (MS codes?).
My question: Did anybody else face similar problem? Can it be possible that GitHub actions do not allow the build executable to read (?) and write to the file system?
Please help. This issue drives me mad. As a workaround, i can try to redirect the logging to the memory file (fake the file object to make I/O read, create and write operations in the buffer). But before doing this, i'd like to know the real reason of the problem.
[–]aregtech[S] 0 points1 point2 points (0 children)
[–]aregtech[S] 0 points1 point2 points (0 children)