mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-10-29 05:40:27 -04:00 
			
		
		
		
	test: test-logger: ignore some systemd journal error codes
Some errors from `sd_journal_get_data()` are not (and should not be considered) fatal from the point of view of the test. Ignore them. See #1710
This commit is contained in:
		
							parent
							
								
									3d152db758
								
							
						
					
					
						commit
						0680e249e5
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		|  | @ -24,6 +24,7 @@ | |||
| 
 | ||||
| #include "pwtest.h" | ||||
| 
 | ||||
| #include <errno.h> | ||||
| #include <fcntl.h> | ||||
| #include <unistd.h> | ||||
| 
 | ||||
|  | @ -464,6 +465,9 @@ find_in_journal(sd_journal *journal, const char *needle, char *out, size_t out_s | |||
| 				const char *d; | ||||
| 				size_t l; | ||||
| 				int r = sd_journal_get_data(journal, "MESSAGE", (const void **)&d, &l); | ||||
| 				if (r == -ENOENT || r == -E2BIG || r == -EBADMSG) | ||||
| 					continue; | ||||
| 
 | ||||
| 				pwtest_neg_errno_ok(r); | ||||
| 				spa_scnprintf(buffer, sizeof(buffer), "%.*s", (int) l, d); | ||||
| 				if (strstr(buffer, needle)) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Barnabás Pőcze
						Barnabás Pőcze