test: Fix 898 and 928
1. Catch up with the interface change in ihk_os_destroy_pseudofs() and ihk_os_create_pseudofs() 2. Expect ihk_os_shutdown() to return zero when the OS had been shut down Refs: #898 Refs: #928 Change-Id: Ic430550ebfd5cd21164eefaed155fe769adf8395
This commit is contained in:
@@ -4,9 +4,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ihklib.h>
|
#include <ihklib.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include "util.h"
|
||||||
|
|
||||||
#define MCK_DIR "/home/satoken/ppos"
|
static char prefix[256] = QUOTE(MCK_DIR);
|
||||||
static char prefix[256] = MCK_DIR;
|
|
||||||
|
|
||||||
static char test_name[64] = "CT_001";
|
static char test_name[64] = "CT_001";
|
||||||
|
|
||||||
@@ -39,8 +39,8 @@ int main(int argc, char** argv) {
|
|||||||
char fn[256];
|
char fn[256];
|
||||||
char kargs[256];
|
char kargs[256];
|
||||||
|
|
||||||
int cpus[4] = {6, 7, 8, 9};
|
int cpus[2] = {1, 2};
|
||||||
int num_cpus = 4;
|
int num_cpus = 2;
|
||||||
|
|
||||||
struct ihk_mem_chunk mem_chunks[4];
|
struct ihk_mem_chunk mem_chunks[4];
|
||||||
int num_mem_chunks;
|
int num_mem_chunks;
|
||||||
@@ -53,7 +53,7 @@ int main(int argc, char** argv) {
|
|||||||
status = system(cmd);
|
status = system(cmd);
|
||||||
|
|
||||||
// ihk_os_destroy_pseudofs
|
// ihk_os_destroy_pseudofs
|
||||||
ret_ihklib = ihk_os_destroy_pseudofs(0);
|
ret_ihklib = ihk_os_destroy_pseudofs(0, 0, 0);
|
||||||
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
||||||
nread = fread(buf, 1, sizeof(buf), fp);
|
nread = fread(buf, 1, sizeof(buf), fp);
|
||||||
buf[nread] = 0;
|
buf[nread] = 0;
|
||||||
@@ -81,21 +81,21 @@ int main(int argc, char** argv) {
|
|||||||
ret_ihklib = ihk_os_assign_cpu(0, cpus, num_cpus);
|
ret_ihklib = ihk_os_assign_cpu(0, cpus, num_cpus);
|
||||||
//OKNG(ret_ihklib == 0, "ihk_os_assign_cpu\n");
|
//OKNG(ret_ihklib == 0, "ihk_os_assign_cpu\n");
|
||||||
|
|
||||||
// reserve mem 128m@0,128m@1
|
// reserve mem 128m@0,128m@0
|
||||||
num_mem_chunks = 2;
|
num_mem_chunks = 2;
|
||||||
mem_chunks[0].size = 128*1024*1024ULL;
|
mem_chunks[0].size = 128*1024*1024ULL;
|
||||||
mem_chunks[0].numa_node_number = 0;
|
mem_chunks[0].numa_node_number = 0;
|
||||||
mem_chunks[1].size = 128*1024*1024ULL;
|
mem_chunks[1].size = 128*1024*1024ULL;
|
||||||
mem_chunks[1].numa_node_number = 1;
|
mem_chunks[1].numa_node_number = 0;
|
||||||
ret_ihklib = ihk_reserve_mem(0, mem_chunks, num_mem_chunks);
|
ret_ihklib = ihk_reserve_mem(0, mem_chunks, num_mem_chunks);
|
||||||
//OKNG(ret_ihklib == 0, "ihk_reserve_mem (2)\n");
|
//OKNG(ret_ihklib == 0, "ihk_reserve_mem (2)\n");
|
||||||
|
|
||||||
// assign mem 128m@0,128m@1
|
// assign mem 128m@0,128m@0
|
||||||
num_mem_chunks = 2;
|
num_mem_chunks = 2;
|
||||||
mem_chunks[0].size = 128*1024*1024ULL;
|
mem_chunks[0].size = 128*1024*1024ULL;
|
||||||
mem_chunks[0].numa_node_number = 0;
|
mem_chunks[0].numa_node_number = 0;
|
||||||
mem_chunks[1].size = 128*1024*1024ULL;
|
mem_chunks[1].size = 128*1024*1024ULL;
|
||||||
mem_chunks[1].numa_node_number = 1;
|
mem_chunks[1].numa_node_number = 0;
|
||||||
ret_ihklib = ihk_os_assign_mem(0, mem_chunks, num_mem_chunks);
|
ret_ihklib = ihk_os_assign_mem(0, mem_chunks, num_mem_chunks);
|
||||||
//OKNG(ret_ihklib == 0, "ihk_os_assign_mem (2)\n");
|
//OKNG(ret_ihklib == 0, "ihk_os_assign_mem (2)\n");
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ goto shutdown;
|
|||||||
usleep(100*1000);
|
usleep(100*1000);
|
||||||
|
|
||||||
// create pseudofs
|
// create pseudofs
|
||||||
ret_ihklib = ihk_os_create_pseudofs(0);
|
ret_ihklib = ihk_os_create_pseudofs(0, 0, 0);
|
||||||
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
||||||
nread = fread(buf, 1, sizeof(buf), fp);
|
nread = fread(buf, 1, sizeof(buf), fp);
|
||||||
buf[nread] = 0;
|
buf[nread] = 0;
|
||||||
@@ -157,7 +157,7 @@ destroy:
|
|||||||
status = system(cmd);
|
status = system(cmd);
|
||||||
|
|
||||||
// destroy pseudofs
|
// destroy pseudofs
|
||||||
ret_ihklib = ihk_os_destroy_pseudofs(0);
|
ret_ihklib = ihk_os_destroy_pseudofs(0, 0, 0);
|
||||||
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
||||||
nread = fread(buf, 1, sizeof(buf), fp);
|
nread = fread(buf, 1, sizeof(buf), fp);
|
||||||
buf[nread] = 0;
|
buf[nread] = 0;
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ihklib.h>
|
#include <ihklib.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include "util.h"
|
||||||
|
|
||||||
#define MCK_DIR "/home/satoken/ppos"
|
static char prefix[256] = QUOTE(MCK_DIR);
|
||||||
static char prefix[256] = MCK_DIR;
|
|
||||||
|
|
||||||
static char test_name[64] = "CT_002";
|
static char test_name[64] = "CT_002";
|
||||||
|
|
||||||
@@ -39,8 +39,8 @@ int main(int argc, char** argv) {
|
|||||||
char fn[256];
|
char fn[256];
|
||||||
char kargs[256];
|
char kargs[256];
|
||||||
|
|
||||||
int cpus[4] = {6, 7, 8, 9};
|
int cpus[2] = {1, 2};
|
||||||
int num_cpus = 4;
|
int num_cpus = 2;
|
||||||
|
|
||||||
struct ihk_mem_chunk mem_chunks[4];
|
struct ihk_mem_chunk mem_chunks[4];
|
||||||
int num_mem_chunks;
|
int num_mem_chunks;
|
||||||
@@ -53,7 +53,7 @@ int main(int argc, char** argv) {
|
|||||||
status = system(cmd);
|
status = system(cmd);
|
||||||
|
|
||||||
// ihk_os_destroy_pseudofs
|
// ihk_os_destroy_pseudofs
|
||||||
ret_ihklib = ihk_os_destroy_pseudofs(0);
|
ret_ihklib = ihk_os_destroy_pseudofs(0, 0, 0);
|
||||||
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
||||||
nread = fread(buf, 1, sizeof(buf), fp);
|
nread = fread(buf, 1, sizeof(buf), fp);
|
||||||
buf[nread] = 0;
|
buf[nread] = 0;
|
||||||
@@ -81,21 +81,21 @@ int main(int argc, char** argv) {
|
|||||||
ret_ihklib = ihk_os_assign_cpu(0, cpus, num_cpus);
|
ret_ihklib = ihk_os_assign_cpu(0, cpus, num_cpus);
|
||||||
//OKNG(ret_ihklib == 0, "ihk_os_assign_cpu\n");
|
//OKNG(ret_ihklib == 0, "ihk_os_assign_cpu\n");
|
||||||
|
|
||||||
// reserve mem 128m@0,128m@1
|
// reserve mem 128m@0,128m@0
|
||||||
num_mem_chunks = 2;
|
num_mem_chunks = 2;
|
||||||
mem_chunks[0].size = 128*1024*1024ULL;
|
mem_chunks[0].size = 128*1024*1024ULL;
|
||||||
mem_chunks[0].numa_node_number = 0;
|
mem_chunks[0].numa_node_number = 0;
|
||||||
mem_chunks[1].size = 128*1024*1024ULL;
|
mem_chunks[1].size = 128*1024*1024ULL;
|
||||||
mem_chunks[1].numa_node_number = 1;
|
mem_chunks[1].numa_node_number = 0;
|
||||||
ret_ihklib = ihk_reserve_mem(0, mem_chunks, num_mem_chunks);
|
ret_ihklib = ihk_reserve_mem(0, mem_chunks, num_mem_chunks);
|
||||||
//OKNG(ret_ihklib == 0, "ihk_reserve_mem (2)\n");
|
//OKNG(ret_ihklib == 0, "ihk_reserve_mem (2)\n");
|
||||||
|
|
||||||
// assign mem 128m@0,128m@1
|
// assign mem 128m@0,128m@0
|
||||||
num_mem_chunks = 2;
|
num_mem_chunks = 2;
|
||||||
mem_chunks[0].size = 128*1024*1024ULL;
|
mem_chunks[0].size = 128*1024*1024ULL;
|
||||||
mem_chunks[0].numa_node_number = 0;
|
mem_chunks[0].numa_node_number = 0;
|
||||||
mem_chunks[1].size = 128*1024*1024ULL;
|
mem_chunks[1].size = 128*1024*1024ULL;
|
||||||
mem_chunks[1].numa_node_number = 1;
|
mem_chunks[1].numa_node_number = 0;
|
||||||
ret_ihklib = ihk_os_assign_mem(0, mem_chunks, num_mem_chunks);
|
ret_ihklib = ihk_os_assign_mem(0, mem_chunks, num_mem_chunks);
|
||||||
//OKNG(ret_ihklib == 0, "ihk_os_assign_mem (2)\n");
|
//OKNG(ret_ihklib == 0, "ihk_os_assign_mem (2)\n");
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ goto destroy;
|
|||||||
usleep(100*1000);
|
usleep(100*1000);
|
||||||
|
|
||||||
// create pseudofs
|
// create pseudofs
|
||||||
ret_ihklib = ihk_os_create_pseudofs(0);
|
ret_ihklib = ihk_os_create_pseudofs(0, 0, 0);
|
||||||
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
||||||
nread = fread(buf, 1, sizeof(buf), fp);
|
nread = fread(buf, 1, sizeof(buf), fp);
|
||||||
buf[nread] = 0;
|
buf[nread] = 0;
|
||||||
@@ -157,7 +157,7 @@ destroy:
|
|||||||
status = system(cmd);
|
status = system(cmd);
|
||||||
|
|
||||||
// destroy pseudofs
|
// destroy pseudofs
|
||||||
ret_ihklib = ihk_os_destroy_pseudofs(0);
|
ret_ihklib = ihk_os_destroy_pseudofs(0, 0, 0);
|
||||||
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
||||||
nread = fread(buf, 1, sizeof(buf), fp);
|
nread = fread(buf, 1, sizeof(buf), fp);
|
||||||
buf[nread] = 0;
|
buf[nread] = 0;
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ihklib.h>
|
#include <ihklib.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include "util.h"
|
||||||
|
|
||||||
#define MCK_DIR "/home/satoken/ppos"
|
static char prefix[256] = QUOTE(MCK_DIR);
|
||||||
static char prefix[256] = MCK_DIR;
|
|
||||||
|
|
||||||
static char test_name[64] = "CT_003";
|
static char test_name[64] = "CT_003";
|
||||||
|
|
||||||
@@ -39,8 +39,8 @@ int main(int argc, char** argv) {
|
|||||||
char fn[256];
|
char fn[256];
|
||||||
char kargs[256];
|
char kargs[256];
|
||||||
|
|
||||||
int cpus[4] = {6, 7, 8, 9};
|
int cpus[2] = {1, 2};
|
||||||
int num_cpus = 4;
|
int num_cpus = 2;
|
||||||
|
|
||||||
struct ihk_mem_chunk mem_chunks[4];
|
struct ihk_mem_chunk mem_chunks[4];
|
||||||
int num_mem_chunks;
|
int num_mem_chunks;
|
||||||
@@ -53,7 +53,7 @@ int main(int argc, char** argv) {
|
|||||||
status = system(cmd);
|
status = system(cmd);
|
||||||
|
|
||||||
// ihk_os_destroy_pseudofs
|
// ihk_os_destroy_pseudofs
|
||||||
ret_ihklib = ihk_os_destroy_pseudofs(0);
|
ret_ihklib = ihk_os_destroy_pseudofs(0, 0, 0);
|
||||||
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
||||||
nread = fread(buf, 1, sizeof(buf), fp);
|
nread = fread(buf, 1, sizeof(buf), fp);
|
||||||
buf[nread] = 0;
|
buf[nread] = 0;
|
||||||
@@ -81,21 +81,21 @@ int main(int argc, char** argv) {
|
|||||||
ret_ihklib = ihk_os_assign_cpu(0, cpus, num_cpus);
|
ret_ihklib = ihk_os_assign_cpu(0, cpus, num_cpus);
|
||||||
//OKNG(ret_ihklib == 0, "ihk_os_assign_cpu\n");
|
//OKNG(ret_ihklib == 0, "ihk_os_assign_cpu\n");
|
||||||
|
|
||||||
// reserve mem 128m@0,128m@1
|
// reserve mem 128m@0,128m@0
|
||||||
num_mem_chunks = 2;
|
num_mem_chunks = 2;
|
||||||
mem_chunks[0].size = 128*1024*1024ULL;
|
mem_chunks[0].size = 128*1024*1024ULL;
|
||||||
mem_chunks[0].numa_node_number = 0;
|
mem_chunks[0].numa_node_number = 0;
|
||||||
mem_chunks[1].size = 128*1024*1024ULL;
|
mem_chunks[1].size = 128*1024*1024ULL;
|
||||||
mem_chunks[1].numa_node_number = 1;
|
mem_chunks[1].numa_node_number = 0;
|
||||||
ret_ihklib = ihk_reserve_mem(0, mem_chunks, num_mem_chunks);
|
ret_ihklib = ihk_reserve_mem(0, mem_chunks, num_mem_chunks);
|
||||||
//OKNG(ret_ihklib == 0, "ihk_reserve_mem (2)\n");
|
//OKNG(ret_ihklib == 0, "ihk_reserve_mem (2)\n");
|
||||||
|
|
||||||
// assign mem 128m@0,128m@1
|
// assign mem 128m@0,128m@0
|
||||||
num_mem_chunks = 2;
|
num_mem_chunks = 2;
|
||||||
mem_chunks[0].size = 128*1024*1024ULL;
|
mem_chunks[0].size = 128*1024*1024ULL;
|
||||||
mem_chunks[0].numa_node_number = 0;
|
mem_chunks[0].numa_node_number = 0;
|
||||||
mem_chunks[1].size = 128*1024*1024ULL;
|
mem_chunks[1].size = 128*1024*1024ULL;
|
||||||
mem_chunks[1].numa_node_number = 1;
|
mem_chunks[1].numa_node_number = 0;
|
||||||
ret_ihklib = ihk_os_assign_mem(0, mem_chunks, num_mem_chunks);
|
ret_ihklib = ihk_os_assign_mem(0, mem_chunks, num_mem_chunks);
|
||||||
//OKNG(ret_ihklib == 0, "ihk_os_assign_mem (2)\n");
|
//OKNG(ret_ihklib == 0, "ihk_os_assign_mem (2)\n");
|
||||||
|
|
||||||
@@ -122,7 +122,7 @@ int main(int argc, char** argv) {
|
|||||||
usleep(100*1000);
|
usleep(100*1000);
|
||||||
|
|
||||||
// create pseudofs
|
// create pseudofs
|
||||||
ret_ihklib = ihk_os_create_pseudofs(0);
|
ret_ihklib = ihk_os_create_pseudofs(0, 0, 0);
|
||||||
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
||||||
nread = fread(buf, 1, sizeof(buf), fp);
|
nread = fread(buf, 1, sizeof(buf), fp);
|
||||||
buf[nread] = 0;
|
buf[nread] = 0;
|
||||||
@@ -156,7 +156,7 @@ destroy:
|
|||||||
status = system(cmd);
|
status = system(cmd);
|
||||||
|
|
||||||
// destroy pseudofs
|
// destroy pseudofs
|
||||||
ret_ihklib = ihk_os_destroy_pseudofs(0);
|
ret_ihklib = ihk_os_destroy_pseudofs(0, 0, 0);
|
||||||
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
||||||
nread = fread(buf, 1, sizeof(buf), fp);
|
nread = fread(buf, 1, sizeof(buf), fp);
|
||||||
buf[nread] = 0;
|
buf[nread] = 0;
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ihklib.h>
|
#include <ihklib.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include "util.h"
|
||||||
|
|
||||||
#define MCK_DIR "/home/satoken/ppos"
|
static char prefix[256] = QUOTE(MCK_DIR);
|
||||||
static char prefix[256] = MCK_DIR;
|
|
||||||
|
|
||||||
static char test_name[64] = "CT_004";
|
static char test_name[64] = "CT_004";
|
||||||
|
|
||||||
@@ -39,8 +39,8 @@ int main(int argc, char** argv) {
|
|||||||
char fn[256];
|
char fn[256];
|
||||||
char kargs[256];
|
char kargs[256];
|
||||||
|
|
||||||
int cpus[4] = {6, 7, 8, 9};
|
int cpus[2] = {1, 2};
|
||||||
int num_cpus = 4;
|
int num_cpus = 2;
|
||||||
|
|
||||||
struct ihk_mem_chunk mem_chunks[4];
|
struct ihk_mem_chunk mem_chunks[4];
|
||||||
int num_mem_chunks;
|
int num_mem_chunks;
|
||||||
@@ -53,7 +53,7 @@ int main(int argc, char** argv) {
|
|||||||
status = system(cmd);
|
status = system(cmd);
|
||||||
|
|
||||||
// ihk_os_destroy_pseudofs
|
// ihk_os_destroy_pseudofs
|
||||||
ret_ihklib = ihk_os_destroy_pseudofs(0);
|
ret_ihklib = ihk_os_destroy_pseudofs(0, 0, 0);
|
||||||
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
||||||
nread = fread(buf, 1, sizeof(buf), fp);
|
nread = fread(buf, 1, sizeof(buf), fp);
|
||||||
buf[nread] = 0;
|
buf[nread] = 0;
|
||||||
@@ -81,21 +81,21 @@ int main(int argc, char** argv) {
|
|||||||
ret_ihklib = ihk_os_assign_cpu(0, cpus, num_cpus);
|
ret_ihklib = ihk_os_assign_cpu(0, cpus, num_cpus);
|
||||||
//OKNG(ret_ihklib == 0, "ihk_os_assign_cpu\n");
|
//OKNG(ret_ihklib == 0, "ihk_os_assign_cpu\n");
|
||||||
|
|
||||||
// reserve mem 128m@0,128m@1
|
// reserve mem 128m@0,128m@0
|
||||||
num_mem_chunks = 2;
|
num_mem_chunks = 2;
|
||||||
mem_chunks[0].size = 128*1024*1024ULL;
|
mem_chunks[0].size = 128*1024*1024ULL;
|
||||||
mem_chunks[0].numa_node_number = 0;
|
mem_chunks[0].numa_node_number = 0;
|
||||||
mem_chunks[1].size = 128*1024*1024ULL;
|
mem_chunks[1].size = 128*1024*1024ULL;
|
||||||
mem_chunks[1].numa_node_number = 1;
|
mem_chunks[1].numa_node_number = 0;
|
||||||
ret_ihklib = ihk_reserve_mem(0, mem_chunks, num_mem_chunks);
|
ret_ihklib = ihk_reserve_mem(0, mem_chunks, num_mem_chunks);
|
||||||
//OKNG(ret_ihklib == 0, "ihk_reserve_mem (2)\n");
|
//OKNG(ret_ihklib == 0, "ihk_reserve_mem (2)\n");
|
||||||
|
|
||||||
// assign mem 128m@0,128m@1
|
// assign mem 128m@0,128m@0
|
||||||
num_mem_chunks = 2;
|
num_mem_chunks = 2;
|
||||||
mem_chunks[0].size = 128*1024*1024ULL;
|
mem_chunks[0].size = 128*1024*1024ULL;
|
||||||
mem_chunks[0].numa_node_number = 0;
|
mem_chunks[0].numa_node_number = 0;
|
||||||
mem_chunks[1].size = 128*1024*1024ULL;
|
mem_chunks[1].size = 128*1024*1024ULL;
|
||||||
mem_chunks[1].numa_node_number = 1;
|
mem_chunks[1].numa_node_number = 0;
|
||||||
ret_ihklib = ihk_os_assign_mem(0, mem_chunks, num_mem_chunks);
|
ret_ihklib = ihk_os_assign_mem(0, mem_chunks, num_mem_chunks);
|
||||||
//OKNG(ret_ihklib == 0, "ihk_os_assign_mem (2)\n");
|
//OKNG(ret_ihklib == 0, "ihk_os_assign_mem (2)\n");
|
||||||
|
|
||||||
@@ -122,7 +122,7 @@ int main(int argc, char** argv) {
|
|||||||
usleep(100*1000);
|
usleep(100*1000);
|
||||||
|
|
||||||
// create pseudofs
|
// create pseudofs
|
||||||
ret_ihklib = ihk_os_create_pseudofs(0);
|
ret_ihklib = ihk_os_create_pseudofs(0, 0, 0);
|
||||||
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
||||||
nread = fread(buf, 1, sizeof(buf), fp);
|
nread = fread(buf, 1, sizeof(buf), fp);
|
||||||
buf[nread] = 0;
|
buf[nread] = 0;
|
||||||
@@ -157,7 +157,7 @@ destroy:
|
|||||||
status = system(cmd);
|
status = system(cmd);
|
||||||
|
|
||||||
// destroy pseudofs
|
// destroy pseudofs
|
||||||
ret_ihklib = ihk_os_destroy_pseudofs(0);
|
ret_ihklib = ihk_os_destroy_pseudofs(0, 0, 0);
|
||||||
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
||||||
nread = fread(buf, 1, sizeof(buf), fp);
|
nread = fread(buf, 1, sizeof(buf), fp);
|
||||||
buf[nread] = 0;
|
buf[nread] = 0;
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ihklib.h>
|
#include <ihklib.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include "util.h"
|
||||||
|
|
||||||
#define MCK_DIR "/home/satoken/ppos"
|
static char prefix[256] = QUOTE(MCK_DIR);
|
||||||
static char prefix[256] = MCK_DIR;
|
|
||||||
|
|
||||||
static char test_name[64] = "CT_005";
|
static char test_name[64] = "CT_005";
|
||||||
|
|
||||||
@@ -81,14 +81,14 @@ int main(int argc, char** argv) {
|
|||||||
ret_ihklib = ihk_os_assign_cpu(0, cpus, num_cpus);
|
ret_ihklib = ihk_os_assign_cpu(0, cpus, num_cpus);
|
||||||
//OKNG(ret_ihklib == 0, "ihk_os_assign_cpu\n");
|
//OKNG(ret_ihklib == 0, "ihk_os_assign_cpu\n");
|
||||||
|
|
||||||
// reserve mem 128m@0,128m@1
|
// reserve mem 128m@0,128m@0
|
||||||
num_mem_chunks = 1;
|
num_mem_chunks = 1;
|
||||||
mem_chunks[0].size = 128*1024*1024ULL;
|
mem_chunks[0].size = 128*1024*1024ULL;
|
||||||
mem_chunks[0].numa_node_number = 0;
|
mem_chunks[0].numa_node_number = 0;
|
||||||
ret_ihklib = ihk_reserve_mem(0, mem_chunks, num_mem_chunks);
|
ret_ihklib = ihk_reserve_mem(0, mem_chunks, num_mem_chunks);
|
||||||
//OKNG(ret_ihklib == 0, "ihk_reserve_mem (2)\n");
|
//OKNG(ret_ihklib == 0, "ihk_reserve_mem (2)\n");
|
||||||
|
|
||||||
// assign mem 128m@0,128m@1
|
// assign mem 128m@0,128m@0
|
||||||
num_mem_chunks = 1;
|
num_mem_chunks = 1;
|
||||||
mem_chunks[0].size = 128*1024*1024ULL;
|
mem_chunks[0].size = 128*1024*1024ULL;
|
||||||
mem_chunks[0].numa_node_number = 0;
|
mem_chunks[0].numa_node_number = 0;
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ihklib.h>
|
#include <ihklib.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include "util.h"
|
||||||
|
|
||||||
#define MCK_DIR "/home/satoken/ppos"
|
static char prefix[256] = QUOTE(MCK_DIR);
|
||||||
static char prefix[256] = MCK_DIR;
|
|
||||||
|
|
||||||
static char test_name[64] = "CT_006";
|
static char test_name[64] = "CT_006";
|
||||||
|
|
||||||
@@ -39,8 +39,8 @@ int main(int argc, char** argv) {
|
|||||||
char fn[256];
|
char fn[256];
|
||||||
char kargs[256];
|
char kargs[256];
|
||||||
|
|
||||||
int cpus[4] = {6, 7, 8, 9};
|
int cpus[2] = {1, 2};
|
||||||
int num_cpus = 4;
|
int num_cpus = 2;
|
||||||
|
|
||||||
struct ihk_mem_chunk mem_chunks[4];
|
struct ihk_mem_chunk mem_chunks[4];
|
||||||
int num_mem_chunks;
|
int num_mem_chunks;
|
||||||
@@ -53,7 +53,7 @@ int main(int argc, char** argv) {
|
|||||||
status = system(cmd);
|
status = system(cmd);
|
||||||
|
|
||||||
// ihk_os_destroy_pseudofs
|
// ihk_os_destroy_pseudofs
|
||||||
ret_ihklib = ihk_os_destroy_pseudofs(0);
|
ret_ihklib = ihk_os_destroy_pseudofs(0, 0, 0);
|
||||||
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
||||||
nread = fread(buf, 1, sizeof(buf), fp);
|
nread = fread(buf, 1, sizeof(buf), fp);
|
||||||
buf[nread] = 0;
|
buf[nread] = 0;
|
||||||
@@ -81,21 +81,21 @@ int main(int argc, char** argv) {
|
|||||||
ret_ihklib = ihk_os_assign_cpu(0, cpus, num_cpus);
|
ret_ihklib = ihk_os_assign_cpu(0, cpus, num_cpus);
|
||||||
//OKNG(ret_ihklib == 0, "ihk_os_assign_cpu\n");
|
//OKNG(ret_ihklib == 0, "ihk_os_assign_cpu\n");
|
||||||
|
|
||||||
// reserve mem 128m@0,128m@1
|
// reserve mem 128m@0,128m@0
|
||||||
num_mem_chunks = 2;
|
num_mem_chunks = 2;
|
||||||
mem_chunks[0].size = 128*1024*1024ULL;
|
mem_chunks[0].size = 128*1024*1024ULL;
|
||||||
mem_chunks[0].numa_node_number = 0;
|
mem_chunks[0].numa_node_number = 0;
|
||||||
mem_chunks[1].size = 128*1024*1024ULL;
|
mem_chunks[1].size = 128*1024*1024ULL;
|
||||||
mem_chunks[1].numa_node_number = 1;
|
mem_chunks[1].numa_node_number = 0;
|
||||||
ret_ihklib = ihk_reserve_mem(0, mem_chunks, num_mem_chunks);
|
ret_ihklib = ihk_reserve_mem(0, mem_chunks, num_mem_chunks);
|
||||||
//OKNG(ret_ihklib == 0, "ihk_reserve_mem (2)\n");
|
//OKNG(ret_ihklib == 0, "ihk_reserve_mem (2)\n");
|
||||||
|
|
||||||
// assign mem 128m@0,128m@1
|
// assign mem 128m@0,128m@0
|
||||||
num_mem_chunks = 2;
|
num_mem_chunks = 2;
|
||||||
mem_chunks[0].size = 128*1024*1024ULL;
|
mem_chunks[0].size = 128*1024*1024ULL;
|
||||||
mem_chunks[0].numa_node_number = 0;
|
mem_chunks[0].numa_node_number = 0;
|
||||||
mem_chunks[1].size = 128*1024*1024ULL;
|
mem_chunks[1].size = 128*1024*1024ULL;
|
||||||
mem_chunks[1].numa_node_number = 1;
|
mem_chunks[1].numa_node_number = 0;
|
||||||
ret_ihklib = ihk_os_assign_mem(0, mem_chunks, num_mem_chunks);
|
ret_ihklib = ihk_os_assign_mem(0, mem_chunks, num_mem_chunks);
|
||||||
//OKNG(ret_ihklib == 0, "ihk_os_assign_mem (2)\n");
|
//OKNG(ret_ihklib == 0, "ihk_os_assign_mem (2)\n");
|
||||||
|
|
||||||
@@ -122,7 +122,7 @@ int main(int argc, char** argv) {
|
|||||||
usleep(100*1000);
|
usleep(100*1000);
|
||||||
|
|
||||||
// create pseudofs
|
// create pseudofs
|
||||||
ret_ihklib = ihk_os_create_pseudofs(0);
|
ret_ihklib = ihk_os_create_pseudofs(0, 0, 0);
|
||||||
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
||||||
nread = fread(buf, 1, sizeof(buf), fp);
|
nread = fread(buf, 1, sizeof(buf), fp);
|
||||||
buf[nread] = 0;
|
buf[nread] = 0;
|
||||||
@@ -166,7 +166,7 @@ destroy:
|
|||||||
status = system(cmd);
|
status = system(cmd);
|
||||||
|
|
||||||
// destroy pseudofs
|
// destroy pseudofs
|
||||||
ret_ihklib = ihk_os_destroy_pseudofs(0);
|
ret_ihklib = ihk_os_destroy_pseudofs(0, 0, 0);
|
||||||
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
||||||
nread = fread(buf, 1, sizeof(buf), fp);
|
nread = fread(buf, 1, sizeof(buf), fp);
|
||||||
buf[nread] = 0;
|
buf[nread] = 0;
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ihklib.h>
|
#include <ihklib.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include "util.h"
|
||||||
|
|
||||||
#define MCK_DIR "/home/satoken/ppos"
|
static char prefix[256] = QUOTE(MCK_DIR);
|
||||||
static char prefix[256] = MCK_DIR;
|
|
||||||
|
|
||||||
static char test_name[64] = "CT_007";
|
static char test_name[64] = "CT_007";
|
||||||
|
|
||||||
@@ -39,8 +39,8 @@ int main(int argc, char** argv) {
|
|||||||
char fn[256];
|
char fn[256];
|
||||||
char kargs[256];
|
char kargs[256];
|
||||||
|
|
||||||
int cpus[4] = {6, 7, 8, 9};
|
int cpus[2] = {1, 2};
|
||||||
int num_cpus = 4;
|
int num_cpus = 2;
|
||||||
|
|
||||||
struct ihk_mem_chunk mem_chunks[4];
|
struct ihk_mem_chunk mem_chunks[4];
|
||||||
int num_mem_chunks;
|
int num_mem_chunks;
|
||||||
@@ -53,7 +53,7 @@ int main(int argc, char** argv) {
|
|||||||
status = system(cmd);
|
status = system(cmd);
|
||||||
|
|
||||||
// ihk_os_destroy_pseudofs
|
// ihk_os_destroy_pseudofs
|
||||||
ret_ihklib = ihk_os_destroy_pseudofs(0);
|
ret_ihklib = ihk_os_destroy_pseudofs(0, 0, 0);
|
||||||
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
||||||
nread = fread(buf, 1, sizeof(buf), fp);
|
nread = fread(buf, 1, sizeof(buf), fp);
|
||||||
buf[nread] = 0;
|
buf[nread] = 0;
|
||||||
@@ -81,21 +81,21 @@ int main(int argc, char** argv) {
|
|||||||
ret_ihklib = ihk_os_assign_cpu(0, cpus, num_cpus);
|
ret_ihklib = ihk_os_assign_cpu(0, cpus, num_cpus);
|
||||||
//OKNG(ret_ihklib == 0, "ihk_os_assign_cpu\n");
|
//OKNG(ret_ihklib == 0, "ihk_os_assign_cpu\n");
|
||||||
|
|
||||||
// reserve mem 128m@0,128m@1
|
// reserve mem 128m@0,128m@0
|
||||||
num_mem_chunks = 2;
|
num_mem_chunks = 2;
|
||||||
mem_chunks[0].size = 128*1024*1024ULL;
|
mem_chunks[0].size = 128*1024*1024ULL;
|
||||||
mem_chunks[0].numa_node_number = 0;
|
mem_chunks[0].numa_node_number = 0;
|
||||||
mem_chunks[1].size = 128*1024*1024ULL;
|
mem_chunks[1].size = 128*1024*1024ULL;
|
||||||
mem_chunks[1].numa_node_number = 1;
|
mem_chunks[1].numa_node_number = 0;
|
||||||
ret_ihklib = ihk_reserve_mem(0, mem_chunks, num_mem_chunks);
|
ret_ihklib = ihk_reserve_mem(0, mem_chunks, num_mem_chunks);
|
||||||
//OKNG(ret_ihklib == 0, "ihk_reserve_mem (2)\n");
|
//OKNG(ret_ihklib == 0, "ihk_reserve_mem (2)\n");
|
||||||
|
|
||||||
// assign mem 128m@0,128m@1
|
// assign mem 128m@0,128m@0
|
||||||
num_mem_chunks = 2;
|
num_mem_chunks = 2;
|
||||||
mem_chunks[0].size = 128*1024*1024ULL;
|
mem_chunks[0].size = 128*1024*1024ULL;
|
||||||
mem_chunks[0].numa_node_number = 0;
|
mem_chunks[0].numa_node_number = 0;
|
||||||
mem_chunks[1].size = 128*1024*1024ULL;
|
mem_chunks[1].size = 128*1024*1024ULL;
|
||||||
mem_chunks[1].numa_node_number = 1;
|
mem_chunks[1].numa_node_number = 0;
|
||||||
ret_ihklib = ihk_os_assign_mem(0, mem_chunks, num_mem_chunks);
|
ret_ihklib = ihk_os_assign_mem(0, mem_chunks, num_mem_chunks);
|
||||||
//OKNG(ret_ihklib == 0, "ihk_os_assign_mem (2)\n");
|
//OKNG(ret_ihklib == 0, "ihk_os_assign_mem (2)\n");
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ goto shutdown;
|
|||||||
usleep(100*1000);
|
usleep(100*1000);
|
||||||
|
|
||||||
// create pseudofs
|
// create pseudofs
|
||||||
ret_ihklib = ihk_os_create_pseudofs(0);
|
ret_ihklib = ihk_os_create_pseudofs(0, 0, 0);
|
||||||
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
||||||
nread = fread(buf, 1, sizeof(buf), fp);
|
nread = fread(buf, 1, sizeof(buf), fp);
|
||||||
buf[nread] = 0;
|
buf[nread] = 0;
|
||||||
@@ -157,7 +157,7 @@ destroy:
|
|||||||
status = system(cmd);
|
status = system(cmd);
|
||||||
|
|
||||||
// destroy pseudofs
|
// destroy pseudofs
|
||||||
ret_ihklib = ihk_os_destroy_pseudofs(0);
|
ret_ihklib = ihk_os_destroy_pseudofs(0, 0, 0);
|
||||||
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
||||||
nread = fread(buf, 1, sizeof(buf), fp);
|
nread = fread(buf, 1, sizeof(buf), fp);
|
||||||
buf[nread] = 0;
|
buf[nread] = 0;
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ihklib.h>
|
#include <ihklib.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include "util.h"
|
||||||
|
|
||||||
#define MCK_DIR "/home/satoken/ppos"
|
static char prefix[256] = QUOTE(MCK_DIR);
|
||||||
static char prefix[256] = MCK_DIR;
|
|
||||||
|
|
||||||
static char test_name[64] = "CT_008";
|
static char test_name[64] = "CT_008";
|
||||||
|
|
||||||
@@ -39,8 +39,8 @@ int main(int argc, char** argv) {
|
|||||||
char fn[256];
|
char fn[256];
|
||||||
char kargs[256];
|
char kargs[256];
|
||||||
|
|
||||||
int cpus[4] = {6, 7, 8, 9};
|
int cpus[2] = {1, 2};
|
||||||
int num_cpus = 4;
|
int num_cpus = 2;
|
||||||
|
|
||||||
struct ihk_mem_chunk mem_chunks[4];
|
struct ihk_mem_chunk mem_chunks[4];
|
||||||
int num_mem_chunks;
|
int num_mem_chunks;
|
||||||
@@ -53,7 +53,7 @@ int main(int argc, char** argv) {
|
|||||||
status = system(cmd);
|
status = system(cmd);
|
||||||
|
|
||||||
// ihk_os_destroy_pseudofs
|
// ihk_os_destroy_pseudofs
|
||||||
ret_ihklib = ihk_os_destroy_pseudofs(0);
|
ret_ihklib = ihk_os_destroy_pseudofs(0, 0, 0);
|
||||||
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
||||||
nread = fread(buf, 1, sizeof(buf), fp);
|
nread = fread(buf, 1, sizeof(buf), fp);
|
||||||
buf[nread] = 0;
|
buf[nread] = 0;
|
||||||
@@ -81,21 +81,21 @@ int main(int argc, char** argv) {
|
|||||||
ret_ihklib = ihk_os_assign_cpu(0, cpus, num_cpus);
|
ret_ihklib = ihk_os_assign_cpu(0, cpus, num_cpus);
|
||||||
//OKNG(ret_ihklib == 0, "ihk_os_assign_cpu\n");
|
//OKNG(ret_ihklib == 0, "ihk_os_assign_cpu\n");
|
||||||
|
|
||||||
// reserve mem 128m@0,128m@1
|
// reserve mem 128m@0,128m@0
|
||||||
num_mem_chunks = 2;
|
num_mem_chunks = 2;
|
||||||
mem_chunks[0].size = 128*1024*1024ULL;
|
mem_chunks[0].size = 128*1024*1024ULL;
|
||||||
mem_chunks[0].numa_node_number = 0;
|
mem_chunks[0].numa_node_number = 0;
|
||||||
mem_chunks[1].size = 128*1024*1024ULL;
|
mem_chunks[1].size = 128*1024*1024ULL;
|
||||||
mem_chunks[1].numa_node_number = 1;
|
mem_chunks[1].numa_node_number = 0;
|
||||||
ret_ihklib = ihk_reserve_mem(0, mem_chunks, num_mem_chunks);
|
ret_ihklib = ihk_reserve_mem(0, mem_chunks, num_mem_chunks);
|
||||||
//OKNG(ret_ihklib == 0, "ihk_reserve_mem (2)\n");
|
//OKNG(ret_ihklib == 0, "ihk_reserve_mem (2)\n");
|
||||||
|
|
||||||
// assign mem 128m@0,128m@1
|
// assign mem 128m@0,128m@0
|
||||||
num_mem_chunks = 2;
|
num_mem_chunks = 2;
|
||||||
mem_chunks[0].size = 128*1024*1024ULL;
|
mem_chunks[0].size = 128*1024*1024ULL;
|
||||||
mem_chunks[0].numa_node_number = 0;
|
mem_chunks[0].numa_node_number = 0;
|
||||||
mem_chunks[1].size = 128*1024*1024ULL;
|
mem_chunks[1].size = 128*1024*1024ULL;
|
||||||
mem_chunks[1].numa_node_number = 1;
|
mem_chunks[1].numa_node_number = 0;
|
||||||
ret_ihklib = ihk_os_assign_mem(0, mem_chunks, num_mem_chunks);
|
ret_ihklib = ihk_os_assign_mem(0, mem_chunks, num_mem_chunks);
|
||||||
//OKNG(ret_ihklib == 0, "ihk_os_assign_mem (2)\n");
|
//OKNG(ret_ihklib == 0, "ihk_os_assign_mem (2)\n");
|
||||||
|
|
||||||
@@ -122,7 +122,7 @@ int main(int argc, char** argv) {
|
|||||||
usleep(100*1000);
|
usleep(100*1000);
|
||||||
|
|
||||||
// create pseudofs
|
// create pseudofs
|
||||||
ret_ihklib = ihk_os_create_pseudofs(0);
|
ret_ihklib = ihk_os_create_pseudofs(0, 0, 0);
|
||||||
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
||||||
nread = fread(buf, 1, sizeof(buf), fp);
|
nread = fread(buf, 1, sizeof(buf), fp);
|
||||||
buf[nread] = 0;
|
buf[nread] = 0;
|
||||||
@@ -150,7 +150,7 @@ shutdown:
|
|||||||
|
|
||||||
// shutdown again
|
// shutdown again
|
||||||
ret_ihklib = ihk_os_shutdown(0);
|
ret_ihklib = ihk_os_shutdown(0);
|
||||||
OKNG(ret_ihklib != 0, "shutdown after shutdown returned NOT 0\n");
|
OKNG(ret_ihklib == 0, "shutdown after shutdown returned NOT 0\n");
|
||||||
|
|
||||||
destroy:
|
destroy:
|
||||||
ret_ihklib = ihk_destroy_os(0, 0);
|
ret_ihklib = ihk_destroy_os(0, 0);
|
||||||
@@ -160,7 +160,7 @@ destroy:
|
|||||||
status = system(cmd);
|
status = system(cmd);
|
||||||
|
|
||||||
// destroy pseudofs
|
// destroy pseudofs
|
||||||
ret_ihklib = ihk_os_destroy_pseudofs(0);
|
ret_ihklib = ihk_os_destroy_pseudofs(0, 0, 0);
|
||||||
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
||||||
nread = fread(buf, 1, sizeof(buf), fp);
|
nread = fread(buf, 1, sizeof(buf), fp);
|
||||||
buf[nread] = 0;
|
buf[nread] = 0;
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ihklib.h>
|
#include <ihklib.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include "util.h"
|
||||||
|
|
||||||
#define MCK_DIR "/home/satoken/ppos"
|
static char prefix[256] = QUOTE(MCK_DIR);
|
||||||
static char prefix[256] = MCK_DIR;
|
|
||||||
|
|
||||||
static char test_name[64] = "CT_009";
|
static char test_name[64] = "CT_009";
|
||||||
|
|
||||||
@@ -39,8 +39,8 @@ int main(int argc, char** argv) {
|
|||||||
char fn[256];
|
char fn[256];
|
||||||
char kargs[256];
|
char kargs[256];
|
||||||
|
|
||||||
int cpus[4] = {6, 7, 8, 9};
|
int cpus[2] = {1, 2};
|
||||||
int num_cpus = 4;
|
int num_cpus = 2;
|
||||||
|
|
||||||
struct ihk_mem_chunk mem_chunks[4];
|
struct ihk_mem_chunk mem_chunks[4];
|
||||||
int num_mem_chunks;
|
int num_mem_chunks;
|
||||||
@@ -53,7 +53,7 @@ int main(int argc, char** argv) {
|
|||||||
status = system(cmd);
|
status = system(cmd);
|
||||||
|
|
||||||
// ihk_os_destroy_pseudofs
|
// ihk_os_destroy_pseudofs
|
||||||
ret_ihklib = ihk_os_destroy_pseudofs(0);
|
ret_ihklib = ihk_os_destroy_pseudofs(0, 0, 0);
|
||||||
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
||||||
nread = fread(buf, 1, sizeof(buf), fp);
|
nread = fread(buf, 1, sizeof(buf), fp);
|
||||||
buf[nread] = 0;
|
buf[nread] = 0;
|
||||||
@@ -81,21 +81,21 @@ int main(int argc, char** argv) {
|
|||||||
ret_ihklib = ihk_os_assign_cpu(0, cpus, num_cpus);
|
ret_ihklib = ihk_os_assign_cpu(0, cpus, num_cpus);
|
||||||
//OKNG(ret_ihklib == 0, "ihk_os_assign_cpu\n");
|
//OKNG(ret_ihklib == 0, "ihk_os_assign_cpu\n");
|
||||||
|
|
||||||
// reserve mem 128m@0,128m@1
|
// reserve mem 128m@0,128m@0
|
||||||
num_mem_chunks = 2;
|
num_mem_chunks = 2;
|
||||||
mem_chunks[0].size = 128*1024*1024ULL;
|
mem_chunks[0].size = 128*1024*1024ULL;
|
||||||
mem_chunks[0].numa_node_number = 0;
|
mem_chunks[0].numa_node_number = 0;
|
||||||
mem_chunks[1].size = 128*1024*1024ULL;
|
mem_chunks[1].size = 128*1024*1024ULL;
|
||||||
mem_chunks[1].numa_node_number = 1;
|
mem_chunks[1].numa_node_number = 0;
|
||||||
ret_ihklib = ihk_reserve_mem(0, mem_chunks, num_mem_chunks);
|
ret_ihklib = ihk_reserve_mem(0, mem_chunks, num_mem_chunks);
|
||||||
//OKNG(ret_ihklib == 0, "ihk_reserve_mem (2)\n");
|
//OKNG(ret_ihklib == 0, "ihk_reserve_mem (2)\n");
|
||||||
|
|
||||||
// assign mem 128m@0,128m@1
|
// assign mem 128m@0,128m@0
|
||||||
num_mem_chunks = 2;
|
num_mem_chunks = 2;
|
||||||
mem_chunks[0].size = 128*1024*1024ULL;
|
mem_chunks[0].size = 128*1024*1024ULL;
|
||||||
mem_chunks[0].numa_node_number = 0;
|
mem_chunks[0].numa_node_number = 0;
|
||||||
mem_chunks[1].size = 128*1024*1024ULL;
|
mem_chunks[1].size = 128*1024*1024ULL;
|
||||||
mem_chunks[1].numa_node_number = 1;
|
mem_chunks[1].numa_node_number = 0;
|
||||||
ret_ihklib = ihk_os_assign_mem(0, mem_chunks, num_mem_chunks);
|
ret_ihklib = ihk_os_assign_mem(0, mem_chunks, num_mem_chunks);
|
||||||
//OKNG(ret_ihklib == 0, "ihk_os_assign_mem (2)\n");
|
//OKNG(ret_ihklib == 0, "ihk_os_assign_mem (2)\n");
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ goto shutdown;
|
|||||||
usleep(100*1000);
|
usleep(100*1000);
|
||||||
|
|
||||||
// create pseudofs
|
// create pseudofs
|
||||||
ret_ihklib = ihk_os_create_pseudofs(0);
|
ret_ihklib = ihk_os_create_pseudofs(0, 0, 0);
|
||||||
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
||||||
nread = fread(buf, 1, sizeof(buf), fp);
|
nread = fread(buf, 1, sizeof(buf), fp);
|
||||||
buf[nread] = 0;
|
buf[nread] = 0;
|
||||||
@@ -157,7 +157,7 @@ destroy:
|
|||||||
status = system(cmd);
|
status = system(cmd);
|
||||||
|
|
||||||
// destroy pseudofs
|
// destroy pseudofs
|
||||||
ret_ihklib = ihk_os_destroy_pseudofs(0);
|
ret_ihklib = ihk_os_destroy_pseudofs(0, 0, 0);
|
||||||
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
|
||||||
nread = fread(buf, 1, sizeof(buf), fp);
|
nread = fread(buf, 1, sizeof(buf), fp);
|
||||||
buf[nread] = 0;
|
buf[nread] = 0;
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
|
include $(HOME)/.mck_test_config.mk
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
MCK_DIR=/home/satoken/ppos
|
|
||||||
TARGET=CT_001 CT_002 CT_003 CT_004 CT_005 CT_006 CT_007 CT_008 CT_009
|
TARGET=CT_001 CT_002 CT_003 CT_004 CT_005 CT_006 CT_007 CT_008 CT_009
|
||||||
|
|
||||||
CPPFLAGS = -I$(MCK_DIR)/include
|
CPPFLAGS = -I$(MCK_DIR)/include -DMCK_DIR=$(MCK_DIR)
|
||||||
LDFLAGS = -L$(MCK_DIR)/lib -lihk -Wl,-rpath -Wl,$(MCK_DIR)/lib -lbfd
|
LDFLAGS = -L$(MCK_DIR)/lib -lihk -Wl,-rpath -Wl,$(MCK_DIR)/lib -lbfd
|
||||||
|
|
||||||
all: $(TARGET)
|
all: $(TARGET)
|
||||||
|
|||||||
@@ -23,9 +23,8 @@ McKernelの状態と、終了処理(shutdown, destroy)の組み合わせで、
|
|||||||
|
|
||||||
(2) テストの実行方法
|
(2) テストの実行方法
|
||||||
以下の手順でテストを実行する
|
以下の手順でテストを実行する
|
||||||
1. Makefileの変数MCK_DIRの内容を、McKernelがインストールされているディレクトリに変更する
|
1. ~/.mck_test_config.mkの変数MCK_DIRの内容を、McKernelがインストールされているディレクトリに変更する
|
||||||
2. CT_xxx.c の定数MCK_DIRの内容を、McKernelがインストールされているディレクトリに変更する
|
2. sh make test を実行する
|
||||||
3. sh make test を実行する
|
|
||||||
|
|
||||||
(3) テスト項目
|
(3) テスト項目
|
||||||
以下の条件でMcKernelの起動/終了が正常に行われることを確認する
|
以下の条件でMcKernelの起動/終了が正常に行われることを確認する
|
||||||
@@ -76,7 +75,7 @@ CT_008:
|
|||||||
3. McKernelプロセスの実行終了直後にMcKernelを終了(ihk_os_shutdown)する
|
3. McKernelプロセスの実行終了直後にMcKernelを終了(ihk_os_shutdown)する
|
||||||
4. ihk_os_get_status がSHUTDOWNまたは、INACTIVEを返すことを確認する
|
4. ihk_os_get_status がSHUTDOWNまたは、INACTIVEを返すことを確認する
|
||||||
5. 終了したMcKernelに対して、再度終了(ihk_os_shutdown)する
|
5. 終了したMcKernelに対して、再度終了(ihk_os_shutdown)する
|
||||||
⇒ ihk_os_shutdownが0以外を返す
|
⇒ ihk_os_shutdownが0を返す
|
||||||
|
|
||||||
CT_009:
|
CT_009:
|
||||||
前提:force_shutdown.patch を適用してMcKernelをビルドする
|
前提:force_shutdown.patch を適用してMcKernelをビルドする
|
||||||
|
|||||||
7
test/mng_mod/issues/898_928/util.h
Normal file
7
test/mng_mod/issues/898_928/util.h
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
#ifndef __UTIL_H_INCLUDED__
|
||||||
|
#define __UTIL_H_INCLUDED__
|
||||||
|
|
||||||
|
#define Q(x) #x
|
||||||
|
#define QUOTE(x) Q(x)
|
||||||
|
|
||||||
|
#endif
|
||||||
Reference in New Issue
Block a user