Граф коммитов

184 Коммитов

Автор SHA1 Сообщение Дата
Bingyi Yang 59cc1df5b1
add a threadpool chaos test (#406)
* add a chaos test

* change back thread count

* address comments

* address comments

* address comment

* add a comment

* fixed a typo

* address comments
2024-11-11 18:04:43 -08:00
Matt Durak 78b5281143
Add real_threadpool_thandle for convenience in UTs (#405)
* Add real_threadpool_thandle for convenience in UTs
2024-11-04 09:54:16 -08:00
Nishikant Deshmukh 6aaa879511
Specs for threadpool_open move to threadpool_create and threadpool_cl… (#403)
* Specs for threadpool_open move to threadpool_create and threadpool_close to threadpool_dispose

* Addressed Dan's comments

* Missing SRS_THREADPOOL_WIN32_01_006 added back

* Pushing some of the missing changes and some new changes

* More changes

* One more change remaining

* Removed the backtick
2024-10-31 13:29:12 -07:00
Bert Kleewein e1df027dc1
add reals for job_object_helper (#402)
* add reals for job_object_helper

* add stdint
2024-10-26 20:27:36 -07:00
Bingyi Yang 537d59b60f
add threadpool timer state spec (#396)
* add spec

* address comments
2024-10-24 11:29:47 -07:00
Bert Kleewein bd77337893
Code and tests for job-object-helper (#388)
* copy tests from geo

* ready for tests

* first pass

* second pass

* negative test pass

* more

* a few more

* all unit tests pass

* integration test for memory use

* integration tests for CPU use

* comment out full memory use test

* adjust CPU expectations

* really relaxing this test. Maybe we need something better.

* fix interlock

* passing"

* log lines

* final PR feedback
2024-10-22 15:42:24 +00:00
Jelani Brandon bbc959b9e9
re-enable traceability code in repo (#393)
Co-authored-by: Jelani Brandon <jebrando@microsoft.com>
2024-10-21 14:40:48 -07:00
Jelani Brandon b593eda612
Revert check in for Socket transport (#392)
* reverting files

* fixing reverted changes

---------

Co-authored-by: Jelani Brandon <jebrando@microsoft.com>
2024-10-21 18:24:53 +00:00
anporumb 752bec6839
fixes for EBS repo and remove c_pal_interfacesmocks (#391)
* c_pal_umocktypes should link with c_pal_reals

* no need to build a mock library for c_pal_interface

* take out pal_ll_interfaces_mocks

* make call_once_ut compile

* better reals for async_socket

* added (void) to void functions

* add real socjket transport / socket for win32

* added reals for sokcet transport on linux

* async socket uses socket transport

* added real async socket for linux

* socket_transport has unbalanced } in C++ lands

* reals changes

* windows compiles now

* better but still doesn't compile on linux

* now it all compiles

* added stdint.h after CR
2024-10-18 11:41:44 -07:00
anporumb e66530d200
use latest master AND modifications for latest ctestrunnerswitcher (#390)
* pal_interfaces now appears in Visual Studio and has mocks

* now it compiles on Linux too

* propagate_all_repos anporumb/pchmock4

* propagate_all_repos anporumb/pchmock4

* spaces removed apparently

* propagate_all_repos anporumb/pchmock4

* propagate_all_repos anporumb/pchmock4

* use the variable set in c-testrunnerswitcher

* propagate_all_repos anporumb/pchmock4

* propagate_all_repos anporumb/pchmock4

* propagate_all_repos anporumb/pchmock4

* propagate_all_repos anporumb/pchmock4

* propagate_all_repos anporumb/pchmock4

* propagate_all_repos anporumb/pchmock4

* propagate_all_repos anporumb/pchmock4

* propagate_all_repos anporumb/pchmock4

* revert interfaces/CMakeLists.txt to master

* use latest dependencies 17 Oct 2024

* use vcpkg from master
2024-10-18 04:51:45 +00:00
samrach9 ab26b45658
initial integrations of socket_transport into async_socket (#354)
* initial integrations of socket_transport into async_socket

---------

Co-authored-by: Jelani Brandon <jebrando@microsoft.com>
2024-10-16 10:27:20 -07:00
anporumb cf83dc4ed7
use correct include path and no double reals (#385)
* use the correct include path

* propagate_all_repos anporumb/pchmock3

* no double include

* why CMAKE, WHY
2024-10-11 11:41:50 -07:00
anporumb 0fee3af5d5
add the smallest precompiled header and use it in 1x project. (#384)
* meek attempt to have a mocks library with precompiled header

* this creates by hand win32_ll_mocks and uses it in call_once_ut_exe_c_pal

* mock loibrary for c_pal_interfaces is build with a function

* propagate_all_repos anporumb/pchmock3

* itr also compiles but does NOT link on linux

* now it builds AND links on LINUX

* added a minimal explanation about exiting visual studio

* propagate_all_repos anporumb/pchmock3

* propagate_all_repos anporumb/pchmock3

* propagate_all_repos anporumb/pchmock3

* threadpool uses terminate_process

* make pal_ll_interfaces appear in Visual Studio

* it needs to be prefixed with inc

* extraneous files are removed

* write library name with capital letters

* use also for #ifdef

* propagate_all_repos anporumb/pchmock3

* propagate_all_repos anporumb/pchmock3

* propagate_all_repos anporumb/pchmock3

* propagate_all_repos anporumb/pchmock3

* propagate_all_repos anporumb/pchmock3

* propagate_all_repos anporumb/pchmock3

* propagate_all_repos anporumb/pchmock3

* use latest dependencies 10 Oct 2024

* remove C_PAL_INC_FOLDER

* make it compile with latest c-pal

* use latest dependencies 10 Oct 2024

* remove garbage from build folder

* use latest dependencies 10 Oct 2024

* propagate_all_repos anporumb/pchmock3

* use latest dependencies 10 Oct 2024

* use latest dependencies 10 Oct 2024
2024-10-11 10:26:22 -07:00
Jelani Brandon e8692afe7d
fix missing include in real file (#383)
Co-authored-by: Jelani Brandon <jebrando@microsoft.com>
2024-10-09 21:03:33 -07:00
Bert Kleewein 345b3df3c7
job_object_helper_v2 spec and header (#377)
* job_object_helper_v2 spec and header

* PR feedback
2024-10-08 03:37:22 +00:00
Jelani Brandon 26720d19e2
adding code to detect port exhaustion (#378)
* adding code to detect port exhaustion

Co-authored-by: Jelani Brandon <jebrando@microsoft.com>
2024-10-02 16:33:55 -07:00
Bert Kleewein 21354df004
design & header specs for job_object_helper (#370)
* design & header specs for job_object_helper

* PR feedback

* updated requirements

* update API to set memory limit
2024-09-26 14:50:34 -07:00
anporumb e25f8f0494
update for umock IMPL/DECL (#372)
* propagate anporumb/pchmock

* propagate_all_repos anporumb/pchmock

* propagate_all_repos anporumb/pchmock

* propagate_all_repos anporumb/pchmock

* propagate_all_repos anporumb/pchmock

* fix c_pal against LNK errors

* propagate_all_repos anporumb/pchmock

* propagate_all_repos anporumb/pchmock

* propagate_all_repos anporumb/pchmock

* propagate_all_repos anporumb/pchmock

* propagate_all_repos anporumb/pchmock

* propagate_all_repos anporumb/pchmock

* propagate_all_repos anporumb/pchmock

* propagate_all_repos anporumb/pchmock

* propagate_all_repos anporumb/pchmock

* propagate_all_repos anporumb/pchmock

* propagate_all_repos anporumb/pchmock

* propagate_all_repos anporumb/pchmock

* propagate_all_repos anporumb/pchmock

* propagate_all_repos anporumb/pchmock

* propagate_all_repos anporumb/pchmock

* propagate_all_repos anporumb/pchmock

* propagate_all_repos anporumb/pchmock

* propagate_all_repos anporumb/pchmock

* propagate_all_repos anporumb/pchmock

* propagate_all_repos anporumb/pchmock

* propagate_all_repos anporumb/pchmock

* propagate_all_repos anporumb/pchmock

* changes for MOCKABLE_INTERFACE

* fix typo

* propagate_all_repos anporumb/pchmock

* propagate_all_repos anporumb/pchmock

* propagate_all_repos anporumb/pchmock

* update to latest subrepos

* doisable incklude what you use
2024-09-24 19:58:36 +05:30
Nishikant Deshmukh 71e315817c
Threadpool WIN32 changes implementation (#371)
* Threadpool WIN32 changes implementation

* Fixed few unit-tests and memory leaks
2024-09-19 14:52:53 -07:00
Navya Gaur 27c3d6f2ca
Added method to get time elapsed in seconds without creating a timer (#369)
* Added a new method timer_global_get_elapsed in timer_win32.c
timer_global_get_elapsed calculates time elapsed in seconds
Added a new test case in timer_win32_ut.c file to test the new method
Added spec for this new method

* Added global_timer_state_reset method to reset g_timer_state variable to 0 after each test case
Added an UT for g_timer_get_elapsed_in_us_succeeds to test timer_global_get_elapsed_us
Added global_timer_state_reset in interface file

* Added suffix _s to timer_global_get_elapsed
Added implementation for timer_global_get_elapsed_s in timer_linux.c
Added releavnt ut and specs in timer_linux_ut.c and timer_linux_requirements.md

* Added reference to spec for test case in timer_win32_ut.c

* Defining a macro with real_ prefix to avoid conflict with existing functions defined

* Added macro for global_timer_state_reset for avoid conflict with any existing method

* Added integration test for timer_global_get_elapsed_s()

---------

Co-authored-by: Navya Gaur <navyagaur@microsoft.com>
2024-09-19 13:33:49 +05:30
Nishikant Deshmukh 8c1dd06fb3
Initial checkin with specs (#362)
* Initial checkin with specs

* Fixed Traceability

* Fixed PVOID on Linux

* Fixed PVOID in threadpool.h

* Forgot to add threadpool.h into the commit, adding it now

* Addressed comments by Matt

* Addressed ALL comments by Matt
2024-09-03 17:35:36 -07:00
samrach9 d79a408f35
adding two functions to socket_transport API (#359)
* adding two functions to socket_transport API

* changing function name

* small fixes
2024-08-19 11:30:52 -07:00
samrach9 f20caca657
adding timeout to socket_transport (#358)
* adding timeout to socket_transport

* iwyu fix

* adding define
2024-08-14 09:53:16 -07:00
samrach9 4edd494c91
adding socket_accept enum (#356)
* adding socket_accept enum

* changing to NO_CONNECTION

* adding SOCKET_ACCEPT_NO_CONNECTION to linux
2024-08-08 12:17:39 -07:00
Bert Kleewein 31ae6b6faf
Fix geo -- timer.h is required for ENABLE_SOCKET_LOGGING (#353) 2024-07-23 14:55:32 -07:00
samrach9 ab33a95545
Socket transport sr (#347)
* unit tests for socket_transport_

* fixed memory leaks and reviews

* fixed int test and binding socket errors

* making socket_transport_create seperate APIs

* fix for linux test

* fixes to spec
2024-07-03 17:54:34 -07:00
samrach9 aa1de8ef52
unit tests for socket_transport_ (#346)
* unit tests for socket_transport_
2024-06-28 20:08:39 -07:00
Jelani Brandon 9ae39553af
spec and header for socket transport module (#341)
---------

Co-authored-by: Jelani Brandon <jebrando@microsoft.com>
2024-06-19 08:42:01 -07:00
Jelani Brandon b9bc7ab2fa
changing async_socket open close signature (#338)
Co-authored-by: Jelani Brandon <jebrando@microsoft.com>
2024-05-15 20:46:19 -07:00
anporumb 1d6d29a682
make logging context thandlable (#337)
* before making reals for thandle_logging_context

* it doesn't compile

* update thandle_ll to expose types of functions

* with reals

* iwyu take 01 out of 99

* iwyu take 02 out of 99

* iwyu take 03 out of 99

* iwyu take 04 out of 99

* iwyu take 05 out of 99

* iwyu take 06 out of 99

* iwyu take 07 out of 99

* iwyu take 08 out of 99

* iwyu take 09 out of 99

* rename test name to something better
2024-05-14 11:22:43 -07:00
anporumb 7fe6b681f5
TIMER_GUARD rename to real_TIMER_GUARD (#330)
* TIMER_GUARD rename to real_TIMER_GUARD

* #define TIMER_GUARD                     real_TIMER_GUARD for linux too
2024-04-23 20:11:09 +00:00
Riddhi Gupta aa6a5e101c
Adding MALLOC_MULTI_FLEX macro (#324)
* malloc_multi_flex_macro

* Adding overflow check

* header and specs

* Fixing build"

* Corrections

* Corrections

* Addressing comments"

* added int test

* Adding align of

* Adding align of in overflow check

* Adding one more test

* Fixes

* Addresing commentS

* Addressing comments

* fix alignment

* Fixing specs

* adding UT, fixes, more ints

* Addressing comments

* Added more tests

* Fixing segfault

* Fixes

* Adding some imports

---------

Co-authored-by: Riddhi Gupta <riddhigupta@microsoft.com>
2024-04-18 10:41:09 +05:30
Dan Cristoloveanu 17de2dd2c7
Jemalloc vcpkg (#314)
* jemalloc_vcpkg

* Remove jemalloc as module

* Add vcpkg

* Use jemalloc through vcpkg

* Add the matrix of all builds

* Add the matrix of all builds

* Add the matrix of all builds

* Add the matrix of all builds

* Add the matrix of all builds

* Add the matrix of all builds

* Add the matrix of all builds

* Add the matrix of all builds

* Add the matrix of all builds

* Add the matrix of all builds

* Add the matrix of all builds

* Add the matrix of all builds

* Add the matrix of all builds

* Add the matrix of all builds

* More fanciness

* Pass CMAKE_BUILD_TYPE option to ymls

* Fix a test when running with jemalloc

* Fix CodeQL and Linux build

* Do not run fsanitize and vstest

* Fix vstest invocation

* Test

* Add int and perf tests

* Rework configuration type

* Fix configuration type expansion

* Re-enable Passthrough

* Update deps

* Fix int tests to run with jemalloc

* Address CR comments
2024-03-12 10:47:42 -07:00
Matt Durak 104fc15292
Fix async_socket on linux (#313) 2024-03-08 17:10:31 -08:00
anporumb b2aebe0ac5
Anpo fix execution engine reals (#311)
* fix execution engine reals

* added also tests for execution engine, becuse those were missing
2024-03-05 22:09:25 -08:00
David Robson 47ee6cc488
Add real_thandle_helper.h and real_interlocked_undo_rename.h to c-pal… (#308)
* Add real_thandle_helper.h and real_interlocked_undo_rename.h to c-pal repo.
Add a document and unit test to show how to use.

---------

Co-authored-by: Matt Durak <mdurak@microsoft.com>
2024-03-01 18:02:41 +00:00
Parth Aggarwal f50f93a220
use real_interlocked in real_threadpool (#301) 2024-02-05 08:37:37 -08:00
Jelani Brandon 45ab80518e
adding function to determine if a uuid is NIL. (#299)
Co-authored-by: Jelani Brandon <jebrando@microsoft.com>
2024-01-30 06:00:45 +00:00
Dan Cristoloveanu dccd19093f
Add gballoc_hl_size to be used by the heap detouring (#292)
* Add gballoc_hl_size to be used by the heap detouring

* Fix Linux-y stuff

* One more Linux fix

* Fix Linux test error

* Fix it harder

* Fix it harder

* Fix it harder

* One more fix
2023-12-13 18:05:48 -08:00
Dan Cristoloveanu 876f34700e
Add SRW_LOCK_LL_TRY_ACQUIRE_RESULT enum in .c file (#288) 2023-11-11 21:00:07 -08:00
anporumb bdcd1ad58e
Anpo 06 oct 2023 update deps (#276)
* use latest dependencies 06 Oct 2023

* remove mymalloc
2023-10-06 15:15:40 -07:00
Dan Cristoloveanu e89ca804d3
Fix reals for win32 for async_socket (#275) 2023-10-06 13:18:16 -07:00
Raj Vengalil 777418ccd4
Add async socket notify (#270)
Add a new `async_socket_notify_io` API that can be used by callers to be notified when the underlying socket is ready to be written to or read from.
2023-10-03 13:38:10 +05:30
David Robson 30a0dd6fde
Add single_performance_counter to c-pal. (#272)
* Moving single_performance_counter to c-pal. Currently, this is a
Windows-only implementation.
2023-10-02 13:50:23 -07:00
Jelani Brandon 717a625b50
adding srw_lock_ll to linux (#268)
Co-authored-by: Jelani Brandon <jebrando@microsoft.com>
2023-09-08 13:29:34 +00:00
Dan Cristoloveanu 70f74b15e7
Add reals for srw lock ll (#266)
* Add real_srw_lock_ll

* reals UT update

* Add reals for srw_lock_ll

* Add mock return value for srw_lock_ll_init
2023-09-06 10:36:52 -07:00
Jelani Brandon 869acb86f6
chore: combining linux and win32 execution engine param structures. (#265)
* chore: combining linux and win32 execution engine param structures

Co-authored-by: Jelani Brandon <jebrando@microsoft.com>
2023-08-31 23:42:50 +00:00
samrach9 7ecf7d49b6
error handling for linux and windows implementation (#257) 2023-07-21 09:30:16 -07:00
Dan Cristoloveanu 073b5545e5
Switch to logging v2 (#249)
* logging_v2

* logging_v2

* logging_v2

* logging_v2

* logging_v2

* Latest deps

* Latest deps

* Minor updates

* Update with logging_v2 config APIs

* Add logerrno to logger.h

* Add one more v1 to v2 translation

* Fix some issues

* Use latest logging

* Fix IWYU

* Fix IWYU

* making call count a global variable to avoid helgrind bug

* Suppress printf issues in sm helgrind test

* Add suppression for printf with Helgrind

* Add suppression for printf with Helgrind

* Address CR comment

---------

Co-authored-by: Jelani Brandon <jebrando@microsoft.com>
2023-06-28 13:07:48 +05:30
Dan Cristoloveanu 6d0a809ed9
Add srw_lock_ll win32 implementation (#248) 2023-06-23 11:25:30 +05:30