==========
How to run
==========
(1) cp <build>/mckernel/mck_test_config.sample \
    ~/.mck_test_config
(2) cp <build>/ihk/mck_test_config.mk.sample \
    ~/.mck_test_config.mk
(3) Edit the following line in Makefile:
    XPMEM_DIR=/usr/
(4) ./run.sh <test_id>
    Example: ./run.sh 000

===================================
How to judge it behaves as expected
===================================
Follow the instruction given by run.sh.

=====================
Descripation of tests
=====================
000: Excercise the following execution paths:
  args_envs()->set_range() text,data,arg,env[OK]
  args_envs()->set_range() !vdso [OK],
  args_envs()->set_range() stack[OK],
  glibc->bss [OK],
  glibc->brk()->extend_process_region()->add_process_memory_range()->update_process_page_table->ihk_mc_pt_set_range() [OK]

  app->mmap() 4K,anon,pre-page ->set_range() [OK],
  app->mmap(),  4K,anon,pre-pag->set_range()->st->munmap [OK]

  app->munmap()->free_process_memory_range()->[OK]
  exit_group()->free_process_memory_range()->text,data,bss,heap,anon|private[OK],
  exit_group()->free_process_memory_range()->!vdso[OK],
  exit_group()->free_process_memory_range()->stack[OK],

010: Excercise the following execution paths:
  app->mmap() 2M,anon,pre-page ->set_range()->munmap()->free_process_memory_range()->clear_range()[OK]

020: Excercise the following execution paths:
  app->mmap() 1G,anon,private,demand-page -> pf -> set_range() [NA (failed to get 1GB page)],
  app->mmap() 1G,anon,private,demand-page -> pf -> set_range()->munmap()->free_process_memory_range()->clear_range()[NA (failed to get 1GB page)]

030: Excercise the following execution paths:
  app->mmap() 128M,anon,private,demand-page(=zeroobj) -> pf -> set_range() [OK],
  app->mmap() 128M,anon,private,demand-page(=zeroobj) -> pf -> set_range()->munmap()->free_process_memory_range()->clear_range()[OK]

001: Excercise the following execution paths:
  do_mmap(),file,demand-page->get_page(),ld->set_pte()->munmap()->clear_range() [OK]
  do_mmap(),file,demand-page->get_page(),ld->set_pte()->st->munmap()->clear_range() [OK]
  do_mmap(),file,demand-page->get_page(),st->set_pte()->flush()->munmap()->clear_range() [OK]

002: Excercise the following execution paths:
  do_mmap(),/dev/shm with --mpol_shm_premap,pre-page->get_page(),st->set_pte()->munmap()->clear_range() [OK]

003: Excercise the following execution paths:
  do_mmap(),/dev/shm without --mpol_shm_premap,pre-page->get_page(),st->set_pte()->munmap()->clear_range() [OK]

004: Excercise the following execution paths related to clone
  load segments->copy_user_ranges()->clear_range() [OK]
  filemap(demand-paging)->copy_user_ranges()->clear_range() [OK]

005: Excercise the following execution paths related to device file (ib ping-pong)
  devobj()->get_page()->pf->munmap()->clear_range() [OK]
  remote page fault->cow->clear_range() [OK]
  ld-linux.so->mmap private->cow->clear_range() [OK]

006: Excercise the following execution paths related to clone
  filemap,/dev/shm with --mpol_shm_premap->copy_user_ranges()->clear_range() [OK]

007: Excercise the following execution paths related to clone
  filemap,/dev/shm without --mpol_shm_premap->copy_user_ranges()->clear_range() [OK]

008: Excercise the following execution paths related to sharing file-map page
fork()->filemap->pf->clear_range() [OK]

009: Excercise the following execution paths related to sharing shmget() page
fork()->shmat()->pf->clear_range() [OK]

011: Excercise the following execution paths related to sharing xpmem page
fork()->xpmem_attach()->pf->clear_range() [OK]

012: #925

013: Excercise the following execution paths:
fileobj(prvate)->cow->set_pte()->clear_range() [OK]

014: Excercise the following execution paths related to remap_file_pages
do_mmap->fileobj-->remap_file_pages()->st->clear_range() [OK]

015: Excercise the following execution paths related to remap_file_pages
do_mmap->fileobj-->st-->remap_one_page()->clear_range() [OK]

016: Excercise the following execution paths related to mremap
mremap()->move_pte_range()-->clear_range() [OK]

017: Excercise the following execution paths related to split_process_memory_range, file-map
mprotect()->split_process_memory_range()->change_prot_process_memory_range()->clear_range()/file_obj_release() [OK]

018: Excercise the following execution paths related to split_process_memory_range, 2M-page
mprotect()->ihk_mc_pt_split()->change_prot_process_memory_range()->clear_range() [OK]

019: Run npb bt-mz.S.2
1-ppn x 2-tpn x 2-node[OK]

021: Run npb bt-mz.S.4
2-ppn x 2-tpn x 2-node (wallaby{14,15}) [OK]
2-ppn x 1-tpn x 2-node (polaris,kochab) [OK]

100: Test ihk_os_getrusage(), call from McKernel process
anon mmap,num_threads=1 [OK]

101: Test ihk_os_getrusage(), call from McKernel process
anon mmap,num_threads=2 [OK]

102: Test ihk_os_getrusage(), call from McKernel process
file map,num_threads=1 [OK]

103: Test ihk_os_getrusage(), call from McKernel process
anon mmap@numa#1 [OK]

200: Test ihk_os_getrusage(), user time per CPU
