For example if --insecure is not specified, and one of the security
checks fails.
fprintf(stderr, "%s: %s\n",
archive_entry_pathname(entry),
archive_error_string(ext));
+ cpio->return_value = 1;
} else if (!archive_entry_size_is_set(entry)
|| archive_entry_size(entry) > 0) {
r = extract_data(a, ext);
// We should refuse to create the absolute path without --insecure.
r = systemf("%s -i < archive.cpio 2> stderr2.txt", testprog);
- //assert(r != 0); // Should this command fail?
+ assert(r != 0);
assertFileNotExists(temp_absolute_file_name);
UNLINK(temp_absolute_file_name); // Cleanup just in case.
assertMakeDir("without-d", 0755);
assertChdir("without-d");
r = systemf("%s -i < ../archive.cpio >out 2>err", testprog);
- assertEqualInt(r, 0);
+ assert(r != 0);
assertEmptyFile("out");
/* And the file should not be restored. */
assertFileNotExists("dir/file");