Subversion Repositories HelenOS

Rev

Rev 2019 | Rev 2027 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2019 Rev 2020
Line 838... Line 838...
838
    printf("Use userspace controls to redraw the screen.\n");
838
    printf("Use userspace controls to redraw the screen.\n");
839
    arch_release_console();
839
    arch_release_console();
840
    return 1;
840
    return 1;
841
}
841
}
842
 
842
 
-
 
843
#ifdef CONFIG_TEST
843
/** Command for printing kernel tests list.
844
/** Command for printing kernel tests list.
844
 *
845
 *
845
 * @param argv Ignored.
846
 * @param argv Ignored.
846
 *
847
 *
847
 * return Always 1.
848
 * return Always 1.
Line 849... Line 850...
849
int cmd_tests(cmd_arg_t *argv)
850
int cmd_tests(cmd_arg_t *argv)
850
{
851
{
851
    test_t *test;
852
    test_t *test;
852
   
853
   
853
    for (test = tests; test->name != NULL; test++)
854
    for (test = tests; test->name != NULL; test++)
854
        printf("%s\t%s\n", test->name, test->desc);
855
        printf("%s\t\t%s%s\n", test->name, test->desc, (test->safe ? "" : " (unsafe)"));
855
   
856
   
-
 
857
    printf("*\t\tRun all safe tests\n");
856
    return 1;
858
    return 1;
857
}
859
}
858
 
860
 
859
/** Command for returning kernel tests
861
/** Command for returning kernel tests
860
 *
862
 *
Line 862... Line 864...
862
 *
864
 *
863
 * return Always 1.
865
 * return Always 1.
864
 */
866
 */
865
int cmd_test(cmd_arg_t *argv)
867
int cmd_test(cmd_arg_t *argv)
866
{
868
{
867
    bool fnd = false;
-
 
868
    test_t *test;
869
    test_t *test;
869
   
870
   
-
 
871
    if (strcmp(argv->buffer, "*") == 0) {
870
    for (test = tests; test->name != NULL; test++) {
872
        for (test = tests; test->name != NULL; test++) {
871
        if (strcmp(test->name, argv->buffer) == 0) {
873
            if (test->safe) {
872
            fnd = true;
874
                printf("\n%s\t\t%s\n\n", test->name, test->desc);
873
            test->entry();
875
                test->entry();
874
            break;
876
            }
875
        }
877
        }
-
 
878
    } else {
-
 
879
        bool fnd = false;
-
 
880
       
-
 
881
        for (test = tests; test->name != NULL; test++) {
-
 
882
            if (strcmp(test->name, argv->buffer) == 0) {
-
 
883
                fnd = true;
-
 
884
                test->entry();
-
 
885
                break;
-
 
886
            }
-
 
887
        }
-
 
888
       
-
 
889
        if (!fnd)
-
 
890
            printf("Unknown test.\n");
876
    }
891
    }
877
   
892
   
878
    if (!fnd)
-
 
879
        printf("Unknown test.\n");
-
 
880
   
-
 
881
    return 1;
893
    return 1;
882
}
894
}
-
 
895
#endif
883
 
896
 
884
/** @}
897
/** @}
885
 */
898
 */