@@ -2870,6 +2870,96 @@ TEST_F(convert_event_test, PPME_SYSCALL_SEMCTL_X_1_to_5_params_with_enter) {
28702870 val));
28712871}
28722872
2873+ // //////////////////////////
2874+ // PPOLL
2875+ // //////////////////////////
2876+
2877+ TEST_F (convert_event_test, PPME_SYSCALL_PPOLL_E_store) {
2878+ constexpr uint64_t ts = 12 ;
2879+ constexpr int64_t tid = 25 ;
2880+
2881+ constexpr uint8_t fds[] = {0x1 , 0x0 , 0x16 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x1 , 0x0 };
2882+ constexpr uint64_t timeout = 30 ;
2883+ constexpr uint32_t sigmask = 31 ;
2884+
2885+ const auto evt = create_safe_scap_event (ts,
2886+ tid,
2887+ PPME_SYSCALL_PPOLL_E,
2888+ 3 ,
2889+ scap_const_sized_buffer{fds, sizeof (fds)},
2890+ timeout,
2891+ sigmask);
2892+ assert_single_conversion_skip (evt);
2893+ assert_event_storage_presence (evt);
2894+ }
2895+
2896+ TEST_F (convert_event_test, PPME_SYSCALL_PPOLL_X_2_to_4_params_no_enter) {
2897+ constexpr uint64_t ts = 12 ;
2898+ constexpr int64_t tid = 25 ;
2899+
2900+ constexpr int64_t res = 89 ;
2901+ constexpr uint8_t fds[] = {0x1 , 0x0 , 0x16 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x1 , 0x0 };
2902+
2903+ // Defaulted to 0
2904+ constexpr uint64_t timeout = 0 ;
2905+ constexpr uint32_t sigmask = 0 ;
2906+
2907+ assert_single_conversion_success (
2908+ conversion_result::CONVERSION_COMPLETED,
2909+ create_safe_scap_event (ts,
2910+ tid,
2911+ PPME_SYSCALL_PPOLL_X,
2912+ 2 ,
2913+ res,
2914+ scap_const_sized_buffer{fds, sizeof (fds)}),
2915+ create_safe_scap_event (ts,
2916+ tid,
2917+ PPME_SYSCALL_PPOLL_X,
2918+ 4 ,
2919+ res,
2920+ scap_const_sized_buffer{fds, sizeof (fds)},
2921+ timeout,
2922+ sigmask));
2923+ }
2924+
2925+ TEST_F (convert_event_test, PPME_SYSCALL_PPOLL_X_2_to_4_params_with_enter) {
2926+ constexpr uint64_t ts = 12 ;
2927+ constexpr int64_t tid = 25 ;
2928+
2929+ constexpr uint8_t fds[] = {0x1 , 0x0 , 0x16 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x1 , 0x0 };
2930+ constexpr uint64_t timeout = 30 ;
2931+ constexpr uint32_t sigmask = 31 ;
2932+ constexpr int64_t res = 89 ;
2933+
2934+ // After the first conversion we should have the storage
2935+ const auto evt = create_safe_scap_event (ts,
2936+ tid,
2937+ PPME_SYSCALL_PPOLL_E,
2938+ 3 ,
2939+ scap_const_sized_buffer{fds, sizeof (fds)},
2940+ timeout,
2941+ sigmask);
2942+ assert_single_conversion_skip (evt);
2943+ assert_event_storage_presence (evt);
2944+
2945+ assert_single_conversion_success (
2946+ conversion_result::CONVERSION_COMPLETED,
2947+ create_safe_scap_event (ts,
2948+ tid,
2949+ PPME_SYSCALL_PPOLL_X,
2950+ 2 ,
2951+ res,
2952+ scap_const_sized_buffer{fds, sizeof (fds)}),
2953+ create_safe_scap_event (ts,
2954+ tid,
2955+ PPME_SYSCALL_PPOLL_X,
2956+ 4 ,
2957+ res,
2958+ scap_const_sized_buffer{fds, sizeof (fds)},
2959+ timeout,
2960+ sigmask));
2961+ }
2962+
28732963// //////////////////////////
28742964// SEMGET
28752965// //////////////////////////
0 commit comments