Add fixups for previous change

This commit is contained in:
Justine Tunney 2022-06-27 15:00:51 -07:00
parent 3c92adfd6e
commit 5297897ba1
47 changed files with 68 additions and 15 deletions

View file

@ -23,6 +23,7 @@
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath", 0);
errno = 0;
}
unsigned P[] = {

View file

@ -23,6 +23,7 @@
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath", 0);
errno = 0;
}
TEST(bitreverse, test) {

View file

@ -27,6 +27,7 @@
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath", 0);
errno = 0;
}
TEST(_countbits, testLow) {

View file

@ -25,6 +25,7 @@
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath", 0);
errno = 0;
}
TEST(morton, test) {

View file

@ -31,6 +31,7 @@ char testlib_enable_tmp_setup_teardown;
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath wpath cpath fattr", 0);
errno = 0;
}
TEST(access, efault) {

View file

@ -26,6 +26,7 @@ char testlib_enable_tmp_setup_teardown;
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath wpath cpath fattr", 0);
errno = 0;
}
TEST(chdir, efault) {

View file

@ -41,6 +41,7 @@ char testlib_enable_tmp_setup_teardown;
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath wpath cpath fattr", 0);
errno = 0;
}
void SetUp(void) {

View file

@ -34,6 +34,7 @@ char testlib_enable_tmp_setup_teardown;
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath wpath cpath fattr proc exec", 0);
errno = 0;
}
static textstartup void TestInit(int argc, char **argv) {

View file

@ -33,8 +33,8 @@ int ws, pid;
char testlib_enable_tmp_setup_teardown;
__attribute__((__constructor__)) static void init(void) {
// TODO(jart): what's up with rhel5 / rhel7?
// pledge("stdio rpath wpath cpath fattr proc exec", 0);
pledge("stdio rpath wpath cpath fattr proc exec", 0);
errno = 0;
}
bool UsingBinfmtMisc(void) {

View file

@ -32,6 +32,7 @@ char testlib_enable_tmp_setup_teardown;
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath wpath cpath fattr", 0);
errno = 0;
}
TEST(fcntl_getfl, testRemembersAccessMode) {

View file

@ -25,6 +25,7 @@ char testlib_enable_tmp_setup_teardown;
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath wpath cpath fattr", 0);
errno = 0;
}
TEST(fileexists, test) {

View file

@ -33,6 +33,7 @@ const char *path;
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath wpath cpath", 0);
errno = 0;
}
TEST(ftruncate, test) {

View file

@ -30,6 +30,7 @@ char testlib_enable_tmp_setup_teardown;
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath cpath fattr", 0);
errno = 0;
}
TEST(getcwd, test) {

View file

@ -29,6 +29,7 @@ char testlib_enable_tmp_setup_teardown;
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath wpath cpath fattr proc", 0);
errno = 0;
}
TEST(lseek, wat) {

View file

@ -32,6 +32,7 @@ char testlib_enable_tmp_setup_teardown;
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath wpath cpath fattr", 0);
errno = 0;
}
void SetUp(void) {

View file

@ -29,6 +29,7 @@ char testlib_enable_tmp_setup_teardown;
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath wpath cpath fattr", 0);
errno = 0;
}
TEST(open, efault) {

View file

@ -26,6 +26,7 @@ char testlib_enable_tmp_setup_teardown;
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath wpath cpath fattr", 0);
errno = 0;
}
TEST(dog, testReadPastEof_returnsZero) {

View file

@ -24,6 +24,7 @@
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath tty", 0);
errno = 0;
}
/**

View file

@ -34,6 +34,7 @@ char testlib_enable_tmp_setup_teardown;
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath wpath cpath fattr", 0);
errno = 0;
}
TEST(readlink, enoent) {

View file

@ -26,6 +26,7 @@ char testlib_enable_tmp_setup_teardown;
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath wpath cpath fattr", 0);
errno = 0;
}
TEST(rename, enoent) {

View file

@ -35,6 +35,7 @@
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath proc", 0);
errno = 0;
}
// It's been reported that Chromebooks return EINVAL here.

View file

@ -32,6 +32,7 @@ bool gotsig;
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath", 0);
errno = 0;
}
void OnSigAlrm(int sig, siginfo_t *si, ucontext_t *ctx) {

View file

@ -35,6 +35,7 @@ volatile bool gotsigint;
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath proc", 0);
errno = 0;
}
void OnSigInt(int sig) {

View file

@ -30,6 +30,7 @@ testonly void OnUsr1(int sig) {
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath proc", 0);
errno = 0;
}
TEST(signal, test) {

View file

@ -30,6 +30,7 @@ volatile int n;
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath proc", 0);
errno = 0;
}
void OnSig(int sig, siginfo_t *si, ucontext_t *ctx) {

View file

@ -38,6 +38,7 @@ char testlib_enable_tmp_setup_teardown;
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath wpath cpath fattr", 0);
errno = 0;
}
TEST(stat_010, testEmptyFile_sizeIsZero) {

View file

@ -32,6 +32,7 @@ struct stat st;
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath wpath cpath fattr", 0);
errno = 0;
}
TEST(symlink, enoent) {

View file

@ -25,6 +25,7 @@ char testlib_enable_tmp_setup_teardown;
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath wpath cpath fattr", 0);
errno = 0;
}
TEST(unlink, efault) {

View file

@ -31,6 +31,7 @@ char testlib_enable_tmp_setup_teardown;
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath wpath cpath fattr", 0);
errno = 0;
}
TEST(utimensat, test) {

View file

@ -33,6 +33,7 @@ char testlib_enable_tmp_setup_teardown;
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath wpath cpath fattr", 0);
errno = 0;
}
TEST(writev, test) {

View file

@ -24,6 +24,7 @@
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath", 0);
errno = 0;
}
TEST(CompareDnsNames, testEmpty) {

View file

@ -47,6 +47,7 @@ void SetUp(void) {
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath", 0);
errno = 0;
}
TEST(malloc, zeroMeansOne) {

View file

@ -33,8 +33,8 @@ STATIC_YOINK("apetest2.com");
char testlib_enable_tmp_setup_teardown_once;
__attribute__((__constructor__)) static void init(void) {
// TODO(jart): What's up with RHEL5 / RHEL7?
// pledge("stdio rpath wpath cpath tty proc exec", 0);
pledge("stdio rpath wpath cpath tty proc exec", 0);
errno = 0;
}
void Extract(const char *from, const char *to, int mode) {

View file

@ -23,6 +23,7 @@
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath", 0);
errno = 0;
}
TEST(arch_prctl, fs) {

View file

@ -44,6 +44,7 @@ _Atomic(int) thechilde;
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath thread", 0);
errno = 0;
}
void SetUp(void) {

View file

@ -31,6 +31,7 @@
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath proc", 0);
errno = 0;
}
TEST(fork, testPipes) {

View file

@ -33,6 +33,7 @@
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath", 0);
errno = 0;
}
static bool AreMemoryIntervalsEqual(const struct MemoryIntervals *mm1,

View file

@ -50,6 +50,7 @@ char testlib_enable_tmp_setup_teardown;
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath wpath cpath proc", 0);
errno = 0;
}
TEST(mmap, zeroSize) {

View file

@ -39,6 +39,7 @@
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath proc inet", 0);
errno = 0;
}
dontdiscard char *FormatPollFd(struct pollfd p[2]) {

View file

@ -25,6 +25,7 @@
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath", 0);
errno = 0;
}
// TEST(select, allZero) {

View file

@ -29,6 +29,7 @@
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath inet", 0);
errno = 0;
}
TEST(setsockopt, SO_RCVTIMEO) {

View file

@ -27,6 +27,7 @@
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath tty", 0);
errno = 0;
}
TEST(socketpair, testAfUnixStream) {

View file

@ -33,6 +33,7 @@
__attribute__((__constructor__)) static void init(void) {
pledge("stdio rpath cpath proc unix", 0);
errno = 0;
}
char testlib_enable_tmp_setup_teardown;