#include <unistd.h>
#include <fcntl.h>
#include <locale.h>
+#include <errno.h>
#include "util.h"
log_info("pid1 $PATH: '%s'", strna(i));
}
+static void test_protect_errno(void) {
+ errno = 12;
+ {
+ PROTECT_ERRNO;
+ errno = 11;
+ }
+ assert(errno == 12);
+}
+
int main(int argc, char *argv[]) {
test_streq_ptr();
test_first_word();
test_hostname_is_valid();
test_u64log2();
test_get_process_comm();
+ test_protect_errno();
return 0;
}