Merge branch 'development' of postpeta.pccluster.org:mckernel into development

This commit is contained in:
Yutaka Ishikawa
2018-02-25 11:03:13 +09:00
71 changed files with 6131 additions and 135 deletions

View File

@@ -145,6 +145,8 @@ nmi:
movq %rsp,%gs:PANIC_REGS+0x08
movl nmi_mode(%rip),%eax
cmp $3,%rax
je 4f
cmp $1,%rax
je 1f
cmp $2,%rax
@@ -199,9 +201,9 @@ nmi:
movl %eax,%gs:PANIC_REGS+0xA0
movq $1,%gs:PANICED
call ihk_mc_query_mem_areas
1:
4:
hlt
jmp 1b
jmp 4b
.globl x86_syscall
x86_syscall:

View File

@@ -809,6 +809,11 @@ do_signal(unsigned long rc, void *regs0, struct thread *thread, struct sig_pendi
regs->gpr.rip = (unsigned long)k->sa.sa_handler;
regs->gpr.rsp = (unsigned long)usp;
// check signal handler is ONESHOT
if (k->sa.sa_flags & SA_RESETHAND) {
k->sa.sa_handler = SIG_DFL;
}
if(!(k->sa.sa_flags & SA_NODEFER))
thread->sigmask.__val[0] |= pending->sigmask.__val[0];
kfree(pending);

View File

@@ -367,7 +367,7 @@ static long mcexec_debug_log(ihk_os_t os, unsigned long arg)
}
int mcexec_close_exec(ihk_os_t os);
int mcexec_destroy_per_process_data(ihk_os_t os);
int mcexec_destroy_per_process_data(ihk_os_t os, int pid);
static void release_handler(ihk_os_t os, void *param)
{
@@ -387,7 +387,7 @@ static void release_handler(ihk_os_t os, void *param)
mcexec_close_exec(os);
mcexec_destroy_per_process_data(os);
mcexec_destroy_per_process_data(os, info->pid);
memset(&isp, '\0', sizeof isp);
isp.msg = SCD_MSG_CLEANUP_PROCESS;
@@ -1720,12 +1720,12 @@ int mcexec_create_per_process_data(ihk_os_t os)
return 0;
}
int mcexec_destroy_per_process_data(ihk_os_t os)
int mcexec_destroy_per_process_data(ihk_os_t os, int pid)
{
struct mcctrl_usrdata *usrdata = ihk_host_os_get_usrdata(os);
struct mcctrl_per_proc_data *ppd = NULL;
ppd = mcctrl_get_per_proc_data(usrdata, task_tgid_vnr(current));
ppd = mcctrl_get_per_proc_data(usrdata, pid);
if (ppd) {
/* One for the reference and one for deallocation.

View File

@@ -27,6 +27,7 @@
#include <linux/miscdevice.h>
#include <linux/slab.h>
#include <linux/device.h>
#include <linux/delay.h>
#include "mcctrl.h"
#include <ihk/ihk_host_user.h>
@@ -169,6 +170,14 @@ error_cleanup_channels:
int mcctrl_os_shutdown_notifier(int os_index)
{
if (os[os_index]) {
/* Wait for os running */
if (ihk_os_wait_for_status(os[os_index], IHK_OS_STATUS_RUNNING, 0, 200) != 0) {
printk("IHK: OS does not become RUNNING in shutdown. Force shutdown.\n");
/* send nmi to force shutdown */
ihk_os_send_nmi(os[os_index], 3);
mdelay(200);
}
sysfsm_cleanup(os[os_index]);
free_topology_info(os[os_index]);
ihk_os_unregister_user_call_handlers(os[os_index], mcctrl_uc + os_index);

View File

@@ -233,12 +233,13 @@ static int nr_processes = 0;
static int nr_threads = -1;
struct fork_sync {
pid_t pid;
int status;
volatile int success;
sem_t sem;
};
struct fork_sync_container {
pid_t pid;
struct fork_sync_container *next;
struct fork_sync *fs;
};
@@ -2533,20 +2534,11 @@ do_generic_syscall(
__dprintf("do_generic_syscall(%ld)\n", w->sr.number);
#ifdef POSTK_DEBUG_TEMP_FIX_75 /* syscall return value check add. */
ret = syscall(w->sr.number, w->sr.args[0], w->sr.args[1], w->sr.args[2],
w->sr.args[3], w->sr.args[4], w->sr.args[5]);
if (ret == -1) {
ret = -errno;
}
#else /* POSTK_DEBUG_TEMP_FIX_75 */
errno = 0;
ret = syscall(w->sr.number, w->sr.args[0], w->sr.args[1], w->sr.args[2],
w->sr.args[3], w->sr.args[4], w->sr.args[5]);
if (errno != 0) {
ret = -errno;
}
#endif /* POSTK_DEBUG_TEMP_FIX_75 */
/* Overlayfs /sys/X directory lseek() problem work around */
if (w->sr.number == __NR_lseek && ret == -EINVAL) {
@@ -3407,68 +3399,56 @@ gettid_out:
case __NR_clone: {
struct fork_sync *fs;
struct fork_sync_container *fsc;
struct fork_sync_container *fsc = NULL;
struct fork_sync_container *fp;
struct fork_sync_container *fb;
int flag = w.sr.args[0];
int rc = -1;
pid_t pid;
if (flag == 1) {
pid = w.sr.args[1];
rc = 0;
pthread_mutex_lock(&fork_sync_mutex);
for (fp = fork_sync_top, fb = NULL; fp; fb = fp, fp = fp->next)
if (fp->pid == pid)
break;
if (fp) {
fs = fp->fs;
if (fb)
fb->next = fp->next;
else
fork_sync_top = fp->next;
fs->success = 1;
munmap(fs, sizeof(struct fork_sync));
free(fp);
}
pthread_mutex_unlock(&fork_sync_mutex);
do_syscall_return(fd, cpu, rc, 0, 0, 0, 0);
break;
}
fs = mmap(NULL, sizeof(struct fork_sync),
PROT_READ | PROT_WRITE,
MAP_SHARED | MAP_ANONYMOUS, -1, 0);
if (fs == (void *)-1) {
goto fork_err;
}
memset(fs, '\0', sizeof(struct fork_sync));
sem_init(&fs->sem, 1, 0);
fsc = malloc(sizeof(struct fork_sync_container));
if (!fsc) {
goto fork_err;
}
memset(fsc, '\0', sizeof(struct fork_sync_container));
pthread_mutex_lock(&fork_sync_mutex);
fsc->next = fork_sync_top;
fork_sync_top = fsc;
pthread_mutex_unlock(&fork_sync_mutex);
fsc->fs = fs = mmap(NULL, sizeof(struct fork_sync),
PROT_READ | PROT_WRITE,
MAP_SHARED | MAP_ANONYMOUS, -1, 0);
if(fs == (void *)-1){
goto fork_err;
}
fsc->fs = fs;
memset(fs, '\0', sizeof(struct fork_sync));
sem_init(&fs->sem, 1, 0);
if(flag){
int pipefds[2];
if(pipe(pipefds) == -1){
rc = -errno;
sem_destroy(&fs->sem);
goto fork_err;
}
pid = fork();
if(pid == 0){
close(pipefds[0]);
pid = fork();
if(pid != 0){
if (write(pipefds[1], &pid, sizeof pid) != sizeof(pid)) {
fprintf(stderr, "error: writing pipefds\n");
}
exit(0);
}
}
else if(pid != -1){
int npid;
int st;
close(pipefds[1]);
if (read(pipefds[0], &npid, sizeof npid) != sizeof(npid)) {
fprintf(stderr, "error: reading pipefds\n");
}
close(pipefds[0]);
waitpid(pid, &st, 0);
pid = npid;
}
else{
rc = -errno;
sem_destroy(&fs->sem);
goto fork_err;
}
}
else
pid = fork();
fsc->pid = pid = fork();
switch (pid) {
/* Error */
@@ -3534,12 +3514,13 @@ gettid_out:
fork_child_sync_pipe:
sem_post(&fs->sem);
sem_destroy(&fs->sem);
if (fs->status)
exit(1);
for (fp = fork_sync_top; fp;) {
fb = fp->next;
if (fp->fs)
if (fp->fs && fp->fs != fs)
munmap(fp->fs, sizeof(struct fork_sync));
free(fp);
fp = fb;
@@ -3551,6 +3532,16 @@ fork_child_sync_pipe:
ioctl(fd, MCEXEC_UP_NEW_PROCESS, &npdesc);
/* TODO: does the forked thread run in a pthread context? */
while (getppid() != 1 &&
fs->success == 0) {
sched_yield();
}
if (fs->success == 0) {
exit(1);
}
munmap(fs, sizeof(struct fork_sync));
join_all_threads();
return ret;
@@ -3558,7 +3549,6 @@ fork_child_sync_pipe:
/* Parent */
default:
fs->pid = pid;
while ((rc = sem_trywait(&fs->sem)) == -1 && (errno == EAGAIN || errno == EINTR)) {
int st;
int wrc;
@@ -3581,20 +3571,25 @@ fork_child_sync_pipe:
break;
}
sem_destroy(&fs->sem);
munmap(fs, sizeof(struct fork_sync));
fork_err:
pthread_mutex_lock(&fork_sync_mutex);
for (fp = fork_sync_top, fb = NULL; fp; fb = fp, fp = fp->next)
if (fp == fsc)
break;
if (fp) {
if (fb)
fb->next = fsc->next;
else
fork_sync_top = fsc->next;
if (fs) {
sem_destroy(&fs->sem);
if (rc < 0) {
munmap(fs, sizeof(struct fork_sync));
pthread_mutex_lock(&fork_sync_mutex);
for (fp = fork_sync_top, fb = NULL; fp; fb = fp, fp = fp->next)
if (fp == fsc)
break;
if (fp) {
if (fb)
fb->next = fsc->next;
else
fork_sync_top = fsc->next;
free(fp);
}
pthread_mutex_unlock(&fork_sync_mutex);
}
}
pthread_mutex_unlock(&fork_sync_mutex);
do_syscall_return(fd, cpu, rc, 0, 0, 0, 0);
break;
}

View File

@@ -18,6 +18,7 @@ extern void mem_init(void);
extern void ihk_ikc_master_init(void);
extern void ap_init(void);
extern void arch_ready(void);
extern void done_init(void);
extern void mc_ikc_test_init(void);
extern void cpu_local_var_init(void);
extern void kmalloc_init(void);

View File

@@ -420,6 +420,7 @@ struct mckfd {
long (*mmap_cb)(struct mckfd *, ihk_mc_user_context_t *);
int (*close_cb)(struct mckfd *, ihk_mc_user_context_t *);
int (*fcntl_cb)(struct mckfd *, ihk_mc_user_context_t *);
int (*dup_cb)(struct mckfd *, ihk_mc_user_context_t *);
};
#define SFD_CLOEXEC 02000000

View File

@@ -252,6 +252,7 @@ extern struct xpmem_partition *xpmem_my_part;
static int xpmem_ioctl(struct mckfd *mckfd, ihk_mc_user_context_t *ctx);
static int xpmem_close(struct mckfd *mckfd, ihk_mc_user_context_t *ctx);
static int xpmem_dup(struct mckfd *mckfd, ihk_mc_user_context_t *ctx);
static int xpmem_init(void);
static void xpmem_exit(void);
@@ -275,6 +276,7 @@ static int xpmem_release(xpmem_apid_t);
static void xpmem_release_ap(struct xpmem_thread_group *,
struct xpmem_access_permit *);
static void xpmem_release_aps_of_tg(struct xpmem_thread_group *ap_tg);
static void xpmem_flush(struct mckfd *);
static int xpmem_attach(struct mckfd *, xpmem_apid_t, off_t, size_t,
unsigned long, int, int, unsigned long *);

View File

@@ -387,6 +387,7 @@ int main(void)
futex_init();
done_init();
kputs("IHK/McKernel booted.\n");
#ifdef DCFA_KMOD

View File

@@ -509,6 +509,10 @@ clone_thread(struct thread *org, unsigned long pc, unsigned long sp,
mckfd->next = proc->mckfd;
proc->mckfd = mckfd;
}
if (mckfd->dup_cb) {
mckfd->dup_cb(mckfd, NULL);
}
}
ihk_mc_spinlock_unlock(&proc->mckfd_lock, irqstate);

View File

@@ -2615,6 +2615,13 @@ retry_tid:
old->tid,
new->tid);
if (!(clone_flags & CLONE_VM)) {
request1.number = __NR_clone;
request1.args[0] = 1;
request1.args[1] = new->tid;
do_syscall(&request1, ihk_mc_get_processor_id(), 0);
}
runq_add_thread(new, cpuid);
if (ptrace_event) {
@@ -6098,7 +6105,6 @@ static int ptrace_attach(int pid)
}
parent = child->parent;
#ifdef POSTK_DEBUG_TEMP_FIX_53 /* attach for child-process fix. */
dkprintf("ptrace_attach() parent->pid=%d\n", parent->pid);
mcs_rwlock_writer_lock_noirq(&parent->children_lock, &childlock);
@@ -6110,23 +6116,6 @@ static int ptrace_attach(int pid)
list_add_tail(&child->siblings_list, &proc->children_list);
child->parent = proc;
mcs_rwlock_writer_unlock_noirq(&proc->children_lock, &childlock);
#else /* POSTK_DEBUG_TEMP_FIX_53 */
/* XXX: tmp */
if (parent != proc) {
dkprintf("ptrace_attach() parent->pid=%d\n", parent->pid);
mcs_rwlock_writer_lock_noirq(&parent->children_lock, &childlock);
list_del(&child->siblings_list);
list_add_tail(&child->ptraced_siblings_list, &parent->ptraced_children_list);
mcs_rwlock_writer_unlock_noirq(&parent->children_lock, &childlock);
mcs_rwlock_writer_lock_noirq(&proc->children_lock, &childlock);
list_add_tail(&child->siblings_list, &proc->children_list);
child->parent = proc;
mcs_rwlock_writer_unlock_noirq(&proc->children_lock, &childlock);
}
#endif /* POSTK_DEBUG_TEMP_FIX_53 */
child->ptrace = PT_TRACED | PT_TRACE_EXEC;

View File

@@ -34,7 +34,6 @@
#include <ihk/mm.h>
#include <xpmem_private.h>
struct xpmem_partition *xpmem_my_part = NULL; /* pointer to this partition */
@@ -107,6 +106,7 @@ int xpmem_open(
mckfd->sig_no = -1;
mckfd->ioctl_cb = xpmem_ioctl;
mckfd->close_cb = xpmem_close;
mckfd->dup_cb = xpmem_dup;
mckfd->data = (long)proc;
irqstate = ihk_mc_spinlock_lock(&proc->mckfd_lock);
@@ -276,16 +276,11 @@ static int xpmem_ioctl(
return -EINVAL;
}
static int xpmem_close(
struct mckfd *mckfd,
ihk_mc_user_context_t *ctx)
{
int n_opened;
struct process *proc = (struct process *)mckfd->data;
struct xpmem_thread_group *tg;
int index;
struct mcs_rwlock_node_irqsave lock;
XPMEM_DEBUG("call: fd=%d, pid=%d, rgid=%d",
mckfd->fd, proc->pid, proc->rgid);
@@ -293,37 +288,11 @@ static int xpmem_close(
n_opened = ihk_atomic_dec_return(&xpmem_my_part->n_opened);
XPMEM_DEBUG("n_opened=%d", n_opened);
index = xpmem_tg_hashtable_index(proc->pid);
mcs_rwlock_writer_lock(&xpmem_my_part->tg_hashtable[index].lock, &lock);
tg = xpmem_tg_ref_by_tgid_all_nolock(proc->pid);
if (IS_ERR(tg)) {
mcs_rwlock_writer_unlock(
&xpmem_my_part->tg_hashtable[index].lock, &lock);
return 0;
if (mckfd->data) {
/* release my xpmem-objects */
xpmem_flush(mckfd);
}
list_del_init(&tg->tg_hashlist);
mcs_rwlock_writer_unlock(&xpmem_my_part->tg_hashtable[index].lock,
&lock);
XPMEM_DEBUG("tg->vm=0x%p", tg->vm);
ihk_mc_spinlock_lock_noirq(&tg->lock);
tg->flags |= XPMEM_FLAG_DESTROYING;
ihk_mc_spinlock_unlock_noirq(&tg->lock);
xpmem_release_aps_of_tg(tg);
xpmem_remove_segs_of_tg(tg);
ihk_mc_spinlock_lock_noirq(&tg->lock);
tg->flags |= XPMEM_FLAG_DESTROYED;
ihk_mc_spinlock_unlock_noirq(&tg->lock);
xpmem_destroy_tg(tg);
if (!n_opened) {
xpmem_exit();
}
@@ -333,6 +302,15 @@ static int xpmem_close(
return 0;
}
static int xpmem_dup(
struct mckfd *mckfd,
ihk_mc_user_context_t *ctx)
{
mckfd->data = 0;
ihk_atomic_inc_return(&xpmem_my_part->n_opened);
return 0;
}
static int xpmem_init(void)
{
@@ -987,6 +965,44 @@ static void xpmem_release_aps_of_tg(
XPMEM_DEBUG("return: ");
}
static void xpmem_flush(struct mckfd *mckfd)
{
struct process *proc = (struct process *)mckfd->data;
struct xpmem_thread_group *tg;
int index;
struct mcs_rwlock_node_irqsave lock;
index = xpmem_tg_hashtable_index(proc->pid);
mcs_rwlock_writer_lock(&xpmem_my_part->tg_hashtable[index].lock, &lock);
tg = xpmem_tg_ref_by_tgid_all_nolock(proc->pid);
if (IS_ERR(tg)) {
mcs_rwlock_writer_unlock(
&xpmem_my_part->tg_hashtable[index].lock, &lock);
return;
}
list_del_init(&tg->tg_hashlist);
mcs_rwlock_writer_unlock(&xpmem_my_part->tg_hashtable[index].lock,
&lock);
XPMEM_DEBUG("tg->vm=0x%p", tg->vm);
ihk_mc_spinlock_lock_noirq(&tg->lock);
tg->flags |= XPMEM_FLAG_DESTROYING;
ihk_mc_spinlock_unlock_noirq(&tg->lock);
xpmem_release_aps_of_tg(tg);
xpmem_remove_segs_of_tg(tg);
ihk_mc_spinlock_lock_noirq(&tg->lock);
tg->flags |= XPMEM_FLAG_DESTROYED;
ihk_mc_spinlock_unlock_noirq(&tg->lock);
xpmem_destroy_tg(tg);
}
static int xpmem_attach(
struct mckfd *mckfd,
@@ -1431,11 +1447,12 @@ static void xpmem_detach_att(
att->at_vaddr, att->at_vaddr + 1);
if (!range || range->start > att->at_vaddr) {
DBUG_ON(1);
ihk_mc_spinlock_lock_noirq(&ap->lock);
list_del_init(&att->att_list);
ihk_mc_spinlock_unlock_noirq(&ap->lock);
mcs_rwlock_writer_unlock(&att->at_lock, &at_lock);
ihk_mc_spinlock_unlock_noirq(&vm->memory_range_lock);
ekprintf("%s: ERROR: lookup_process_memory_range() failed\n",
__FUNCTION__);
xpmem_att_destroyable(att);
XPMEM_DEBUG("return: range=%p");
return;
}

View File

@@ -0,0 +1,91 @@
【Issue#1031 動作確認】
Issue#1031が解決され、既存機能に影響がないことをIssueで報告されたテストプログラム1項目と、
McKernelでのsigaction()の基本動作確認10項目の計11項目のテストによって確認した。
なお、各テストの実行結果は./result.log として格納している。
①Issueで報告されたテストプログラムによる確認
・Issue#1031
報告で使用されたテストプログラムを用いて、現象が再現しないことを確認した。
実行時の出力を./result.log に記載している
②McKernelでのsigaction()の基本動作確認
以下の内容で、Issue#1031による変更が既存機能に影響しないことを確認した。
基本動作確認の詳細を以下に示す。
1. テストの実行方法
以下の手順でテストを実行する
1. Makefileの変数MCK_DIRの内容を、McKernelがインストールされているディレクトリに変更する
2. sh make test を実行する
2. テスト項目
CT_001: SIG_RESETHAND 指定時の動作
1. SIG_RESETHANDを指定したsigaction()でSIG_USR1にハンドラを設定
2. 自身にSIGUSR1を送る
3. 1.で登録したハンドラが呼び出される
4. 自身にSIGUSR1を送る
5. 1.で登録したハンドラが呼び出されず、プロセスが終了する
CT_002: SIG_RESETHAND 未指定時の動作
1. SIG_RESETHANDを指定しないsigaction()でSIGUSR1にハンドラを設定
2. 自身にSIGUSR1を送る
3. 1.で登録したハンドラが呼び出される
4. 自身にSIGUSR1を送る
5. 1.で登録したハンドラが呼び出される
CT_003: SIG_RESETHANDO 指定ハンドラへの上書き登録時の動作
1. SIG_RESETHANDを指定したsigaction()でSIG_USR1にハンドラを設定
2. SIG_RESETHANDを指定しないsigaction()でSIG_USR1にハンドラを設定
3. 自身にSIGUSR1を送る
4. 2.で登録したハンドラが呼び出される
5. 自身にSIGUSR1を送る
6. 2.で登録したハンドラが呼び出される
CT_004: 複数のsig_numへのハンドラ登録時の動作
1. SIG_RESETHANDを指定したsigaction()でSIG_USR1にハンドラを設定
2. SIG_RESETHANDを指定したsigaction()でSIG_USR2にハンドラを設定
3. 自身にSIGUSR1を送る
4. 1.で登録したハンドラが呼び出される
5. 自身にSIGUSR2を送る
6. 2.で登録したハンドラが呼び出される
7. 自身にSIGUSR1を送る
8. 1.で登録したハンドラが呼び出されず、プロセスが終了する
CT_005: 複数回(非上書き)のSIG_RESETHAND 指定時の動作
1. SIG_RESETHANDを指定したsigaction()でSIG_USR1にハンドラを設定
2. 自身にSIGUSR1を送る
3. 1.で登録したハンドラが呼び出される
4. SIG_RESETHANDを指定したsigaction()でSIG_USR1にハンドラを設定
5. 自身にSIGUSR1を送る
6. 4.で登録したハンドラが呼び出される
7. 自身にSIGUSR1を送る
8. 4.で登録したハンドラが呼び出されず、プロセスが終了する
CT_006: 設定中のハンドラ情報の取得 (上書き時)
1. SIG_RESETHANDを指定したsigaction()でSIG_USR1にハンドラを設定
2. sigaction(SIGUSR1, NULL, &act) で設定情報を取得
3. SIG_RESETHANDを指定しないsigaction()でSIG_USR1にデフォルトハンドラを設定
4. sigaction(SIGUSR1, NULL, &act) で設定情報を取得
CT_007: 設定中のハンドラ情報の取得 (デフォルトに戻った時)
1. SIG_RESETHANDを指定したsigaction()でSIG_USR1にハンドラを設定
2. 自身にSIGUSR1を送る
3. 1.で登録したハンドラが呼び出される
4. sigaction(SIGUSR1, NULL, &act) で設定情報を取得
CT_008: 不正なsig_numへのハンドラ登録
1. 範囲外(上限、下限)のsignumへのハンドラ登録
2. SIGKILL, SIGSTOPへのハンドラ登録
CT_009: SIGKILL, SIGSTOPのハンドラ情報の取得
1. sigaction(SIGKILL, NULL, &act) で設定情報を取得
2. sigaction(SIGSTOP, NULL, &act) で設定情報を取得
CT_010: sig_numの有効確認
1. sigaction(SIGUSR1, NULL, NULL) で有効かどうかを確認
2. sigaction(SIGKILL, NULL, NULL) で有効かどうかを確認
3. sigaction(SIGSTOP, NULL, NULL) で有効かどうかを確認
3. 結果
テストプログラムの実行結果をresult.log に示す。
上記の11項目がPASSしていることを確認した。

View File

@@ -0,0 +1,27 @@
スクリプトは Wed Jan 24 20:43:43 2018
に開始しました[?1034hbash-4.2$ ~/wallaby11-smp-x86/development/mic/mcexec ./signalonread-multi
[4261] I am the examiner for 4270.
[4270] I am a subjectThread 1, ad000700 ad000700
[4270] I am a subjectThread 3, ae400700 ae400700
[4270] I am a subjectThread 2, ada00700 ada00700
[4270] I am a subjectThread 0, ac72aec0 ac72aec0
[3] setup: 1367 ms
[2] setup: 1367 ms
[1] setup: 1367 ms
[0] setup: 1367 ms
[3] START TEST
[2] START TEST
[3] ./signalonread-multi try to read 2147483648 bytes. buffp=0x2aac40000010
[1] START TEST
[2] ./signalonread-multi try to read 2147483648 bytes. buffp=0x2aad00000010
[0] START TEST
[1] ./signalonread-multi try to read 2147483648 bytes. buffp=0x2aab80000010
[0] ./signalonread-multi try to read 2147483648 bytes. buffp=0x2aaac0000010
The TEST process is terminated by the signal 15
TEST SUCCESSED IF YOU DID NOT SEE 'OVERRUN'
TEST FINISHED
bash-4.2$ シェルから脱出するには "exit" を使用してください。
bash-4.2$ exit
スクリプトは Wed Jan 24 20:45:10 2018
に終了しました

View File

@@ -0,0 +1,21 @@
スクリプトは Wed Jan 24 20:56:37 2018
に開始しました[?1034hbash-4.2$ pwd
/home/shirasawa/dangertest/bin
bash-4.2$ ./mck-mcexec.sh ./killit -t 4000 - ./signalonread -nt 4 -nosignal
SUCCESS kmsg
SUCCESS clear_kmsg
SUCCESS mcexec
SUCCESS ./killit -t 4000 mcexec ./signalonread -nt 4 -nosignal
SUCCESS kmsg
SUCCESS kmsg 1 lines
SUCCESS ioctl 40000000 1
SUCCESS kmsg
SUCCESS 0 processes found
SUCCESS ioctl 40000000 2
SUCCESS kmsg
SUCCESS 0 threads found
bash-4.2$ シェルから脱出するには "exit" を使用してください。
bash-4.2$ exit
スクリプトは Wed Jan 24 20:57:07 2018
に終了しました

View File

@@ -0,0 +1,40 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <signal.h>
#include <errno.h>
#include <time.h>
#include <sys/time.h>
void
sig(int s)
{
fprintf(stderr, "signal hanlder is called\n");
}
int
main(int argc, char **argv)
{
struct sigaction act;
int fds[2];
char c;
int rc;
memset(&act, '\0', sizeof act);
act.sa_handler = sig;
sigaction(SIGALRM, &act, NULL);
alarm(3);
pipe(fds);
rc = read(fds[0], &c, 1);
if (rc != -1) {
fprintf(stderr, "CT3001 NG BAD read rc=%d\n", rc);
exit(1);
}
if (errno != EINTR) {
fprintf(stderr, "CT3001 NG BAD error errno=%d\n", errno);
exit(1);
}
fprintf(stderr, "CT3001 OK\n");
exit(0);
}

View File

@@ -0,0 +1,3 @@
#!/bin/sh
MCEXEC=mcexec
$MCEXEC ./CT3001

View File

@@ -0,0 +1,54 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <signal.h>
#include <errno.h>
#include <fcntl.h>
#include <time.h>
#include <sys/time.h>
#define FILESIZE (2L * 1024 * 1024 * 1024)
int sigcalled = 0;
void
sig(int s)
{
sigcalled = 1;
fprintf(stderr, "signal hanlder is called\n");
}
int
main(int argc, char **argv)
{
struct sigaction act;
char *buf;
long rc;
long l;
long r;
int fd;
buf = malloc(FILESIZE);
fd = open("testfile", O_RDONLY);
if (fd == -1) {
fprintf(stderr, "Could not open file\n");
unlink("testfile");
exit(1);
}
memset(&act, '\0', sizeof act);
act.sa_handler = sig;
sigaction(SIGALRM, &act, NULL);
alarm(1);
rc = read(fd, buf, FILESIZE);
if (rc == -1) {
fprintf(stderr, "CT3002 NG BAD read rc=%ld errno=%d\n", rc, errno);
exit(1);
}
if (sigcalled == 0) {
fprintf(stderr, "CT3002 NG signal handler was not called\n");
exit(1);
}
fprintf(stderr, "CT3002 OK\n");
exit(0);
}

View File

@@ -0,0 +1,7 @@
#!/bin/sh
MCEXEC=mcexec
dd if=/dev/zero of=testfile bs=$((1024 * 1024)) count=$((2 * 1024))
sync
sudo /sbin/sysctl vm.drop_caches=3
$MCEXEC ./CT3002
rm -f testfile

View File

@@ -0,0 +1,51 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <signal.h>
#include <errno.h>
#include <time.h>
#include <sys/time.h>
#include <sys/wait.h>
void
child()
{
struct sigaction act;
int fds[2];
char c;
int rc;
alarm(3);
pipe(fds);
rc = read(fds[0], &c, 1);
}
int
main(int argc, char **argv)
{
pid_t pid;
int st;
int rc;
pid = fork();
if (pid == 0) {
child();
exit(1);
}
while ((rc = waitpid(pid, &st, 0)) == -1 && errno == EINTR);
if (rc != pid) {
fprintf(stderr, "CT3003 NG BAD wait rc=%d errno=%d\n", rc, errno);
exit(1);
}
if (!WIFSIGNALED(st)) {
fprintf(stderr, "CT3003 NG no signaled st=%08x\n", st);
exit(1);
}
if (WTERMSIG(st) != SIGALRM) {
fprintf(stderr, "CT3003 NG BAD signal sig=%d\n", WTERMSIG(st));
exit(1);
}
fprintf(stderr, "CT3003 OK\n");
exit(0);
}

View File

@@ -0,0 +1,3 @@
#!/bin/sh
MCEXEC=mcexec
$MCEXEC ./CT3003

View File

@@ -0,0 +1,62 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <signal.h>
#include <errno.h>
#include <fcntl.h>
#include <time.h>
#include <sys/time.h>
#include <sys/wait.h>
#define FILESIZE (2L * 1024 * 1024 * 1024)
void
child()
{
char *buf;
long rc;
long l;
long r;
int fd;
buf = malloc(FILESIZE);
fd = open("testfile", O_RDONLY);
if (fd == -1) {
fprintf(stderr, "Could not open file\n");
unlink("testfile");
exit(1);
}
alarm(1);
rc = read(fd, buf, FILESIZE);
}
int
main(int argc, char **argv)
{
pid_t pid;
int st;
int rc;
pid = fork();
if (pid == 0) {
child();
exit(1);
}
while ((rc = waitpid(pid, &st, 0)) == -1 && errno == EINTR);
if (rc != pid) {
fprintf(stderr, "CT3004 NG BAD wait rc=%d errno=%d\n", rc, errno);
exit(1);
}
if (!WIFSIGNALED(st)) {
fprintf(stderr, "CT3004 NG no signaled st=%08x\n", st);
exit(1);
}
if (WTERMSIG(st) != SIGALRM) {
fprintf(stderr, "CT3004 NG BAD signal sig=%d\n", WTERMSIG(st));
exit(1);
}
fprintf(stderr, "CT3004 OK\n");
exit(0);
}

View File

@@ -0,0 +1,7 @@
#!/bin/sh
MCEXEC=mcexec
dd if=/dev/zero of=testfile bs=$((1024 * 1024)) count=$((2 * 1024))
sync
sudo /sbin/sysctl vm.drop_caches=3
$MCEXEC ./CT3004
rm -f testfile

View File

@@ -0,0 +1,70 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <signal.h>
#include <errno.h>
#include <time.h>
#include <sys/time.h>
#include <sys/wait.h>
pid_t pid;
void
sig(int s)
{
static int cnt = 0;
cnt++;
if (cnt == 1) {
fprintf(stderr, "kill SIGURG\n");
kill(pid, SIGURG);
}
else if (cnt == 2) {
fprintf(stderr, "kill SIGINT\n");
kill(pid, SIGINT);
}
alarm(2);
}
void
child()
{
struct sigaction act;
int fds[2];
char c;
int rc;
pipe(fds);
rc = read(fds[0], &c, 1);
}
int
main(int argc, char **argv)
{
int st;
int rc;
pid = fork();
if (pid == 0) {
child();
exit(1);
}
signal(SIGALRM, sig);
alarm(2);
while ((rc = waitpid(pid, &st, 0)) == -1 && errno == EINTR);
if (rc != pid) {
fprintf(stderr, "CT3005 NG BAD wait rc=%d errno=%d\n", rc, errno);
exit(1);
}
if (!WIFSIGNALED(st)) {
fprintf(stderr, "CT3005 NG no signaled st=%08x\n", st);
exit(1);
}
if (WTERMSIG(st) != SIGINT) {
fprintf(stderr, "CT3005 NG BAD signal sig=%d\n", WTERMSIG(st));
exit(1);
}
fprintf(stderr, "CT3005 OK\n");
exit(0);
}

View File

@@ -0,0 +1,3 @@
#!/bin/sh
MCEXEC=mcexec
$MCEXEC ./CT3005

View File

@@ -0,0 +1,75 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <signal.h>
#include <errno.h>
#include <fcntl.h>
#include <time.h>
#include <sys/time.h>
#include <sys/wait.h>
#define FILESIZE (2L * 1024 * 1024 * 1024)
pid_t pid;
void
sig(int s)
{
fprintf(stderr, "kill SIGURG\n");
kill(pid, SIGURG);
}
void
child()
{
char *buf;
long rc;
long l;
long r;
int fd;
buf = malloc(FILESIZE);
fd = open("testfile", O_RDONLY);
if (fd == -1) {
fprintf(stderr, "Could not open file\n");
unlink("testfile");
exit(1);
}
rc = read(fd, buf, FILESIZE);
}
int
main(int argc, char **argv)
{
int st;
int rc;
pid = fork();
if (pid == 0) {
child();
exit(99);
}
signal(SIGALRM, sig);
alarm(2);
while ((rc = waitpid(pid, &st, 0)) == -1 && errno == EINTR);
if (rc != pid) {
fprintf(stderr, "CT3006 NG BAD wait rc=%d errno=%d\n", rc, errno);
exit(1);
}
if (WIFSIGNALED(st)) {
fprintf(stderr, "CT3006 NG BAD signal st=%08x\n", st);
exit(1);
}
if (!WIFEXITED(st)) {
fprintf(stderr, "CT3006 NG BAD terminated st=%08x\n", st);
exit(1);
}
if (WEXITSTATUS(st) != 99) {
fprintf(stderr, "CT3006 NG BAD exit status st=%08x\n", st);
exit(1);
}
fprintf(stderr, "CT3006 OK\n");
exit(0);
}

View File

@@ -0,0 +1,7 @@
#!/bin/sh
MCEXEC=mcexec
dd if=/dev/zero of=testfile bs=$((1024 * 1024)) count=$((2 * 1024))
sync
sudo /sbin/sysctl vm.drop_caches=3
$MCEXEC ./CT3006
rm -f testfile

View File

@@ -0,0 +1,71 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <signal.h>
#include <errno.h>
#include <time.h>
#include <sys/time.h>
#include <sys/wait.h>
pid_t pid;
void
sig(int s)
{
static int cnt = 0;
cnt++;
if (cnt == 1) {
fprintf(stderr, "kill SIGTERM (ignored)\n");
kill(pid, SIGTERM);
}
else if (cnt == 2) {
fprintf(stderr, "kill SIGINT\n");
kill(pid, SIGINT);
}
alarm(2);
}
void
child()
{
struct sigaction act;
int fds[2];
char c;
int rc;
pipe(fds);
rc = read(fds[0], &c, 1);
}
int
main(int argc, char **argv)
{
int st;
int rc;
pid = fork();
if (pid == 0) {
signal(SIGTERM, SIG_IGN);
child();
exit(1);
}
signal(SIGALRM, sig);
alarm(2);
while ((rc = waitpid(pid, &st, 0)) == -1 && errno == EINTR);
if (rc != pid) {
fprintf(stderr, "CT3007 NG BAD wait rc=%d errno=%d\n", rc, errno);
exit(1);
}
if (!WIFSIGNALED(st)) {
fprintf(stderr, "CT3007 NG no signaled st=%08x\n", st);
exit(1);
}
if (WTERMSIG(st) != SIGINT) {
fprintf(stderr, "CT3007 NG BAD signal sig=%d\n", WTERMSIG(st));
exit(1);
}
fprintf(stderr, "CT3007 OK\n");
exit(0);
}

View File

@@ -0,0 +1,3 @@
#!/bin/sh
MCEXEC=mcexec
$MCEXEC ./CT3007

View File

@@ -0,0 +1,76 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <signal.h>
#include <errno.h>
#include <fcntl.h>
#include <time.h>
#include <sys/time.h>
#include <sys/wait.h>
#define FILESIZE (2L * 1024 * 1024 * 1024)
pid_t pid;
void
sig(int s)
{
fprintf(stderr, "kill SIGTERM (ignored)\n");
kill(pid, SIGURG);
}
void
child()
{
char *buf;
long rc;
long l;
long r;
int fd;
buf = malloc(FILESIZE);
fd = open("testfile", O_RDONLY);
if (fd == -1) {
fprintf(stderr, "Could not open file\n");
unlink("testfile");
exit(1);
}
rc = read(fd, buf, FILESIZE);
}
int
main(int argc, char **argv)
{
int st;
int rc;
pid = fork();
if (pid == 0) {
signal(SIGTERM, SIG_IGN);
child();
exit(99);
}
signal(SIGALRM, sig);
alarm(2);
while ((rc = waitpid(pid, &st, 0)) == -1 && errno == EINTR);
if (rc != pid) {
fprintf(stderr, "CT3008 NG BAD wait rc=%d errno=%d\n", rc, errno);
exit(1);
}
if (WIFSIGNALED(st)) {
fprintf(stderr, "CT3008 NG BAD signal st=%08x\n", st);
exit(1);
}
if (!WIFEXITED(st)) {
fprintf(stderr, "CT3008 NG BAD terminated st=%08x\n", st);
exit(1);
}
if (WEXITSTATUS(st) != 99) {
fprintf(stderr, "CT3008 NG BAD exit status st=%08x\n", st);
exit(1);
}
fprintf(stderr, "CT3008 OK\n");
exit(0);
}

View File

@@ -0,0 +1,7 @@
#!/bin/sh
MCEXEC=mcexec
dd if=/dev/zero of=testfile bs=$((1024 * 1024)) count=$((2 * 1024))
sync
sudo /sbin/sysctl vm.drop_caches=3
$MCEXEC ./CT3008
rm -f testfile

View File

@@ -0,0 +1,12 @@
#!/bin/sh
MCKERNEL_DIR=/home/shirasawa/wallaby11-smp-x86/development/mic
export PATH=$MCKERNEL_DIR/bin:$PATH
./CT3001.sh
./CT3002.sh
./CT3003.sh
./CT3004.sh
./CT3005.sh
./CT3006.sh
./CT3007.sh
./CT3008.sh

View File

@@ -0,0 +1,40 @@
スクリプトは Mon Feb 5 16:00:07 2018
に開始しました[?1034hbash-4.2$ make test
./CT300x.sh
signal hanlder is called
CT3001 OK
2048+0 レコード入力
2048+0 レコード出力
2147483648 バイト (2.1 GB) コピーされました、 19.5651 秒、 110 MB/秒
vm.drop_caches = 3
signal hanlder is called
CT3002 OK
CT3003 OK
2048+0 レコード入力
2048+0 レコード出力
2147483648 バイト (2.1 GB) コピーされました、 19.5383 秒、 110 MB/秒
vm.drop_caches = 3
CT3004 OK
kill SIGURG
kill SIGINT
CT3005 OK
2048+0 レコード入力
2048+0 レコード出力
2147483648 バイト (2.1 GB) コピーされました、 19.5148 秒、 110 MB/秒
vm.drop_caches = 3
kill SIGURG
CT3006 OK
kill SIGTERM (ignored)
kill SIGINT
CT3007 OK
2048+0 レコード入力
2048+0 レコード出力
2147483648 バイト (2.1 GB) コピーされました、 19.5614 秒、 110 MB/秒
vm.drop_caches = 3
kill SIGTERM (ignored)
CT3008 OK
bash-4.2$ exit
exit
スクリプトは Mon Feb 5 16:03:02 2018
に終了しました

View File

@@ -0,0 +1,33 @@
CC=gcc
TARGET=CT3001 CT3002 CT3003 CT3004 CT3005 CT3006 CT3007 CT3008
all:: $(TARGET)
CT3001: CT3001.c
$(CC) -o CT3001 $<
CT3002: CT3002.c
$(CC) -o CT3002 $<
CT3003: CT3003.c
$(CC) -o CT3003 $<
CT3004: CT3004.c
$(CC) -o CT3004 $<
CT3005: CT3005.c
$(CC) -o CT3005 $<
CT3006: CT3006.c
$(CC) -o CT3006 $<
CT3007: CT3007.c
$(CC) -o CT3007 $<
CT3008: CT3008.c
$(CC) -o CT3008 $<
test:: $(TARGET)
./CT300x.sh
clean::
rm -f $(TARGET)

View File

@@ -0,0 +1,32 @@
【Issue#863 動作確認】
1. Issue#863および、同件のIssue#870で指摘されたテストプログラムを用いて
現象が解消されていることを確認した。(2件)
実行結果(エビデンス)は以下の通り。
CT1001.txt Issue#863の指摘で使用されたテストプログラムの実行結果(OK 1件、NG 0件)
CT2001.txt Issue#870の指摘で使用されたテストプログラムの実行結果(OK 1件、NG 0件)
2. Issue#863の変更が既存シグナル機能に影響しないことを確認した。
確認内容は以下の通り。
CT3001 遅いI/Oシステムコール実行中にシグナルを受け、即座にシグナル
ハンドラが呼び出され、システムコールがEINTRを返却することを
確認する。
CT3002 遅くないI/Oシステムコール実行中にシグナルを受け、システム
コール完了後にシグナルハンドラが呼び出され、システムコール
が正常に終了することを確認する。
CT3003 遅いI/Oシステムコール実行中にプログラムを終了するシグナルを
受けとると、即座にプログラムが終了することを確認する。
CT3004 遅くないI/Oシステムコール実行中にプログラムを終了するシグナル
を受けとると、即座にプログラムを終了することを確認する。
CT3005 遅いI/Oシステムコール実行中にプログラムを終了しないシグナル(SIGURG)
を受けとっても、プログラムの実行に影響しないことを確認する。
CT3006 遅くないI/Oシステムコール実行中にプログラムを終了しないシグナル
(SIGURG)を受けとっても、プログラムの実行に影響しないことを確認する。
CT3007 遅いI/Oシステムコール実行中に無視(SIG_IGN)するシグナルを
受けとっても、プログラムの実行に影響しないことを確認する。
CT3008 遅くないI/Oシステムコール実行中に無視(SIG_IGN)するシグナルを
受けとっても、プログラムの実行に影響しないことを確認する。
CT300x の実行は、make test で行う。
エビデンスは CT300x.txt に示す。(OK 8件、NG 0件)

View File

@@ -0,0 +1,518 @@
スクリプトは Thu Feb 22 10:54:03 2018
に開始しました[?1034hbash-4.2$ ./mck-mcexec.sh ./killit -np 16 -t 2000 - ./signalonfork -nosignal
SUCCESS kmsg
SUCCESS clear_kmsg
SUCCESS mcexec
SUCCESS ./killit -np 16 -t 2000 mcexec ./signalonfork -nosignal
SUCCESS kmsg
FAIL kmsg 25 lines
[ 7]: do_syscall: proxy PID 29798 is dead, terminate()
[ 7]: ERROR: forking host process
[ 0]: do_syscall: proxy PID 29792 is dead, terminate()
[ 0]: ERROR: forking host process
[ 5]: do_syscall: proxy PID 29800 is dead, terminate()
[ 5]: ERROR: forking host process
[ 10]: do_syscall: proxy PID 29791 is dead, terminate()
[ 10]: ERROR: forking host process
[ 2]: do_syscall: proxy PID 29801 is dead, terminate()
[ 2]: ERROR: forking host process
[ 15]: do_syscall: proxy PID 29803 is dead, terminate()
[ 15]: ERROR: forking host process
[ 13]: do_syscall: proxy PID 29805 is dead, terminate()
[ 13]: ERROR: forking host process
[ 6]: do_syscall: proxy PID 29793 is dead, terminate()
[ 6]: ERROR: forking host process
[ 1]: do_syscall: proxy PID 29796 is dead, terminate()
[ 1]: ERROR: forking host process
[ 8]: do_syscall: proxy PID 29797 is dead, terminate()
[ 8]: ERROR: forking host process
[ 3]: do_syscall: proxy PID 29804 is dead, terminate()
[ 3]: ERROR: forking host process
[ 12]: do_syscall: proxy PID 29806 is dead, terminate()
[ 12]: ERROR: forking host process
bash-4.2$ ./ihkosctl 0 ioctl 40000000 1
bash-4.2$ ./ihkosctl 0 ioctl 40000000 2
bash-4.2$ ./ihkosctl 0 kmsg
[ 7]: do_syscall: proxy PID 29798 is dead, terminate()
[ 7]: ERROR: forking host process
[ 0]: do_syscall: proxy PID 29792 is dead, terminate()
[ 0]: ERROR: forking host process
[ 5]: do_syscall: proxy PID 29800 is dead, terminate()
[ 5]: ERROR: forking host process
[ 10]: do_syscall: proxy PID 29791 is dead, terminate()
[ 10]: ERROR: forking host process
[ 2]: do_syscall: proxy PID 29801 is dead, terminate()
[ 2]: ERROR: forking host process
[ 15]: do_syscall: proxy PID 29803 is dead, terminate()
[ 15]: ERROR: forking host process
[ 13]: do_syscall: proxy PID 29805 is dead, terminate()
[ 13]: ERROR: forking host process
[ 6]: do_syscall: proxy PID 29793 is dead, terminate()
[ 6]: ERROR: forking host process
[ 1]: do_syscall: proxy PID 29796 is dead, terminate()
[ 1]: ERROR: forking host process
[ 8]: do_syscall: proxy PID 29797 is dead, terminate()
[ 8]: ERROR: forking host process
[ 3]: do_syscall: proxy PID 29804 is dead, terminate()
[ 3]: ERROR: forking host process
[ 12]: do_syscall: proxy PID 29806 is dead, terminate()
[ 12]: ERROR: forking host process
[ 0]: 0 processes are found.
[ 0]: 0 threads are found.
bash-4.2$ ps axg|grep mcexec
6021 pts/1 S+ 0:00 grep mcexec
bash-4.2$ ./mck-mcexec.sh ./killit -np 16 -t 2000 - ./signalonfork -nosignal
SUCCESS kmsg
SUCCESS clear_kmsg
SUCCESS mcexec
SUCCESS ./killit -np 16 -t 2000 mcexec ./signalonfork -nosignal
SUCCESS kmsg
FAIL kmsg 30 lines
[ 6]: do_syscall: proxy PID 6078 is dead, terminate()
[ 6]: ERROR: forking host process
[ 14]: do_syscall: proxy PID 6086 is dead, terminate()
[ 10]: do_syscall: proxy PID 6077 is dead, terminate()
[ 10]: ERROR: forking host process
[ 9]: do_syscall: proxy PID 6076 is dead, terminate()
[ 9]: ERROR: forking host process
[ 4]: do_syscall: proxy PID 6081 is dead, terminate()
[ 4]: ERROR: forking host process
[ 5]: do_syscall: proxy PID 6075 is dead, terminate()
[ 5]: ERROR: forking host process
[ 11]: do_syscall: proxy PID 6082 is dead, terminate()
[ 11]: ERROR: forking host process
[ 3]: do_syscall: proxy PID 6073 is dead, terminate()
[ 3]: ERROR: forking host process
[ 12]: do_syscall: proxy PID 6084 is dead, terminate()
[ 12]: ERROR: forking host process
[ 8]: do_syscall: proxy PID 6085 is dead, terminate()
[ 8]: ERROR: forking host process
[ 1]: do_syscall: proxy PID 6074 is dead, terminate()
[ 1]: ERROR: forking host process
[ 0]: do_syscall: proxy PID 6072 is dead, terminate()
[ 0]: ERROR: forking host process
[ 7]: do_syscall: proxy PID 6083 is dead, terminate()
[ 7]: ERROR: forking host process
[ 2]: do_syscall: proxy PID 6080 is dead, terminate()
[ 2]: ERROR: forking host process
[ 13]: do_syscall: proxy PID 6079 is dead, terminate()
[ 13]: ERROR: forking host process
bash-4.2$ ./ihkosctl 0 ioctl 40000000 1
bash-4.2$ ./ihkosctl 0 ioctl 40000000 2
bash-4.2$ ./ihkosctl 0 kmsg
[ 6]: do_syscall: proxy PID 6078 is dead, terminate()
[ 6]: ERROR: forking host process
[ 14]: do_syscall: proxy PID 6086 is dead, terminate()
[ 10]: do_syscall: proxy PID 6077 is dead, terminate()
[ 10]: ERROR: forking host process
[ 9]: do_syscall: proxy PID 6076 is dead, terminate()
[ 9]: ERROR: forking host process
[ 4]: do_syscall: proxy PID 6081 is dead, terminate()
[ 4]: ERROR: forking host process
[ 5]: do_syscall: proxy PID 6075 is dead, terminate()
[ 5]: ERROR: forking host process
[ 11]: do_syscall: proxy PID 6082 is dead, terminate()
[ 11]: ERROR: forking host process
[ 3]: do_syscall: proxy PID 6073 is dead, terminate()
[ 3]: ERROR: forking host process
[ 12]: do_syscall: proxy PID 6084 is dead, terminate()
[ 12]: ERROR: forking host process
[ 8]: do_syscall: proxy PID 6085 is dead, terminate()
[ 8]: ERROR: forking host process
[ 1]: do_syscall: proxy PID 6074 is dead, terminate()
[ 1]: ERROR: forking host process
[ 0]: do_syscall: proxy PID 6072 is dead, terminate()
[ 0]: ERROR: forking host process
[ 7]: do_syscall: proxy PID 6083 is dead, terminate()
[ 7]: ERROR: forking host process
[ 2]: do_syscall: proxy PID 6080 is dead, terminate()
[ 2]: ERROR: forking host process
[ 13]: do_syscall: proxy PID 6079 is dead, terminate()
[ 13]: ERROR: forking host process
[ 0]: 0 processes are found.
[ 0]: 0 threads are found.
bash-4.2$ ps axg|grep mcexec
14805 pts/1 S+ 0:00 grep mcexec
bash-4.2$ ./mck-mcexec.sh ./killit -np 16 -t 2000 - ./signalonfork -nosignal
SUCCESS kmsg
SUCCESS clear_kmsg
SUCCESS mcexec
SUCCESS ./killit -np 16 -t 2000 mcexec ./signalonfork -nosignal
SUCCESS kmsg
FAIL kmsg 33 lines
[ 11]: do_syscall: proxy PID 14833 is dead, terminate()
[ 11]: ERROR: forking host process
[ 3]: do_syscall: proxy PID 14819 is dead, terminate()
[ 3]: ERROR: forking host process
[ 0]: do_syscall: proxy PID 14824 is dead, terminate()
[ 0]: ERROR: forking host process
[ 9]: do_syscall: proxy PID 14826 is dead, terminate()
[ 9]: ERROR: forking host process
[ 7]: do_syscall: proxy PID 14825 is dead, terminate()
[ 7]: ERROR: forking host process
[ 2]: do_syscall: proxy PID 14823 is dead, terminate()
[ 2]: ERROR: forking host process
[ 4]: do_syscall: proxy PID 14820 is dead, terminate()
[ 4]: ERROR: forking host process
[ 8]: do_syscall: proxy PID 14829 is dead, terminate()
[ 8]: ERROR: forking host process
[ 5]: do_syscall: proxy PID 14821 is dead, terminate()
[ 5]: ERROR: forking host process
[ 6]: do_syscall: proxy PID 14830 is dead, terminate()
[ 6]: ERROR: forking host process
[ 10]: do_syscall: proxy PID 14822 is dead, terminate()
[ 10]: ERROR: forking host process
[ 1]: do_syscall: proxy PID 14818 is dead, terminate()
[ 1]: ERROR: forking host process
[ 13]: do_syscall: proxy PID 14828 is dead, terminate()
[ 13]: ERROR: forking host process
[ 12]: do_syscall: proxy PID 14832 is dead, terminate()
[ 12]: ERROR: forking host process
[ 14]: do_syscall: proxy PID 14827 is dead, terminate()
[ 14]: ERROR: forking host process
[ 15]: do_syscall: proxy PID 14831 is dead, terminate()
[ 15]: ERROR: forking host process
bash-4.2$ ./ihkosctl 0 ioctl 40000000 1
bash-4.2$ ./ihkosctl 0 ioctl 40000000 2
bash-4.2$ ./ihkosctl 0 kmsg
[ 11]: do_syscall: proxy PID 14833 is dead, terminate()
[ 11]: ERROR: forking host process
[ 3]: do_syscall: proxy PID 14819 is dead, terminate()
[ 3]: ERROR: forking host process
[ 0]: do_syscall: proxy PID 14824 is dead, terminate()
[ 0]: ERROR: forking host process
[ 9]: do_syscall: proxy PID 14826 is dead, terminate()
[ 9]: ERROR: forking host process
[ 7]: do_syscall: proxy PID 14825 is dead, terminate()
[ 7]: ERROR: forking host process
[ 2]: do_syscall: proxy PID 14823 is dead, terminate()
[ 2]: ERROR: forking host process
[ 4]: do_syscall: proxy PID 14820 is dead, terminate()
[ 4]: ERROR: forking host process
[ 8]: do_syscall: proxy PID 14829 is dead, terminate()
[ 8]: ERROR: forking host process
[ 5]: do_syscall: proxy PID 14821 is dead, terminate()
[ 5]: ERROR: forking host process
[ 6]: do_syscall: proxy PID 14830 is dead, terminate()
[ 6]: ERROR: forking host process
[ 10]: do_syscall: proxy PID 14822 is dead, terminate()
[ 10]: ERROR: forking host process
[ 1]: do_syscall: proxy PID 14818 is dead, terminate()
[ 1]: ERROR: forking host process
[ 13]: do_syscall: proxy PID 14828 is dead, terminate()
[ 13]: ERROR: forking host process
[ 12]: do_syscall: proxy PID 14832 is dead, terminate()
[ 12]: ERROR: forking host process
[ 14]: do_syscall: proxy PID 14827 is dead, terminate()
[ 14]: ERROR: forking host process
[ 15]: do_syscall: proxy PID 14831 is dead, terminate()
[ 15]: ERROR: forking host process
[ 0]: 0 processes are found.
[ 0]: 0 threads are found.
bash-4.2$ ps axg|grep mcexec
23388 pts/1 S+ 0:00 grep mcexec
bash-4.2$ ./mck-mcexec.sh ./killit -np 16 -t 2000 - ./signalonfork -nosignal
SUCCESS kmsg
SUCCESS clear_kmsg
SUCCESS mcexec
SUCCESS ./killit -np 16 -t 2000 mcexec ./signalonfork -nosignal
SUCCESS kmsg
FAIL kmsg 33 lines
[ 14]: do_syscall: proxy PID 23412 is dead, terminate()
[ 14]: ERROR: forking host process
[ 15]: do_syscall: proxy PID 23403 is dead, terminate()
[ 15]: ERROR: forking host process
[ 1]: do_syscall: proxy PID 23401 is dead, terminate()
[ 1]: ERROR: forking host process
[ 0]: do_syscall: proxy PID 23405 is dead, terminate()
[ 0]: ERROR: forking host process
[ 2]: do_syscall: proxy PID 23404 is dead, terminate()
[ 2]: ERROR: forking host process
[ 3]: do_syscall: proxy PID 23402 is dead, terminate()
[ 3]: ERROR: forking host process
[ 4]: do_syscall: proxy PID 23414 is dead, terminate()
[ 4]: ERROR: forking host process
[ 5]: do_syscall: proxy PID 23413 is dead, terminate()
[ 5]: ERROR: forking host process
[ 8]: do_syscall: proxy PID 23407 is dead, terminate()
[ 8]: ERROR: forking host process
[ 6]: do_syscall: proxy PID 23411 is dead, terminate()
[ 6]: ERROR: forking host process
[ 13]: do_syscall: proxy PID 23416 is dead, terminate()
[ 13]: ERROR: forking host process
[ 12]: do_syscall: proxy PID 23410 is dead, terminate()
[ 12]: ERROR: forking host process
[ 9]: do_syscall: proxy PID 23406 is dead, terminate()
[ 9]: ERROR: forking host process
[ 7]: do_syscall: proxy PID 23409 is dead, terminate()
[ 7]: ERROR: forking host process
[ 10]: do_syscall: proxy PID 23408 is dead, terminate()
[ 10]: ERROR: forking host process
[ 11]: do_syscall: proxy PID 23415 is dead, terminate()
[ 11]: ERROR: forking host process
bash-4.2$ ./ihkosctl 0 ioctl 40000000 1
bash-4.2$ ./ihkosctl 0 ioctl 40000000 2
bash-4.2$ ./ihkosctl 0 kmsg
[ 14]: do_syscall: proxy PID 23412 is dead, terminate()
[ 14]: ERROR: forking host process
[ 15]: do_syscall: proxy PID 23403 is dead, terminate()
[ 15]: ERROR: forking host process
[ 1]: do_syscall: proxy PID 23401 is dead, terminate()
[ 1]: ERROR: forking host process
[ 0]: do_syscall: proxy PID 23405 is dead, terminate()
[ 0]: ERROR: forking host process
[ 2]: do_syscall: proxy PID 23404 is dead, terminate()
[ 2]: ERROR: forking host process
[ 3]: do_syscall: proxy PID 23402 is dead, terminate()
[ 3]: ERROR: forking host process
[ 4]: do_syscall: proxy PID 23414 is dead, terminate()
[ 4]: ERROR: forking host process
[ 5]: do_syscall: proxy PID 23413 is dead, terminate()
[ 5]: ERROR: forking host process
[ 8]: do_syscall: proxy PID 23407 is dead, terminate()
[ 8]: ERROR: forking host process
[ 6]: do_syscall: proxy PID 23411 is dead, terminate()
[ 6]: ERROR: forking host process
[ 13]: do_syscall: proxy PID 23416 is dead, terminate()
[ 13]: ERROR: forking host process
[ 12]: do_syscall: proxy PID 23410 is dead, terminate()
[ 12]: ERROR: forking host process
[ 9]: do_syscall: proxy PID 23406 is dead, terminate()
[ 9]: ERROR: forking host process
[ 7]: do_syscall: proxy PID 23409 is dead, terminate()
[ 7]: ERROR: forking host process
[ 10]: do_syscall: proxy PID 23408 is dead, terminate()
[ 10]: ERROR: forking host process
[ 11]: do_syscall: proxy PID 23415 is dead, terminate()
[ 11]: ERROR: forking host process
[ 0]: 0 processes are found.
[ 0]: 0 threads are found.
bash-4.2$ ps axg|grep mcexec
31727 pts/1 S+ 0:00 grep mcexec
bash-4.2$ ./mck-mcexec.sh ./killit -np 16 -t 2000 - ./signalonfork -nosignal
SUCCESS kmsg
SUCCESS clear_kmsg
SUCCESS mcexec
SUCCESS ./killit -np 16 -t 2000 mcexec ./signalonfork -nosignal
SUCCESS kmsg
FAIL kmsg 29 lines
[ 8]: do_syscall: proxy PID 31749 is dead, terminate()
[ 8]: ERROR: forking host process
[ 2]: do_syscall: proxy PID 31759 is dead, terminate()
[ 2]: ERROR: forking host process
[ 0]: do_syscall: proxy PID 31748 is dead, terminate()
[ 0]: ERROR: forking host process
[ 3]: do_syscall: proxy PID 31754 is dead, terminate()
[ 3]: ERROR: forking host process
[ 5]: do_syscall: proxy PID 31752 is dead, terminate()
[ 5]: ERROR: forking host process
[ 11]: do_syscall: proxy PID 31758 is dead, terminate()
[ 11]: ERROR: forking host process
[ 9]: do_syscall: proxy PID 31751 is dead, terminate()
[ 9]: ERROR: forking host process
[ 13]: do_syscall: proxy PID 31750 is dead, terminate()
[ 13]: ERROR: forking host process
[ 7]: do_syscall: proxy PID 31760 is dead, terminate()
[ 7]: ERROR: forking host process
[ 4]: do_syscall: proxy PID 31761 is dead, terminate()
[ 4]: ERROR: forking host process
[ 6]: do_syscall: proxy PID 31762 is dead, terminate()
[ 6]: ERROR: forking host process
[ 15]: do_syscall: proxy PID 31753 is dead, terminate()
[ 15]: ERROR: forking host process
[ 10]: do_syscall: proxy PID 31755 is dead, terminate()
[ 10]: ERROR: forking host process
[ 14]: do_syscall: proxy PID 31763 is dead, terminate()
[ 14]: ERROR: forking host process
bash-4.2$ ./ihkosctl 0 ioctl 40000000 1
bash-4.2$ ./ihkosctl 0 ioctl 40000000 2
bash-4.2$ ./ihkosctl 0 kmsg
[ 8]: do_syscall: proxy PID 31749 is dead, terminate()
[ 8]: ERROR: forking host process
[ 2]: do_syscall: proxy PID 31759 is dead, terminate()
[ 2]: ERROR: forking host process
[ 0]: do_syscall: proxy PID 31748 is dead, terminate()
[ 0]: ERROR: forking host process
[ 3]: do_syscall: proxy PID 31754 is dead, terminate()
[ 3]: ERROR: forking host process
[ 5]: do_syscall: proxy PID 31752 is dead, terminate()
[ 5]: ERROR: forking host process
[ 11]: do_syscall: proxy PID 31758 is dead, terminate()
[ 11]: ERROR: forking host process
[ 9]: do_syscall: proxy PID 31751 is dead, terminate()
[ 9]: ERROR: forking host process
[ 13]: do_syscall: proxy PID 31750 is dead, terminate()
[ 13]: ERROR: forking host process
[ 7]: do_syscall: proxy PID 31760 is dead, terminate()
[ 7]: ERROR: forking host process
[ 4]: do_syscall: proxy PID 31761 is dead, terminate()
[ 4]: ERROR: forking host process
[ 6]: do_syscall: proxy PID 31762 is dead, terminate()
[ 6]: ERROR: forking host process
[ 15]: do_syscall: proxy PID 31753 is dead, terminate()
[ 15]: ERROR: forking host process
[ 10]: do_syscall: proxy PID 31755 is dead, terminate()
[ 10]: ERROR: forking host process
[ 14]: do_syscall: proxy PID 31763 is dead, terminate()
[ 14]: ERROR: forking host process
[ 0]: 0 processes are found.
[ 0]: 0 threads are found.
bash-4.2$ ps axg|grep mcexec
7914 pts/1 S+ 0:00 grep mcexec
bash-4.2$ ./mck-mcexec.sh ./killit -np 16 -t 2000 - ./signalonfork -nosignal
SUCCESS kmsg
SUCCESS clear_kmsg
SUCCESS mcexec
SUCCESS ./killit -np 16 -t 2000 mcexec ./signalonfork -nosignal
SUCCESS kmsg
FAIL kmsg 29 lines
[ 0]: do_syscall: proxy PID 7929 is dead, terminate()
[ 0]: ERROR: forking host process
[ 1]: do_syscall: proxy PID 7933 is dead, terminate()
[ 1]: ERROR: forking host process
[ 5]: do_syscall: proxy PID 7928 is dead, terminate()
[ 5]: ERROR: forking host process
[ 7]: do_syscall: proxy PID 7934 is dead, terminate()
[ 7]: ERROR: forking host process
[ 8]: do_syscall: proxy PID 7938 is dead, terminate()
[ 8]: ERROR: forking host process
[ 4]: do_syscall: proxy PID 7931 is dead, terminate()
[ 4]: ERROR: forking host process
[ 14]: do_syscall: proxy PID 7942 is dead, terminate()
[ 14]: ERROR: forking host process
[ 6]: do_syscall: proxy PID 7935 is dead, terminate()
[ 6]: ERROR: forking host process
[ 2]: do_syscall: proxy PID 7936 is dead, terminate()
[ 2]: ERROR: forking host process
[ 10]: do_syscall: proxy PID 7932 is dead, terminate()
[ 10]: ERROR: forking host process
[ 13]: do_syscall: proxy PID 7937 is dead, terminate()
[ 13]: ERROR: forking host process
[ 11]: do_syscall: proxy PID 7927 is dead, terminate()
[ 11]: ERROR: forking host process
[ 9]: do_syscall: proxy PID 7941 is dead, terminate()
[ 9]: ERROR: forking host process
[ 12]: do_syscall: proxy PID 7939 is dead, terminate()
[ 12]: ERROR: forking host process
bash-4.2$ ./ihkosctl 0 ioctl 40000000 1
bash-4.2$ ./ihkosctl 0 ioctl 40000000 2
bash-4.2$ ./ihkosctl 0 kmsg
[ 0]: do_syscall: proxy PID 7929 is dead, terminate()
[ 0]: ERROR: forking host process
[ 1]: do_syscall: proxy PID 7933 is dead, terminate()
[ 1]: ERROR: forking host process
[ 5]: do_syscall: proxy PID 7928 is dead, terminate()
[ 5]: ERROR: forking host process
[ 7]: do_syscall: proxy PID 7934 is dead, terminate()
[ 7]: ERROR: forking host process
[ 8]: do_syscall: proxy PID 7938 is dead, terminate()
[ 8]: ERROR: forking host process
[ 4]: do_syscall: proxy PID 7931 is dead, terminate()
[ 4]: ERROR: forking host process
[ 14]: do_syscall: proxy PID 7942 is dead, terminate()
[ 14]: ERROR: forking host process
[ 6]: do_syscall: proxy PID 7935 is dead, terminate()
[ 6]: ERROR: forking host process
[ 2]: do_syscall: proxy PID 7936 is dead, terminate()
[ 2]: ERROR: forking host process
[ 10]: do_syscall: proxy PID 7932 is dead, terminate()
[ 10]: ERROR: forking host process
[ 13]: do_syscall: proxy PID 7937 is dead, terminate()
[ 13]: ERROR: forking host process
[ 11]: do_syscall: proxy PID 7927 is dead, terminate()
[ 11]: ERROR: forking host process
[ 9]: do_syscall: proxy PID 7941 is dead, terminate()
[ 9]: ERROR: forking host process
[ 12]: do_syscall: proxy PID 7939 is dead, terminate()
[ 12]: ERROR: forking host process
[ 0]: 0 processes are found.
[ 0]: 0 threads are found.
bash-4.2$ ps axg|grep mcexec
16649 pts/1 S+ 0:00 grep mcexec
bash-4.2$ ./mck-mcexec.sh ./killit -np 16 -t 2000 - ./signalonfork -nosignal
SUCCESS kmsg
SUCCESS clear_kmsg
SUCCESS mcexec
SUCCESS ./killit -np 16 -t 2000 mcexec ./signalonfork -nosignal
SUCCESS kmsg
FAIL kmsg 28 lines
[ 12]: do_syscall: proxy PID 16672 is dead, terminate()
[ 12]: ERROR: forking host process
[ 15]: do_syscall: proxy PID 16667 is dead, terminate()
[ 15]: ERROR: forking host process
[ 10]: do_syscall: proxy PID 16676 is dead, terminate()
[ 10]: ERROR: forking host process
[ 0]: do_syscall: proxy PID 16664 is dead, terminate()
[ 0]: ERROR: forking host process
[ 8]: do_syscall: proxy PID 16673 is dead, terminate()
[ 8]: ERROR: forking host process
[ 2]: do_syscall: proxy PID 16677 is dead, terminate()
[ 2]: ERROR: forking host process
[ 7]: do_syscall: proxy PID 16662 is dead, terminate()
[ 7]: ERROR: forking host process
[ 1]: do_syscall: proxy PID 16663 is dead, terminate()
[ 1]: ERROR: forking host process
[ 13]: do_syscall: proxy PID 16671 is dead, terminate()
[ 13]: ERROR: forking host process
[ 6]: do_syscall: proxy PID 16669 is dead, terminate()
[ 6]: ERROR: forking host process
[ 3]: do_syscall: proxy PID 16670 is dead, terminate()
[ 3]: ERROR: forking host process
[ 4]: do_syscall: proxy PID 16666 is dead, terminate()
[ 4]: ERROR: forking host process
[ 9]: do_syscall: proxy PID 16668 is dead, terminate()
[ 11]: do_syscall: proxy PID 16675 is dead, terminate()
[ 11]: ERROR: forking host process
bash-4.2$ ./ihkosctl 0 ioctl 40000000 1
bash-4.2$ ./ihkosctl 0 ioctl 40000000 2
bash-4.2$ ./ihkosctl 0 kmsg
[ 12]: do_syscall: proxy PID 16672 is dead, terminate()
[ 12]: ERROR: forking host process
[ 15]: do_syscall: proxy PID 16667 is dead, terminate()
[ 15]: ERROR: forking host process
[ 10]: do_syscall: proxy PID 16676 is dead, terminate()
[ 10]: ERROR: forking host process
[ 0]: do_syscall: proxy PID 16664 is dead, terminate()
[ 0]: ERROR: forking host process
[ 8]: do_syscall: proxy PID 16673 is dead, terminate()
[ 8]: ERROR: forking host process
[ 2]: do_syscall: proxy PID 16677 is dead, terminate()
[ 2]: ERROR: forking host process
[ 7]: do_syscall: proxy PID 16662 is dead, terminate()
[ 7]: ERROR: forking host process
[ 1]: do_syscall: proxy PID 16663 is dead, terminate()
[ 1]: ERROR: forking host process
[ 13]: do_syscall: proxy PID 16671 is dead, terminate()
[ 13]: ERROR: forking host process
[ 6]: do_syscall: proxy PID 16669 is dead, terminate()
[ 6]: ERROR: forking host process
[ 3]: do_syscall: proxy PID 16670 is dead, terminate()
[ 3]: ERROR: forking host process
[ 4]: do_syscall: proxy PID 16666 is dead, terminate()
[ 4]: ERROR: forking host process
[ 9]: do_syscall: proxy PID 16668 is dead, terminate()
[ 11]: do_syscall: proxy PID 16675 is dead, terminate()
[ 11]: ERROR: forking host process
[ 0]: 0 processes are found.
[ 0]: 0 threads are found.
bash-4.2$ ps axg|grep mcexec
25296 pts/1 S+ 0:00 grep mcexec
bash-4.2$ exit
exit
スクリプトは Thu Feb 22 10:58:33 2018
に終了しました

View File

@@ -0,0 +1,30 @@
【Issue#882 動作確認】
1. Issue#882で指摘されたテストプログラムを用いて現象が解消されていることを
確認した。(テストプログラム1本、確認項目3件)
実行結果(エビデンス)は以下の通り。
CT1001-3.txt Issue#882の指摘で使用されたテストプログラムの実行結果
(OK 3件、NG 0件)
McKernelにプロセス残留が無いこと(ihkosctl 0 ioctl 40000000 1の結果 0)
McKernelにスレッド残留が無いこと(ihkosctl 0 ioctl 40000000 2の結果 0)
Linuxにmcexecプロセス残留が無いこと(ps axg|grep mcexecの結果、プロセスなし)
尚、タイミングによって発生しない可能性があるため、複数回(5回以上)繰り返し実行
し、再発しないことを確認した。
2. Issue#882の変更が既存fork機能に影響しないことをLTPを用いて確認した。
(テストプログラム6本、確認項目12件)
実行結果(エビデンス)は以下の通り。
fork01.txt fork後に子プロセスのプロセスIDが正しいことを確認 (OK 2件)
fork02.txt fork後にwaitを行い、waitが子プロセスのPIDを返却することを確認(OK 1件)
fork03.txt forkで生成した子プロセスが処理を行った後でもfork返却値に変化が無い
(親プロセス側の返却値で上書きされていない)ことを確認 (OK 1件)
fork04.txt forkで生成した子プロセスが環境変数を変更しても、親プロセス側の
環境変数に変化が無いことを確認 (OK 3件)
fork07.txt forkした子プロセスに、親プロセスからファイルディスクリプタを
引き継いでいることを確認 (OK 1件)
fork08.txt forkした複数の子プロセスが、それぞれ親プロセスから引き継いだファイル
ディスクリプタを別個に操作できることを確認
(ある子プロセスがcloseしても別な子プロセスがI/O可能) (OK 4件)

View File

@@ -0,0 +1,222 @@
Thu Feb 22 11:34:28 JST 2018
/work/mcktest/ltp/output /work/mcktest/ltp
/work/mcktest/ltp
/work/mcktest/ltp/results /work/mcktest/ltp
/work/mcktest/ltp
INFO: creating /work/mcktest/ltp/results directory
Checking for required user/group ids
'nobody' user id and group found.
'bin' user id and group found.
'daemon' user id and group found.
Users group found.
Sys group found.
Required users/groups exist.
If some fields are empty or look unusual you may have an old version.
Compare to the current minimal requirements in Documentation/Changes.
CentOS Linux release 7.3.1611 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
CentOS Linux release 7.3.1611 (Core)
CentOS Linux release 7.3.1611 (Core)
Linux wallaby11.aics-sys.riken.jp 3.10.0-693.1.1.el7.x86_64 #1 SMP Tue Aug 29 22:28:02 JST 2017 x86_64 x86_64 x86_64 GNU/Linux
Gnu C gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11)
Gnu make 3.82
util-linux linux 2.23.2
mount linux 2.23.2 (libmount 2.23.0: selinux, debug, assert)
modutils 20
e2fsprogs 1.42.9
PPP 2.4.5
Linux C Library > libc.2.17
Dynamic linker (ldd) 2.17
Procps 3.3.10
Net-tools 2.10-alpha
iproute2 iproute2-ss130716
Kbd 1.15.5
Sh-utils 8.22
Modules Loaded mcoverlay mcctrl ihk_smp_x86_64 ihk xt_CHECKSUM ipt_MASQUERADE nf_nat_masquerade_ipv4 tun rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache ip6t_rpfilter ipt_REJECT nf_reject_ipv4 ip6t_REJECT nf_reject_ipv6 xt_conntrack ip_set nfnetlink ebtable_nat ebtable_broute bridge stp llc ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack libcrc32c iptable_mangle iptable_security iptable_raw ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter rpcrdma ib_isert iscsi_target_mod ib_iser libiscsi scsi_transport_iscsi ib_srpt target_core_mod ib_srp scsi_transport_srp scsi_tgt ib_ipoib rdma_ucm ib_ucm ib_uverbs ib_umad rdma_cm ib_cm iw_cm mlx4_ib ib_core dm_mirror dm_region_hash dm_log dm_mod sb_edac edac_core intel_powerclamp coretemp intel_rapl iosf_mbi kvm_intel kvm irqbypass crc32_pclmul iTCO_wdt ghash_clmulni_intel joydev iTCO_vendor_support aesni_intel lrw gf128mul glue_helper ablk_helper pcspkr ioatdma cryptd ipmi_si ipmi_devintf ipmi_msghandler i2c_i801 wmi lpc_ich mei_me mei sg shpchp nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables ext4 mbcache jbd2 mlx4_en sd_mod crc_t10dif crct10dif_generic mgag200 drm_kms_helper syscopyarea sysfillrect isci sysimgblt fb_sys_fops ttm libsas drm mlx4_core igb ahci scsi_transport_sas libahci libata crct10dif_pclmul crct10dif_common crc32c_intel ptp pps_core dca i2c_algo_bit i2c_core devlink
free reports:
total used free shared buff/cache available
Mem: 65772228 2878184 58208296 9476 4685748 62381840
Swap: 33554428 0 33554428
/proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping : 4
microcode : 0x428
cpu MHz : 2599.898
cache size : 20480 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts
bogomips : 5200.02
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 8
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping : 4
microcode : 0x428
cpu MHz : 2599.898
cache size : 20480 KB
physical id : 1
siblings : 2
core id : 0
cpu cores : 1
apicid : 32
initial apicid : 32
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts
bogomips : 5205.57
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 16
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping : 4
microcode : 0x428
cpu MHz : 2600.000
cache size : 20480 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts
bogomips : 5200.02
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 24
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping : 4
microcode : 0x428
cpu MHz : 2600.507
cache size : 20480 KB
physical id : 1
siblings : 2
core id : 0
cpu cores : 1
apicid : 33
initial apicid : 33
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts
bogomips : 5205.57
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
no big block device was specified on commandline.
Tests which require a big block device are disabled.
You can specify it with option -z
COMMAND: /work/mcktest/ltp/bin/ltp-pan -e -S -a 7938 -n 7938 -p -f /tmp/ltp-UKNGX7Nocd/alltests -l /work/mcktest/ltp/results/LTP_RUN_ON-2018_02_22-11h_34m_29s.log -C /work/mcktest/ltp/output/LTP_RUN_ON-2018_02_22-11h_34m_29s.failed -T /work/mcktest/ltp/output/LTP_RUN_ON-2018_02_22-11h_34m_29s.tconf
LOG File: /work/mcktest/ltp/results/LTP_RUN_ON-2018_02_22-11h_34m_29s.log
FAILED COMMAND File: /work/mcktest/ltp/output/LTP_RUN_ON-2018_02_22-11h_34m_29s.failed
TCONF COMMAND File: /work/mcktest/ltp/output/LTP_RUN_ON-2018_02_22-11h_34m_29s.tconf
Running tests.......
<<<test_start>>>
tag=fork01 stime=1519266872
cmdline="fork01"
contacts=""
analysis=exit
<<<test_output>>>
fork01 1 TPASS : fork() returned 8136
fork01 2 TPASS : child pid and fork() return agree: 8136
incrementing stop
<<<execution_status>>>
initiation_status="ok"
duration=11 termination_type=exited termination_id=0 corefile=no
cutime=1 cstime=3
<<<test_end>>>
Terminated
INFO: ltp-pan reported all tests PASS
LTP Version: 20150420
###############################################################
Done executing testcases.
LTP Version: 20150420
###############################################################
Thu Feb 22 11:34:48 JST 2018
IHK/McKernel started.
[ -1]: no_execute_available: 1
[ -1]: X86_IA32_NUM_PERF_COUNTERS: 4, X86_IA32_NUM_FIXED_PERF_COUNTERS: 3
[ -1]: Invariant TSC supported.
[ -1]: setup_x86 done.
[ -1]: ns_per_tsc: 384
[ -1]: KCommand Line: hidos dump_level=24
[ -1]: Physical memory: 0x1002c8000 - 0x140000000, 1070825472 bytes, 261432 pages available @ NUMA: 0
[ -1]: Physical memory: 0x880000000 - 0x8c0000000, 1073741824 bytes, 262144 pages available @ NUMA: 1
[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 1070825472, pages: 261432
[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 1073741824, pages: 262144
[ -1]: NUMA 0 distances: 0 (10), 1 (21),
[ -1]: NUMA 1 distances: 1 (10), 0 (21),
[ -1]: map_fixed: phys: 0x8a000 => 0xffffffff70015000 (2 pages)
[ -1]: Trampoline area: 0x8a000
[ -1]: map_fixed: phys: 0x0 => 0xffffffff70017000 (1 pages)
[ -1]: # of cpus : 28
[ -1]: locals = ffff800880024000
[ 0]: BSP: 0 (HW ID: 2 @ NUMA 0)
[ 0]: BSP: booted 27 AP CPUs
[ 0]: Master channel init acked.
[ 0]: vdso is enabled
IHK/McKernel booted.
PASS

View File

@@ -0,0 +1,224 @@
Thu Feb 22 11:34:48 JST 2018
/work/mcktest/ltp/output /work/mcktest/ltp
/work/mcktest/ltp
/work/mcktest/ltp/results /work/mcktest/ltp
/work/mcktest/ltp
INFO: creating /work/mcktest/ltp/results directory
Checking for required user/group ids
'nobody' user id and group found.
'bin' user id and group found.
'daemon' user id and group found.
Users group found.
Sys group found.
Required users/groups exist.
If some fields are empty or look unusual you may have an old version.
Compare to the current minimal requirements in Documentation/Changes.
CentOS Linux release 7.3.1611 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
CentOS Linux release 7.3.1611 (Core)
CentOS Linux release 7.3.1611 (Core)
Linux wallaby11.aics-sys.riken.jp 3.10.0-693.1.1.el7.x86_64 #1 SMP Tue Aug 29 22:28:02 JST 2017 x86_64 x86_64 x86_64 GNU/Linux
Gnu C gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11)
Gnu make 3.82
util-linux linux 2.23.2
mount linux 2.23.2 (libmount 2.23.0: selinux, debug, assert)
modutils 20
e2fsprogs 1.42.9
PPP 2.4.5
Linux C Library > libc.2.17
Dynamic linker (ldd) 2.17
Procps 3.3.10
Net-tools 2.10-alpha
iproute2 iproute2-ss130716
Kbd 1.15.5
Sh-utils 8.22
Modules Loaded loop mcoverlay mcctrl ihk_smp_x86_64 ihk xt_CHECKSUM ipt_MASQUERADE nf_nat_masquerade_ipv4 tun rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache ip6t_rpfilter ipt_REJECT nf_reject_ipv4 ip6t_REJECT nf_reject_ipv6 xt_conntrack ip_set nfnetlink ebtable_nat ebtable_broute bridge stp llc ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack libcrc32c iptable_mangle iptable_security iptable_raw ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter rpcrdma ib_isert iscsi_target_mod ib_iser libiscsi scsi_transport_iscsi ib_srpt target_core_mod ib_srp scsi_transport_srp scsi_tgt ib_ipoib rdma_ucm ib_ucm ib_uverbs ib_umad rdma_cm ib_cm iw_cm mlx4_ib ib_core dm_mirror dm_region_hash dm_log dm_mod sb_edac edac_core intel_powerclamp coretemp intel_rapl iosf_mbi kvm_intel kvm irqbypass crc32_pclmul iTCO_wdt ghash_clmulni_intel joydev iTCO_vendor_support aesni_intel lrw gf128mul glue_helper ablk_helper pcspkr ioatdma cryptd ipmi_si ipmi_devintf ipmi_msghandler i2c_i801 wmi lpc_ich mei_me mei sg shpchp nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables ext4 mbcache jbd2 mlx4_en sd_mod crc_t10dif crct10dif_generic mgag200 drm_kms_helper syscopyarea sysfillrect isci sysimgblt fb_sys_fops ttm libsas drm mlx4_core igb ahci scsi_transport_sas libahci libata crct10dif_pclmul crct10dif_common crc32c_intel ptp pps_core dca i2c_algo_bit i2c_core devlink
free reports:
total used free shared buff/cache available
Mem: 65772228 2879548 57828736 9480 5063944 62376968
Swap: 33554428 0 33554428
/proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping : 4
microcode : 0x428
cpu MHz : 2600.000
cache size : 20480 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts
bogomips : 5200.02
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 8
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping : 4
microcode : 0x428
cpu MHz : 2599.898
cache size : 20480 KB
physical id : 1
siblings : 2
core id : 0
cpu cores : 1
apicid : 32
initial apicid : 32
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts
bogomips : 5205.57
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 16
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping : 4
microcode : 0x428
cpu MHz : 2600.000
cache size : 20480 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts
bogomips : 5200.02
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 24
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping : 4
microcode : 0x428
cpu MHz : 2600.000
cache size : 20480 KB
physical id : 1
siblings : 2
core id : 0
cpu cores : 1
apicid : 33
initial apicid : 33
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts
bogomips : 5205.57
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
no big block device was specified on commandline.
Tests which require a big block device are disabled.
You can specify it with option -z
COMMAND: /work/mcktest/ltp/bin/ltp-pan -e -S -a 8202 -n 8202 -p -f /tmp/ltp-cEslogTr79/alltests -l /work/mcktest/ltp/results/LTP_RUN_ON-2018_02_22-11h_34m_48s.log -C /work/mcktest/ltp/output/LTP_RUN_ON-2018_02_22-11h_34m_48s.failed -T /work/mcktest/ltp/output/LTP_RUN_ON-2018_02_22-11h_34m_48s.tconf
LOG File: /work/mcktest/ltp/results/LTP_RUN_ON-2018_02_22-11h_34m_48s.log
FAILED COMMAND File: /work/mcktest/ltp/output/LTP_RUN_ON-2018_02_22-11h_34m_48s.failed
TCONF COMMAND File: /work/mcktest/ltp/output/LTP_RUN_ON-2018_02_22-11h_34m_48s.tconf
Running tests.......
<<<test_start>>>
tag=fork02 stime=1519266888
cmdline="fork02"
contacts=""
analysis=exit
<<<test_output>>>
fork02 0 TINFO : Inside parent
fork02 0 TINFO : Inside child
fork02 0 TINFO : exit status of wait 0
fork02 1 TPASS : test 1 PASSED
Terminated
incrementing stop
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=0 corefile=no
cutime=1 cstime=2
<<<test_end>>>
INFO: ltp-pan reported all tests PASS
LTP Version: 20150420
###############################################################
Done executing testcases.
LTP Version: 20150420
###############################################################
Thu Feb 22 11:34:53 JST 2018
IHK/McKernel started.
[ -1]: no_execute_available: 1
[ -1]: X86_IA32_NUM_PERF_COUNTERS: 4, X86_IA32_NUM_FIXED_PERF_COUNTERS: 3
[ -1]: Invariant TSC supported.
[ -1]: setup_x86 done.
[ -1]: ns_per_tsc: 384
[ -1]: KCommand Line: hidos dump_level=24
[ -1]: Physical memory: 0x1002c8000 - 0x140000000, 1070825472 bytes, 261432 pages available @ NUMA: 0
[ -1]: Physical memory: 0x880000000 - 0x8c0000000, 1073741824 bytes, 262144 pages available @ NUMA: 1
[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 1070825472, pages: 261432
[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 1073741824, pages: 262144
[ -1]: NUMA 0 distances: 0 (10), 1 (21),
[ -1]: NUMA 1 distances: 1 (10), 0 (21),
[ -1]: map_fixed: phys: 0x8a000 => 0xffffffff70015000 (2 pages)
[ -1]: Trampoline area: 0x8a000
[ -1]: map_fixed: phys: 0x0 => 0xffffffff70017000 (1 pages)
[ -1]: # of cpus : 28
[ -1]: locals = ffff800880024000
[ 0]: BSP: 0 (HW ID: 2 @ NUMA 0)
[ 0]: BSP: booted 27 AP CPUs
[ 0]: Master channel init acked.
[ 0]: vdso is enabled
IHK/McKernel booted.
PASS

View File

@@ -0,0 +1,222 @@
Thu Feb 22 11:34:53 JST 2018
/work/mcktest/ltp/output /work/mcktest/ltp
/work/mcktest/ltp
/work/mcktest/ltp/results /work/mcktest/ltp
/work/mcktest/ltp
INFO: creating /work/mcktest/ltp/results directory
Checking for required user/group ids
'nobody' user id and group found.
'bin' user id and group found.
'daemon' user id and group found.
Users group found.
Sys group found.
Required users/groups exist.
If some fields are empty or look unusual you may have an old version.
Compare to the current minimal requirements in Documentation/Changes.
CentOS Linux release 7.3.1611 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
CentOS Linux release 7.3.1611 (Core)
CentOS Linux release 7.3.1611 (Core)
Linux wallaby11.aics-sys.riken.jp 3.10.0-693.1.1.el7.x86_64 #1 SMP Tue Aug 29 22:28:02 JST 2017 x86_64 x86_64 x86_64 GNU/Linux
Gnu C gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11)
Gnu make 3.82
util-linux linux 2.23.2
mount linux 2.23.2 (libmount 2.23.0: selinux, debug, assert)
modutils 20
e2fsprogs 1.42.9
PPP 2.4.5
Linux C Library > libc.2.17
Dynamic linker (ldd) 2.17
Procps 3.3.10
Net-tools 2.10-alpha
iproute2 iproute2-ss130716
Kbd 1.15.5
Sh-utils 8.22
Modules Loaded loop mcoverlay mcctrl ihk_smp_x86_64 ihk xt_CHECKSUM ipt_MASQUERADE nf_nat_masquerade_ipv4 tun rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache ip6t_rpfilter ipt_REJECT nf_reject_ipv4 ip6t_REJECT nf_reject_ipv6 xt_conntrack ip_set nfnetlink ebtable_nat ebtable_broute bridge stp llc ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack libcrc32c iptable_mangle iptable_security iptable_raw ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter rpcrdma ib_isert iscsi_target_mod ib_iser libiscsi scsi_transport_iscsi ib_srpt target_core_mod ib_srp scsi_transport_srp scsi_tgt ib_ipoib rdma_ucm ib_ucm ib_uverbs ib_umad rdma_cm ib_cm iw_cm mlx4_ib ib_core dm_mirror dm_region_hash dm_log dm_mod sb_edac edac_core intel_powerclamp coretemp intel_rapl iosf_mbi kvm_intel kvm irqbypass crc32_pclmul iTCO_wdt ghash_clmulni_intel joydev iTCO_vendor_support aesni_intel lrw gf128mul glue_helper ablk_helper pcspkr ioatdma cryptd ipmi_si ipmi_devintf ipmi_msghandler i2c_i801 wmi lpc_ich mei_me mei sg shpchp nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables ext4 mbcache jbd2 mlx4_en sd_mod crc_t10dif crct10dif_generic mgag200 drm_kms_helper syscopyarea sysfillrect isci sysimgblt fb_sys_fops ttm libsas drm mlx4_core igb ahci scsi_transport_sas libahci libata crct10dif_pclmul crct10dif_common crc32c_intel ptp pps_core dca i2c_algo_bit i2c_core devlink
free reports:
total used free shared buff/cache available
Mem: 65772228 2854648 57628544 9480 5289036 62401372
Swap: 33554428 0 33554428
/proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping : 4
microcode : 0x428
cpu MHz : 2600.000
cache size : 20480 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts
bogomips : 5200.02
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 8
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping : 4
microcode : 0x428
cpu MHz : 2599.898
cache size : 20480 KB
physical id : 1
siblings : 2
core id : 0
cpu cores : 1
apicid : 32
initial apicid : 32
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts
bogomips : 5205.57
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 16
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping : 4
microcode : 0x428
cpu MHz : 2600.000
cache size : 20480 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts
bogomips : 5200.02
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 24
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping : 4
microcode : 0x428
cpu MHz : 2600.000
cache size : 20480 KB
physical id : 1
siblings : 2
core id : 0
cpu cores : 1
apicid : 33
initial apicid : 33
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts
bogomips : 5205.57
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
no big block device was specified on commandline.
Tests which require a big block device are disabled.
You can specify it with option -z
COMMAND: /work/mcktest/ltp/bin/ltp-pan -e -S -a 8457 -n 8457 -p -f /tmp/ltp-m4m2EsXERb/alltests -l /work/mcktest/ltp/results/LTP_RUN_ON-2018_02_22-11h_34m_53s.log -C /work/mcktest/ltp/output/LTP_RUN_ON-2018_02_22-11h_34m_53s.failed -T /work/mcktest/ltp/output/LTP_RUN_ON-2018_02_22-11h_34m_53s.tconf
LOG File: /work/mcktest/ltp/results/LTP_RUN_ON-2018_02_22-11h_34m_53s.log
FAILED COMMAND File: /work/mcktest/ltp/output/LTP_RUN_ON-2018_02_22-11h_34m_53s.failed
TCONF COMMAND File: /work/mcktest/ltp/output/LTP_RUN_ON-2018_02_22-11h_34m_53s.tconf
Running tests.......
<<<test_start>>>
tag=fork03 stime=1519266894
cmdline="fork03"
contacts=""
analysis=exit
<<<test_output>>>
fork03 0 TINFO : process id in parent of child from fork : 8638
fork03 1 TPASS : test 1 PASSED
incrementing stop
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=0 corefile=no
cutime=1 cstime=2
<<<test_end>>>
Terminated
INFO: ltp-pan reported all tests PASS
LTP Version: 20150420
###############################################################
Done executing testcases.
LTP Version: 20150420
###############################################################
Thu Feb 22 11:34:59 JST 2018
IHK/McKernel started.
[ -1]: no_execute_available: 1
[ -1]: X86_IA32_NUM_PERF_COUNTERS: 4, X86_IA32_NUM_FIXED_PERF_COUNTERS: 3
[ -1]: Invariant TSC supported.
[ -1]: setup_x86 done.
[ -1]: ns_per_tsc: 384
[ -1]: KCommand Line: hidos dump_level=24
[ -1]: Physical memory: 0x1002c8000 - 0x140000000, 1070825472 bytes, 261432 pages available @ NUMA: 0
[ -1]: Physical memory: 0x880000000 - 0x8c0000000, 1073741824 bytes, 262144 pages available @ NUMA: 1
[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 1070825472, pages: 261432
[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 1073741824, pages: 262144
[ -1]: NUMA 0 distances: 0 (10), 1 (21),
[ -1]: NUMA 1 distances: 1 (10), 0 (21),
[ -1]: map_fixed: phys: 0x8a000 => 0xffffffff70015000 (2 pages)
[ -1]: Trampoline area: 0x8a000
[ -1]: map_fixed: phys: 0x0 => 0xffffffff70017000 (1 pages)
[ -1]: # of cpus : 28
[ -1]: locals = ffff800880024000
[ 0]: BSP: 0 (HW ID: 2 @ NUMA 0)
[ 0]: BSP: booted 27 AP CPUs
[ 0]: Master channel init acked.
[ 0]: vdso is enabled
IHK/McKernel booted.
PASS

View File

@@ -0,0 +1,223 @@
Thu Feb 22 11:34:59 JST 2018
/work/mcktest/ltp/output /work/mcktest/ltp
/work/mcktest/ltp
/work/mcktest/ltp/results /work/mcktest/ltp
/work/mcktest/ltp
INFO: creating /work/mcktest/ltp/results directory
Checking for required user/group ids
'nobody' user id and group found.
'bin' user id and group found.
'daemon' user id and group found.
Users group found.
Sys group found.
Required users/groups exist.
If some fields are empty or look unusual you may have an old version.
Compare to the current minimal requirements in Documentation/Changes.
CentOS Linux release 7.3.1611 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
CentOS Linux release 7.3.1611 (Core)
CentOS Linux release 7.3.1611 (Core)
Linux wallaby11.aics-sys.riken.jp 3.10.0-693.1.1.el7.x86_64 #1 SMP Tue Aug 29 22:28:02 JST 2017 x86_64 x86_64 x86_64 GNU/Linux
Gnu C gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11)
Gnu make 3.82
util-linux linux 2.23.2
mount linux 2.23.2 (libmount 2.23.0: selinux, debug, assert)
modutils 20
e2fsprogs 1.42.9
PPP 2.4.5
Linux C Library > libc.2.17
Dynamic linker (ldd) 2.17
Procps 3.3.10
Net-tools 2.10-alpha
iproute2 iproute2-ss130716
Kbd 1.15.5
Sh-utils 8.22
Modules Loaded loop mcoverlay mcctrl ihk_smp_x86_64 ihk xt_CHECKSUM ipt_MASQUERADE nf_nat_masquerade_ipv4 tun rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache ip6t_rpfilter ipt_REJECT nf_reject_ipv4 ip6t_REJECT nf_reject_ipv6 xt_conntrack ip_set nfnetlink ebtable_nat ebtable_broute bridge stp llc ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack libcrc32c iptable_mangle iptable_security iptable_raw ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter rpcrdma ib_isert iscsi_target_mod ib_iser libiscsi scsi_transport_iscsi ib_srpt target_core_mod ib_srp scsi_transport_srp scsi_tgt ib_ipoib rdma_ucm ib_ucm ib_uverbs ib_umad rdma_cm ib_cm iw_cm mlx4_ib ib_core dm_mirror dm_region_hash dm_log dm_mod sb_edac edac_core intel_powerclamp coretemp intel_rapl iosf_mbi kvm_intel kvm irqbypass crc32_pclmul iTCO_wdt ghash_clmulni_intel joydev iTCO_vendor_support aesni_intel lrw gf128mul glue_helper ablk_helper pcspkr ioatdma cryptd ipmi_si ipmi_devintf ipmi_msghandler i2c_i801 wmi lpc_ich mei_me mei sg shpchp nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables ext4 mbcache jbd2 mlx4_en sd_mod crc_t10dif crct10dif_generic mgag200 drm_kms_helper syscopyarea sysfillrect isci sysimgblt fb_sys_fops ttm libsas drm mlx4_core igb ahci scsi_transport_sas libahci libata crct10dif_pclmul crct10dif_common crc32c_intel ptp pps_core dca i2c_algo_bit i2c_core devlink
free reports:
total used free shared buff/cache available
Mem: 65772228 2853676 57628848 9480 5289704 62402440
Swap: 33554428 0 33554428
/proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping : 4
microcode : 0x428
cpu MHz : 2599.898
cache size : 20480 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts
bogomips : 5200.02
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 8
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping : 4
microcode : 0x428
cpu MHz : 2600.000
cache size : 20480 KB
physical id : 1
siblings : 2
core id : 0
cpu cores : 1
apicid : 32
initial apicid : 32
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts
bogomips : 5205.57
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 16
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping : 4
microcode : 0x428
cpu MHz : 2600.000
cache size : 20480 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts
bogomips : 5200.02
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 24
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping : 4
microcode : 0x428
cpu MHz : 2600.000
cache size : 20480 KB
physical id : 1
siblings : 2
core id : 0
cpu cores : 1
apicid : 33
initial apicid : 33
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts
bogomips : 5205.57
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
no big block device was specified on commandline.
Tests which require a big block device are disabled.
You can specify it with option -z
COMMAND: /work/mcktest/ltp/bin/ltp-pan -e -S -a 8712 -n 8712 -p -f /tmp/ltp-G3Ey89zMm6/alltests -l /work/mcktest/ltp/results/LTP_RUN_ON-2018_02_22-11h_34m_59s.log -C /work/mcktest/ltp/output/LTP_RUN_ON-2018_02_22-11h_34m_59s.failed -T /work/mcktest/ltp/output/LTP_RUN_ON-2018_02_22-11h_34m_59s.tconf
LOG File: /work/mcktest/ltp/results/LTP_RUN_ON-2018_02_22-11h_34m_59s.log
FAILED COMMAND File: /work/mcktest/ltp/output/LTP_RUN_ON-2018_02_22-11h_34m_59s.failed
TCONF COMMAND File: /work/mcktest/ltp/output/LTP_RUN_ON-2018_02_22-11h_34m_59s.tconf
Running tests.......
<<<test_start>>>
tag=fork04 stime=1519266899
cmdline="fork04"
contacts=""
analysis=exit
<<<test_output>>>
fork04 1 TPASS : Env var TERM unchanged after fork(): unknown
fork04 2 TPASS : Env var NoTSetzWq unchanged after fork(): getenv() does not find variable set
fork04 3 TPASS : Env var TESTPROG unchanged after fork(): FRKTCS04
incrementing stop
<<<execution_status>>>
initiation_status="ok"
duration=1 termination_type=exited termination_id=0 corefile=no
cutime=0 cstime=2
<<<test_end>>>
Terminated
INFO: ltp-pan reported all tests PASS
LTP Version: 20150420
###############################################################
Done executing testcases.
LTP Version: 20150420
###############################################################
Thu Feb 22 11:35:05 JST 2018
IHK/McKernel started.
[ -1]: no_execute_available: 1
[ -1]: X86_IA32_NUM_PERF_COUNTERS: 4, X86_IA32_NUM_FIXED_PERF_COUNTERS: 3
[ -1]: Invariant TSC supported.
[ -1]: setup_x86 done.
[ -1]: ns_per_tsc: 384
[ -1]: KCommand Line: hidos dump_level=24
[ -1]: Physical memory: 0x1002c8000 - 0x140000000, 1070825472 bytes, 261432 pages available @ NUMA: 0
[ -1]: Physical memory: 0x880000000 - 0x8c0000000, 1073741824 bytes, 262144 pages available @ NUMA: 1
[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 1070825472, pages: 261432
[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 1073741824, pages: 262144
[ -1]: NUMA 0 distances: 0 (10), 1 (21),
[ -1]: NUMA 1 distances: 1 (10), 0 (21),
[ -1]: map_fixed: phys: 0x8a000 => 0xffffffff70015000 (2 pages)
[ -1]: Trampoline area: 0x8a000
[ -1]: map_fixed: phys: 0x0 => 0xffffffff70017000 (1 pages)
[ -1]: # of cpus : 28
[ -1]: locals = ffff800880024000
[ 0]: BSP: 0 (HW ID: 2 @ NUMA 0)
[ 0]: BSP: booted 27 AP CPUs
[ 0]: Master channel init acked.
[ 0]: vdso is enabled
IHK/McKernel booted.
PASS

View File

@@ -0,0 +1,224 @@
Thu Feb 22 11:35:16 JST 2018
/work/mcktest/ltp/output /work/mcktest/ltp
/work/mcktest/ltp
/work/mcktest/ltp/results /work/mcktest/ltp
/work/mcktest/ltp
INFO: creating /work/mcktest/ltp/results directory
Checking for required user/group ids
'nobody' user id and group found.
'bin' user id and group found.
'daemon' user id and group found.
Users group found.
Sys group found.
Required users/groups exist.
If some fields are empty or look unusual you may have an old version.
Compare to the current minimal requirements in Documentation/Changes.
CentOS Linux release 7.3.1611 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
CentOS Linux release 7.3.1611 (Core)
CentOS Linux release 7.3.1611 (Core)
Linux wallaby11.aics-sys.riken.jp 3.10.0-693.1.1.el7.x86_64 #1 SMP Tue Aug 29 22:28:02 JST 2017 x86_64 x86_64 x86_64 GNU/Linux
Gnu C gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11)
Gnu make 3.82
util-linux linux 2.23.2
mount linux 2.23.2 (libmount 2.23.0: selinux, debug, assert)
modutils 20
e2fsprogs 1.42.9
PPP 2.4.5
Linux C Library > libc.2.17
Dynamic linker (ldd) 2.17
Procps 3.3.10
Net-tools 2.10-alpha
iproute2 iproute2-ss130716
Kbd 1.15.5
Sh-utils 8.22
Modules Loaded loop mcoverlay mcctrl ihk_smp_x86_64 ihk xt_CHECKSUM ipt_MASQUERADE nf_nat_masquerade_ipv4 tun rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache ip6t_rpfilter ipt_REJECT nf_reject_ipv4 ip6t_REJECT nf_reject_ipv6 xt_conntrack ip_set nfnetlink ebtable_nat ebtable_broute bridge stp llc ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack libcrc32c iptable_mangle iptable_security iptable_raw ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter rpcrdma ib_isert iscsi_target_mod ib_iser libiscsi scsi_transport_iscsi ib_srpt target_core_mod ib_srp scsi_transport_srp scsi_tgt ib_ipoib rdma_ucm ib_ucm ib_uverbs ib_umad rdma_cm ib_cm iw_cm mlx4_ib ib_core dm_mirror dm_region_hash dm_log dm_mod sb_edac edac_core intel_powerclamp coretemp intel_rapl iosf_mbi kvm_intel kvm irqbypass crc32_pclmul iTCO_wdt ghash_clmulni_intel joydev iTCO_vendor_support aesni_intel lrw gf128mul glue_helper ablk_helper pcspkr ioatdma cryptd ipmi_si ipmi_devintf ipmi_msghandler i2c_i801 wmi lpc_ich mei_me mei sg shpchp nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables ext4 mbcache jbd2 mlx4_en sd_mod crc_t10dif crct10dif_generic mgag200 drm_kms_helper syscopyarea sysfillrect isci sysimgblt fb_sys_fops ttm libsas drm mlx4_core igb ahci scsi_transport_sas libahci libata crct10dif_pclmul crct10dif_common crc32c_intel ptp pps_core dca i2c_algo_bit i2c_core devlink
free reports:
total used free shared buff/cache available
Mem: 65772228 2850468 57621684 9480 5300076 62404604
Swap: 33554428 0 33554428
/proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping : 4
microcode : 0x428
cpu MHz : 2600.000
cache size : 20480 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts
bogomips : 5200.02
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 8
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping : 4
microcode : 0x428
cpu MHz : 2600.000
cache size : 20480 KB
physical id : 1
siblings : 2
core id : 0
cpu cores : 1
apicid : 32
initial apicid : 32
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts
bogomips : 5205.57
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 16
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping : 4
microcode : 0x428
cpu MHz : 2600.000
cache size : 20480 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts
bogomips : 5200.02
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 24
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping : 4
microcode : 0x428
cpu MHz : 2600.000
cache size : 20480 KB
physical id : 1
siblings : 2
core id : 0
cpu cores : 1
apicid : 33
initial apicid : 33
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts
bogomips : 5205.57
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
no big block device was specified on commandline.
Tests which require a big block device are disabled.
You can specify it with option -z
COMMAND: /work/mcktest/ltp/bin/ltp-pan -e -S -a 6932 -n 6932 -p -f /tmp/ltp-ijKVAXxoG2/alltests -l /work/mcktest/ltp/results/LTP_RUN_ON-2018_02_22-11h_35m_16s.log -C /work/mcktest/ltp/output/LTP_RUN_ON-2018_02_22-11h_35m_16s.failed -T /work/mcktest/ltp/output/LTP_RUN_ON-2018_02_22-11h_35m_16s.tconf
LOG File: /work/mcktest/ltp/results/LTP_RUN_ON-2018_02_22-11h_35m_16s.log
FAILED COMMAND File: /work/mcktest/ltp/output/LTP_RUN_ON-2018_02_22-11h_35m_16s.failed
TCONF COMMAND File: /work/mcktest/ltp/output/LTP_RUN_ON-2018_02_22-11h_35m_16s.tconf
Running tests.......
<<<test_start>>>
tag=fork07 stime=1519266917
cmdline="fork07"
contacts=""
analysis=exit
<<<test_output>>>
fork07 0 TINFO : Forking 100 children
fork07 0 TINFO : Forked all 100 children, now collecting
fork07 0 TINFO : Collected all 100 children
fork07 1 TPASS : 100/100 children read correctly from an inheritted fd
incrementing stop
<<<execution_status>>>
initiation_status="ok"
duration=1 termination_type=exited termination_id=0 corefile=no
cutime=4 cstime=28
<<<test_end>>>
Terminated
INFO: ltp-pan reported all tests PASS
LTP Version: 20150420
###############################################################
Done executing testcases.
LTP Version: 20150420
###############################################################
Thu Feb 22 11:35:23 JST 2018
IHK/McKernel started.
[ -1]: no_execute_available: 1
[ -1]: X86_IA32_NUM_PERF_COUNTERS: 4, X86_IA32_NUM_FIXED_PERF_COUNTERS: 3
[ -1]: Invariant TSC supported.
[ -1]: setup_x86 done.
[ -1]: ns_per_tsc: 384
[ -1]: KCommand Line: hidos dump_level=24
[ -1]: Physical memory: 0x1002c8000 - 0x140000000, 1070825472 bytes, 261432 pages available @ NUMA: 0
[ -1]: Physical memory: 0x880000000 - 0x8c0000000, 1073741824 bytes, 262144 pages available @ NUMA: 1
[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 1070825472, pages: 261432
[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 1073741824, pages: 262144
[ -1]: NUMA 0 distances: 0 (10), 1 (21),
[ -1]: NUMA 1 distances: 1 (10), 0 (21),
[ -1]: map_fixed: phys: 0x8a000 => 0xffffffff70015000 (2 pages)
[ -1]: Trampoline area: 0x8a000
[ -1]: map_fixed: phys: 0x0 => 0xffffffff70017000 (1 pages)
[ -1]: # of cpus : 28
[ -1]: locals = ffff800880024000
[ 0]: BSP: 0 (HW ID: 2 @ NUMA 0)
[ 0]: BSP: booted 27 AP CPUs
[ 0]: Master channel init acked.
[ 0]: vdso is enabled
IHK/McKernel booted.
PASS

View File

@@ -0,0 +1,231 @@
Thu Feb 22 11:35:23 JST 2018
/work/mcktest/ltp/output /work/mcktest/ltp
/work/mcktest/ltp
/work/mcktest/ltp/results /work/mcktest/ltp
/work/mcktest/ltp
INFO: creating /work/mcktest/ltp/results directory
Checking for required user/group ids
'nobody' user id and group found.
'bin' user id and group found.
'daemon' user id and group found.
Users group found.
Sys group found.
Required users/groups exist.
If some fields are empty or look unusual you may have an old version.
Compare to the current minimal requirements in Documentation/Changes.
CentOS Linux release 7.3.1611 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
CentOS Linux release 7.3.1611 (Core)
CentOS Linux release 7.3.1611 (Core)
Linux wallaby11.aics-sys.riken.jp 3.10.0-693.1.1.el7.x86_64 #1 SMP Tue Aug 29 22:28:02 JST 2017 x86_64 x86_64 x86_64 GNU/Linux
Gnu C gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11)
Gnu make 3.82
util-linux linux 2.23.2
mount linux 2.23.2 (libmount 2.23.0: selinux, debug, assert)
modutils 20
e2fsprogs 1.42.9
PPP 2.4.5
Linux C Library > libc.2.17
Dynamic linker (ldd) 2.17
Procps 3.3.10
Net-tools 2.10-alpha
iproute2 iproute2-ss130716
Kbd 1.15.5
Sh-utils 8.22
Modules Loaded loop mcoverlay mcctrl ihk_smp_x86_64 ihk xt_CHECKSUM ipt_MASQUERADE nf_nat_masquerade_ipv4 tun rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache ip6t_rpfilter ipt_REJECT nf_reject_ipv4 ip6t_REJECT nf_reject_ipv6 xt_conntrack ip_set nfnetlink ebtable_nat ebtable_broute bridge stp llc ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack libcrc32c iptable_mangle iptable_security iptable_raw ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter rpcrdma ib_isert iscsi_target_mod ib_iser libiscsi scsi_transport_iscsi ib_srpt target_core_mod ib_srp scsi_transport_srp scsi_tgt ib_ipoib rdma_ucm ib_ucm ib_uverbs ib_umad rdma_cm ib_cm iw_cm mlx4_ib ib_core dm_mirror dm_region_hash dm_log dm_mod sb_edac edac_core intel_powerclamp coretemp intel_rapl iosf_mbi kvm_intel kvm irqbypass crc32_pclmul iTCO_wdt ghash_clmulni_intel joydev iTCO_vendor_support aesni_intel lrw gf128mul glue_helper ablk_helper pcspkr ioatdma cryptd ipmi_si ipmi_devintf ipmi_msghandler i2c_i801 wmi lpc_ich mei_me mei sg shpchp nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables ext4 mbcache jbd2 mlx4_en sd_mod crc_t10dif crct10dif_generic mgag200 drm_kms_helper syscopyarea sysfillrect isci sysimgblt fb_sys_fops ttm libsas drm mlx4_core igb ahci scsi_transport_sas libahci libata crct10dif_pclmul crct10dif_common crc32c_intel ptp pps_core dca i2c_algo_bit i2c_core devlink
free reports:
total used free shared buff/cache available
Mem: 65772228 2849960 57621644 9480 5300624 62404812
Swap: 33554428 0 33554428
/proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping : 4
microcode : 0x428
cpu MHz : 2599.898
cache size : 20480 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts
bogomips : 5200.02
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 8
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping : 4
microcode : 0x428
cpu MHz : 2599.898
cache size : 20480 KB
physical id : 1
siblings : 2
core id : 0
cpu cores : 1
apicid : 32
initial apicid : 32
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts
bogomips : 5205.57
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 16
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping : 4
microcode : 0x428
cpu MHz : 2599.898
cache size : 20480 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts
bogomips : 5200.02
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 24
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping : 4
microcode : 0x428
cpu MHz : 2600.000
cache size : 20480 KB
physical id : 1
siblings : 2
core id : 0
cpu cores : 1
apicid : 33
initial apicid : 33
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts
bogomips : 5205.57
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
no big block device was specified on commandline.
Tests which require a big block device are disabled.
You can specify it with option -z
COMMAND: /work/mcktest/ltp/bin/ltp-pan -e -S -a 10167 -n 10167 -p -f /tmp/ltp-68xTwDrmY3/alltests -l /work/mcktest/ltp/results/LTP_RUN_ON-2018_02_22-11h_35m_24s.log -C /work/mcktest/ltp/output/LTP_RUN_ON-2018_02_22-11h_35m_24s.failed -T /work/mcktest/ltp/output/LTP_RUN_ON-2018_02_22-11h_35m_24s.tconf
LOG File: /work/mcktest/ltp/results/LTP_RUN_ON-2018_02_22-11h_35m_24s.log
FAILED COMMAND File: /work/mcktest/ltp/output/LTP_RUN_ON-2018_02_22-11h_35m_24s.failed
TCONF COMMAND File: /work/mcktest/ltp/output/LTP_RUN_ON-2018_02_22-11h_35m_24s.tconf
Running tests.......
<<<test_start>>>
tag=fork08 stime=1519266924
cmdline="fork08"
contacts=""
analysis=exit
<<<test_output>>>
fork08 0 TINFO : parent forksval: 1
fork08 0 TINFO : parent forksval: 2
fork08 0 TINFO : exit status of wait expected 0 got 0
fork08 0 TINFO : second child got char: b
fork08 1 TPASS : parent test PASSED
fork08 1 TPASS : Test passed in childnumber 2
fork08 0 TINFO : exit status of wait expected 0 got 0
fork08 2 TPASS : parent test PASSED
fork08 0 TINFO : exit status of wait expected 0 got 0
fork08 3 TPASS : parent test PASSED
fork08 0 TINFO : Number of processes forked is 2
incrementing stop
<<<execution_status>>>
initiation_status="ok"
duration=1 termination_type=exited termination_id=0 corefile=no
cutime=1 cstime=2
<<<test_end>>>
Terminated
INFO: ltp-pan reported all tests PASS
LTP Version: 20150420
###############################################################
Done executing testcases.
LTP Version: 20150420
###############################################################
Thu Feb 22 11:35:30 JST 2018
IHK/McKernel started.
[ -1]: no_execute_available: 1
[ -1]: X86_IA32_NUM_PERF_COUNTERS: 4, X86_IA32_NUM_FIXED_PERF_COUNTERS: 3
[ -1]: Invariant TSC supported.
[ -1]: setup_x86 done.
[ -1]: ns_per_tsc: 384
[ -1]: KCommand Line: hidos dump_level=24
[ -1]: Physical memory: 0x1002c8000 - 0x140000000, 1070825472 bytes, 261432 pages available @ NUMA: 0
[ -1]: Physical memory: 0x880000000 - 0x8c0000000, 1073741824 bytes, 262144 pages available @ NUMA: 1
[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 1070825472, pages: 261432
[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 1073741824, pages: 262144
[ -1]: NUMA 0 distances: 0 (10), 1 (21),
[ -1]: NUMA 1 distances: 1 (10), 0 (21),
[ -1]: map_fixed: phys: 0x8a000 => 0xffffffff70015000 (2 pages)
[ -1]: Trampoline area: 0x8a000
[ -1]: map_fixed: phys: 0x0 => 0xffffffff70017000 (1 pages)
[ -1]: # of cpus : 28
[ -1]: locals = ffff800880024000
[ 0]: BSP: 0 (HW ID: 2 @ NUMA 0)
[ 0]: BSP: booted 27 AP CPUs
[ 0]: Master channel init acked.
[ 0]: vdso is enabled
IHK/McKernel booted.
PASS

View File

@@ -0,0 +1,61 @@
【Issue#885 動作確認】
Issue#885が解決され、既存機能に影響がないことをIssueで報告されたテストプログラム2項目と、
McKernelでのptraceのattach/detach操作の基本動作確認8項目の計10項目のテストによって確認した。
なお、各テストの実行結果は./result.log として格納している。
①Issueで報告されたテストプログラムによる確認
・Issue#885
報告で使用されたテストプログラムを用いて、現象が再現しないことを確認した。
実行時の出力を./result.log に記載している
②McKernelでのptraceのattach/detachの基本動作確認
以下の内容で、Issue#885による変更が既存機能に影響しないことを確認した。
基本動作確認の詳細を以下に示す。
1. テストの実行方法
以下の手順でテストを実行する
1. Makefileの変数MCK_DIRの内容を、McKernelがインストールされているディレクトリに変更する
2. sh make test を実行する
2. テスト項目
CT_001: 通常のattach detach 操作
1. 親プロセスが子プロセスにattach
2. 親プロセスが子プロセスをdetach
3. 子プロセスが終了
4. 親プロセスがwait()で子プロセスの終了を回収
CT_002: tracee(子プロセス)がdetachせずに終了
1. 親プロセスが子プロセスにattach
2. 子プロセスが終了
3. 親プロセスがwait()で子プロセスの終了を回収
CT_003: tracer(親プロセス)がdetachしないまま先に終了
1. 親プロセスが子プロセスにattach
2. 親プロセスが子プロセスに再開指示した直後に終了
3. 子プロセスが終了
CT_004: 複数回のattach -> detach 操作
1. 親プロセスが子プロセスにattach
2. 親プロセスが子プロセスにdetach
3. 再び、親プロセスが子プロセスにattach
4. 親プロセスが子プロセスにdetach
CT_005: 不正なpid指定のattach
1. 不正なpid(0, 1, 負数)を指定したattach
2. 自身のpidを指定したattach
CT_006: attach済の子プロセスへのattach
1. 既にattachしている子プロセスへ再びattach
2. tracemeした子プロセスへattach
CT_007: 不正なpid指定のdetach
1. 不正なpid(0, 1, 負数)を指定したdetach
2. attachしていない子プロセスのpidを指定したdetach
CT_008: detach済の子プロセスへのdetach
1. 既にdetachしていいる子プロセスへ再びdetach
3. 結果
テストプログラムの実行結果をresult.log に示す。
上記の10項目がPASSしていることを確認した。

View File

@@ -0,0 +1,177 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ihklib.h>
#include <sys/types.h>
#define MCK_DIR "/home/satoken/ppos"
static char prefix[256] = MCK_DIR;
static char test_name[64] = "CT_001";
#define OKNG(cond, ...) \
do { \
if(cond) { \
printf("[OK] "); \
printf(__VA_ARGS__); \
} else { \
printf("[NG] "); \
printf(__VA_ARGS__); \
char buf[65536];\
char cmd[256];\
sprintf(cmd, "%s/sbin/ihkosctl 0 kmsg", prefix);\
FILE* fp = popen(cmd, "r"); \
size_t nread = fread(buf, 1, sizeof(buf), fp); \
buf[nread] = 0; \
printf("%s", buf); \
goto fn_fail; \
} \
} while(0)
int main(int argc, char** argv) {
int ret = 0, status, ret_ihklib;
FILE *fp;
char buf[65536];
size_t nread;
char cmd[1024];
char fn[256];
char kargs[256];
int cpus[4] = {6, 7, 8, 9};
int num_cpus = 4;
struct ihk_mem_chunk mem_chunks[4];
int num_mem_chunks;
printf("*** %s start *************************\n", test_name);
/*--------------------------------------------
* Preparing
*--------------------------------------------*/
sprintf(cmd, "%s/sbin/mcstop+release.sh", prefix);
status = system(cmd);
// ihk_os_destroy_pseudofs
ret_ihklib = ihk_os_destroy_pseudofs(0);
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
sprintf(cmd, "insmod %s/kmod/ihk.ko", prefix);
status = system(cmd);
sprintf(cmd, "insmod %s/kmod/ihk-smp-x86_64.ko ihk_start_irq=240 ihk_ikc_irq_core=0", prefix);
status = system(cmd);
sprintf(cmd, "insmod %s/kmod/mcctrl.ko", prefix);
status = system(cmd);
/*--------------------------------------------
* Test
*--------------------------------------------*/
// create 0
ret_ihklib = ihk_create_os(0);
// reserve cpus
ret_ihklib = ihk_reserve_cpu(0, cpus, num_cpus);
//OKNG(ret_ihklib == 0, "ihk_reserve_cpu\n");
// assign cpus
ret_ihklib = ihk_os_assign_cpu(0, cpus, num_cpus);
//OKNG(ret_ihklib == 0, "ihk_os_assign_cpu\n");
// reserve mem 128m@0,128m@1
num_mem_chunks = 2;
mem_chunks[0].size = 128*1024*1024ULL;
mem_chunks[0].numa_node_number = 0;
mem_chunks[1].size = 128*1024*1024ULL;
mem_chunks[1].numa_node_number = 1;
ret_ihklib = ihk_reserve_mem(0, mem_chunks, num_mem_chunks);
//OKNG(ret_ihklib == 0, "ihk_reserve_mem (2)\n");
// assign mem 128m@0,128m@1
num_mem_chunks = 2;
mem_chunks[0].size = 128*1024*1024ULL;
mem_chunks[0].numa_node_number = 0;
mem_chunks[1].size = 128*1024*1024ULL;
mem_chunks[1].numa_node_number = 1;
ret_ihklib = ihk_os_assign_mem(0, mem_chunks, num_mem_chunks);
//OKNG(ret_ihklib == 0, "ihk_os_assign_mem (2)\n");
// load
sprintf(fn, "%s/smp-x86/kernel/mckernel.img", prefix);
ret_ihklib = ihk_os_load(0, fn);
//OKNG(ret_ihklib == 0, "ihk_os_load\n");
// kargs
sprintf(kargs, "hidos ksyslogd=0");
ret_ihklib = ihk_os_kargs(0, kargs);
//OKNG(ret_ihklib == 0, "ihk_os_kargs\n");
// boot
ret_ihklib = ihk_os_boot(0);
goto shutdown;
OKNG(ret_ihklib == 0, "ihk_os_boot\n");
/* Make sure that all initialization related transactions between McKernel and IHK finish
sysfs_init(void) (in mckernel/kernel/sysfs.c)
packet.msg = SCD_MSG_SYSFS_REQ_SETUP;
sysfsm_work_main() in (mckernel/executer/kernel/mcctrl/sysfs.c)
sysfsm_req_setup
sysfsm_setup */
usleep(100*1000);
// create pseudofs
ret_ihklib = ihk_os_create_pseudofs(0);
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
//OKNG(ret_ihklib == 0 &&
// strstr(buf, "/tmp/mcos/mcos0_sys") != NULL, "ihk_os_create_pseudofs()\n");
// mcexec
sprintf(cmd, "%s/bin/mcexec ls -l | grep Makefile", prefix);
fp = popen(cmd, "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
OKNG(strstr(buf, "Makefile") != NULL, "mcexec\n");
// shutdown
shutdown:
ret_ihklib = ihk_os_shutdown(0);
OKNG(ret_ihklib == 0, "shutdown immediately after boot returned 0\n");
// get status. Note that the smp_ihk_os_shutdown() transitions
// smp-x86 status to BUILTIN_OS_STATUS_SHUTDOWN
// and smp_ihk_os_query_status() transitions os status to IHK_OS_STATUS_NOT_BOOTED.
ret_ihklib = ihk_os_get_status(0);
//OKNG(ret_ihklib == IHK_STATUS_SHUTDOWN ||
// ret_ihklib == IHK_STATUS_INACTIVE, "ihk_os_get_status (5) returned %d\n", ret_ihklib);
destroy:
ret_ihklib = ihk_destroy_os(0, 0);
//OKNG(ret_ihklib == 0, "destroy immediately after boot\n");
sprintf(cmd, "rmmod %s/kmod/mcctrl.ko", prefix);
status = system(cmd);
// destroy pseudofs
ret_ihklib = ihk_os_destroy_pseudofs(0);
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
sprintf(cmd, "rmmod %s/kmod/ihk-smp-x86_64.ko", prefix);
status = system(cmd);
sprintf(cmd, "rmmod %s/kmod/ihk.ko", prefix);
status = system(cmd);
printf("*** All tests finished\n\n");
fn_exit:
return ret;
fn_fail:
goto fn_exit;
}

View File

@@ -0,0 +1,177 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ihklib.h>
#include <sys/types.h>
#define MCK_DIR "/home/satoken/ppos"
static char prefix[256] = MCK_DIR;
static char test_name[64] = "CT_002";
#define OKNG(cond, ...) \
do { \
if(cond) { \
printf("[OK] "); \
printf(__VA_ARGS__); \
} else { \
printf("[NG] "); \
printf(__VA_ARGS__); \
char buf[65536];\
char cmd[256];\
sprintf(cmd, "%s/sbin/ihkosctl 0 kmsg", prefix);\
FILE* fp = popen(cmd, "r"); \
size_t nread = fread(buf, 1, sizeof(buf), fp); \
buf[nread] = 0; \
printf("%s", buf); \
goto fn_fail; \
} \
} while(0)
int main(int argc, char** argv) {
int ret = 0, status, ret_ihklib;
FILE *fp;
char buf[65536];
size_t nread;
char cmd[1024];
char fn[256];
char kargs[256];
int cpus[4] = {6, 7, 8, 9};
int num_cpus = 4;
struct ihk_mem_chunk mem_chunks[4];
int num_mem_chunks;
printf("*** %s start *************************\n", test_name);
/*--------------------------------------------
* Preparing
*--------------------------------------------*/
sprintf(cmd, "%s/sbin/mcstop+release.sh", prefix);
status = system(cmd);
// ihk_os_destroy_pseudofs
ret_ihklib = ihk_os_destroy_pseudofs(0);
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
sprintf(cmd, "insmod %s/kmod/ihk.ko", prefix);
status = system(cmd);
sprintf(cmd, "insmod %s/kmod/ihk-smp-x86_64.ko ihk_start_irq=240 ihk_ikc_irq_core=0", prefix);
status = system(cmd);
sprintf(cmd, "insmod %s/kmod/mcctrl.ko", prefix);
status = system(cmd);
/*--------------------------------------------
* Test
*--------------------------------------------*/
// create 0
ret_ihklib = ihk_create_os(0);
// reserve cpus
ret_ihklib = ihk_reserve_cpu(0, cpus, num_cpus);
//OKNG(ret_ihklib == 0, "ihk_reserve_cpu\n");
// assign cpus
ret_ihklib = ihk_os_assign_cpu(0, cpus, num_cpus);
//OKNG(ret_ihklib == 0, "ihk_os_assign_cpu\n");
// reserve mem 128m@0,128m@1
num_mem_chunks = 2;
mem_chunks[0].size = 128*1024*1024ULL;
mem_chunks[0].numa_node_number = 0;
mem_chunks[1].size = 128*1024*1024ULL;
mem_chunks[1].numa_node_number = 1;
ret_ihklib = ihk_reserve_mem(0, mem_chunks, num_mem_chunks);
//OKNG(ret_ihklib == 0, "ihk_reserve_mem (2)\n");
// assign mem 128m@0,128m@1
num_mem_chunks = 2;
mem_chunks[0].size = 128*1024*1024ULL;
mem_chunks[0].numa_node_number = 0;
mem_chunks[1].size = 128*1024*1024ULL;
mem_chunks[1].numa_node_number = 1;
ret_ihklib = ihk_os_assign_mem(0, mem_chunks, num_mem_chunks);
//OKNG(ret_ihklib == 0, "ihk_os_assign_mem (2)\n");
// load
sprintf(fn, "%s/smp-x86/kernel/mckernel.img", prefix);
ret_ihklib = ihk_os_load(0, fn);
//OKNG(ret_ihklib == 0, "ihk_os_load\n");
// kargs
sprintf(kargs, "hidos ksyslogd=0");
ret_ihklib = ihk_os_kargs(0, kargs);
//OKNG(ret_ihklib == 0, "ihk_os_kargs\n");
// boot
ret_ihklib = ihk_os_boot(0);
goto destroy;
OKNG(ret_ihklib == 0, "ihk_os_boot\n");
/* Make sure that all initialization related transactions between McKernel and IHK finish
sysfs_init(void) (in mckernel/kernel/sysfs.c)
packet.msg = SCD_MSG_SYSFS_REQ_SETUP;
sysfsm_work_main() in (mckernel/executer/kernel/mcctrl/sysfs.c)
sysfsm_req_setup
sysfsm_setup */
usleep(100*1000);
// create pseudofs
ret_ihklib = ihk_os_create_pseudofs(0);
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
//OKNG(ret_ihklib == 0 &&
// strstr(buf, "/tmp/mcos/mcos0_sys") != NULL, "ihk_os_create_pseudofs()\n");
// mcexec
sprintf(cmd, "%s/bin/mcexec ls -l | grep Makefile", prefix);
fp = popen(cmd, "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
OKNG(strstr(buf, "Makefile") != NULL, "mcexec\n");
// shutdown
shutdown:
ret_ihklib = ihk_os_shutdown(0);
//OKNG(ret_ihklib == 0, "shutdown immediately after boot\n");
// get status. Note that the smp_ihk_os_shutdown() transitions
// smp-x86 status to BUILTIN_OS_STATUS_SHUTDOWN
// and smp_ihk_os_query_status() transitions os status to IHK_OS_STATUS_NOT_BOOTED.
ret_ihklib = ihk_os_get_status(0);
//OKNG(ret_ihklib == IHK_STATUS_SHUTDOWN ||
// ret_ihklib == IHK_STATUS_INACTIVE, "ihk_os_get_status (5) returned %d\n", ret_ihklib);
destroy:
ret_ihklib = ihk_destroy_os(0, 0);
OKNG(ret_ihklib == 0, "destroy immediately after boot returned NOT 0\n");
sprintf(cmd, "rmmod %s/kmod/mcctrl.ko", prefix);
status = system(cmd);
// destroy pseudofs
ret_ihklib = ihk_os_destroy_pseudofs(0);
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
sprintf(cmd, "rmmod %s/kmod/ihk-smp-x86_64.ko", prefix);
status = system(cmd);
sprintf(cmd, "rmmod %s/kmod/ihk.ko", prefix);
status = system(cmd);
printf("*** All tests finished\n\n");
fn_exit:
return ret;
fn_fail:
goto fn_exit;
}

View File

@@ -0,0 +1,176 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ihklib.h>
#include <sys/types.h>
#define MCK_DIR "/home/satoken/ppos"
static char prefix[256] = MCK_DIR;
static char test_name[64] = "CT_003";
#define OKNG(cond, ...) \
do { \
if(cond) { \
printf("[OK] "); \
printf(__VA_ARGS__); \
} else { \
printf("[NG] "); \
printf(__VA_ARGS__); \
char buf[65536];\
char cmd[256];\
sprintf(cmd, "%s/sbin/ihkosctl 0 kmsg", prefix);\
FILE* fp = popen(cmd, "r"); \
size_t nread = fread(buf, 1, sizeof(buf), fp); \
buf[nread] = 0; \
printf("%s", buf); \
goto fn_fail; \
} \
} while(0)
int main(int argc, char** argv) {
int ret = 0, status, ret_ihklib;
FILE *fp;
char buf[65536];
size_t nread;
char cmd[1024];
char fn[256];
char kargs[256];
int cpus[4] = {6, 7, 8, 9};
int num_cpus = 4;
struct ihk_mem_chunk mem_chunks[4];
int num_mem_chunks;
printf("*** %s start *************************\n", test_name);
/*--------------------------------------------
* Preparing
*--------------------------------------------*/
sprintf(cmd, "%s/sbin/mcstop+release.sh", prefix);
status = system(cmd);
// ihk_os_destroy_pseudofs
ret_ihklib = ihk_os_destroy_pseudofs(0);
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
sprintf(cmd, "insmod %s/kmod/ihk.ko", prefix);
status = system(cmd);
sprintf(cmd, "insmod %s/kmod/ihk-smp-x86_64.ko ihk_start_irq=240 ihk_ikc_irq_core=0", prefix);
status = system(cmd);
sprintf(cmd, "insmod %s/kmod/mcctrl.ko", prefix);
status = system(cmd);
/*--------------------------------------------
* Test
*--------------------------------------------*/
// create 0
ret_ihklib = ihk_create_os(0);
// reserve cpus
ret_ihklib = ihk_reserve_cpu(0, cpus, num_cpus);
//OKNG(ret_ihklib == 0, "ihk_reserve_cpu\n");
// assign cpus
ret_ihklib = ihk_os_assign_cpu(0, cpus, num_cpus);
//OKNG(ret_ihklib == 0, "ihk_os_assign_cpu\n");
// reserve mem 128m@0,128m@1
num_mem_chunks = 2;
mem_chunks[0].size = 128*1024*1024ULL;
mem_chunks[0].numa_node_number = 0;
mem_chunks[1].size = 128*1024*1024ULL;
mem_chunks[1].numa_node_number = 1;
ret_ihklib = ihk_reserve_mem(0, mem_chunks, num_mem_chunks);
//OKNG(ret_ihklib == 0, "ihk_reserve_mem (2)\n");
// assign mem 128m@0,128m@1
num_mem_chunks = 2;
mem_chunks[0].size = 128*1024*1024ULL;
mem_chunks[0].numa_node_number = 0;
mem_chunks[1].size = 128*1024*1024ULL;
mem_chunks[1].numa_node_number = 1;
ret_ihklib = ihk_os_assign_mem(0, mem_chunks, num_mem_chunks);
//OKNG(ret_ihklib == 0, "ihk_os_assign_mem (2)\n");
// load
sprintf(fn, "%s/smp-x86/kernel/mckernel.img", prefix);
ret_ihklib = ihk_os_load(0, fn);
//OKNG(ret_ihklib == 0, "ihk_os_load\n");
// kargs
sprintf(kargs, "hidos ksyslogd=0");
ret_ihklib = ihk_os_kargs(0, kargs);
//OKNG(ret_ihklib == 0, "ihk_os_kargs\n");
// boot
ret_ihklib = ihk_os_boot(0);
OKNG(ret_ihklib == 0, "ihk_os_boot\n");
/* Make sure that all initialization related transactions between McKernel and IHK finish
sysfs_init(void) (in mckernel/kernel/sysfs.c)
packet.msg = SCD_MSG_SYSFS_REQ_SETUP;
sysfsm_work_main() in (mckernel/executer/kernel/mcctrl/sysfs.c)
sysfsm_req_setup
sysfsm_setup */
usleep(100*1000);
// create pseudofs
ret_ihklib = ihk_os_create_pseudofs(0);
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
//OKNG(ret_ihklib == 0 &&
// strstr(buf, "/tmp/mcos/mcos0_sys") != NULL, "ihk_os_create_pseudofs()\n");
// mcexec
sprintf(cmd, "%s/bin/mcexec ls -l | grep Makefile", prefix);
fp = popen(cmd, "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
OKNG(strstr(buf, "Makefile") != NULL, "done mcexec\n");
// shutdown
shutdown:
ret_ihklib = ihk_os_shutdown(0);
OKNG(ret_ihklib == 0, "shutdown after mcexec returned 0\n");
// get status. Note that the smp_ihk_os_shutdown() transitions
// smp-x86 status to BUILTIN_OS_STATUS_SHUTDOWN
// and smp_ihk_os_query_status() transitions os status to IHK_OS_STATUS_NOT_BOOTED.
ret_ihklib = ihk_os_get_status(0);
//OKNG(ret_ihklib == IHK_STATUS_SHUTDOWN ||
// ret_ihklib == IHK_STATUS_INACTIVE, "ihk_os_get_status (5) returned %d\n", ret_ihklib);
destroy:
ret_ihklib = ihk_destroy_os(0, 0);
//OKNG(ret_ihklib == 0, "destroy immediately after boot\n");
sprintf(cmd, "rmmod %s/kmod/mcctrl.ko", prefix);
status = system(cmd);
// destroy pseudofs
ret_ihklib = ihk_os_destroy_pseudofs(0);
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
sprintf(cmd, "rmmod %s/kmod/ihk-smp-x86_64.ko", prefix);
status = system(cmd);
sprintf(cmd, "rmmod %s/kmod/ihk.ko", prefix);
status = system(cmd);
printf("*** All tests finished\n\n");
fn_exit:
return ret;
fn_fail:
goto fn_exit;
}

View File

@@ -0,0 +1,177 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ihklib.h>
#include <sys/types.h>
#define MCK_DIR "/home/satoken/ppos"
static char prefix[256] = MCK_DIR;
static char test_name[64] = "CT_004";
#define OKNG(cond, ...) \
do { \
if(cond) { \
printf("[OK] "); \
printf(__VA_ARGS__); \
} else { \
printf("[NG] "); \
printf(__VA_ARGS__); \
char buf[65536];\
char cmd[256];\
sprintf(cmd, "%s/sbin/ihkosctl 0 kmsg", prefix);\
FILE* fp = popen(cmd, "r"); \
size_t nread = fread(buf, 1, sizeof(buf), fp); \
buf[nread] = 0; \
printf("%s", buf); \
goto fn_fail; \
} \
} while(0)
int main(int argc, char** argv) {
int ret = 0, status, ret_ihklib;
FILE *fp;
char buf[65536];
size_t nread;
char cmd[1024];
char fn[256];
char kargs[256];
int cpus[4] = {6, 7, 8, 9};
int num_cpus = 4;
struct ihk_mem_chunk mem_chunks[4];
int num_mem_chunks;
printf("*** %s start *************************\n", test_name);
/*--------------------------------------------
* Preparing
*--------------------------------------------*/
sprintf(cmd, "%s/sbin/mcstop+release.sh", prefix);
status = system(cmd);
// ihk_os_destroy_pseudofs
ret_ihklib = ihk_os_destroy_pseudofs(0);
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
sprintf(cmd, "insmod %s/kmod/ihk.ko", prefix);
status = system(cmd);
sprintf(cmd, "insmod %s/kmod/ihk-smp-x86_64.ko ihk_start_irq=240 ihk_ikc_irq_core=0", prefix);
status = system(cmd);
sprintf(cmd, "insmod %s/kmod/mcctrl.ko", prefix);
status = system(cmd);
/*--------------------------------------------
* Test
*--------------------------------------------*/
// create 0
ret_ihklib = ihk_create_os(0);
// reserve cpus
ret_ihklib = ihk_reserve_cpu(0, cpus, num_cpus);
//OKNG(ret_ihklib == 0, "ihk_reserve_cpu\n");
// assign cpus
ret_ihklib = ihk_os_assign_cpu(0, cpus, num_cpus);
//OKNG(ret_ihklib == 0, "ihk_os_assign_cpu\n");
// reserve mem 128m@0,128m@1
num_mem_chunks = 2;
mem_chunks[0].size = 128*1024*1024ULL;
mem_chunks[0].numa_node_number = 0;
mem_chunks[1].size = 128*1024*1024ULL;
mem_chunks[1].numa_node_number = 1;
ret_ihklib = ihk_reserve_mem(0, mem_chunks, num_mem_chunks);
//OKNG(ret_ihklib == 0, "ihk_reserve_mem (2)\n");
// assign mem 128m@0,128m@1
num_mem_chunks = 2;
mem_chunks[0].size = 128*1024*1024ULL;
mem_chunks[0].numa_node_number = 0;
mem_chunks[1].size = 128*1024*1024ULL;
mem_chunks[1].numa_node_number = 1;
ret_ihklib = ihk_os_assign_mem(0, mem_chunks, num_mem_chunks);
//OKNG(ret_ihklib == 0, "ihk_os_assign_mem (2)\n");
// load
sprintf(fn, "%s/smp-x86/kernel/mckernel.img", prefix);
ret_ihklib = ihk_os_load(0, fn);
//OKNG(ret_ihklib == 0, "ihk_os_load\n");
// kargs
sprintf(kargs, "hidos ksyslogd=0");
ret_ihklib = ihk_os_kargs(0, kargs);
//OKNG(ret_ihklib == 0, "ihk_os_kargs\n");
// boot
ret_ihklib = ihk_os_boot(0);
OKNG(ret_ihklib == 0, "ihk_os_boot\n");
/* Make sure that all initialization related transactions between McKernel and IHK finish
sysfs_init(void) (in mckernel/kernel/sysfs.c)
packet.msg = SCD_MSG_SYSFS_REQ_SETUP;
sysfsm_work_main() in (mckernel/executer/kernel/mcctrl/sysfs.c)
sysfsm_req_setup
sysfsm_setup */
usleep(100*1000);
// create pseudofs
ret_ihklib = ihk_os_create_pseudofs(0);
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
//OKNG(ret_ihklib == 0 &&
// strstr(buf, "/tmp/mcos/mcos0_sys") != NULL, "ihk_os_create_pseudofs()\n");
// mcexec
sprintf(cmd, "%s/bin/mcexec ls -l | grep Makefile", prefix);
fp = popen(cmd, "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
OKNG(strstr(buf, "Makefile") != NULL, "do mcexec\n");
goto destroy;
// shutdown
shutdown:
ret_ihklib = ihk_os_shutdown(0);
//OKNG(ret_ihklib == 0, "shutdown after mcexec\n");
// get status. Note that the smp_ihk_os_shutdown() transitions
// smp-x86 status to BUILTIN_OS_STATUS_SHUTDOWN
// and smp_ihk_os_query_status() transitions os status to IHK_OS_STATUS_NOT_BOOTED.
ret_ihklib = ihk_os_get_status(0);
//OKNG(ret_ihklib == IHK_STATUS_SHUTDOWN ||
// ret_ihklib == IHK_STATUS_INACTIVE, "ihk_os_get_status (5) returned %d\n", ret_ihklib);
destroy:
ret_ihklib = ihk_destroy_os(0, 0);
OKNG(ret_ihklib == 0, "destroy after mcexec returned 0\n");
sprintf(cmd, "rmmod %s/kmod/mcctrl.ko", prefix);
status = system(cmd);
// destroy pseudofs
ret_ihklib = ihk_os_destroy_pseudofs(0);
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
sprintf(cmd, "rmmod %s/kmod/ihk-smp-x86_64.ko", prefix);
status = system(cmd);
sprintf(cmd, "rmmod %s/kmod/ihk.ko", prefix);
status = system(cmd);
printf("*** All tests finished\n\n");
fn_exit:
return ret;
fn_fail:
goto fn_exit;
}

View File

@@ -0,0 +1,183 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ihklib.h>
#include <sys/types.h>
#define MCK_DIR "/home/satoken/ppos"
static char prefix[256] = MCK_DIR;
static char test_name[64] = "CT_005";
#define OKNG(cond, ...) \
do { \
if(cond) { \
printf("[OK] "); \
printf(__VA_ARGS__); \
} else { \
printf("[NG] "); \
printf(__VA_ARGS__); \
char buf[65536];\
char cmd[256];\
sprintf(cmd, "%s/sbin/ihkosctl 0 kmsg", prefix);\
FILE* fp = popen(cmd, "r"); \
size_t nread = fread(buf, 1, sizeof(buf), fp); \
buf[nread] = 0; \
printf("%s", buf); \
goto fn_fail; \
} \
} while(0)
int main(int argc, char** argv) {
int ret = 0, status, ret_ihklib, pid;
FILE *fp;
char buf[65536];
size_t nread;
char cmd[1024];
char fn[256];
char kargs[256];
int cpus[4] = {6, 7, 8, 9};
int num_cpus = 4;
struct ihk_mem_chunk mem_chunks[4];
int num_mem_chunks;
printf("*** %s start *************************\n", test_name);
/*--------------------------------------------
* Preparing
*--------------------------------------------*/
sprintf(cmd, "%s/sbin/mcstop+release.sh", prefix);
status = system(cmd);
// ihk_os_destroy_pseudofs
ret_ihklib = ihk_os_destroy_pseudofs(0);
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
sprintf(cmd, "insmod %s/kmod/ihk.ko", prefix);
status = system(cmd);
sprintf(cmd, "insmod %s/kmod/ihk-smp-x86_64.ko ihk_start_irq=240 ihk_ikc_irq_core=0", prefix);
status = system(cmd);
sprintf(cmd, "insmod %s/kmod/mcctrl.ko", prefix);
status = system(cmd);
/*--------------------------------------------
* Test
*--------------------------------------------*/
// create 0
ret_ihklib = ihk_create_os(0);
// reserve cpus
ret_ihklib = ihk_reserve_cpu(0, cpus, num_cpus);
//OKNG(ret_ihklib == 0, "ihk_reserve_cpu\n");
// assign cpus
ret_ihklib = ihk_os_assign_cpu(0, cpus, num_cpus);
//OKNG(ret_ihklib == 0, "ihk_os_assign_cpu\n");
// reserve mem 128m@0,128m@1
num_mem_chunks = 2;
mem_chunks[0].size = 128*1024*1024ULL;
mem_chunks[0].numa_node_number = 0;
mem_chunks[1].size = 128*1024*1024ULL;
mem_chunks[1].numa_node_number = 1;
ret_ihklib = ihk_reserve_mem(0, mem_chunks, num_mem_chunks);
//OKNG(ret_ihklib == 0, "ihk_reserve_mem (2)\n");
// assign mem 128m@0,128m@1
num_mem_chunks = 2;
mem_chunks[0].size = 128*1024*1024ULL;
mem_chunks[0].numa_node_number = 0;
mem_chunks[1].size = 128*1024*1024ULL;
mem_chunks[1].numa_node_number = 1;
ret_ihklib = ihk_os_assign_mem(0, mem_chunks, num_mem_chunks);
//OKNG(ret_ihklib == 0, "ihk_os_assign_mem (2)\n");
// load
sprintf(fn, "%s/smp-x86/kernel/mckernel.img", prefix);
ret_ihklib = ihk_os_load(0, fn);
//OKNG(ret_ihklib == 0, "ihk_os_load\n");
// kargs
sprintf(kargs, "hidos ksyslogd=0");
ret_ihklib = ihk_os_kargs(0, kargs);
//OKNG(ret_ihklib == 0, "ihk_os_kargs\n");
// boot
ret_ihklib = ihk_os_boot(0);
OKNG(ret_ihklib == 0, "ihk_os_boot\n");
/* Make sure that all initialization related transactions between McKernel and IHK finish
sysfs_init(void) (in mckernel/kernel/sysfs.c)
packet.msg = SCD_MSG_SYSFS_REQ_SETUP;
sysfsm_work_main() in (mckernel/executer/kernel/mcctrl/sysfs.c)
sysfsm_req_setup
sysfsm_setup */
usleep(100*1000);
// create pseudofs
ret_ihklib = ihk_os_create_pseudofs(0);
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
//OKNG(ret_ihklib == 0 &&
// strstr(buf, "/tmp/mcos/mcos0_sys") != NULL, "ihk_os_create_pseudofs()\n");
// mcexec
pid = fork();
if (pid == 0) {
printf(" start long mcexec...\n");
sprintf(cmd, "%s/bin/mcexec sleep 5", prefix);
fp = popen(cmd, "r");
nread = fread(buf, 1, sizeof(buf), fp);
return 0;
}
usleep(100*1000);
// shutdown
shutdown:
ret_ihklib = ihk_os_shutdown(0);
OKNG(ret_ihklib == 0, "shutdown during mcexec returned 0\n");
printf(" (But, mcexec process remain due to #846)\n");
goto done_test;
// get status. Note that the smp_ihk_os_shutdown() transitions
// smp-x86 status to BUILTIN_OS_STATUS_SHUTDOWN
// and smp_ihk_os_query_status() transitions os status to IHK_OS_STATUS_NOT_BOOTED.
ret_ihklib = ihk_os_get_status(0);
//OKNG(ret_ihklib == IHK_STATUS_SHUTDOWN ||
// ret_ihklib == IHK_STATUS_INACTIVE, "ihk_os_get_status (5) returned %d\n", ret_ihklib);
destroy:
ret_ihklib = ihk_destroy_os(0, 0);
//OKNG(ret_ihklib == 0, "destroy immediately after boot\n");
sprintf(cmd, "rmmod %s/kmod/mcctrl.ko", prefix);
status = system(cmd);
// destroy pseudofs
ret_ihklib = ihk_os_destroy_pseudofs(0);
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
sprintf(cmd, "rmmod %s/kmod/ihk-smp-x86_64.ko", prefix);
status = system(cmd);
sprintf(cmd, "rmmod %s/kmod/ihk.ko", prefix);
status = system(cmd);
done_test:
printf("*** All tests finished\n\n");
fn_exit:
return ret;
fn_fail:
goto fn_exit;
}

View File

@@ -0,0 +1,187 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ihklib.h>
#include <sys/types.h>
#define MCK_DIR "/home/satoken/ppos"
static char prefix[256] = MCK_DIR;
static char test_name[64] = "CT_006";
#define OKNG(cond, ...) \
do { \
if(cond) { \
printf("[OK] "); \
printf(__VA_ARGS__); \
} else { \
printf("[NG] "); \
printf(__VA_ARGS__); \
char buf[65536];\
char cmd[256];\
sprintf(cmd, "%s/sbin/ihkosctl 0 kmsg", prefix);\
FILE* fp = popen(cmd, "r"); \
size_t nread = fread(buf, 1, sizeof(buf), fp); \
buf[nread] = 0; \
printf("%s", buf); \
goto fn_fail; \
} \
} while(0)
int main(int argc, char** argv) {
int ret = 0, status, ret_ihklib, pid;
FILE *fp;
char buf[65536];
size_t nread;
char cmd[1024];
char fn[256];
char kargs[256];
int cpus[4] = {6, 7, 8, 9};
int num_cpus = 4;
struct ihk_mem_chunk mem_chunks[4];
int num_mem_chunks;
printf("*** %s start *************************\n", test_name);
/*--------------------------------------------
* Preparing
*--------------------------------------------*/
sprintf(cmd, "%s/sbin/mcstop+release.sh", prefix);
status = system(cmd);
// ihk_os_destroy_pseudofs
ret_ihklib = ihk_os_destroy_pseudofs(0);
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
sprintf(cmd, "insmod %s/kmod/ihk.ko", prefix);
status = system(cmd);
sprintf(cmd, "insmod %s/kmod/ihk-smp-x86_64.ko ihk_start_irq=240 ihk_ikc_irq_core=0", prefix);
status = system(cmd);
sprintf(cmd, "insmod %s/kmod/mcctrl.ko", prefix);
status = system(cmd);
/*--------------------------------------------
* Test
*--------------------------------------------*/
// create 0
ret_ihklib = ihk_create_os(0);
// reserve cpus
ret_ihklib = ihk_reserve_cpu(0, cpus, num_cpus);
//OKNG(ret_ihklib == 0, "ihk_reserve_cpu\n");
// assign cpus
ret_ihklib = ihk_os_assign_cpu(0, cpus, num_cpus);
//OKNG(ret_ihklib == 0, "ihk_os_assign_cpu\n");
// reserve mem 128m@0,128m@1
num_mem_chunks = 2;
mem_chunks[0].size = 128*1024*1024ULL;
mem_chunks[0].numa_node_number = 0;
mem_chunks[1].size = 128*1024*1024ULL;
mem_chunks[1].numa_node_number = 1;
ret_ihklib = ihk_reserve_mem(0, mem_chunks, num_mem_chunks);
//OKNG(ret_ihklib == 0, "ihk_reserve_mem (2)\n");
// assign mem 128m@0,128m@1
num_mem_chunks = 2;
mem_chunks[0].size = 128*1024*1024ULL;
mem_chunks[0].numa_node_number = 0;
mem_chunks[1].size = 128*1024*1024ULL;
mem_chunks[1].numa_node_number = 1;
ret_ihklib = ihk_os_assign_mem(0, mem_chunks, num_mem_chunks);
//OKNG(ret_ihklib == 0, "ihk_os_assign_mem (2)\n");
// load
sprintf(fn, "%s/smp-x86/kernel/mckernel.img", prefix);
ret_ihklib = ihk_os_load(0, fn);
//OKNG(ret_ihklib == 0, "ihk_os_load\n");
// kargs
sprintf(kargs, "hidos ksyslogd=0");
ret_ihklib = ihk_os_kargs(0, kargs);
//OKNG(ret_ihklib == 0, "ihk_os_kargs\n");
// boot
ret_ihklib = ihk_os_boot(0);
OKNG(ret_ihklib == 0, "ihk_os_boot\n");
/* Make sure that all initialization related transactions between McKernel and IHK finish
sysfs_init(void) (in mckernel/kernel/sysfs.c)
packet.msg = SCD_MSG_SYSFS_REQ_SETUP;
sysfsm_work_main() in (mckernel/executer/kernel/mcctrl/sysfs.c)
sysfsm_req_setup
sysfsm_setup */
usleep(100*1000);
// create pseudofs
ret_ihklib = ihk_os_create_pseudofs(0);
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
//OKNG(ret_ihklib == 0 &&
// strstr(buf, "/tmp/mcos/mcos0_sys") != NULL, "ihk_os_create_pseudofs()\n");
// mcexec
fflush(stdout);
pid = fork();
if (pid == 0) {
printf(" start long mcexec...\n");
sprintf(cmd, "%s/bin/mcexec sleep 5", prefix);
fp = popen(cmd, "r");
nread = fread(buf, 1, sizeof(buf), fp);
return 0;
}
usleep(100*1000);
goto destroy;
// shutdown
shutdown:
ret_ihklib = ihk_os_shutdown(0);
OKNG(ret_ihklib == 0, "shutdown during mcexec\n");
// get status. Note that the smp_ihk_os_shutdown() transitions
// smp-x86 status to BUILTIN_OS_STATUS_SHUTDOWN
// and smp_ihk_os_query_status() transitions os status to IHK_OS_STATUS_NOT_BOOTED.
ret_ihklib = ihk_os_get_status(0);
//OKNG(ret_ihklib == IHK_STATUS_SHUTDOWN ||
// ret_ihklib == IHK_STATUS_INACTIVE, "ihk_os_get_status (5) returned %d\n", ret_ihklib);
destroy:
ret_ihklib = ihk_destroy_os(0, 0);
OKNG(ret_ihklib != 0, "destroy during mcexec returned NOT 0\n");
// wait for child process
waitpid(pid, &status, 0);
usleep(100*1000);
sprintf(cmd, "rmmod %s/kmod/mcctrl.ko", prefix);
status = system(cmd);
// destroy pseudofs
ret_ihklib = ihk_os_destroy_pseudofs(0);
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
sprintf(cmd, "rmmod %s/kmod/ihk-smp-x86_64.ko", prefix);
status = system(cmd);
sprintf(cmd, "rmmod %s/kmod/ihk.ko", prefix);
status = system(cmd);
done_test:
printf("*** All tests finished\n\n");
fn_exit:
return ret;
fn_fail:
goto fn_exit;
}

View File

@@ -0,0 +1,177 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ihklib.h>
#include <sys/types.h>
#define MCK_DIR "/home/satoken/ppos"
static char prefix[256] = MCK_DIR;
static char test_name[64] = "CT_007";
#define OKNG(cond, ...) \
do { \
if(cond) { \
printf("[OK] "); \
printf(__VA_ARGS__); \
} else { \
printf("[NG] "); \
printf(__VA_ARGS__); \
char buf[65536];\
char cmd[256];\
sprintf(cmd, "%s/sbin/ihkosctl 0 kmsg", prefix);\
FILE* fp = popen(cmd, "r"); \
size_t nread = fread(buf, 1, sizeof(buf), fp); \
buf[nread] = 0; \
printf("%s", buf); \
goto fn_fail; \
} \
} while(0)
int main(int argc, char** argv) {
int ret = 0, status, ret_ihklib;
FILE *fp;
char buf[65536];
size_t nread;
char cmd[1024];
char fn[256];
char kargs[256];
int cpus[4] = {6, 7, 8, 9};
int num_cpus = 4;
struct ihk_mem_chunk mem_chunks[4];
int num_mem_chunks;
printf("*** %s start *************************\n", test_name);
/*--------------------------------------------
* Preparing
*--------------------------------------------*/
sprintf(cmd, "%s/sbin/mcstop+release.sh", prefix);
status = system(cmd);
// ihk_os_destroy_pseudofs
ret_ihklib = ihk_os_destroy_pseudofs(0);
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
sprintf(cmd, "insmod %s/kmod/ihk.ko", prefix);
status = system(cmd);
sprintf(cmd, "insmod %s/kmod/ihk-smp-x86_64.ko ihk_start_irq=240 ihk_ikc_irq_core=0", prefix);
status = system(cmd);
sprintf(cmd, "insmod %s/kmod/mcctrl.ko", prefix);
status = system(cmd);
/*--------------------------------------------
* Test
*--------------------------------------------*/
// create 0
ret_ihklib = ihk_create_os(0);
// reserve cpus
ret_ihklib = ihk_reserve_cpu(0, cpus, num_cpus);
//OKNG(ret_ihklib == 0, "ihk_reserve_cpu\n");
// assign cpus
ret_ihklib = ihk_os_assign_cpu(0, cpus, num_cpus);
//OKNG(ret_ihklib == 0, "ihk_os_assign_cpu\n");
// reserve mem 128m@0,128m@1
num_mem_chunks = 2;
mem_chunks[0].size = 128*1024*1024ULL;
mem_chunks[0].numa_node_number = 0;
mem_chunks[1].size = 128*1024*1024ULL;
mem_chunks[1].numa_node_number = 1;
ret_ihklib = ihk_reserve_mem(0, mem_chunks, num_mem_chunks);
//OKNG(ret_ihklib == 0, "ihk_reserve_mem (2)\n");
// assign mem 128m@0,128m@1
num_mem_chunks = 2;
mem_chunks[0].size = 128*1024*1024ULL;
mem_chunks[0].numa_node_number = 0;
mem_chunks[1].size = 128*1024*1024ULL;
mem_chunks[1].numa_node_number = 1;
ret_ihklib = ihk_os_assign_mem(0, mem_chunks, num_mem_chunks);
//OKNG(ret_ihklib == 0, "ihk_os_assign_mem (2)\n");
// load
sprintf(fn, "%s/smp-x86/kernel/mckernel.img", prefix);
ret_ihklib = ihk_os_load(0, fn);
goto shutdown;
//OKNG(ret_ihklib == 0, "ihk_os_load\n");
// kargs
sprintf(kargs, "hidos ksyslogd=0");
ret_ihklib = ihk_os_kargs(0, kargs);
//OKNG(ret_ihklib == 0, "ihk_os_kargs\n");
// boot
ret_ihklib = ihk_os_boot(0);
OKNG(ret_ihklib == 0, "ihk_os_boot\n");
/* Make sure that all initialization related transactions between McKernel and IHK finish
sysfs_init(void) (in mckernel/kernel/sysfs.c)
packet.msg = SCD_MSG_SYSFS_REQ_SETUP;
sysfsm_work_main() in (mckernel/executer/kernel/mcctrl/sysfs.c)
sysfsm_req_setup
sysfsm_setup */
usleep(100*1000);
// create pseudofs
ret_ihklib = ihk_os_create_pseudofs(0);
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
//OKNG(ret_ihklib == 0 &&
// strstr(buf, "/tmp/mcos/mcos0_sys") != NULL, "ihk_os_create_pseudofs()\n");
// mcexec
sprintf(cmd, "%s/bin/mcexec ls -l | grep Makefile", prefix);
fp = popen(cmd, "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
OKNG(strstr(buf, "Makefile") != NULL, "mcexec\n");
// shutdown
shutdown:
ret_ihklib = ihk_os_shutdown(0);
OKNG(ret_ihklib == 0, "shutdown before boot returned 0\n");
// get status. Note that the smp_ihk_os_shutdown() transitions
// smp-x86 status to BUILTIN_OS_STATUS_SHUTDOWN
// and smp_ihk_os_query_status() transitions os status to IHK_OS_STATUS_NOT_BOOTED.
ret_ihklib = ihk_os_get_status(0);
//OKNG(ret_ihklib == IHK_STATUS_SHUTDOWN ||
// ret_ihklib == IHK_STATUS_INACTIVE, "ihk_os_get_status (5) returned %d\n", ret_ihklib);
destroy:
ret_ihklib = ihk_destroy_os(0, 0);
//OKNG(ret_ihklib == 0, "destroy immediately after boot\n");
sprintf(cmd, "rmmod %s/kmod/mcctrl.ko", prefix);
status = system(cmd);
// destroy pseudofs
ret_ihklib = ihk_os_destroy_pseudofs(0);
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
sprintf(cmd, "rmmod %s/kmod/ihk-smp-x86_64.ko", prefix);
status = system(cmd);
sprintf(cmd, "rmmod %s/kmod/ihk.ko", prefix);
status = system(cmd);
printf("*** All tests finished\n\n");
fn_exit:
return ret;
fn_fail:
goto fn_exit;
}

View File

@@ -0,0 +1,180 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ihklib.h>
#include <sys/types.h>
#define MCK_DIR "/home/satoken/ppos"
static char prefix[256] = MCK_DIR;
static char test_name[64] = "CT_008";
#define OKNG(cond, ...) \
do { \
if(cond) { \
printf("[OK] "); \
printf(__VA_ARGS__); \
} else { \
printf("[NG] "); \
printf(__VA_ARGS__); \
char buf[65536];\
char cmd[256];\
sprintf(cmd, "%s/sbin/ihkosctl 0 kmsg", prefix);\
FILE* fp = popen(cmd, "r"); \
size_t nread = fread(buf, 1, sizeof(buf), fp); \
buf[nread] = 0; \
printf("%s", buf); \
goto fn_fail; \
} \
} while(0)
int main(int argc, char** argv) {
int ret = 0, status, ret_ihklib;
FILE *fp;
char buf[65536];
size_t nread;
char cmd[1024];
char fn[256];
char kargs[256];
int cpus[4] = {6, 7, 8, 9};
int num_cpus = 4;
struct ihk_mem_chunk mem_chunks[4];
int num_mem_chunks;
printf("*** %s start *************************\n", test_name);
/*--------------------------------------------
* Preparing
*--------------------------------------------*/
sprintf(cmd, "%s/sbin/mcstop+release.sh", prefix);
status = system(cmd);
// ihk_os_destroy_pseudofs
ret_ihklib = ihk_os_destroy_pseudofs(0);
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
sprintf(cmd, "insmod %s/kmod/ihk.ko", prefix);
status = system(cmd);
sprintf(cmd, "insmod %s/kmod/ihk-smp-x86_64.ko ihk_start_irq=240 ihk_ikc_irq_core=0", prefix);
status = system(cmd);
sprintf(cmd, "insmod %s/kmod/mcctrl.ko", prefix);
status = system(cmd);
/*--------------------------------------------
* Test
*--------------------------------------------*/
// create 0
ret_ihklib = ihk_create_os(0);
// reserve cpus
ret_ihklib = ihk_reserve_cpu(0, cpus, num_cpus);
//OKNG(ret_ihklib == 0, "ihk_reserve_cpu\n");
// assign cpus
ret_ihklib = ihk_os_assign_cpu(0, cpus, num_cpus);
//OKNG(ret_ihklib == 0, "ihk_os_assign_cpu\n");
// reserve mem 128m@0,128m@1
num_mem_chunks = 2;
mem_chunks[0].size = 128*1024*1024ULL;
mem_chunks[0].numa_node_number = 0;
mem_chunks[1].size = 128*1024*1024ULL;
mem_chunks[1].numa_node_number = 1;
ret_ihklib = ihk_reserve_mem(0, mem_chunks, num_mem_chunks);
//OKNG(ret_ihklib == 0, "ihk_reserve_mem (2)\n");
// assign mem 128m@0,128m@1
num_mem_chunks = 2;
mem_chunks[0].size = 128*1024*1024ULL;
mem_chunks[0].numa_node_number = 0;
mem_chunks[1].size = 128*1024*1024ULL;
mem_chunks[1].numa_node_number = 1;
ret_ihklib = ihk_os_assign_mem(0, mem_chunks, num_mem_chunks);
//OKNG(ret_ihklib == 0, "ihk_os_assign_mem (2)\n");
// load
sprintf(fn, "%s/smp-x86/kernel/mckernel.img", prefix);
ret_ihklib = ihk_os_load(0, fn);
//OKNG(ret_ihklib == 0, "ihk_os_load\n");
// kargs
sprintf(kargs, "hidos ksyslogd=0");
ret_ihklib = ihk_os_kargs(0, kargs);
//OKNG(ret_ihklib == 0, "ihk_os_kargs\n");
// boot
ret_ihklib = ihk_os_boot(0);
OKNG(ret_ihklib == 0, "ihk_os_boot\n");
/* Make sure that all initialization related transactions between McKernel and IHK finish
sysfs_init(void) (in mckernel/kernel/sysfs.c)
packet.msg = SCD_MSG_SYSFS_REQ_SETUP;
sysfsm_work_main() in (mckernel/executer/kernel/mcctrl/sysfs.c)
sysfsm_req_setup
sysfsm_setup */
usleep(100*1000);
// create pseudofs
ret_ihklib = ihk_os_create_pseudofs(0);
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
//OKNG(ret_ihklib == 0 &&
// strstr(buf, "/tmp/mcos/mcos0_sys") != NULL, "ihk_os_create_pseudofs()\n");
// mcexec
sprintf(cmd, "%s/bin/mcexec ls -l | grep Makefile", prefix);
fp = popen(cmd, "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
OKNG(strstr(buf, "Makefile") != NULL, "do mcexec\n");
// shutdown
shutdown:
ret_ihklib = ihk_os_shutdown(0);
OKNG(ret_ihklib == 0, "shutdown after mcexec returned 0\n");
// get status. Note that the smp_ihk_os_shutdown() transitions
// smp-x86 status to BUILTIN_OS_STATUS_SHUTDOWN
// and smp_ihk_os_query_status() transitions os status to IHK_OS_STATUS_NOT_BOOTED.
ret_ihklib = ihk_os_get_status(0);
OKNG(ret_ihklib == IHK_STATUS_SHUTDOWN ||
ret_ihklib == IHK_STATUS_INACTIVE, "ihk_os_get_status returned SHUTDOWN or INACTIVE\n");
// shutdown again
ret_ihklib = ihk_os_shutdown(0);
OKNG(ret_ihklib != 0, "shutdown after shutdown returned NOT 0\n");
destroy:
ret_ihklib = ihk_destroy_os(0, 0);
//OKNG(ret_ihklib == 0, "destroy immediately after boot\n");
sprintf(cmd, "rmmod %s/kmod/mcctrl.ko", prefix);
status = system(cmd);
// destroy pseudofs
ret_ihklib = ihk_os_destroy_pseudofs(0);
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
sprintf(cmd, "rmmod %s/kmod/ihk-smp-x86_64.ko", prefix);
status = system(cmd);
sprintf(cmd, "rmmod %s/kmod/ihk.ko", prefix);
status = system(cmd);
printf("*** All tests finished\n\n");
fn_exit:
return ret;
fn_fail:
goto fn_exit;
}

View File

@@ -0,0 +1,177 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ihklib.h>
#include <sys/types.h>
#define MCK_DIR "/home/satoken/ppos"
static char prefix[256] = MCK_DIR;
static char test_name[64] = "CT_009";
#define OKNG(cond, ...) \
do { \
if(cond) { \
printf("[OK] "); \
printf(__VA_ARGS__); \
} else { \
printf("[NG] "); \
printf(__VA_ARGS__); \
char buf[65536];\
char cmd[256];\
sprintf(cmd, "%s/sbin/ihkosctl 0 kmsg", prefix);\
FILE* fp = popen(cmd, "r"); \
size_t nread = fread(buf, 1, sizeof(buf), fp); \
buf[nread] = 0; \
printf("%s", buf); \
goto fn_fail; \
} \
} while(0)
int main(int argc, char** argv) {
int ret = 0, status, ret_ihklib;
FILE *fp;
char buf[65536];
size_t nread;
char cmd[1024];
char fn[256];
char kargs[256];
int cpus[4] = {6, 7, 8, 9};
int num_cpus = 4;
struct ihk_mem_chunk mem_chunks[4];
int num_mem_chunks;
printf("*** %s start *************************\n", test_name);
/*--------------------------------------------
* Preparing
*--------------------------------------------*/
sprintf(cmd, "%s/sbin/mcstop+release.sh", prefix);
status = system(cmd);
// ihk_os_destroy_pseudofs
ret_ihklib = ihk_os_destroy_pseudofs(0);
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
sprintf(cmd, "insmod %s/kmod/ihk.ko", prefix);
status = system(cmd);
sprintf(cmd, "insmod %s/kmod/ihk-smp-x86_64.ko ihk_start_irq=240 ihk_ikc_irq_core=0", prefix);
status = system(cmd);
sprintf(cmd, "insmod %s/kmod/mcctrl.ko", prefix);
status = system(cmd);
/*--------------------------------------------
* Test
*--------------------------------------------*/
// create 0
ret_ihklib = ihk_create_os(0);
// reserve cpus
ret_ihklib = ihk_reserve_cpu(0, cpus, num_cpus);
//OKNG(ret_ihklib == 0, "ihk_reserve_cpu\n");
// assign cpus
ret_ihklib = ihk_os_assign_cpu(0, cpus, num_cpus);
//OKNG(ret_ihklib == 0, "ihk_os_assign_cpu\n");
// reserve mem 128m@0,128m@1
num_mem_chunks = 2;
mem_chunks[0].size = 128*1024*1024ULL;
mem_chunks[0].numa_node_number = 0;
mem_chunks[1].size = 128*1024*1024ULL;
mem_chunks[1].numa_node_number = 1;
ret_ihklib = ihk_reserve_mem(0, mem_chunks, num_mem_chunks);
//OKNG(ret_ihklib == 0, "ihk_reserve_mem (2)\n");
// assign mem 128m@0,128m@1
num_mem_chunks = 2;
mem_chunks[0].size = 128*1024*1024ULL;
mem_chunks[0].numa_node_number = 0;
mem_chunks[1].size = 128*1024*1024ULL;
mem_chunks[1].numa_node_number = 1;
ret_ihklib = ihk_os_assign_mem(0, mem_chunks, num_mem_chunks);
//OKNG(ret_ihklib == 0, "ihk_os_assign_mem (2)\n");
// load
sprintf(fn, "%s/smp-x86/kernel/mckernel.img", prefix);
ret_ihklib = ihk_os_load(0, fn);
//OKNG(ret_ihklib == 0, "ihk_os_load\n");
// kargs
sprintf(kargs, "hidos ksyslogd=0");
ret_ihklib = ihk_os_kargs(0, kargs);
//OKNG(ret_ihklib == 0, "ihk_os_kargs\n");
// boot
ret_ihklib = ihk_os_boot(0);
goto shutdown;
OKNG(ret_ihklib == 0, "ihk_os_boot\n");
/* Make sure that all initialization related transactions between McKernel and IHK finish
sysfs_init(void) (in mckernel/kernel/sysfs.c)
packet.msg = SCD_MSG_SYSFS_REQ_SETUP;
sysfsm_work_main() in (mckernel/executer/kernel/mcctrl/sysfs.c)
sysfsm_req_setup
sysfsm_setup */
usleep(100*1000);
// create pseudofs
ret_ihklib = ihk_os_create_pseudofs(0);
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
//OKNG(ret_ihklib == 0 &&
// strstr(buf, "/tmp/mcos/mcos0_sys") != NULL, "ihk_os_create_pseudofs()\n");
// mcexec
sprintf(cmd, "%s/bin/mcexec ls -l | grep Makefile", prefix);
fp = popen(cmd, "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
OKNG(strstr(buf, "Makefile") != NULL, "mcexec\n");
// shutdown
shutdown:
ret_ihklib = ihk_os_shutdown(0);
OKNG(ret_ihklib == 0, "force shutdown immediately after boot returned 0\n");
// get status. Note that the smp_ihk_os_shutdown() transitions
// smp-x86 status to BUILTIN_OS_STATUS_SHUTDOWN
// and smp_ihk_os_query_status() transitions os status to IHK_OS_STATUS_NOT_BOOTED.
ret_ihklib = ihk_os_get_status(0);
//OKNG(ret_ihklib == IHK_STATUS_SHUTDOWN ||
// ret_ihklib == IHK_STATUS_INACTIVE, "ihk_os_get_status (5) returned %d\n", ret_ihklib);
destroy:
ret_ihklib = ihk_destroy_os(0, 0);
//OKNG(ret_ihklib == 0, "destroy immediately after boot\n");
sprintf(cmd, "rmmod %s/kmod/mcctrl.ko", prefix);
status = system(cmd);
// destroy pseudofs
ret_ihklib = ihk_os_destroy_pseudofs(0);
fp = popen("cat /proc/mounts | grep /tmp/mcos/mcos0_sys", "r");
nread = fread(buf, 1, sizeof(buf), fp);
buf[nread] = 0;
sprintf(cmd, "rmmod %s/kmod/ihk-smp-x86_64.ko", prefix);
status = system(cmd);
sprintf(cmd, "rmmod %s/kmod/ihk.ko", prefix);
status = system(cmd);
printf("*** All tests finished\n\n");
fn_exit:
return ret;
fn_fail:
goto fn_exit;
}

View File

@@ -0,0 +1,51 @@
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
CPPFLAGS = -I$(MCK_DIR)/include
LDFLAGS = -L$(MCK_DIR)/lib -lihk -Wl,-rpath -Wl,$(MCK_DIR)/lib -lbfd
all: $(TARGET)
CT_001: CT_001.c
$(CC) -o $@ $(CPPFLAGS) $(LDFLAGS) $^
CT_002: CT_002.c
$(CC) -o $@ $(CPPFLAGS) $(LDFLAGS) $^
CT_003: CT_003.c
$(CC) -o $@ $(CPPFLAGS) $(LDFLAGS) $^
CT_004: CT_004.c
$(CC) -o $@ $(CPPFLAGS) $(LDFLAGS) $^
CT_005: CT_005.c
$(CC) -o $@ $(CPPFLAGS) $(LDFLAGS) $^
CT_006: CT_006.c
$(CC) -o $@ $(CPPFLAGS) $(LDFLAGS) $^
CT_007: CT_007.c
$(CC) -o $@ $(CPPFLAGS) $(LDFLAGS) $^
CT_008: CT_008.c
$(CC) -o $@ $(CPPFLAGS) $(LDFLAGS) $^
CT_009: CT_009.c
$(CC) -o $@ $(CPPFLAGS) $(LDFLAGS) $^
test:: $(TARGET)
-sudo ./CT_001
-sudo ./CT_002
-sudo ./CT_003
-sudo ./CT_004
#-sudo ./CT_005
-sudo ./CT_006
-sudo ./CT_007
-sudo ./CT_008
-sudo ./CT_009
clean:
rm -f $(TARGET)

View File

@@ -0,0 +1,93 @@
【Issue#898,#928 動作確認】
Issue#898, #928が解決され、既存機能に影響がないことをihklibテストスイートを用いた確認2項目と、
McKernelの起動/終了の基本動作確認9項目の計11項目のテストによって確認した。
①ihklibテストスイートを用いた確認
・Issue#898
ihklibテストスイートのihklib001_lin.c を以下のように修正して1000回繰り返し実行し、
すべての実行においてテストをパスすることを確認した。
- McKernelのブート処理の直後にgoto文を追加し、シャットダウン処理の直前に移動する
・Issue#928
ihklibテストスイートのihklib001_lin.c を以下のように修正して1000回繰り返し実行し、
すべての実行においてテストをパスすることを確認した。
- McKernelプロセス(mcexec)の実行直後にgoto文を追加し、シャットダウン処理の直前に移動する
②McKernelの起動/終了の基本動作確認
McKernelの状態と、終了処理(shutdown, destroy)の組み合わせで、
9項目のテストを実施した。
基本動作確認の詳細を以下に示す。
1. ファイルの説明
CT_xxx.c 各テスト項目のテストプログラム
force_shutdown.patch McKernelの状態がRUNNINGにならなかった場合に行う強制シャットダウン処理を
発生させるパッチファイル
result.log テストプログラムの実行結果
2. テストの実行方法
以下の手順でテストを実行する
1. Makefileの変数MCK_DIRの内容を、McKernelがインストールされているディレクトリに変更する
2. CT_xxx.c の定数MCK_DIRの内容を、McKernelがインストールされているディレクトリに変更する
3. sh make test を実行する
3. テスト項目
以下の条件でMcKernelの起動/終了が正常に行われることを確認する
なお、McKernelの起動、終了の操作はihklibを用いて実施する
CT_001:
1. McKernelを起動(ihk_os_boot)する
2. 起動の直後にMcKernelを終了(ihk_os_shutdown)する
⇒ ihk_os_shutdownが0を返す
CT_002:
1. McKernelを起動(ihk_os_boot)する
2. 起動の直後に対象のIHK_OSインスタンスを破棄(ihk_os_destroy)する
⇒ ihk_os_destroyが0を返す
CT_003:
1. McKernelを起動(ihk_os_boot)する
2. McKernelプロセスを実行する
3. McKernelプロセスの実行終了直後にMcKernelを終了(ihk_os_shutdown)する
⇒ ihk_os_shutdownが0を返す
CT_004:
1. McKernelを起動(ihk_os_boot)する
2. McKernelプロセスを実行する
3. McKernelプロセスの実行終了直後に対象のIHK_OSインスタンスを破棄(ihk_os_destroy)する
⇒ ihk_os_destroyが0を返す
CT_005:
1. McKernelを起動(ihk_os_boot)する
2. McKernelプロセスを実行する
3. McKernelプロセスの実行中にMcKernelを終了(ihk_os_shutdown)する
⇒ ihk_os_shutdownが0を返す
CT_006:
1. McKernelを起動(ihk_os_boot)する
2. McKernelプロセスを実行する
3. McKernelプロセスの実行中に対象のIHK_OSインスタンスを破棄(ihk_os_destroy)する
⇒ ihk_os_destroyが0以外を返す (ref_count != 0)
CT_007:
1. McKernelの起動処理の中の、カーネルイメージのロード(ihk_os_load)までを実施する
2. McKernelを終了(ihk_os_shutdown)する
⇒ ihk_os_shutdownが0を返す
CT_008:
1. McKernelを起動(ihk_os_boot)する
2. McKernelプロセスを実行する
3. McKernelプロセスの実行終了直後にMcKernelを終了(ihk_os_shutdown)する
4. ihk_os_get_status がSHUTDOWNまたは、INACTIVEを返すことを確認する
5. 終了したMcKernelに対して、再度終了(ihk_os_shutdown)する
⇒ ihk_os_shutdownが0以外を返す
CT_009:
前提force_shutdown.patch を適用してMcKernelをビルドする
1. McKernelを起動(ihk_os_boot)する
2. 起動の直後にMcKernelを終了(ihk_os_shutdown)する
⇒ ihk_os_shutdownが0を返す
4. 結果
テストプログラムの実行結果はresult.log に出力される。
上記9項目で[OK]が出力されていることを確認した。

View File

@@ -0,0 +1,20 @@
diff --git a/executer/kernel/mcctrl/driver.c b/executer/kernel/mcctrl/driver.c
index 390dac6..a87aa45 100644
--- a/executer/kernel/mcctrl/driver.c
+++ b/executer/kernel/mcctrl/driver.c
@@ -171,12 +171,12 @@ int mcctrl_os_shutdown_notifier(int os_index)
{
if (os[os_index]) {
/* Wait for os running */
- if (ihk_os_wait_for_status(os[os_index], IHK_OS_STATUS_RUNNING, 0, 200) != 0) {
- printk("IHK: OS does not become RUNNING in shutdown. Force shutdown.\n");
+// if (ihk_os_wait_for_status(os[os_index], IHK_OS_STATUS_RUNNING, 0, 200) != 0) {
+// printk("IHK: OS does not become RUNNING in shutdown. Force shutdown.\n");
/* send nmi to force shutdown */
ihk_os_send_nmi(os[os_index], 3);
mdelay(200);
- }
+// }
sysfsm_cleanup(os[os_index]);
free_topology_info(os[os_index]);

View File

@@ -0,0 +1,58 @@
sudo ./CT_001
*** CT_001 start *************************
[OK] shutdown immediately after boot returned 0
*** All tests finished
sudo ./CT_002
*** CT_002 start *************************
[OK] destroy immediately after boot returned NOT 0
*** All tests finished
sudo ./CT_003
*** CT_003 start *************************
[OK] ihk_os_boot
[OK] done mcexec
[OK] shutdown after mcexec returned 0
*** All tests finished
sudo ./CT_004
*** CT_004 start *************************
[OK] ihk_os_boot
[OK] do mcexec
[OK] destroy after mcexec returned 0
*** All tests finished
-sudo ./CT_005
*** CT_005 start *************************
[OK] ihk_os_boot
start long mcexec...
[OK] shutdown during mcexec returned 0
(But, mcexec process remain due to #846)
*** All tests finished
sudo ./CT_006
*** CT_006 start *************************
[OK] ihk_os_boot
start long mcexec...
[OK] destroy during mcexec returned NOT 0
*** All tests finished
sudo ./CT_007
*** CT_007 start *************************
[OK] shutdown before boot returned 0
*** All tests finished
sudo ./CT_008
*** CT_008 start *************************
[OK] ihk_os_boot
[OK] do mcexec
[OK] shutdown after mcexec returned 0
[OK] ihk_os_get_status returned SHUTDOWN or INACTIVE
[OK] shutdown after shutdown returned NOT 0
*** All tests finished
sudo ./CT_009
*** CT_009 start *************************
[OK] force shutdown immediately after boot returned 0
*** All tests finished

View File

@@ -0,0 +1,85 @@
#include <unistd.h>
#include <stdio.h>
#include <sys/mman.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/wait.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <xpmem.h>
#define TEST_NAME "CT_001"
#define CHKANDJUMP(cond, ...) \
do { \
if (cond) { \
fprintf(stderr, " [NG] "); \
fprintf(stderr, __VA_ARGS__); \
fprintf(stderr, " failed\n"); \
goto fn_fail; \
} \
} while(0);
#define OKNG(cond, ...) \
do { \
if (cond) { \
CHKANDJUMP(cond, __VA_ARGS__); \
} else { \
fprintf(stdout, " [OK] "); \
fprintf(stdout, __VA_ARGS__); \
fprintf(stdout, "\n"); \
} \
} while(0);
#define SZ_MEM 4 * (1ULL << 10)
#define TEST_VAL 0x1129
int main(int argc, char** argv) {
void *mem, *attach;
int rc = 0;
int status;
xpmem_segid_t segid;
xpmem_apid_t apid;
struct xpmem_addr addr;
printf("*** %s start *******************************\n", TEST_NAME);
mem = mmap(0, SZ_MEM, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
CHKANDJUMP(mem == NULL, "mmap");
memset(mem, 0, SZ_MEM);
rc = xpmem_init();
CHKANDJUMP(rc != 0, "xpmem_init");
segid = xpmem_make(mem, SZ_MEM, XPMEM_PERMIT_MODE, (void*)0666);
OKNG(segid == -1, "xpmem_make");
apid = xpmem_get(segid, XPMEM_RDWR, XPMEM_PERMIT_MODE, NULL);
OKNG(apid == -1, "xpmem_get");
addr.apid = apid;
addr.offset = 0;
attach = xpmem_attach(addr, SZ_MEM, NULL);
OKNG(attach == (void*)-1, "xpmem_attach");
//*((unsigned long*)attach) = TEST_VAL;
rc = xpmem_detach(attach);
OKNG(rc == -1, "xpmem_detach");
//OKNG(*((unsigned long*)mem) != TEST_VAL, "validate TEST_VAL");
rc = xpmem_remove(segid);
OKNG(rc == -1, "xpmem_remove");
printf("*** %s PASSED\n\n", TEST_NAME);
return 0;
fn_fail:
printf("*** %s FAILED\n\n", TEST_NAME);
return -1;
}

View File

@@ -0,0 +1,100 @@
#include <unistd.h>
#include <stdio.h>
#include <sys/mman.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/wait.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <xpmem.h>
#define TEST_NAME "CT_002"
#define CHKANDJUMP(cond, ...) \
do { \
if (cond) { \
fprintf(stderr, " [NG] "); \
fprintf(stderr, __VA_ARGS__); \
fprintf(stderr, " failed\n"); \
goto fn_fail; \
} \
} while(0);
#define OKNG(cond, ...) \
do { \
if (cond) { \
CHKANDJUMP(cond, __VA_ARGS__); \
} else { \
fprintf(stdout, " [OK] "); \
fprintf(stdout, __VA_ARGS__); \
fprintf(stdout, "\n"); \
} \
} while(0);
#define SZ_MEM 4 * (1ULL << 10)
#define TEST_VAL 0x1129
int main(int argc, char** argv) {
void *mem, *attach;
int rc = 0;
int status;
pid_t pid;
xpmem_segid_t segid;
xpmem_apid_t apid;
struct xpmem_addr addr;
printf("*** %s start *******************************\n", TEST_NAME);
mem = mmap(0, SZ_MEM, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
CHKANDJUMP(mem == NULL, "mmap");
memset(mem, 0, SZ_MEM);
fflush(0);
pid = fork();
CHKANDJUMP(pid == -1, "fork failed\n");
if (pid == 0) {
/* Child process */
rc = xpmem_init();
CHKANDJUMP(rc != 0, "xpmem_init in child");
segid = xpmem_make(mem, SZ_MEM, XPMEM_PERMIT_MODE, (void*)0666);
OKNG(segid == -1, "xpmem_make in child");
apid = xpmem_get(segid, XPMEM_RDWR, XPMEM_PERMIT_MODE, NULL);
OKNG(apid == -1, "xpmem_get in child");
addr.apid = apid;
addr.offset = 0;
attach = xpmem_attach(addr, SZ_MEM, NULL);
OKNG(attach == (void*)-1, "xpmem_attach in child");
//*((unsigned long*)attach) = TEST_VAL;
rc = xpmem_detach(attach);
OKNG(rc == -1, "xpmem_detach in child");
rc = xpmem_remove(segid);
OKNG(rc == -1, "xpmem_remove in child");
//OKNG(*((unsigned long*)mem) != TEST_VAL, "validate TEST_VAL");
fflush(0);
_exit(0);
} else {
/* Parent process */
rc = waitpid(pid, &status, 0);
CHKANDJUMP(rc == -1, "waitpid failed\n");
}
printf("*** %s PASSED\n\n", TEST_NAME);
return 0;
fn_fail:
printf("*** %s FAILED\n\n", TEST_NAME);
return -1;
}

View File

@@ -0,0 +1,100 @@
#include <unistd.h>
#include <stdio.h>
#include <sys/mman.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/wait.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <xpmem.h>
#define TEST_NAME "CT_003"
#define CHKANDJUMP(cond, ...) \
do { \
if (cond) { \
fprintf(stderr, " [NG] "); \
fprintf(stderr, __VA_ARGS__); \
fprintf(stderr, " failed\n"); \
goto fn_fail; \
} \
} while(0);
#define OKNG(cond, ...) \
do { \
if (cond) { \
CHKANDJUMP(cond, __VA_ARGS__); \
} else { \
fprintf(stdout, " [OK] "); \
fprintf(stdout, __VA_ARGS__); \
fprintf(stdout, "\n"); \
} \
} while(0);
#define SZ_MEM 4 * (1ULL << 10)
#define TEST_VAL 0x1129
int main(int argc, char** argv) {
void *mem, *attach;
int rc = 0;
int status;
pid_t pid;
xpmem_segid_t segid;
xpmem_apid_t apid;
struct xpmem_addr addr;
printf("*** %s start *******************************\n", TEST_NAME);
mem = mmap(0, SZ_MEM, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
CHKANDJUMP(mem == NULL, "mmap");
memset(mem, 0, SZ_MEM);
rc = xpmem_init();
CHKANDJUMP(rc != 0, "xpmem_init");
segid = xpmem_make(mem, SZ_MEM, XPMEM_PERMIT_MODE, (void*)0666);
OKNG(segid == -1, "xpmem_make");
fflush(0);
pid = fork();
CHKANDJUMP(pid == -1, "fork failed\n");
if (pid == 0) {
/* Child process */
apid = xpmem_get(segid, XPMEM_RDWR, XPMEM_PERMIT_MODE, NULL);
OKNG(apid == -1, "xpmem_get in child");
addr.apid = apid;
addr.offset = 0;
attach = xpmem_attach(addr, SZ_MEM, NULL);
OKNG(attach == (void*)-1, "xpmem_attach in child");
*((unsigned long*)attach) = TEST_VAL;
rc = xpmem_detach(attach);
OKNG(rc == -1, "xpmem_detach in child");
fflush(0);
_exit(0);
} else {
/* Parent process */
rc = waitpid(pid, &status, 0);
CHKANDJUMP(rc == -1, "waitpid failed\n");
OKNG(*((unsigned long*)mem) != TEST_VAL, "validate TEST_VAL");
rc = xpmem_remove(segid);
OKNG(rc == -1, "xpmem_remove");
}
printf("*** %s PASSED\n\n", TEST_NAME);
return 0;
fn_fail:
printf("*** %s FAILED\n\n", TEST_NAME);
return -1;
}

View File

@@ -0,0 +1,127 @@
#include <unistd.h>
#include <stdio.h>
#include <sys/mman.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/wait.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <xpmem.h>
#define TEST_NAME "CT_004"
#define CHKANDJUMP(cond, ...) \
do { \
if (cond) { \
fprintf(stderr, " [NG] "); \
fprintf(stderr, __VA_ARGS__); \
fprintf(stderr, " failed\n"); \
goto fn_fail; \
} \
} while(0);
#define OKNG(cond, ...) \
do { \
if (cond) { \
CHKANDJUMP(cond, __VA_ARGS__); \
} else { \
fprintf(stdout, " [OK] "); \
fprintf(stdout, __VA_ARGS__); \
fprintf(stdout, "\n"); \
} \
} while(0);
#define SZ_MEM 4 * (1ULL << 10)
#define TEST_VAL 0x1129
#define BUFF_SIZE 1024
int main(int argc, char** argv) {
void *mem, *attach;
int rc = 0;
int status;
pid_t pid;
xpmem_segid_t segid;
xpmem_apid_t apid;
struct xpmem_addr addr;
key_t key = ftok(argv[0], 0);
int shmid;
printf("*** %s start *******************************\n", TEST_NAME);
shmid = shmget(key, SZ_MEM, IPC_CREAT | 0660);
CHKANDJUMP(shmid == -1, "shmget");
mem = mmap(0, SZ_MEM, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
CHKANDJUMP(mem == NULL, "mmap");
memset(mem, 0, SZ_MEM);
fflush(0);
pid = fork();
CHKANDJUMP(pid == -1, "fork failed\n");
if (pid == 0) {
/* Child process */
void *shm = shmat(shmid, NULL, 0);
CHKANDJUMP(shm == (void*)-1, "shmat in child");
while ((segid = *(xpmem_segid_t*)shm) == 0) { };
rc = shmdt(shm);
CHKANDJUMP(rc == -1, "shmdt");
rc = xpmem_init();
CHKANDJUMP(rc != 0, "xpmem_init in child");
apid = xpmem_get(segid, XPMEM_RDWR, XPMEM_PERMIT_MODE, NULL);
OKNG(apid == -1, "xpmem_get in child");
addr.apid = apid;
addr.offset = 0;
attach = xpmem_attach(addr, SZ_MEM, NULL);
OKNG(attach == (void*)-1, "xpmem_attach in child");
*((unsigned long*)attach) = TEST_VAL;
rc = xpmem_detach(attach);
OKNG(rc == -1, "xpmem_detach in child");
fflush(0);
_exit(0);
} else {
/* Parent process */
void *shm = shmat(shmid, NULL, 0);
CHKANDJUMP(shm == (void*)-1, "shmat in parent");
rc = xpmem_init();
CHKANDJUMP(rc != 0, "xpmem_init");
segid = xpmem_make(mem, SZ_MEM, XPMEM_PERMIT_MODE, (void*)0666);
OKNG(segid == -1, "xpmem_make");
*(xpmem_segid_t*)shm = segid;
rc = waitpid(pid, &status, 0);
CHKANDJUMP(rc == -1, "waitpid failed\n");
OKNG(*((unsigned long*)mem) != TEST_VAL, "validate TEST_VAL");
struct shmid_ds buf;
rc = shmctl(shmid, IPC_RMID, &buf);
CHKANDJUMP(rc == -1, "shmctl");
rc = shmdt(shm);
CHKANDJUMP(rc == -1, "shmdt");
rc = xpmem_remove(segid);
OKNG(rc == -1, "xpmem_remove");
}
printf("*** %s PASSED\n\n", TEST_NAME);
return 0;
fn_fail:
printf("*** %s FAILED\n\n", TEST_NAME);
return -1;
}

View File

@@ -0,0 +1,97 @@
#include <unistd.h>
#include <stdio.h>
#include <sys/mman.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/wait.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <xpmem.h>
#define TEST_NAME "CT_005"
#define CHKANDJUMP(cond, ...) \
do { \
if (cond) { \
fprintf(stderr, " [NG] "); \
fprintf(stderr, __VA_ARGS__); \
fprintf(stderr, " failed\n"); \
goto fn_fail; \
} \
} while(0);
#define OKNG(cond, ...) \
do { \
if (cond) { \
CHKANDJUMP(cond, __VA_ARGS__); \
} else { \
fprintf(stdout, " [OK] "); \
fprintf(stdout, __VA_ARGS__); \
fprintf(stdout, "\n"); \
} \
} while(0);
#define SZ_MEM 4 * (1ULL << 10)
#define TEST_VAL 0x1129
int main(int argc, char** argv) {
void *mem, *attach;
int rc = 0;
int status;
pid_t pid;
xpmem_segid_t segid;
xpmem_apid_t apid;
struct xpmem_addr addr;
printf("*** %s start *******************************\n", TEST_NAME);
mem = mmap(0, SZ_MEM, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
CHKANDJUMP(mem == NULL, "mmap");
memset(mem, 0, SZ_MEM);
rc = xpmem_init();
CHKANDJUMP(rc != 0, "xpmem_init");
segid = xpmem_make(mem, SZ_MEM, XPMEM_PERMIT_MODE, (void*)0666);
OKNG(segid == -1, "xpmem_make");
fflush(0);
pid = fork();
CHKANDJUMP(pid == -1, "fork failed\n");
if (pid == 0) {
/* Child process */
apid = xpmem_get(segid, XPMEM_RDWR, XPMEM_PERMIT_MODE, NULL);
OKNG(apid == -1, "xpmem_get in child");
addr.apid = apid;
addr.offset = 0;
attach = xpmem_attach(addr, SZ_MEM, NULL);
OKNG(attach == (void*)-1, "xpmem_attach in child");
*((unsigned long*)attach) = TEST_VAL;
fflush(0);
_exit(0);
} else {
/* Parent process */
rc = waitpid(pid, &status, 0);
CHKANDJUMP(rc == -1, "waitpid failed\n");
OKNG(*((unsigned long*)mem) != TEST_VAL, "validate TEST_VAL");
rc = xpmem_remove(segid);
OKNG(rc == -1, "xpmem_remove");
}
printf("*** %s PASSED\n\n", TEST_NAME);
return 0;
fn_fail:
printf("*** %s FAILED\n\n", TEST_NAME);
return -1;
}

View File

@@ -0,0 +1,84 @@
#include <unistd.h>
#include <stdio.h>
#include <sys/mman.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/wait.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <xpmem.h>
#define TEST_NAME "CT_006"
#define CHKANDJUMP(cond, ...) \
do { \
if (cond) { \
fprintf(stderr, " [NG] "); \
fprintf(stderr, __VA_ARGS__); \
fprintf(stderr, " failed\n"); \
goto fn_fail; \
} \
} while(0);
#define OKNG(cond, ...) \
do { \
if (cond) { \
CHKANDJUMP(cond, __VA_ARGS__); \
} else { \
fprintf(stdout, " [OK] "); \
fprintf(stdout, __VA_ARGS__); \
fprintf(stdout, "\n"); \
} \
} while(0);
#define SZ_MEM 4 * (1ULL << 10)
#define TEST_VAL 0x1129
int main(int argc, char** argv) {
void *mem, *attach;
int rc = 0;
int status;
pid_t pid;
xpmem_segid_t segid;
xpmem_apid_t apid;
struct xpmem_addr addr;
printf("*** %s start *******************************\n", TEST_NAME);
mem = mmap(0, SZ_MEM, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
CHKANDJUMP(mem == NULL, "mmap");
memset(mem, 0, SZ_MEM);
rc = xpmem_init();
CHKANDJUMP(rc != 0, "xpmem_init");
segid = xpmem_make(mem, SZ_MEM, XPMEM_PERMIT_MODE, (void*)0666);
OKNG(segid == -1, "xpmem_make");
fflush(0);
pid = fork();
CHKANDJUMP(pid == -1, "fork failed\n");
if (pid == 0) {
/* Child process */
sleep(1); /* wait for parent process exit */
apid = xpmem_get(segid, XPMEM_RDWR, XPMEM_PERMIT_MODE, NULL);
OKNG(apid != -1, "xpmem_get in child failed (parent process exited already");
fflush(0);
} else {
/* Parent process */
_exit(0);
}
printf("*** %s PASSED\n\n", TEST_NAME);
return 0;
fn_fail:
printf("*** %s FAILED\n\n", TEST_NAME);
return -1;
}

View File

@@ -0,0 +1,107 @@
#include <unistd.h>
#include <stdio.h>
#include <sys/mman.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/wait.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <xpmem.h>
#define TEST_NAME "CT_007"
#define CHKANDJUMP(cond, ...) \
do { \
if (cond) { \
fprintf(stderr, " [NG] "); \
fprintf(stderr, __VA_ARGS__); \
fprintf(stderr, " failed\n"); \
goto fn_fail; \
} \
} while(0);
#define OKNG(cond, ...) \
do { \
if (cond) { \
CHKANDJUMP(cond, __VA_ARGS__); \
} else { \
fprintf(stdout, " [OK] "); \
fprintf(stdout, __VA_ARGS__); \
fprintf(stdout, "\n"); \
} \
} while(0);
#define SZ_MEM 4 * (1ULL << 10)
#define TEST_VAL 0x1129
#define BAD_ADDRESS (void*)-1
int main(int argc, char** argv) {
void *mem, *attach;
int rc = 0;
int status;
pid_t pid;
xpmem_segid_t segid;
xpmem_apid_t apid;
struct xpmem_addr addr;
printf("*** %s start *******************************\n", TEST_NAME);
mem = mmap(0, SZ_MEM, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
CHKANDJUMP(mem == NULL, "mmap");
memset(mem, 0, SZ_MEM);
rc = xpmem_init();
CHKANDJUMP(rc != 0, "xpmem_init");
segid = xpmem_make(BAD_ADDRESS, SZ_MEM, XPMEM_PERMIT_MODE, (void*)0666);
OKNG(segid != -1, "xpmem_make failed (invalid address)");
segid = xpmem_make(mem, SZ_MEM, XPMEM_PERMIT_MODE, (void*)0666);
CHKANDJUMP(segid == -1, "xpmem_make");
segid = xpmem_make(mem, SZ_MEM, XPMEM_PERMIT_MODE, (void*)0666);
OKNG(segid == -1, "xpmem_make succeed(do twice to same address)");
fflush(0);
pid = fork();
CHKANDJUMP(pid == -1, "fork failed\n");
if (pid == 0) {
/* Child process */
apid = xpmem_get(segid, XPMEM_RDWR, XPMEM_PERMIT_MODE, NULL);
CHKANDJUMP(apid == -1, "xpmem_get in child");
addr.apid = apid;
addr.offset = 0;
attach = xpmem_attach(addr, SZ_MEM, NULL);
CHKANDJUMP(attach == (void*)-1, "xpmem_attach in child");
*((unsigned long*)attach) = TEST_VAL;
rc = xpmem_detach(attach);
CHKANDJUMP(rc == -1, "xpmem_detach in child");
fflush(0);
_exit(0);
} else {
/* Parent process */
rc = waitpid(pid, &status, 0);
CHKANDJUMP(rc == -1, "waitpid failed\n");
CHKANDJUMP(*((unsigned long*)mem) != TEST_VAL, "validate TEST_VAL");
rc = xpmem_remove(segid);
CHKANDJUMP(rc == -1, "xpmem_remove");
}
printf("*** %s PASSED\n\n", TEST_NAME);
return 0;
fn_fail:
printf("*** %s FAILED\n\n", TEST_NAME);
return -1;
}

View File

@@ -0,0 +1,107 @@
#include <unistd.h>
#include <stdio.h>
#include <sys/mman.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/wait.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <xpmem.h>
#define TEST_NAME "CT_008"
#define CHKANDJUMP(cond, ...) \
do { \
if (cond) { \
fprintf(stderr, " [NG] "); \
fprintf(stderr, __VA_ARGS__); \
fprintf(stderr, " failed\n"); \
goto fn_fail; \
} \
} while(0);
#define OKNG(cond, ...) \
do { \
if (cond) { \
CHKANDJUMP(cond, __VA_ARGS__); \
} else { \
fprintf(stdout, " [OK] "); \
fprintf(stdout, __VA_ARGS__); \
fprintf(stdout, "\n"); \
} \
} while(0);
#define SZ_MEM 4 * (1ULL << 10)
#define TEST_VAL 0x1129
#define BAD_SEGID -1
int main(int argc, char** argv) {
void *mem, *attach;
int rc = 0;
int status;
pid_t pid;
xpmem_segid_t segid;
xpmem_apid_t apid;
struct xpmem_addr addr;
printf("*** %s start *******************************\n", TEST_NAME);
mem = mmap(0, SZ_MEM, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
CHKANDJUMP(mem == NULL, "mmap");
memset(mem, 0, SZ_MEM);
rc = xpmem_init();
CHKANDJUMP(rc != 0, "xpmem_init");
segid = xpmem_make(mem, SZ_MEM, XPMEM_PERMIT_MODE, (void*)0666);
CHKANDJUMP(segid == -1, "xpmem_make");
fflush(0);
pid = fork();
CHKANDJUMP(pid == -1, "fork failed\n");
if (pid == 0) {
/* Child process */
apid = xpmem_get(BAD_SEGID, XPMEM_RDWR, XPMEM_PERMIT_MODE, NULL);
OKNG(apid != -1, "xpmem_get in child failed (invalid segid)");
apid = xpmem_get(segid, XPMEM_RDWR, XPMEM_PERMIT_MODE, NULL);
CHKANDJUMP(apid == -1, "xpmem_get in child");
apid = xpmem_get(segid, XPMEM_RDWR, XPMEM_PERMIT_MODE, NULL);
OKNG(apid == -1, "xpmem_get in child (do twice to same segid");
addr.apid = apid;
addr.offset = 0;
attach = xpmem_attach(addr, SZ_MEM, NULL);
CHKANDJUMP(attach == (void*)-1, "xpmem_attach in child");
*((unsigned long*)attach) = TEST_VAL;
rc = xpmem_detach(attach);
CHKANDJUMP(rc == -1, "xpmem_detach in child");
fflush(0);
_exit(0);
} else {
/* Parent process */
rc = waitpid(pid, &status, 0);
CHKANDJUMP(rc == -1, "waitpid failed\n");
CHKANDJUMP(*((unsigned long*)mem) != TEST_VAL, "validate TEST_VAL");
rc = xpmem_remove(segid);
CHKANDJUMP(rc == -1, "xpmem_remove");
}
printf("*** %s PASSED\n\n", TEST_NAME);
return 0;
fn_fail:
printf("*** %s FAILED\n\n", TEST_NAME);
return -1;
}

View File

@@ -0,0 +1,110 @@
#include <unistd.h>
#include <stdio.h>
#include <sys/mman.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/wait.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <xpmem.h>
#define TEST_NAME "CT_009"
#define CHKANDJUMP(cond, ...) \
do { \
if (cond) { \
fprintf(stderr, " [NG] "); \
fprintf(stderr, __VA_ARGS__); \
fprintf(stderr, " failed\n"); \
goto fn_fail; \
} \
} while(0);
#define OKNG(cond, ...) \
do { \
if (cond) { \
CHKANDJUMP(cond, __VA_ARGS__); \
} else { \
fprintf(stdout, " [OK] "); \
fprintf(stdout, __VA_ARGS__); \
fprintf(stdout, "\n"); \
} \
} while(0);
#define SZ_MEM 4 * (1ULL << 10)
#define TEST_VAL 0x1129
int main(int argc, char** argv) {
void *mem, *attach;
int rc = 0;
int status;
pid_t pid;
xpmem_segid_t segid;
xpmem_apid_t apid;
struct xpmem_addr addr;
printf("*** %s start *******************************\n", TEST_NAME);
mem = mmap(0, SZ_MEM, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
CHKANDJUMP(mem == NULL, "mmap");
memset(mem, 0, SZ_MEM);
rc = xpmem_init();
CHKANDJUMP(rc != 0, "xpmem_init");
segid = xpmem_make(mem, SZ_MEM, XPMEM_PERMIT_MODE, (void*)0666);
CHKANDJUMP(segid == -1, "xpmem_make");
fflush(0);
pid = fork();
CHKANDJUMP(pid == -1, "fork failed\n");
if (pid == 0) {
/* Child process */
apid = xpmem_get(segid, XPMEM_RDWR, XPMEM_PERMIT_MODE, NULL);
CHKANDJUMP(apid == -1, "xpmem_get in child");
addr.apid = -1;
addr.offset = 0;
attach = xpmem_attach(addr, SZ_MEM, NULL);
OKNG(attach != (void*)-1, "xpmem_attach in childi failed (invalid apid)");
addr.apid = apid;
addr.offset = 0;
attach = xpmem_attach(addr, SZ_MEM, NULL);
CHKANDJUMP(attach == (void*)-1, "xpmem_attach in child");
addr.apid = apid;
addr.offset = 0;
attach = xpmem_attach(addr, SZ_MEM, NULL);
OKNG(attach == (void*)-1, "xpmem_attach in child succeed (do twice to same apid)");
*((unsigned long*)attach) = TEST_VAL;
rc = xpmem_detach(attach);
CHKANDJUMP(rc == -1, "xpmem_detach in child");
fflush(0);
_exit(0);
} else {
/* Parent process */
rc = waitpid(pid, &status, 0);
CHKANDJUMP(rc == -1, "waitpid failed\n");
CHKANDJUMP(*((unsigned long*)mem) != TEST_VAL, "validate TEST_VAL");
rc = xpmem_remove(segid);
CHKANDJUMP(rc == -1, "xpmem_remove");
}
printf("*** %s PASSED\n\n", TEST_NAME);
return 0;
fn_fail:
printf("*** %s FAILED\n\n", TEST_NAME);
return -1;
}

View File

@@ -0,0 +1,107 @@
#include <unistd.h>
#include <stdio.h>
#include <sys/mman.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/wait.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <xpmem.h>
#define TEST_NAME "CT_010"
#define CHKANDJUMP(cond, ...) \
do { \
if (cond) { \
fprintf(stderr, " [NG] "); \
fprintf(stderr, __VA_ARGS__); \
fprintf(stderr, " failed\n"); \
goto fn_fail; \
} \
} while(0);
#define OKNG(cond, ...) \
do { \
if (cond) { \
CHKANDJUMP(cond, __VA_ARGS__); \
} else { \
fprintf(stdout, " [OK] "); \
fprintf(stdout, __VA_ARGS__); \
fprintf(stdout, "\n"); \
} \
} while(0);
#define SZ_MEM 4 * (1ULL << 10)
#define TEST_VAL 0x1129
#define BAD_ADDRESS (void *) -1
int main(int argc, char** argv) {
void *mem, *attach;
int rc = 0;
int status;
pid_t pid;
xpmem_segid_t segid;
xpmem_apid_t apid;
struct xpmem_addr addr;
printf("*** %s start *******************************\n", TEST_NAME);
mem = mmap(0, SZ_MEM, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
CHKANDJUMP(mem == NULL, "mmap");
memset(mem, 0, SZ_MEM);
rc = xpmem_init();
CHKANDJUMP(rc != 0, "xpmem_init");
segid = xpmem_make(mem, SZ_MEM, XPMEM_PERMIT_MODE, (void*)0666);
CHKANDJUMP(segid == -1, "xpmem_make");
fflush(0);
pid = fork();
CHKANDJUMP(pid == -1, "fork failed\n");
if (pid == 0) {
/* Child process */
apid = xpmem_get(segid, XPMEM_RDWR, XPMEM_PERMIT_MODE, NULL);
CHKANDJUMP(apid == -1, "xpmem_get in child");
addr.apid = apid;
addr.offset = 0;
attach = xpmem_attach(addr, SZ_MEM, NULL);
CHKANDJUMP(attach == (void*)-1, "xpmem_attach in child");
*((unsigned long*)attach) = TEST_VAL;
rc = xpmem_detach(BAD_ADDRESS);
OKNG(rc == -1, "xpmem_detach in child succeed (invalid address)");
rc = xpmem_detach(attach);
CHKANDJUMP(rc == -1, "xpmem_detach in child");
rc = xpmem_detach(attach);
OKNG(rc == -1, "xpmem_detach in child succeed (do twice to same address)");
fflush(0);
_exit(0);
} else {
/* Parent process */
rc = waitpid(pid, &status, 0);
CHKANDJUMP(rc == -1, "waitpid failed\n");
CHKANDJUMP(*((unsigned long*)mem) != TEST_VAL, "validate TEST_VAL");
rc = xpmem_remove(segid);
CHKANDJUMP(rc == -1, "xpmem_remove");
}
printf("*** %s PASSED\n\n", TEST_NAME);
return 0;
fn_fail:
printf("*** %s FAILED\n\n", TEST_NAME);
return -1;
}

View File

@@ -0,0 +1,107 @@
#include <unistd.h>
#include <stdio.h>
#include <sys/mman.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/wait.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <xpmem.h>
#define TEST_NAME "CT_011"
#define CHKANDJUMP(cond, ...) \
do { \
if (cond) { \
fprintf(stderr, " [NG] "); \
fprintf(stderr, __VA_ARGS__); \
fprintf(stderr, " failed\n"); \
goto fn_fail; \
} \
} while(0);
#define OKNG(cond, ...) \
do { \
if (cond) { \
CHKANDJUMP(cond, __VA_ARGS__); \
} else { \
fprintf(stdout, " [OK] "); \
fprintf(stdout, __VA_ARGS__); \
fprintf(stdout, "\n"); \
} \
} while(0);
#define SZ_MEM 4 * (1ULL << 10)
#define TEST_VAL 0x1129
#define BAD_SEGID -1
int main(int argc, char** argv) {
void *mem, *attach;
int rc = 0;
int status;
pid_t pid;
xpmem_segid_t segid;
xpmem_apid_t apid;
struct xpmem_addr addr;
printf("*** %s start *******************************\n", TEST_NAME);
mem = mmap(0, SZ_MEM, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
CHKANDJUMP(mem == NULL, "mmap");
memset(mem, 0, SZ_MEM);
rc = xpmem_init();
CHKANDJUMP(rc != 0, "xpmem_init");
segid = xpmem_make(mem, SZ_MEM, XPMEM_PERMIT_MODE, (void*)0666);
CHKANDJUMP(segid == -1, "xpmem_make");
fflush(0);
pid = fork();
CHKANDJUMP(pid == -1, "fork failed\n");
if (pid == 0) {
/* Child process */
apid = xpmem_get(segid, XPMEM_RDWR, XPMEM_PERMIT_MODE, NULL);
CHKANDJUMP(apid == -1, "xpmem_get in child");
addr.apid = apid;
addr.offset = 0;
attach = xpmem_attach(addr, SZ_MEM, NULL);
CHKANDJUMP(attach == (void*)-1, "xpmem_attach in child");
*((unsigned long*)attach) = TEST_VAL;
rc = xpmem_detach(attach);
CHKANDJUMP(rc == -1, "xpmem_detach in child");
fflush(0);
_exit(0);
} else {
/* Parent process */
rc = waitpid(pid, &status, 0);
CHKANDJUMP(rc == -1, "waitpid failed\n");
CHKANDJUMP(*((unsigned long*)mem) != TEST_VAL, "validate TEST_VAL");
rc = xpmem_remove(BAD_SEGID);
OKNG(rc != -1, "xpmem_remove failed (invalid segid)");
rc = xpmem_remove(segid);
CHKANDJUMP(rc == -1, "xpmem_remove");
rc = xpmem_remove(segid);
OKNG(rc != -1, "xpmem_remove failed (do twice to same segid)");
}
printf("*** %s PASSED\n\n", TEST_NAME);
return 0;
fn_fail:
printf("*** %s FAILED\n\n", TEST_NAME);
return -1;
}

View File

@@ -0,0 +1,84 @@
CC = gcc
MCK_DIR=/home/satoken/ppos
XPMEM_DIR=/home/satoken/usr
MCEXEC=$(MCK_DIR)/bin/mcexec
TARGET=CT_001 CT_002 CT_003 CT_004 CT_005 CT_006 CT_007 CT_008 CT_009 CT_010 CT_011
CPPFLAGS = -I$(XPMEM_DIR)/include
LDFLAGS = -L$(XPMEM_DIR)/lib -lxpmem
all: $(TARGET)
CT_001: CT_001.o
$(CC) -o $@ $^ -static $(LDFLAGS)
CT_001.o: CT_001.c
$(CC) $(CPPFLAGS) -c $<
CT_002: CT_002.o
$(CC) -o $@ $^ -static $(LDFLAGS)
CT_002.o: CT_002.c
$(CC) $(CPPFLAGS) -c $<
CT_003: CT_003.o
$(CC) -o $@ $^ -static $(LDFLAGS)
CT_003.o: CT_003.c
$(CC) $(CPPFLAGS) -c $<
CT_004: CT_004.o
$(CC) -o $@ $^ -static $(LDFLAGS)
CT_004.o: CT_004.c
$(CC) $(CPPFLAGS) -c $<
CT_005: CT_005.o
$(CC) -o $@ $^ -static $(LDFLAGS)
CT_005.o: CT_005.c
$(CC) $(CPPFLAGS) -c $<
CT_006: CT_006.o
$(CC) -o $@ $^ -static $(LDFLAGS)
CT_006.o: CT_006.c
$(CC) $(CPPFLAGS) -c $<
CT_007: CT_007.o
$(CC) -o $@ $^ -static $(LDFLAGS)
CT_007.o: CT_007.c
$(CC) $(CPPFLAGS) -c $<
CT_008: CT_008.o
$(CC) -o $@ $^ -static $(LDFLAGS)
CT_008.o: CT_008.c
$(CC) $(CPPFLAGS) -c $<
CT_009: CT_009.o
$(CC) -o $@ $^ -static $(LDFLAGS)
CT_009.o: CT_009.c
$(CC) $(CPPFLAGS) -c $<
CT_010: CT_010.o
$(CC) -o $@ $^ -static $(LDFLAGS)
CT_010.o: CT_010.c
$(CC) $(CPPFLAGS) -c $<
CT_011: CT_011.o
$(CC) -o $@ $^ -static $(LDFLAGS)
CT_011.o: CT_011.c
$(CC) $(CPPFLAGS) -c $<
test: all
$(MCEXEC) ./CT_001
$(MCEXEC) ./CT_002
$(MCEXEC) ./CT_003
$(MCEXEC) ./CT_004
$(MCEXEC) ./CT_005
$(MCEXEC) ./CT_006
@sleep 2
$(MCEXEC) ./CT_007
$(MCEXEC) ./CT_008
$(MCEXEC) ./CT_009
$(MCEXEC) ./CT_010
$(MCEXEC) ./CT_011
clean:
rm -f $(TARGET) *.o

View File

@@ -0,0 +1,83 @@
【Issue#925 動作確認】
Issue#925が解決され、既存機能に影響がないことをIssueで報告されたテストプログラム1項目と、
McKernelでのXPMEM操作の基本動作確認11項目の計12項目のテストによって確認した。
なお、各テストの実行結果は./result.log として格納している。
①Issueで報告されたテストプログラムによる確認
・Issue#925
報告で使用されたテストプログラムを用いて、現象が再現しないことを確認した。
実行時の出力を./result.log に記載している
②McKernelでのXPMEM操作の基本動作確認
以下の内容で、Issue#925による変更が既存機能(XPMEM)に影響しないことを確認した。
基本動作確認の詳細を以下に示す。
1. テストの実行方法
以下の手順でテストを実行する
1. Makefileの変数MCK_DIRの内容を、McKernelがインストールされているディレクトリに変更する
2. Makefileの変数XPMEM_DIRの内容を、XPMEMライブラリがインストールされているディレクトリに変更する
3. sh make test を実行する
2. テスト項目
CT_001: 単一プロセスでのXPMEM操作
1. 実行したプロセスがxpmem_make -> xpmem_get -> xpmem_attach -> xpmem_detach -> xpmem_remove
CT_002: 子プロセスでのXPMEM操作
1. 親プロセスがfork()
2. 子プロセスがxpmem_make -> xpmem_get -> xpmem_attach -> xpmem_detach ->xpmem_remove
3. 子プロセス終了後、親プロセスが終了
CT_003: 親プロセスがmakeした共有領域への子プロセスによるXPMEM操作
1. 親プロセスがxpmem_make
2. fork()で子プロセスを作成
3. 子プロセスで、xpmem_get -> xpmem_attach -> 値(TEST_VAL)の設定 -> xpmem_detach
4. 子プロセスが終了
5. 親プロセスが、子プロセスによって設定された値(TEST_VAL)を確認
6. 親プロセスがxpmem_remove
CT_004: fork()後に親プロセスがmakeした共有領域への子プロセスによるXPMEM操作
1. fork()で子プロセスを作成
2. 親プロセスがxpmem_make
3. 子プロセスで、xpmem_get -> xpmem_attach -> 値(TEST_VAL)の設定 -> xpmem_detach
4. 子プロセスが終了
5. 親プロセスが、子プロセスによって設定された値(TEST_VAL)を確認
6. 親プロセスがxpmem_remove
CT_005: 子プロセスがxpmem_attach後、xpmem_detachをせずに終了
1. 親プロセスがxpmem_make
2. fork()で子プロセスを作成
3. 子プロセスで、xpmem_get -> xpmem_attach
4. 子プロセスが終了
5. 親プロセスがxpmem_remove
CT_006: 子プロセスがXPMEM操作を行う時点で、xpmem_makeをした親プロセスが終了している
1. 親プロセスがxpmem_make
2. fork()で子プロセスを作成
3. 親プロセスが終了
4. 子プロセスで、xpmem_get (失敗)
5. 子プロセスが終了
CT_007: xpmem_make 呼び出しの異常系
1. xpmem_make の第1引数に不正なアドレスを指定する (失敗)
2. 1度xpmem_make を実施したメモリ領域に対して、再度xpmem_make を行う (成功)
CT_008: xpmem_get 呼び出しの異常系
1. xpmem_get の第1引数に不正なsegidを指定する (失敗)
2. 1度xpmem_get を実施したsegidで、再度xpmem_get を行う (成功)
CT_009: xpmem_attach 呼び出しの異常系
1. xpmem_attach の第1引数に不正なapidを指定する (失敗)
2. 1度xpmem_attach を実施したapidで、再度xpmem_attach を行う (成功)
CT_010: xpmem_detach 呼び出しの異常系
1. xpmem_detach の第1引数に不正なアドレスを指定する (成功)
2. 1度xpmem_detach を実施したメモリ領域に対して、再度xpmem_detach を行う (成功)
CT_011: xpmem_remove 呼び出しの異常系
1. xpmem_remove の第1引数に不正なsegidを指定する (失敗)
2. 1度xpmem_remove を実施したsegidで、再度xpmem_remove を行う (失敗)
3. 結果
テストプログラムの実行結果をresult.log に示す。
上記の11項目がPASSしていることを確認した。

View File

@@ -0,0 +1,89 @@
①Issueで報告されたテストプログラムによる確認
$ mcexec ./rusage012
1234
②McKernelでのXPMEM操作の基本動作確認
/home/satoken/ppos/bin/mcexec ./CT_001
*** CT_001 start *******************************
[OK] xpmem_make
[OK] xpmem_get
[OK] xpmem_attach
[OK] xpmem_detach
[OK] xpmem_remove
*** CT_001 PASSED
/home/satoken/ppos/bin/mcexec ./CT_002
*** CT_002 start *******************************
[OK] xpmem_make in child
[OK] xpmem_get in child
[OK] xpmem_attach in child
[OK] xpmem_detach in child
[OK] xpmem_remove in child
*** CT_002 PASSED
/home/satoken/ppos/bin/mcexec ./CT_003
*** CT_003 start *******************************
[OK] xpmem_make
[OK] xpmem_get in child
[OK] xpmem_attach in child
[OK] xpmem_detach in child
[OK] validate TEST_VAL
[OK] xpmem_remove
*** CT_003 PASSED
/home/satoken/ppos/bin/mcexec ./CT_004
*** CT_004 start *******************************
[OK] xpmem_get in child
[OK] xpmem_attach in child
[OK] xpmem_detach in child
[OK] xpmem_make
[OK] validate TEST_VAL
[OK] xpmem_remove
*** CT_004 PASSED
/home/satoken/ppos/bin/mcexec ./CT_005
*** CT_005 start *******************************
[OK] xpmem_make
[OK] xpmem_get in child
[OK] xpmem_attach in child
[OK] validate TEST_VAL
[OK] xpmem_remove
*** CT_005 PASSED
/home/satoken/ppos/bin/mcexec ./CT_006
*** CT_006 start *******************************
[OK] xpmem_make
[OK] xpmem_get in child failed (parent process exited already
*** CT_006 PASSED
/home/satoken/ppos/bin/mcexec ./CT_007
*** CT_007 start *******************************
[OK] xpmem_make failed (invalid address)
[OK] xpmem_make succeed(do twice to same address)
*** CT_007 PASSED
/home/satoken/ppos/bin/mcexec ./CT_008
*** CT_008 start *******************************
[OK] xpmem_get in child failed (invalid segid)
[OK] xpmem_get in child (do twice to same segid
*** CT_008 PASSED
/home/satoken/ppos/bin/mcexec ./CT_009
*** CT_009 start *******************************
[OK] xpmem_attach in childi failed (invalid apid)
[OK] xpmem_attach in child succeed (do twice to same apid)
*** CT_009 PASSED
/home/satoken/ppos/bin/mcexec ./CT_010
*** CT_010 start *******************************
[OK] xpmem_detach in child succeed (invalid address)
[OK] xpmem_detach in child succeed (do twice to same address)
*** CT_010 PASSED
/home/satoken/ppos/bin/mcexec ./CT_011
*** CT_011 start *******************************
[OK] xpmem_remove failed (invalid segid)
[OK] xpmem_remove failed (do twice to same segid)
*** CT_011 PASSED