}
}
+static void
+test_print_memory(char *const p, const unsigned int test_max)
+{
+ add_key(p, test_max);
+ printf("add_key(NULL, NULL, ");
+ print_quoted_memory(p, test_max);
+ printf(", %u, KEY_SPEC_THREAD_KEYRING) = %s\n", test_max, errstr);
+}
+
void
test_printstrn(const unsigned int test_max)
{
for (i = 0; i < sizeof(long); ++i)
test_printstrn_at(p + page_size - i, test_max);
test_efault(test_max);
+
+ fill_memory_ex(p, test_max + page_size, 0x00, 0xFF);
+ /* Test corner cases when octal quoting goes before digit */
+ for (int i = 0; i < 11; i++)
+ p[2 + 3 * i] = '0' + i - 1;
+
+ test_print_memory(p, test_max);
}