mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-11-04 01:58:54 +01:00 
			
		
		
		
	tests: Remove an incorrect assertion in converter-stream
While the assertion always turned out to be true on Linux, it frequently caused spurious test failures on FreeBSD. After some remote debugging, I *think* the cause is as written up in the comment in the code in this commit. However, I cannot be certain, as the more debugging messages I added, the harder the failure was to reproduce; and I don’t have access to a FreeBSD machine. This fixes failures like: ``` Bail out! GLib-GIO:ERROR:../gio/tests/converter-stream.c:1043:test_converter_pollable: assertion failed (error == NULL): Resource temporarily unavailable (g-io-error-quark, 27) ``` It’s succeeded 1000 times in a row on the FreeBSD CI now; previously it was failing one time in three: https://gitlab.gnome.org/GNOME/glib/-/jobs/1936395. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
		@@ -1037,12 +1037,11 @@ test_converter_pollable (void)
 | 
				
			|||||||
      if (!is_readable)
 | 
					      if (!is_readable)
 | 
				
			||||||
	g_assert_cmpint (res, ==, -1);
 | 
						g_assert_cmpint (res, ==, -1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      /* After closing the write end, we can't get WOULD_BLOCK any more */
 | 
					      /* Even after closing the write end, we can get WOULD_BLOCK (particularly
 | 
				
			||||||
      if (!socket_out)
 | 
					       * on FreeBSD), so we can’t make any assertions based on `!socket_out`.
 | 
				
			||||||
        {
 | 
					       * This is because the FIN packets may still be in the out buffer of one
 | 
				
			||||||
          g_assert_no_error (error);
 | 
					       * half of the socket pair, while the in buffer of the other half has some
 | 
				
			||||||
          g_assert_cmpint (res, !=, -1);
 | 
					       * data, but not enough for a full block for the converter to consume. */
 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
      if (res == -1)
 | 
					      if (res == -1)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user