test: cover exact package tool invocation paths
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
/* `path` is acceptable iff it's either an archive ("!<arch>\n") or
|
||||
* an ELF file ("\x7fELF"). Distros often ship lib<name>.so as a GNU
|
||||
@@ -128,10 +129,9 @@ main(int argc, char **argv)
|
||||
}
|
||||
int rc = l_emit_elf(&l, f, base, base + 0x1000 + entry->val);
|
||||
fclose(f);
|
||||
if (rc == 0) {
|
||||
char cmd[1024];
|
||||
snprintf(cmd, sizeof cmd, "chmod +x %s", out);
|
||||
(void)system(cmd);
|
||||
if (rc == 0 && chmod(out, 0755) != 0) {
|
||||
fprintf(stderr, "w6l: cannot make %s executable\n", out);
|
||||
rc = 1;
|
||||
}
|
||||
free(inputs);
|
||||
return rc;
|
||||
|
||||
Reference in New Issue
Block a user