diff --git a/BUILD.gn b/BUILD.gn index a560c5d372bf6814c9d3fd9cb2d5237723199ec0..075a9553388423d8cbc6d5c87bb415df28c8c874 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -34,6 +34,7 @@ LITEOS_MENUCONFIG_H = rebase_path("$root_out_dir/config.h") declare_args() { tee_enable = false liteos_name = "OHOS_Image" + liteos_container_enable = false liteos_skip_make = false liteos_is_mini = false } @@ -239,6 +240,21 @@ config("misc_config") { asmflags = cflags } +config("container_config") { + if (liteos_container_enable) { + cflags = [ + "-DLOSCFG_KERNEL_CONTAINER", + "-DLOSCFG_PID_CONTAINER", + "-DLOSCFG_UTS_CONTAINER", + "-DLOSCFG_MNT_CONTAINER", + "-DLOSCFG_CHROOT", + "-DLOSCFG_IPC_CONTAINER", + "-DLOSCFG_TIME_CONTAINER", + "-DLOSCFG_PROC_PROCESS_DIR", + ] + } +} + config("los_config") { configs = [ ":arch_config", @@ -249,6 +265,7 @@ config("los_config") { ":ssp_config", ":warn_config", ":misc_config", + ":container_config", ] } diff --git a/fs/proc/os_adapt/process_proc.c b/fs/proc/os_adapt/process_proc.c index f32a58cf56f027d08e7b68b739bc03eabf7d0cd7..962cf6c276275dca5efaa213b65ad6ce4dd8d010 100644 --- a/fs/proc/os_adapt/process_proc.c +++ b/fs/proc/os_adapt/process_proc.c @@ -60,6 +60,14 @@ struct ProcessData { unsigned int type; }; +static LosProcessCB *ProcGetProcessCB(struct ProcessData *data) +{ + if (data->process != 0) { + return (LosProcessCB *)data->process; + } + return OsCurrProcessGet(); +} + #define PROC_PID_PRIVILEGE 7 #define PROC_PID_DIR_LEN 100 #ifdef LOSCFG_KERNEL_CONTAINER @@ -95,7 +103,7 @@ static ssize_t ProcessContainerReadLink(struct ProcDirEntry *entry, char *buffer if (data == NULL) { return -EINVAL; } - LosProcessCB *processCB = (LosProcessCB *)data->process; + LosProcessCB *processCB = ProcGetProcessCB(data); SCHEDULER_LOCK(intSave); UINT32 containerID = OsGetContainerID(processCB->container, (ContainerType)data->type); SCHEDULER_UNLOCK(intSave); @@ -139,7 +147,7 @@ static int ProcessMemInfoRead(struct SeqBuf *seqBuf, LosProcessCB *pcb) (void)LosBufPrintf(seqBuf, "VMSpaceMapSize: %u byte\n", vmSpace->mapSize); (void)LosBufPrintf(seqBuf, "VM TLB Asid: %u\n", vmSpace->archMmu.asid); (void)LosBufPrintf(seqBuf, "VMHeapSize: %u byte\n", heap->range.size); - (void)LosBufPrintf(seqBuf, "VMHeapRegionNmae: %s\n", OsGetRegionNameOrFilePath(heap)); + (void)LosBufPrintf(seqBuf, "VMHeapRegionName: %s\n", OsGetRegionNameOrFilePath(heap)); (void)LosBufPrintf(seqBuf, "VMHeapRegionType: 0x%x\n", heap->regionType); (void)LOS_MemFree(m_aucSysMem1, vmSpace); return 0; @@ -192,7 +200,7 @@ static int ProcTimeContainerRead(struct SeqBuf *m, void *v) struct ProcessData *data = (struct ProcessData *)v; SCHEDULER_LOCK(intSave); - LosProcessCB *processCB = (LosProcessCB *)data->process; + LosProcessCB *processCB = ProcGetProcessCB(data); ret = OsGetTimeContainerMonotonic(processCB, &offsets); SCHEDULER_UNLOCK(intSave); if (ret != LOS_OK) { @@ -265,7 +273,7 @@ static int ProcTimeContainerWrite(struct ProcFile *pf, const char *buf, size_t c } buf += strlen(g_monotonic); - ret = ProcSetTimensOffset(buf, (LosProcessCB *)data->process); + ret = ProcSetTimensOffset(buf, ProcGetProcessCB(data)); if (ret < 0) { (VOID)LOS_MemFree(m_aucSysMem1, kbuf); return ret; @@ -288,10 +296,10 @@ static int ProcProcessRead(struct SeqBuf *m, void *v) struct ProcessData *data = (struct ProcessData *)v; switch (data->type) { case PROC_PID_MEM: - return ProcessMemInfoRead(m, (LosProcessCB *)data->process); + return ProcessMemInfoRead(m, ProcGetProcessCB(data)); #ifdef LOSCFG_KERNEL_CPUP case PROC_PID_CPUP: - return ProcessCpupRead(m, (LosProcessCB *)data->process); + return ProcessCpupRead(m, ProcGetProcessCB(data)); #endif default: break; @@ -411,10 +419,18 @@ static struct ProcDirEntry *ProcCreatePorcess(UINT32 pid, struct ProcProcess *po if (data == NULL) { return NULL; } - if (porcess->name != NULL) { - ret = snprintf_s(pidName, PROC_PID_DIR_LEN, PROC_PID_DIR_LEN - 1, "%u/%s", pid, porcess->name); + if (pid != OS_INVALID_VALUE) { + if (porcess->name != NULL) { + ret = snprintf_s(pidName, PROC_PID_DIR_LEN, PROC_PID_DIR_LEN - 1, "%u/%s", pid, porcess->name); + } else { + ret = snprintf_s(pidName, PROC_PID_DIR_LEN, PROC_PID_DIR_LEN - 1, "%u", pid); + } } else { - ret = snprintf_s(pidName, PROC_PID_DIR_LEN, PROC_PID_DIR_LEN - 1, "%u", pid); + if (porcess->name != NULL) { + ret = snprintf_s(pidName, PROC_PID_DIR_LEN, PROC_PID_DIR_LEN - 1, "%s/%s", "self", porcess->name); + } else { + ret = snprintf_s(pidName, PROC_PID_DIR_LEN, PROC_PID_DIR_LEN - 1, "%s", "self"); + } } if (ret < 0) { free(data); @@ -448,9 +464,12 @@ int ProcCreateProcessDir(UINT32 pid, uintptr_t process) } } - SCHEDULER_LOCK(intSave); - ((LosProcessCB *)process)->procDir = pidDir; - SCHEDULER_UNLOCK(intSave); + if (process != 0) { + SCHEDULER_LOCK(intSave); + ((LosProcessCB *)process)->procDir = pidDir; + SCHEDULER_UNLOCK(intSave); + } + return 0; CREATE_ERROR: @@ -482,7 +501,12 @@ void ProcProcessInit(void) pde->procFileOps = &PROCESS_PROC_FOPS; #ifdef LOSCFG_PROC_PROCESS_DIR - int ret = ProcCreateProcessDir(OS_USER_ROOT_PROCESS_ID, (uintptr_t)OsGetUserInitProcess()); + int ret = ProcCreateProcessDir(OS_INVALID_VALUE, 0); + if (ret < 0) { + PRINT_ERR("Create proc process self dir failed!\n"); + } + + ret = ProcCreateProcessDir(OS_USER_ROOT_PROCESS_ID, (uintptr_t)OsGetUserInitProcess()); if (ret < 0) { PRINT_ERR("Create proc process %d dir failed!\n", OS_USER_ROOT_PROCESS_ID); } diff --git a/testsuites/BUILD.gn b/testsuites/BUILD.gn index d6e02339c10352cecea8c53b1c5eee6cdb3635cc..c09cb41cb9ba3546c4507ab83309511366282e75 100644 --- a/testsuites/BUILD.gn +++ b/testsuites/BUILD.gn @@ -37,6 +37,5 @@ group("testsuites") { deps = [] if (liteos_kernel_unittest) { deps += [ "unittest" ] - #deps += [ "//kernel/liteos_a/testsuites/fuzz:fuzztest" ] } } diff --git a/testsuites/unittest/BUILD.gn b/testsuites/unittest/BUILD.gn index 69860d8438a34f6860dae5ce230eda74f4e69f88..56af2ae2983e53db75140f869f23e95cc29bdd51 100644 --- a/testsuites/unittest/BUILD.gn +++ b/testsuites/unittest/BUILD.gn @@ -167,5 +167,10 @@ group("unittest") { deps += [ "container:liteos_a_container_unittest" ] } } + + # fuzz test + if (LOSCFG_USER_FUZZ_TEST == true) { + deps += [ "fuzz:liteos_a_fuzztest" ] + } } } diff --git a/testsuites/unittest/config.gni b/testsuites/unittest/config.gni index 15f063d1e8acfe939a72e03d77e64074b7902631..cf6c584249381e4f3f8e12f84e7f9e8c6bb2b797 100644 --- a/testsuites/unittest/config.gni +++ b/testsuites/unittest/config.gni @@ -29,6 +29,10 @@ import("$root_out_dir/config.gni") TEST_UNITTEST_DIR = rebase_path(".") +declare_args() { + liteos_container_test_enable = false + liteos_fuzz_test_enable = false +} TEST_LEVEL_LOW = 1 TEST_LEVEL_MIDDLE = 3 @@ -127,7 +131,7 @@ LOSCFG_USER_TEST_SECURITY_REUGID = true LOSCFG_USER_TEST_SECURITY_VID = true LOSCFG_USER_TEST_PROCESS_FS = false -if (defined(LOSCFG_PROC_PROCESS_DIR)) { +if (defined(LOSCFG_PROC_PROCESS_DIR) || liteos_container_test_enable == true) { LOSCFG_USER_TEST_PROCESS_FS = true } @@ -138,21 +142,27 @@ LOSCFG_USER_TEST_UTS_CONTAINER = false LOSCFG_USER_TEST_MNT_CONTAINER = false LOSCFG_USER_TEST_IPC_CONTAINER = false LOSCFG_USER_TEST_TIME_CONTAINER = false -if (defined(LOSCFG_KERNEL_CONTAINER)) { +if (defined(LOSCFG_KERNEL_CONTAINER) || liteos_container_test_enable == true) { LOSCFG_USER_TEST_CONTAINER = true - if (defined(LOSCFG_PID_CONTAINER)) { + if (defined(LOSCFG_PID_CONTAINER) || liteos_container_test_enable == true) { LOSCFG_USER_TEST_PID_CONTAINER = true } - if (defined(LOSCFG_UTS_CONTAINER)) { + if (defined(LOSCFG_UTS_CONTAINER) || liteos_container_test_enable == true) { LOSCFG_USER_TEST_UTS_CONTAINER = true } - if (defined(LOSCFG_MNT_CONTAINER)) { + if (defined(LOSCFG_MNT_CONTAINER) || liteos_container_test_enable == true) { LOSCFG_USER_TEST_MNT_CONTAINER = true } - if (defined(LOSCFG_IPC_CONTAINER)) { + if (defined(LOSCFG_IPC_CONTAINER) || liteos_container_test_enable == true) { LOSCFG_USER_TEST_IPC_CONTAINER = true } - if (defined(LOSCFG_TIME_CONTAINER)) { + if (defined(LOSCFG_TIME_CONTAINER) || liteos_container_test_enable == true) { LOSCFG_USER_TEST_TIME_CONTAINER = true } } + +########## fuzz test ########## +LOSCFG_USER_FUZZ_TEST = false +if (liteos_fuzz_test_enable == true) { + LOSCFG_USER_FUZZ_TEST = true +} diff --git a/testsuites/unittest/container/config.gni b/testsuites/unittest/container/config.gni index dcc08186d898e5b4bdd9d99b08755d5e679ddb65..310a35525a559e37a39a0451a4569eedcc5b1960 100644 --- a/testsuites/unittest/container/config.gni +++ b/testsuites/unittest/container/config.gni @@ -36,11 +36,7 @@ common_include_dirs = [ sources_entry = [ "$TEST_UNITTEST_DIR/container/It_container_test.cpp" ] -sources_smoke = [ - "$TEST_UNITTEST_DIR/container/smoke/It_container_001.cpp", - "$TEST_UNITTEST_DIR/container/smoke/It_container_chroot_001.cpp", - "$TEST_UNITTEST_DIR/container/smoke/It_container_chroot_002.cpp", -] +sources_smoke = [ "$TEST_UNITTEST_DIR/container/smoke/It_container_001.cpp" ] sources_full = [] @@ -91,6 +87,8 @@ if (defined(LOSCFG_USER_TEST_UTS_CONTAINER)) { } if (defined(LOSCFG_USER_TEST_MNT_CONTAINER)) { sources_smoke += [ + "$TEST_UNITTEST_DIR/container/smoke/It_container_chroot_001.cpp", + "$TEST_UNITTEST_DIR/container/smoke/It_container_chroot_002.cpp", "$TEST_UNITTEST_DIR/container/smoke/It_mnt_container_001.cpp", "$TEST_UNITTEST_DIR/container/smoke/It_mnt_container_002.cpp", "$TEST_UNITTEST_DIR/container/smoke/It_mnt_container_003.cpp", diff --git a/testsuites/fuzz/BUILD.gn b/testsuites/unittest/fuzz/BUILD.gn similarity index 97% rename from testsuites/fuzz/BUILD.gn rename to testsuites/unittest/fuzz/BUILD.gn index 2d8bccbe86eaaf7bdc22d9756851773feaf3467e..21b6295c014c2f01bb26e601659973894aaea110 100644 --- a/testsuites/fuzz/BUILD.gn +++ b/testsuites/unittest/fuzz/BUILD.gn @@ -28,7 +28,7 @@ import("//build/lite/config/test.gni") -fuzztest("FuzzDemoTest") { +fuzztest("liteos_a_user_fuzz_test") { output_extension = "bin" sources = [ "adjtime_fuzzer.cpp", @@ -83,6 +83,6 @@ fuzztest("FuzzDemoTest") { include_dirs = [] deps = [] } -group("fuzztest") { - deps = [ ":FuzzDemoTest" ] +group("liteos_a_fuzztest") { + deps = [ ":liteos_a_user_fuzz_test" ] } diff --git a/testsuites/fuzz/adjtime_fuzzer.cpp b/testsuites/unittest/fuzz/adjtime_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/adjtime_fuzzer.cpp rename to testsuites/unittest/fuzz/adjtime_fuzzer.cpp diff --git a/testsuites/fuzz/chroot_fuzzer.cpp b/testsuites/unittest/fuzz/chroot_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/chroot_fuzzer.cpp rename to testsuites/unittest/fuzz/chroot_fuzzer.cpp diff --git a/testsuites/fuzz/clone_fuzzer.cpp b/testsuites/unittest/fuzz/clone_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/clone_fuzzer.cpp rename to testsuites/unittest/fuzz/clone_fuzzer.cpp diff --git a/testsuites/fuzz/epoll_create_fuzzer.cpp b/testsuites/unittest/fuzz/epoll_create_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/epoll_create_fuzzer.cpp rename to testsuites/unittest/fuzz/epoll_create_fuzzer.cpp diff --git a/testsuites/fuzz/epoll_ctl_fuzzer.cpp b/testsuites/unittest/fuzz/epoll_ctl_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/epoll_ctl_fuzzer.cpp rename to testsuites/unittest/fuzz/epoll_ctl_fuzzer.cpp diff --git a/testsuites/fuzz/epoll_wait_fuzzer.cpp b/testsuites/unittest/fuzz/epoll_wait_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/epoll_wait_fuzzer.cpp rename to testsuites/unittest/fuzz/epoll_wait_fuzzer.cpp diff --git a/testsuites/fuzz/fesetenv_fuzzer.cpp b/testsuites/unittest/fuzz/fesetenv_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/fesetenv_fuzzer.cpp rename to testsuites/unittest/fuzz/fesetenv_fuzzer.cpp diff --git a/testsuites/fuzz/fuzzertest.h b/testsuites/unittest/fuzz/fuzzertest.h similarity index 100% rename from testsuites/fuzz/fuzzertest.h rename to testsuites/unittest/fuzz/fuzzertest.h diff --git a/testsuites/fuzz/getrlimit_fuzzer.cpp b/testsuites/unittest/fuzz/getrlimit_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/getrlimit_fuzzer.cpp rename to testsuites/unittest/fuzz/getrlimit_fuzzer.cpp diff --git a/testsuites/fuzz/main.cpp b/testsuites/unittest/fuzz/main.cpp similarity index 74% rename from testsuites/fuzz/main.cpp rename to testsuites/unittest/fuzz/main.cpp index 83b7b7586157e6367c2f52c7226f47c86d116860..2f372b55870eb0d10d295ad3c801152a7489b473 100644 --- a/testsuites/fuzz/main.cpp +++ b/testsuites/unittest/fuzz/main.cpp @@ -81,53 +81,11 @@ extern void TestSethostname(void); int main() { DT_Set_Report_Path("/storage/"); - TestPosixSpawnFileActionsAddchdirNp(); - TestPosixSpawnFileActionsAddopen(); - TestPosixSpawnFileActionsAdddup2(); - TestPosixSpawnFileActionsAddfchdirNp(); - TestPosixSpawnFileActionsDestroy(); - TestPosixSpawnFileActionsInit(); - TestPosixSpawnattrDestroy(); - TestPosixSpawnattrGetflags(); - TestPosixSpawnattrGetpgroup(); - TestPosixSpawnattrGetschedparam(); - TestPosixSpawnattrGetschedpolicy(); - TestPosixSpawnattrGetsigdefault(); - TestPosixSpawnattrGetsigmask(); - TestPosixSpawnattrInit(); - TestPosixSpawnattrSetflags(); - TestPosixSpawnattrSetpgroup(); - TestPosixSpawnattrSetschedparam(); - TestPosixSpawnattrSetschedpolicy(); - TestPosixSpawnattrSetsigdefault(); - TestPosixSpawnattrSetsigmask(); - TestPosixSpawn(); - TestPosixSpawnp(); - TestSyslog(); - TestSystem(); - TestMlock(); - TestMlockall(); - TestAdjtime(); - TestFesetenv(); - TestGetrlimit(); TestReadlink(); TestReadlinkat(); - TestTimes(); + TestSethostname(); TestClone(); - TestEpollCreate(); - TestEpollCtl(); - TestEpollWait(); - TestPthreadMutexConsistent(); - TestPthreadMutexGetprioceiling(); - TestPthreadMutexattrSetprotocol(); - TestPthreadMutexattrSetrobust(); - TestPthreadMutexattrSettype(); - TestPthreadSetconcurrency(); - TestSetns(); - TestSemOpen(); TestUnshare(); TestChroot(); - TestSethostname(); - return 0; } diff --git a/testsuites/fuzz/mlock_fuzzer.cpp b/testsuites/unittest/fuzz/mlock_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/mlock_fuzzer.cpp rename to testsuites/unittest/fuzz/mlock_fuzzer.cpp diff --git a/testsuites/fuzz/mlockall_fuzzer.cpp b/testsuites/unittest/fuzz/mlockall_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/mlockall_fuzzer.cpp rename to testsuites/unittest/fuzz/mlockall_fuzzer.cpp diff --git a/testsuites/fuzz/posix_spawn_file_actions_addchdir_np_fuzzer.cpp b/testsuites/unittest/fuzz/posix_spawn_file_actions_addchdir_np_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/posix_spawn_file_actions_addchdir_np_fuzzer.cpp rename to testsuites/unittest/fuzz/posix_spawn_file_actions_addchdir_np_fuzzer.cpp diff --git a/testsuites/fuzz/posix_spawn_file_actions_adddup2_fuzzer.cpp b/testsuites/unittest/fuzz/posix_spawn_file_actions_adddup2_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/posix_spawn_file_actions_adddup2_fuzzer.cpp rename to testsuites/unittest/fuzz/posix_spawn_file_actions_adddup2_fuzzer.cpp diff --git a/testsuites/fuzz/posix_spawn_file_actions_addfchdir_np_fuzzer.cpp b/testsuites/unittest/fuzz/posix_spawn_file_actions_addfchdir_np_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/posix_spawn_file_actions_addfchdir_np_fuzzer.cpp rename to testsuites/unittest/fuzz/posix_spawn_file_actions_addfchdir_np_fuzzer.cpp diff --git a/testsuites/fuzz/posix_spawn_file_actions_addopen_fuzzer.cpp b/testsuites/unittest/fuzz/posix_spawn_file_actions_addopen_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/posix_spawn_file_actions_addopen_fuzzer.cpp rename to testsuites/unittest/fuzz/posix_spawn_file_actions_addopen_fuzzer.cpp diff --git a/testsuites/fuzz/posix_spawn_file_actions_destroy_fuzzer.cpp b/testsuites/unittest/fuzz/posix_spawn_file_actions_destroy_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/posix_spawn_file_actions_destroy_fuzzer.cpp rename to testsuites/unittest/fuzz/posix_spawn_file_actions_destroy_fuzzer.cpp diff --git a/testsuites/fuzz/posix_spawn_file_actions_init_fuzzer.cpp b/testsuites/unittest/fuzz/posix_spawn_file_actions_init_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/posix_spawn_file_actions_init_fuzzer.cpp rename to testsuites/unittest/fuzz/posix_spawn_file_actions_init_fuzzer.cpp diff --git a/testsuites/fuzz/posix_spawn_fuzzer.cpp b/testsuites/unittest/fuzz/posix_spawn_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/posix_spawn_fuzzer.cpp rename to testsuites/unittest/fuzz/posix_spawn_fuzzer.cpp diff --git a/testsuites/fuzz/posix_spawnattr_destroy_fuzzer.cpp b/testsuites/unittest/fuzz/posix_spawnattr_destroy_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/posix_spawnattr_destroy_fuzzer.cpp rename to testsuites/unittest/fuzz/posix_spawnattr_destroy_fuzzer.cpp diff --git a/testsuites/fuzz/posix_spawnattr_getflags_fuzzer.cpp b/testsuites/unittest/fuzz/posix_spawnattr_getflags_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/posix_spawnattr_getflags_fuzzer.cpp rename to testsuites/unittest/fuzz/posix_spawnattr_getflags_fuzzer.cpp diff --git a/testsuites/fuzz/posix_spawnattr_getpgroup_fuzzer.cpp b/testsuites/unittest/fuzz/posix_spawnattr_getpgroup_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/posix_spawnattr_getpgroup_fuzzer.cpp rename to testsuites/unittest/fuzz/posix_spawnattr_getpgroup_fuzzer.cpp diff --git a/testsuites/fuzz/posix_spawnattr_getschedparam_fuzzer.cpp b/testsuites/unittest/fuzz/posix_spawnattr_getschedparam_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/posix_spawnattr_getschedparam_fuzzer.cpp rename to testsuites/unittest/fuzz/posix_spawnattr_getschedparam_fuzzer.cpp diff --git a/testsuites/fuzz/posix_spawnattr_getschedpolicy_fuzzer.cpp b/testsuites/unittest/fuzz/posix_spawnattr_getschedpolicy_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/posix_spawnattr_getschedpolicy_fuzzer.cpp rename to testsuites/unittest/fuzz/posix_spawnattr_getschedpolicy_fuzzer.cpp diff --git a/testsuites/fuzz/posix_spawnattr_getsigdefault_fuzzer.cpp b/testsuites/unittest/fuzz/posix_spawnattr_getsigdefault_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/posix_spawnattr_getsigdefault_fuzzer.cpp rename to testsuites/unittest/fuzz/posix_spawnattr_getsigdefault_fuzzer.cpp diff --git a/testsuites/fuzz/posix_spawnattr_getsigmask_fuzzer.cpp b/testsuites/unittest/fuzz/posix_spawnattr_getsigmask_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/posix_spawnattr_getsigmask_fuzzer.cpp rename to testsuites/unittest/fuzz/posix_spawnattr_getsigmask_fuzzer.cpp diff --git a/testsuites/fuzz/posix_spawnattr_init_fuzzer.cpp b/testsuites/unittest/fuzz/posix_spawnattr_init_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/posix_spawnattr_init_fuzzer.cpp rename to testsuites/unittest/fuzz/posix_spawnattr_init_fuzzer.cpp diff --git a/testsuites/fuzz/posix_spawnattr_setflags_fuzzer.cpp b/testsuites/unittest/fuzz/posix_spawnattr_setflags_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/posix_spawnattr_setflags_fuzzer.cpp rename to testsuites/unittest/fuzz/posix_spawnattr_setflags_fuzzer.cpp diff --git a/testsuites/fuzz/posix_spawnattr_setpgroup_fuzzer.cpp b/testsuites/unittest/fuzz/posix_spawnattr_setpgroup_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/posix_spawnattr_setpgroup_fuzzer.cpp rename to testsuites/unittest/fuzz/posix_spawnattr_setpgroup_fuzzer.cpp diff --git a/testsuites/fuzz/posix_spawnattr_setschedparam_fuzzer.cpp b/testsuites/unittest/fuzz/posix_spawnattr_setschedparam_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/posix_spawnattr_setschedparam_fuzzer.cpp rename to testsuites/unittest/fuzz/posix_spawnattr_setschedparam_fuzzer.cpp diff --git a/testsuites/fuzz/posix_spawnattr_setschedpolicy_fuzzer.cpp b/testsuites/unittest/fuzz/posix_spawnattr_setschedpolicy_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/posix_spawnattr_setschedpolicy_fuzzer.cpp rename to testsuites/unittest/fuzz/posix_spawnattr_setschedpolicy_fuzzer.cpp diff --git a/testsuites/fuzz/posix_spawnattr_setsigdefault_fuzzer.cpp b/testsuites/unittest/fuzz/posix_spawnattr_setsigdefault_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/posix_spawnattr_setsigdefault_fuzzer.cpp rename to testsuites/unittest/fuzz/posix_spawnattr_setsigdefault_fuzzer.cpp diff --git a/testsuites/fuzz/posix_spawnattr_setsigmask_fuzzer.cpp b/testsuites/unittest/fuzz/posix_spawnattr_setsigmask_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/posix_spawnattr_setsigmask_fuzzer.cpp rename to testsuites/unittest/fuzz/posix_spawnattr_setsigmask_fuzzer.cpp diff --git a/testsuites/fuzz/posix_spawnp_fuzzer.cpp b/testsuites/unittest/fuzz/posix_spawnp_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/posix_spawnp_fuzzer.cpp rename to testsuites/unittest/fuzz/posix_spawnp_fuzzer.cpp diff --git a/testsuites/fuzz/pthread_mutex_consistent_fuzzer.cpp b/testsuites/unittest/fuzz/pthread_mutex_consistent_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/pthread_mutex_consistent_fuzzer.cpp rename to testsuites/unittest/fuzz/pthread_mutex_consistent_fuzzer.cpp diff --git a/testsuites/fuzz/pthread_mutex_getprioceiling_fuzzer.cpp b/testsuites/unittest/fuzz/pthread_mutex_getprioceiling_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/pthread_mutex_getprioceiling_fuzzer.cpp rename to testsuites/unittest/fuzz/pthread_mutex_getprioceiling_fuzzer.cpp diff --git a/testsuites/fuzz/pthread_mutexattr_setprotocol_fuzzer.cpp b/testsuites/unittest/fuzz/pthread_mutexattr_setprotocol_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/pthread_mutexattr_setprotocol_fuzzer.cpp rename to testsuites/unittest/fuzz/pthread_mutexattr_setprotocol_fuzzer.cpp diff --git a/testsuites/fuzz/pthread_mutexattr_setrobust_fuzzer.cpp b/testsuites/unittest/fuzz/pthread_mutexattr_setrobust_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/pthread_mutexattr_setrobust_fuzzer.cpp rename to testsuites/unittest/fuzz/pthread_mutexattr_setrobust_fuzzer.cpp diff --git a/testsuites/fuzz/pthread_mutexattr_settype_fuzzer.cpp b/testsuites/unittest/fuzz/pthread_mutexattr_settype_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/pthread_mutexattr_settype_fuzzer.cpp rename to testsuites/unittest/fuzz/pthread_mutexattr_settype_fuzzer.cpp diff --git a/testsuites/fuzz/pthread_setconcurrency_fuzzer.cpp b/testsuites/unittest/fuzz/pthread_setconcurrency_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/pthread_setconcurrency_fuzzer.cpp rename to testsuites/unittest/fuzz/pthread_setconcurrency_fuzzer.cpp diff --git a/testsuites/fuzz/readlink_fuzzer.cpp b/testsuites/unittest/fuzz/readlink_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/readlink_fuzzer.cpp rename to testsuites/unittest/fuzz/readlink_fuzzer.cpp diff --git a/testsuites/fuzz/readlinkat_fuzzer.cpp b/testsuites/unittest/fuzz/readlinkat_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/readlinkat_fuzzer.cpp rename to testsuites/unittest/fuzz/readlinkat_fuzzer.cpp diff --git a/testsuites/fuzz/sem_open_fuzzer.cpp b/testsuites/unittest/fuzz/sem_open_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/sem_open_fuzzer.cpp rename to testsuites/unittest/fuzz/sem_open_fuzzer.cpp diff --git a/testsuites/fuzz/sethostname_fuzzer.cpp b/testsuites/unittest/fuzz/sethostname_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/sethostname_fuzzer.cpp rename to testsuites/unittest/fuzz/sethostname_fuzzer.cpp diff --git a/testsuites/fuzz/setns_fuzzer.cpp b/testsuites/unittest/fuzz/setns_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/setns_fuzzer.cpp rename to testsuites/unittest/fuzz/setns_fuzzer.cpp diff --git a/testsuites/fuzz/syslog_fuzzer.cpp b/testsuites/unittest/fuzz/syslog_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/syslog_fuzzer.cpp rename to testsuites/unittest/fuzz/syslog_fuzzer.cpp diff --git a/testsuites/fuzz/system_fuzzer.cpp b/testsuites/unittest/fuzz/system_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/system_fuzzer.cpp rename to testsuites/unittest/fuzz/system_fuzzer.cpp diff --git a/testsuites/fuzz/times_fuzzer.cpp b/testsuites/unittest/fuzz/times_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/times_fuzzer.cpp rename to testsuites/unittest/fuzz/times_fuzzer.cpp diff --git a/testsuites/fuzz/unshare_fuzzer.cpp b/testsuites/unittest/fuzz/unshare_fuzzer.cpp similarity index 100% rename from testsuites/fuzz/unshare_fuzzer.cpp rename to testsuites/unittest/fuzz/unshare_fuzzer.cpp