| 1402 | } |
| 1403 | |
| 1404 | void |
| 1405 | hstest_thread::operator ()() |
| 1406 | { |
| 1407 | if (arg.watch_flag) { |
| 1408 | return test_watch(); |
| 1409 | } |
| 1410 | int test_num = arg.sh.conf.get_int("test", 1); |
| 1411 | if (test_num == 1) { |
| 1412 | test_1(); |
| 1413 | } else if (test_num == 2 || test_num == 3) { |
| 1414 | test_2_3(test_num); |
| 1415 | } else if (test_num == 4 || test_num == 5) { |
| 1416 | test_4_5(test_num); |
| 1417 | } else if (test_num == 6) { |
| 1418 | test_6(test_num); |
| 1419 | } else if (test_num == 7) { |
| 1420 | test_7(test_num); |
| 1421 | } else if (test_num == 8) { |
| 1422 | test_8(test_num); |
| 1423 | } else if (test_num == 9) { |
| 1424 | test_9(test_num); |
| 1425 | } else if (test_num == 10) { |
| 1426 | test_10(test_num); |
| 1427 | } else if (test_num == 11) { |
| 1428 | test_11(test_num); |
| 1429 | } else if (test_num == 12) { |
| 1430 | test_12(test_num); |
| 1431 | } else if (test_num == 21) { |
| 1432 | test_21(test_num); |
| 1433 | } else if (test_num == 22) { |
| 1434 | test_22(test_num); |
| 1435 | } |
| 1436 | const int halt = arg.sh.conf.get_int("halt", 0); |
| 1437 | if (halt) { |
| 1438 | fprintf(stderr, "thread halted\n"); |
| 1439 | while (true) { |
| 1440 | sleep(100000); |
| 1441 | } |
| 1442 | } |
| 1443 | fprintf(stderr, "thread finished\n"); |
| 1444 | } |
| 1445 | |
| 1446 | int |
| 1447 | hstest_main(int argc, char **argv) |