Lines Matching refs:test
502 execute_test(test_t *test) in execute_test() argument
513 T_LOG("[BEGIN] %s\n", test->t_testname); in execute_test()
515 T_LOG(test->t_want_event ? "Expecting an event.\n" : "Not expecting events.\n"); in execute_test()
517 res = execute_action_list(test->t_prep_actions, test->t_n_prep_actions, 1); in execute_test()
522 if (!test->t_is_poll_test) { in execute_test()
528 if ((test->t_is_poll_test) || kqfd >= 0) { in execute_test()
530 if (test->t_file_is_fifo) { in execute_test()
532 open_fifo(test->t_watchfile, &filefd, &writefd); in execute_test()
534 if ((filefd = open(test->t_watchfile, O_RDONLY | O_SYMLINK)) == -1) { in execute_test()
535 T_LOG("open() of watchfile %s failed: %d (%s)\n", test->t_watchfile, in execute_test()
548 test->t_helpthreadact.act_fd = (writefd >= 0 ? writefd : filefd); in execute_test()
550 if (test->t_read_to_end_first) { in execute_test()
552 } else if (test->t_write_some_data) { in execute_test()
561 res = pthread_create(&thr, NULL, execute_action, (void*) &test->t_helpthreadact); in execute_test()
566 if (test->t_extra_sleep_hack) { in execute_test()
570 if (test->t_is_poll_test) { in execute_test()
573 pl.events = test->t_union.tu_pollevents; in execute_test()
581 test->t_union.tu_kev.ident = filefd; in execute_test()
582 cnt = kevent(kqfd, &test->t_union.tu_kev, 1, &evlist, 1, &ts); in execute_test()
611 if (test->t_file_is_fifo) { in execute_test()
615 if (!test->t_is_poll_test) { in execute_test()
625 execute_action_list(test->t_cleanup_actions, test->t_n_cleanup_actions, 0); in execute_test()
632 if (((cnt > 0) && (test->t_want_event)) || ((cnt == 0) && (!test->t_want_event))) { in execute_test()
633 …if ((!test->t_is_poll_test) && (test->t_union.tu_kev.filter == EVFILT_READ || test->t_union.tu_kev… in execute_test()
634 && (test->t_nbytes) && (test->t_nbytes != evlist.data)) { in execute_test()
635 … T_LOG("Read wrong number of bytes available. Wanted %d, got %d\n", test->t_nbytes, evlist.data); in execute_test()
649 if (test->t_nondeterministic) { in execute_test()
654 if (test->t_known_failure) { in execute_test()
661 T_PASS("%s", test->t_testname); in execute_test()
663 T_FAIL("%s", test->t_testname); in execute_test()
666 T_LOG("Test %s done with result %d.\n", test->t_testname, retval); in execute_test()
723 test_t test; in run_note_delete_tests() local
725 init_test(&test, "1.1.2: unlink a file", FILE1, 1, 0, NOTE_DELETE, YES_EVENT); in run_note_delete_tests()
726 test.t_nondeterministic = 1; in run_note_delete_tests()
727 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_delete_tests()
728 init_action(&test.t_helpthreadact, SLEEP, UNLINK, 2, (void*)FILE1, NULL); in run_note_delete_tests()
729 execute_test(&test); in run_note_delete_tests()
731 init_test(&test, "1.1.3: rmdir a dir", DIR1, 1, 0, NOTE_DELETE, YES_EVENT); in run_note_delete_tests()
732 test.t_nondeterministic = 1; in run_note_delete_tests()
733 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_delete_tests()
734 init_action(&test.t_helpthreadact, SLEEP, RMDIR, 2, (void*)DIR1, NULL); in run_note_delete_tests()
735 execute_test(&test); in run_note_delete_tests()
737 init_test(&test, "1.1.4: rename one file over another", FILE2, 2, 1, NOTE_DELETE, YES_EVENT); in run_note_delete_tests()
738 test.t_nondeterministic = 1; in run_note_delete_tests()
739 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_delete_tests()
740 init_action(&(test.t_prep_actions[1]), NOSLEEP, CREAT, 2, (void*)FILE2, (void*)NULL); in run_note_delete_tests()
741 init_action(&test.t_helpthreadact, SLEEP, RENAME, 2, (void*)FILE1, (void*)FILE2); in run_note_delete_tests()
742 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE2, NULL); in run_note_delete_tests()
743 execute_test(&test); in run_note_delete_tests()
745 init_test(&test, "1.1.5: rename one dir over another", DIR2, 2, 1, NOTE_DELETE, YES_EVENT); in run_note_delete_tests()
746 test.t_nondeterministic = 1; in run_note_delete_tests()
747 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_delete_tests()
748 init_action(&(test.t_prep_actions[1]), NOSLEEP, MKDIR, 2, (void*)DIR2, (void*)NULL); in run_note_delete_tests()
749 init_action(&test.t_helpthreadact, SLEEP, RENAME, 2, (void*)DIR1, (void*)DIR2); in run_note_delete_tests()
750 init_action(&test.t_cleanup_actions[0], NOSLEEP, RMDIR, 2, (void*)DIR2, NULL); in run_note_delete_tests()
751 execute_test(&test); in run_note_delete_tests()
754 init_test(&test, "1.1.6: make a fifo, unlink it", FILE1, 1, 0, NOTE_DELETE, YES_EVENT); in run_note_delete_tests()
755 test.t_file_is_fifo = 1; in run_note_delete_tests()
756 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKFIFO, 2, (void*)FILE1, (void*)NULL); in run_note_delete_tests()
757 init_action(&test.t_helpthreadact, SLEEP, UNLINK, 1, (void*)FILE1); in run_note_delete_tests()
758 execute_test(&test); in run_note_delete_tests()
760 init_test(&test, "1.1.7: rename a file over a fifo", FILE1, 2, 1, NOTE_DELETE, YES_EVENT); in run_note_delete_tests()
761 test.t_nondeterministic = 1; in run_note_delete_tests()
762 test.t_file_is_fifo = 1; in run_note_delete_tests()
763 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKFIFO, 2, (void*)FILE1, (void*)NULL); in run_note_delete_tests()
764 init_action(&(test.t_prep_actions[1]), NOSLEEP, CREAT, 2, (void*)FILE2, (void*)NULL); in run_note_delete_tests()
765 init_action(&test.t_helpthreadact, SLEEP, RENAME, 2, (void*)FILE2, (void*)FILE1); in run_note_delete_tests()
766 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, NULL); in run_note_delete_tests()
767 execute_test(&test); in run_note_delete_tests()
769 init_test(&test, "1.1.8: unlink a symlink to a file", FILE2, 2, 1, NOTE_DELETE, YES_EVENT); in run_note_delete_tests()
770 test.t_nondeterministic = 1; in run_note_delete_tests()
771 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_delete_tests()
772 init_action(&(test.t_prep_actions[1]), NOSLEEP, SYMLINK, 2, (void*)FILE1, (void*)FILE2); in run_note_delete_tests()
773 init_action(&test.t_helpthreadact, SLEEP, UNLINK, 2, (void*)FILE2, NULL); in run_note_delete_tests()
774 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, NULL); in run_note_delete_tests()
775 execute_test(&test); in run_note_delete_tests()
779 init_test(&test, "1.2.1: Straight-up rename file", FILE1, 1, 1, NOTE_DELETE, NO_EVENT); in run_note_delete_tests()
780 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_delete_tests()
781 init_action(&test.t_helpthreadact, SLEEP, RENAME, 2, (void*)FILE1, (void*)FILE2); in run_note_delete_tests()
782 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE2, (void*)NULL); in run_note_delete_tests()
783 execute_test(&test); in run_note_delete_tests()
785 init_test(&test, "1.2.2: Straight-up rename dir", DIR1, 1, 1, NOTE_DELETE, NO_EVENT); in run_note_delete_tests()
786 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_delete_tests()
787 init_action(&test.t_helpthreadact, SLEEP, RENAME, 2, (void*)DIR1, (void*)DIR2); in run_note_delete_tests()
788 init_action(&test.t_cleanup_actions[0], NOSLEEP, RMDIR, 2, (void*)DIR2, (void*)NULL); in run_note_delete_tests()
789 execute_test(&test); in run_note_delete_tests()
791 init_test(&test, "1.2.3: Null action on file", FILE1, 1, 1, NOTE_DELETE, NO_EVENT); in run_note_delete_tests()
792 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_delete_tests()
793 init_action(&test.t_helpthreadact, SLEEP, NOTHING, 2, NULL, NULL); /* The null action */ in run_note_delete_tests()
794 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, (void*)NULL); in run_note_delete_tests()
795 execute_test(&test); in run_note_delete_tests()
797 …init_test(&test, "1.2.4: Rename one file over another: watch the file that lives", FILE1, 2, 1, NO… in run_note_delete_tests()
798 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_delete_tests()
799 init_action(&(test.t_prep_actions[1]), NOSLEEP, CREAT, 2, (void*)FILE2, (void*)NULL); in run_note_delete_tests()
800 init_action(&test.t_helpthreadact, SLEEP, RENAME, 2, (void*)FILE1, (void*)FILE2); in run_note_delete_tests()
801 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE2, NULL); in run_note_delete_tests()
802 execute_test(&test); in run_note_delete_tests()
804 …init_test(&test, "1.2.5: Rename one dir over another, watch the dir that lives", DIR1, 2, 1, NOTE_… in run_note_delete_tests()
805 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_delete_tests()
806 init_action(&(test.t_prep_actions[1]), NOSLEEP, MKDIR, 2, (void*)DIR2, (void*)NULL); in run_note_delete_tests()
807 init_action(&test.t_helpthreadact, SLEEP, RENAME, 2, (void*)DIR1, (void*)DIR2); in run_note_delete_tests()
808 init_action(&test.t_cleanup_actions[0], NOSLEEP, RMDIR, 2, (void*)DIR2, NULL); in run_note_delete_tests()
825 test_t test; in run_note_write_tests() local
827 init_test(&test, "2.1.1: Straight-up write to a file", FILE1, 1, 1, NOTE_WRITE, YES_EVENT); in run_note_write_tests()
828 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_write_tests()
829 init_action(&test.t_helpthreadact, SLEEP, WRITE, 2, (void*)FILE1, NULL); in run_note_write_tests()
830 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, (void*)NULL); in run_note_write_tests()
831 execute_test(&test); in run_note_write_tests()
835 init_test(&test, "2.1.2: creat() file inside a dir", DIR1, 1, 2, NOTE_WRITE, YES_EVENT); in run_note_write_tests()
836 test.t_known_failure = 1; in run_note_write_tests()
837 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_write_tests()
838 init_action(&test.t_helpthreadact, SLEEP, CREAT, 2, (void*)pathbuf, NULL); in run_note_write_tests()
839 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)pathbuf, (void*)NULL); in run_note_write_tests()
840 init_action(&test.t_cleanup_actions[1], NOSLEEP, RMDIR, 2, (void*)DIR1, (void*)NULL); in run_note_write_tests()
841 execute_test(&test); in run_note_write_tests()
844 init_test(&test, "2.1.3: open() file inside a dir", DIR1, 1, 2, NOTE_WRITE, YES_EVENT); in run_note_write_tests()
845 test.t_known_failure = 1; in run_note_write_tests()
846 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_write_tests()
847 init_action(&test.t_helpthreadact, SLEEP, OPEN, 2, (void*)pathbuf, NULL); in run_note_write_tests()
848 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)pathbuf, (void*)NULL); in run_note_write_tests()
849 init_action(&test.t_cleanup_actions[1], NOSLEEP, RMDIR, 2, (void*)DIR1, (void*)NULL); in run_note_write_tests()
850 execute_test(&test); in run_note_write_tests()
853 init_test(&test, "2.1.4: unlink a file from a dir", DIR1, 2, 1, NOTE_WRITE, YES_EVENT); in run_note_write_tests()
854 test.t_known_failure = 1; in run_note_write_tests()
855 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_write_tests()
856 init_action(&(test.t_prep_actions[1]), NOSLEEP, CREAT, 2, (void*)pathbuf, (void*)NULL); in run_note_write_tests()
857 init_action(&test.t_helpthreadact, SLEEP, UNLINK, 2, (void*)pathbuf, NULL); in run_note_write_tests()
858 init_action(&test.t_cleanup_actions[0], NOSLEEP, RMDIR, 2, (void*)DIR1, (void*)NULL); in run_note_write_tests()
859 execute_test(&test); in run_note_write_tests()
863 init_test(&test, "2.1.5: rename a file in a dir", DIR1, 2, 2, NOTE_WRITE, YES_EVENT); in run_note_write_tests()
864 test.t_known_failure = 1; in run_note_write_tests()
865 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_write_tests()
866 init_action(&(test.t_prep_actions[1]), NOSLEEP, CREAT, 2, (void*)pathbuf, (void*)NULL); in run_note_write_tests()
867 init_action(&test.t_helpthreadact, SLEEP, RENAME, 2, (void*)pathbuf, (void*)otherpathbuf); in run_note_write_tests()
868 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)otherpathbuf, (void*)NULL); in run_note_write_tests()
869 init_action(&test.t_cleanup_actions[1], NOSLEEP, RMDIR, 2, (void*)DIR1, (void*)NULL); in run_note_write_tests()
870 execute_test(&test); in run_note_write_tests()
873 init_test(&test, "2.1.6: rename a file to outside of a dir", DIR1, 2, 2, NOTE_WRITE, YES_EVENT); in run_note_write_tests()
874 test.t_known_failure = 1; in run_note_write_tests()
875 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_write_tests()
876 init_action(&(test.t_prep_actions[1]), NOSLEEP, CREAT, 2, (void*)pathbuf, (void*)NULL); in run_note_write_tests()
877 init_action(&test.t_helpthreadact, SLEEP, RENAME, 2, (void*)pathbuf, (void*)FILE1); in run_note_write_tests()
878 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, (void*)NULL); in run_note_write_tests()
879 init_action(&test.t_cleanup_actions[1], NOSLEEP, RMDIR, 2, (void*)DIR1, (void*)NULL); in run_note_write_tests()
880 execute_test(&test); in run_note_write_tests()
883 init_test(&test, "2.1.7: rename a file into a dir", DIR1, 2, 2, NOTE_WRITE, YES_EVENT); in run_note_write_tests()
884 test.t_known_failure = 1; in run_note_write_tests()
885 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_write_tests()
886 init_action(&(test.t_prep_actions[1]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_write_tests()
887 init_action(&test.t_helpthreadact, SLEEP, RENAME, 2, (void*)FILE1, (void*)pathbuf); in run_note_write_tests()
888 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)pathbuf, (void*)NULL); in run_note_write_tests()
889 init_action(&test.t_cleanup_actions[1], NOSLEEP, RMDIR, 2, (void*)DIR1, (void*)NULL); in run_note_write_tests()
890 execute_test(&test); in run_note_write_tests()
893 init_test(&test, "2.1.9: unlink a fifo from a dir", DIR1, 2, 1, NOTE_WRITE, YES_EVENT); in run_note_write_tests()
894 test.t_known_failure = 1; in run_note_write_tests()
895 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_write_tests()
896 init_action(&(test.t_prep_actions[1]), NOSLEEP, MKFIFO, 2, (void*)pathbuf, (void*)NULL); in run_note_write_tests()
897 init_action(&test.t_helpthreadact, SLEEP, UNLINK, 2, (void*)pathbuf, NULL); in run_note_write_tests()
898 init_action(&test.t_cleanup_actions[0], NOSLEEP, RMDIR, 2, (void*)DIR1, (void*)NULL); in run_note_write_tests()
899 execute_test(&test); in run_note_write_tests()
902 init_test(&test, "2.1.10: make symlink in a dir", DIR1, 1, 2, NOTE_WRITE, YES_EVENT); in run_note_write_tests()
903 test.t_known_failure = 1; in run_note_write_tests()
904 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_write_tests()
905 init_action(&test.t_helpthreadact, SLEEP, SYMLINK, 2, (void*)DOTDOT, (void*)pathbuf); in run_note_write_tests()
906 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)pathbuf, (void*)NULL); in run_note_write_tests()
907 init_action(&test.t_cleanup_actions[1], NOSLEEP, RMDIR, 2, (void*)DIR1, (void*)NULL); in run_note_write_tests()
908 execute_test(&test); in run_note_write_tests()
910 init_test(&test, "2.1.12: write to a FIFO", FILE1, 1, 1, NOTE_WRITE, YES_EVENT); in run_note_write_tests()
911 test.t_known_failure = 1; in run_note_write_tests()
912 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKFIFO, 2, (void*)FILE1, (void*)NULL); in run_note_write_tests()
913 test.t_file_is_fifo = 1; in run_note_write_tests()
914 init_action(&test.t_helpthreadact, SLEEP, WRITEFD, 0); in run_note_write_tests()
915 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, (void*)NULL); in run_note_write_tests()
916 execute_test(&test); in run_note_write_tests()
920 init_test(&test, "2.1.13: delete a symlink in a dir", DIR1, 2, 1, NOTE_WRITE, YES_EVENT); in run_note_write_tests()
921 test.t_known_failure = 1; in run_note_write_tests()
922 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_write_tests()
923 init_action(&(test.t_prep_actions[1]), NOSLEEP, SYMLINK, 2, (void*)DOTDOT, (void*)pathbuf); in run_note_write_tests()
924 init_action(&test.t_helpthreadact, SLEEP, UNLINK, 2, (void*)pathbuf, (void*)FILE1); in run_note_write_tests()
925 init_action(&test.t_cleanup_actions[0], NOSLEEP, RMDIR, 2, (void*)DIR1, (void*)NULL); in run_note_write_tests()
926 execute_test(&test); in run_note_write_tests()
933 init_test(&test, "2.1.14: exchangedata two files in a dir", DIR1, 3, 3, NOTE_WRITE, NO_EVENT); in run_note_write_tests()
934 test.t_known_failure = 1; in run_note_write_tests()
935 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_write_tests()
936 init_action(&(test.t_prep_actions[1]), NOSLEEP, CREAT, 2, (void*)pathbuf, (void*)NULL); in run_note_write_tests()
937 init_action(&(test.t_prep_actions[2]), NOSLEEP, CREAT, 2, (void*)otherpathbuf, (void*)NULL); in run_note_write_tests()
938 init_action(&test.t_helpthreadact, SLEEP, EXCHANGEDATA, 2, (void*)pathbuf, (void*)otherpathbuf); in run_note_write_tests()
939 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)pathbuf, (void*)NULL); in run_note_write_tests()
940 init_action(&test.t_cleanup_actions[1], NOSLEEP, UNLINK, 2, (void*)otherpathbuf, (void*)NULL); in run_note_write_tests()
941 init_action(&test.t_cleanup_actions[2], NOSLEEP, RMDIR, 2, (void*)DIR1, (void*)NULL); in run_note_write_tests()
942 execute_test(&test); in run_note_write_tests()
945 init_test(&test, "2.1.15: Change a file with mmap()", FILE1, 1, 1, NOTE_WRITE, YES_EVENT); in run_note_write_tests()
946 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_write_tests()
947 init_action(&test.t_helpthreadact, SLEEP, MMAP, 2, (void*)FILE1, (void*)1); /* 1 -> "modify it"*/ in run_note_write_tests()
948 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, (void*)NULL); in run_note_write_tests()
949 execute_test(&test); in run_note_write_tests()
952 init_test(&test, "2.2.1: just open and close existing file", FILE1, 1, 1, NOTE_WRITE, NO_EVENT); in run_note_write_tests()
953 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_write_tests()
954 init_action(&test.t_helpthreadact, SLEEP, OPEN, 2, (void*)FILE1, NULL); in run_note_write_tests()
955 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, (void*)NULL); in run_note_write_tests()
956 execute_test(&test); in run_note_write_tests()
958 init_test(&test, "2.2.2: read from existing file", FILE1, 1, 1, NOTE_WRITE, NO_EVENT); in run_note_write_tests()
959 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_write_tests()
960 init_action(&test.t_helpthreadact, SLEEP, READ, 2, (void*)FILE1, NULL); in run_note_write_tests()
961 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, (void*)NULL); in run_note_write_tests()
962 execute_test(&test); in run_note_write_tests()
964 init_test(&test, "2.2.3: rename existing file", FILE1, 1, 1, NOTE_WRITE, NO_EVENT); in run_note_write_tests()
965 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_write_tests()
966 init_action(&test.t_helpthreadact, SLEEP, RENAME, 2, (void*)FILE1, (void*)FILE2); in run_note_write_tests()
967 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE2, (void*)NULL); in run_note_write_tests()
968 execute_test(&test); in run_note_write_tests()
970 init_test(&test, "2.2.4: just open and close dir", DIR1, 1, 1, NOTE_WRITE, NO_EVENT); in run_note_write_tests()
971 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_write_tests()
972 init_action(&test.t_helpthreadact, SLEEP, OPEN, 2, (void*)DIR1, (void*)NULL); in run_note_write_tests()
973 init_action(&test.t_cleanup_actions[0], NOSLEEP, RMDIR, 2, (void*)DIR1, (void*)NULL); in run_note_write_tests()
974 execute_test(&test); in run_note_write_tests()
978 init_test(&test, "2.2.7: rename a dir", DIR1, 1, 1, NOTE_WRITE, NO_EVENT); in run_note_write_tests()
979 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_write_tests()
980 init_action(&test.t_helpthreadact, SLEEP, RENAME, 2, (void*)DIR1, (void*)DIR2); in run_note_write_tests()
981 init_action(&test.t_cleanup_actions[0], NOSLEEP, RMDIR, 2, (void*)DIR2, (void*)NULL); in run_note_write_tests()
982 execute_test(&test); in run_note_write_tests()
984 init_test(&test, "2.2.8: rename a fifo", FILE1, 1, 1, NOTE_WRITE, NO_EVENT); in run_note_write_tests()
985 test.t_file_is_fifo = 1; in run_note_write_tests()
986 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKFIFO, 2, (void*)FILE1, (void*)NULL); in run_note_write_tests()
987 init_action(&test.t_helpthreadact, SLEEP, RENAME, 2, (void*)FILE1, (void*)FILE2); in run_note_write_tests()
988 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE2, (void*)NULL); in run_note_write_tests()
989 execute_test(&test); in run_note_write_tests()
991 init_test(&test, "2.2.9: unlink a fifo", FILE1, 1, 0, NOTE_WRITE, NO_EVENT); in run_note_write_tests()
992 test.t_file_is_fifo = 1; in run_note_write_tests()
993 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKFIFO, 2, (void*)FILE1, (void*)NULL); in run_note_write_tests()
994 init_action(&test.t_helpthreadact, SLEEP, UNLINK, 1, (void*)FILE1); in run_note_write_tests()
995 execute_test(&test); in run_note_write_tests()
997 init_test(&test, "2.2.10: chmod a file", FILE1, 1, 1, NOTE_WRITE, NO_EVENT); in run_note_write_tests()
998 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_write_tests()
999 init_action(&test.t_helpthreadact, SLEEP, CHMOD, 2, (void*)FILE1, (void*)0700); in run_note_write_tests()
1000 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, (void*)NULL); in run_note_write_tests()
1001 execute_test(&test); in run_note_write_tests()
1006 init_test(&test, "2.2.11: chown a file", FILE1, 2, 1, NOTE_WRITE, NO_EVENT); in run_note_write_tests()
1007 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_write_tests()
1008 …init_action(&test.t_prep_actions[1], NOSLEEP, CHOWN, 3, (void*)FILE1, (void*)pwd->pw_uid, (void*)p… in run_note_write_tests()
1009 …init_action(&test.t_helpthreadact, SLEEP, CHOWN, 3, (void*)FILE1, (void*)getuid(), (void*)getgid()… in run_note_write_tests()
1010 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, (void*)NULL); in run_note_write_tests()
1011 execute_test(&test); in run_note_write_tests()
1014 init_test(&test, "2.2.12: chmod a dir", DIR1, 1, 1, NOTE_WRITE, NO_EVENT); in run_note_write_tests()
1015 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_write_tests()
1016 init_action(&test.t_helpthreadact, SLEEP, CHMOD, 2, (void*)DIR1, (void*)0700); in run_note_write_tests()
1017 init_action(&test.t_cleanup_actions[0], NOSLEEP, RMDIR, 2, (void*)DIR1, (void*)NULL); in run_note_write_tests()
1018 execute_test(&test); in run_note_write_tests()
1021 init_test(&test, "2.2.13: chown a dir", DIR1, 2, 1, NOTE_WRITE, NO_EVENT); in run_note_write_tests()
1022 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_write_tests()
1023 …init_action(&test.t_prep_actions[1], NOSLEEP, CHOWN, 3, (void*)DIR1, (void*)pwd->pw_uid, (void*)pw… in run_note_write_tests()
1024 …init_action(&test.t_helpthreadact, SLEEP, CHOWN, 3, (void*)DIR1, (void*)getuid(), (void*)getgid()); in run_note_write_tests()
1025 init_action(&test.t_cleanup_actions[0], NOSLEEP, RMDIR, 2, (void*)DIR1, (void*)NULL); in run_note_write_tests()
1026 execute_test(&test); in run_note_write_tests()
1030 init_test(&test, "2.1.14: mmap() a file but do not change it", FILE1, 1, 1, NOTE_WRITE, NO_EVENT); in run_note_write_tests()
1031 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_write_tests()
1032 init_action(&test.t_helpthreadact, SLEEP, MMAP, 2, (void*)FILE1, (void*)0); in run_note_write_tests()
1033 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, (void*)NULL); in run_note_write_tests()
1034 execute_test(&test); in run_note_write_tests()
1040 test_t test; in run_note_extend_tests() local
1045 init_test(&test, "3.1.1: write beyond the end of a file", FILE1, 1, 1, NOTE_EXTEND, YES_EVENT); in run_note_extend_tests()
1046 test.t_nondeterministic = 1; in run_note_extend_tests()
1047 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_extend_tests()
1048 init_action(&test.t_helpthreadact, SLEEP, WRITE, 2, (void*)FILE1, (void*)NULL); in run_note_extend_tests()
1049 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, (void*)NULL); in run_note_extend_tests()
1050 execute_test(&test); in run_note_extend_tests()
1092 init_test(&test, "3.1.7: lengthen a file with truncate()", FILE1, 1, 1, NOTE_EXTEND, YES_EVENT); in run_note_extend_tests()
1093 test.t_nondeterministic = 1; in run_note_extend_tests()
1094 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_extend_tests()
1095 init_action(&test.t_helpthreadact, SLEEP, LENGTHEN, 2, FILE1, (void*)NULL); in run_note_extend_tests()
1096 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, (void*)NULL); in run_note_extend_tests()
1097 execute_test(&test); in run_note_extend_tests()
1101 init_test(&test, "3.2.1: setxattr() a file", FILE1, 1, 1, NOTE_EXTEND, NO_EVENT); in run_note_extend_tests()
1102 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_extend_tests()
1103 init_action(&test.t_helpthreadact, SLEEP, SETXATTR, 2, FILE1, (void*)NULL); in run_note_extend_tests()
1104 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, (void*)NULL); in run_note_extend_tests()
1105 execute_test(&test); in run_note_extend_tests()
1107 init_test(&test, "3.2.2: chmod a file", FILE1, 1, 1, NOTE_EXTEND, NO_EVENT); in run_note_extend_tests()
1108 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_extend_tests()
1109 init_action(&test.t_helpthreadact, SLEEP, CHMOD, 2, (void*)FILE1, (void*)0700); in run_note_extend_tests()
1110 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, (void*)NULL); in run_note_extend_tests()
1111 execute_test(&test); in run_note_extend_tests()
1115 init_test(&test, "3.2.3: chown a file", FILE1, 2, 1, NOTE_EXTEND, NO_EVENT); in run_note_extend_tests()
1116 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_extend_tests()
1117 …init_action(&test.t_prep_actions[1], NOSLEEP, CHOWN, 3, (void*)FILE1, (void*)pwd->pw_uid, (void*)p… in run_note_extend_tests()
1118 …init_action(&test.t_helpthreadact, SLEEP, CHOWN, 3, (void*)FILE1, (void*)getuid(), (void*)getgid()… in run_note_extend_tests()
1119 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, (void*)NULL); in run_note_extend_tests()
1120 execute_test(&test); in run_note_extend_tests()
1125 init_test(&test, "3.2.4: chmod a dir", DIR1, 1, 1, NOTE_EXTEND, NO_EVENT); in run_note_extend_tests()
1126 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_extend_tests()
1127 init_action(&test.t_helpthreadact, SLEEP, CHMOD, 2, (void*)DIR1, (void*)0700); in run_note_extend_tests()
1128 init_action(&test.t_cleanup_actions[0], NOSLEEP, RMDIR, 2, (void*)DIR1, (void*)NULL); in run_note_extend_tests()
1129 execute_test(&test); in run_note_extend_tests()
1132 init_test(&test, "3.2.5: chown a dir", DIR1, 2, 1, NOTE_EXTEND, NO_EVENT); in run_note_extend_tests()
1133 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_extend_tests()
1134 …init_action(&test.t_prep_actions[1], NOSLEEP, CHOWN, 3, (void*)DIR1, (void*)pwd->pw_uid, (void*)pw… in run_note_extend_tests()
1135 …init_action(&test.t_helpthreadact, SLEEP, CHOWN, 3, (void*)DIR1, (void*)getuid(), (void*)getgid()); in run_note_extend_tests()
1136 init_action(&test.t_cleanup_actions[0], NOSLEEP, RMDIR, 2, (void*)DIR1, (void*)NULL); in run_note_extend_tests()
1137 execute_test(&test); in run_note_extend_tests()
1140 init_test(&test, "3.2.6: TRUNC a file with truncate()", FILE1, 1, 1, NOTE_EXTEND, NO_EVENT); in run_note_extend_tests()
1141 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_extend_tests()
1142 init_action(&test.t_helpthreadact, SLEEP, TRUNC, 2, FILE1, (void*)NULL); in run_note_extend_tests()
1143 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, (void*)NULL); in run_note_extend_tests()
1144 execute_test(&test); in run_note_extend_tests()
1150 test_t test; in run_note_attrib_tests() local
1153 init_test(&test, "4.1.1: chmod a file", FILE1, 1, 1, NOTE_ATTRIB, YES_EVENT); in run_note_attrib_tests()
1154 test.t_nondeterministic = 1; in run_note_attrib_tests()
1155 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_attrib_tests()
1156 init_action(&test.t_helpthreadact, SLEEP, CHMOD, 2, FILE1, (void*)0700); in run_note_attrib_tests()
1157 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, (void*)NULL); in run_note_attrib_tests()
1158 execute_test(&test); in run_note_attrib_tests()
1162 init_test(&test, "4.1.2: chown a file", FILE1, 2, 1, NOTE_ATTRIB, YES_EVENT); in run_note_attrib_tests()
1163 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_attrib_tests()
1164 …init_action(&(test.t_prep_actions[1]), NOSLEEP, CHOWN, 3, (void*)FILE1, (void*)pwd->pw_uid, (void*… in run_note_attrib_tests()
1165 init_action(&test.t_helpthreadact, SLEEP, CHOWN, 3, FILE1, (void*)getuid(), (void*)pwd->pw_gid); in run_note_attrib_tests()
1166 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, (void*)NULL); in run_note_attrib_tests()
1167 execute_test(&test); in run_note_attrib_tests()
1170 init_test(&test, "4.1.3: chmod a dir", DIR1, 1, 1, NOTE_ATTRIB, YES_EVENT); in run_note_attrib_tests()
1171 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_attrib_tests()
1172 init_action(&(test.t_helpthreadact), SLEEP, CHMOD, 2, (void*)DIR1, (void*)0700); in run_note_attrib_tests()
1173 init_action(&test.t_cleanup_actions[0], NOSLEEP, RMDIR, 2, (void*)DIR1, (void*)NULL); in run_note_attrib_tests()
1174 execute_test(&test); in run_note_attrib_tests()
1177 init_test(&test, "4.1.4: chown a dir", DIR1, 2, 1, NOTE_ATTRIB, YES_EVENT); in run_note_attrib_tests()
1178 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_attrib_tests()
1179 …init_action(&(test.t_prep_actions[1]), NOSLEEP, CHOWN, 3, (void*)DIR1, (void*) pwd->pw_uid, (void*… in run_note_attrib_tests()
1180 init_action(&test.t_helpthreadact, SLEEP, CHOWN, 3, DIR1, (void*)getuid(), (void*)getgid()); in run_note_attrib_tests()
1181 init_action(&test.t_cleanup_actions[0], NOSLEEP, RMDIR, 2, (void*)DIR1, (void*)NULL); in run_note_attrib_tests()
1182 execute_test(&test); in run_note_attrib_tests()
1185 init_test(&test, "4.1.5: setxattr on a file", FILE1, 1, 1, NOTE_ATTRIB, YES_EVENT); in run_note_attrib_tests()
1186 test.t_nondeterministic = 1; in run_note_attrib_tests()
1187 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_attrib_tests()
1188 init_action(&test.t_helpthreadact, SLEEP, SETXATTR, 2, (void*)FILE1, (void*)NULL); in run_note_attrib_tests()
1189 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, (void*)NULL); in run_note_attrib_tests()
1190 execute_test(&test); in run_note_attrib_tests()
1192 init_test(&test, "4.1.6: setxattr on a dir", DIR1, 1, 1, NOTE_ATTRIB, YES_EVENT); in run_note_attrib_tests()
1193 test.t_nondeterministic = 1; in run_note_attrib_tests()
1194 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_attrib_tests()
1195 init_action(&test.t_helpthreadact, SLEEP, SETXATTR, 2, (void*)DIR1, (void*)NULL); in run_note_attrib_tests()
1196 init_action(&test.t_cleanup_actions[0], NOSLEEP, RMDIR, 2, (void*)DIR1, (void*)NULL); in run_note_attrib_tests()
1197 execute_test(&test); in run_note_attrib_tests()
1201 init_test(&test, "4.1.7: exchangedata", FILE1, 2, 2, NOTE_ATTRIB, YES_EVENT); in run_note_attrib_tests()
1202 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_attrib_tests()
1203 init_action(&(test.t_prep_actions[1]), NOSLEEP, CREAT, 2, (void*)FILE2, (void*)NULL); in run_note_attrib_tests()
1204 init_action(&test.t_helpthreadact, SLEEP, EXCHANGEDATA, 2, (void*)FILE1, (void*)FILE2); in run_note_attrib_tests()
1205 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, (void*)NULL); in run_note_attrib_tests()
1206 init_action(&test.t_cleanup_actions[1], NOSLEEP, UNLINK, 2, (void*)FILE2, (void*)NULL); in run_note_attrib_tests()
1207 execute_test(&test); in run_note_attrib_tests()
1210 init_test(&test, "4.1.8: utimes on a file", FILE1, 1, 1, NOTE_ATTRIB, YES_EVENT); in run_note_attrib_tests()
1211 test.t_nondeterministic = 1; in run_note_attrib_tests()
1212 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_attrib_tests()
1213 init_action(&test.t_helpthreadact, SLEEP, UTIMES, 2, (void*)FILE1, (void*)NULL); in run_note_attrib_tests()
1214 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, (void*)NULL); in run_note_attrib_tests()
1215 execute_test(&test); in run_note_attrib_tests()
1217 init_test(&test, "4.1.9: utimes on a dir", DIR1, 1, 1, NOTE_ATTRIB, YES_EVENT); in run_note_attrib_tests()
1218 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_attrib_tests()
1219 init_action(&test.t_helpthreadact, SLEEP, UTIMES, 2, (void*)DIR1, (void*)NULL); in run_note_attrib_tests()
1220 init_action(&test.t_cleanup_actions[0], NOSLEEP, RMDIR, 2, (void*)DIR1, (void*)NULL); in run_note_attrib_tests()
1221 execute_test(&test); in run_note_attrib_tests()
1226 init_test(&test, "4.2.1: rename a file", FILE1, 1, 1, NOTE_ATTRIB, NO_EVENT); in run_note_attrib_tests()
1227 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_attrib_tests()
1228 init_action(&test.t_helpthreadact, SLEEP, RENAME, 2, (void*)FILE1, (void*)FILE2); in run_note_attrib_tests()
1229 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE2, NULL); in run_note_attrib_tests()
1230 execute_test(&test); in run_note_attrib_tests()
1232 init_test(&test, "4.2.2: open (do not change) a file", FILE1, 1, 1, NOTE_ATTRIB, NO_EVENT); in run_note_attrib_tests()
1233 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_attrib_tests()
1234 init_action(&test.t_helpthreadact, SLEEP, OPEN, 2, (void*)FILE1, NULL); in run_note_attrib_tests()
1235 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, NULL); in run_note_attrib_tests()
1236 execute_test(&test); in run_note_attrib_tests()
1238 init_test(&test, "4.2.3: stat a file", FILE1, 1, 1, NOTE_ATTRIB, NO_EVENT); in run_note_attrib_tests()
1239 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_attrib_tests()
1240 init_action(&test.t_helpthreadact, SLEEP, STAT, 2, (void*)FILE1, NULL); in run_note_attrib_tests()
1241 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, NULL); in run_note_attrib_tests()
1242 execute_test(&test); in run_note_attrib_tests()
1244 init_test(&test, "4.2.4: unlink a file", FILE1, 1, 0, NOTE_ATTRIB, NO_EVENT); in run_note_attrib_tests()
1245 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_attrib_tests()
1246 init_action(&test.t_helpthreadact, SLEEP, UNLINK, 2, (void*)FILE1, NULL); in run_note_attrib_tests()
1247 execute_test(&test); in run_note_attrib_tests()
1249 init_test(&test, "4.2.5: write to a file", FILE1, 1, 1, NOTE_ATTRIB, NO_EVENT); in run_note_attrib_tests()
1250 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_attrib_tests()
1251 init_action(&test.t_helpthreadact, SLEEP, WRITE, 2, (void*)FILE1, (void*)NULL); in run_note_attrib_tests()
1252 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, (void*)NULL); in run_note_attrib_tests()
1253 execute_test(&test); in run_note_attrib_tests()
1256 …init_test(&test, "4.2.6: add a file to a directory with creat()", DIR1, 1, 2, NOTE_ATTRIB, NO_EVEN… in run_note_attrib_tests()
1257 test.t_known_failure = 1; in run_note_attrib_tests()
1259 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_attrib_tests()
1260 init_action(&test.t_helpthreadact, SLEEP, CREAT, 2, (void*)pathbuf, (void*)NULL); in run_note_attrib_tests()
1261 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)pathbuf, (void*)NULL); in run_note_attrib_tests()
1262 init_action(&test.t_cleanup_actions[1], NOSLEEP, RMDIR, 2, (void*)DIR1, (void*)NULL); in run_note_attrib_tests()
1263 execute_test(&test); in run_note_attrib_tests()
1265 init_test(&test, "4.2.7: mkdir in a dir", DIR1, 1, 2, NOTE_ATTRIB, NO_EVENT); in run_note_attrib_tests()
1266 test.t_known_failure = 1; in run_note_attrib_tests()
1268 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_attrib_tests()
1269 init_action(&test.t_helpthreadact, SLEEP, MKDIR, 2, (void*)pathbuf, (void*)NULL); in run_note_attrib_tests()
1270 init_action(&test.t_cleanup_actions[0], NOSLEEP, RMDIR, 2, (void*)pathbuf, (void*)NULL); in run_note_attrib_tests()
1271 init_action(&test.t_cleanup_actions[1], NOSLEEP, RMDIR, 2, (void*)DIR1, (void*)NULL); in run_note_attrib_tests()
1272 execute_test(&test); in run_note_attrib_tests()
1274 init_test(&test, "4.2.8: add a symlink to a directory", DIR1, 1, 2, NOTE_ATTRIB, NO_EVENT); in run_note_attrib_tests()
1275 test.t_known_failure = 1; in run_note_attrib_tests()
1277 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_attrib_tests()
1278 init_action(&test.t_helpthreadact, SLEEP, SYMLINK, 2, (void*)DOTDOT, (void*)pathbuf); in run_note_attrib_tests()
1279 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)pathbuf, (void*)NULL); in run_note_attrib_tests()
1280 init_action(&test.t_cleanup_actions[1], NOSLEEP, RMDIR, 2, (void*)DIR1, (void*)NULL); in run_note_attrib_tests()
1281 execute_test(&test); in run_note_attrib_tests()
1283 init_test(&test, "4.2.9: rename into a dir()", DIR1, 2, 2, NOTE_ATTRIB, NO_EVENT); in run_note_attrib_tests()
1284 test.t_known_failure = 1; in run_note_attrib_tests()
1286 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_attrib_tests()
1287 init_action(&(test.t_prep_actions[1]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_attrib_tests()
1288 init_action(&test.t_helpthreadact, SLEEP, RENAME, 2, (void*)FILE1, (void*)pathbuf); in run_note_attrib_tests()
1289 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)pathbuf, (void*)NULL); in run_note_attrib_tests()
1290 init_action(&test.t_cleanup_actions[1], NOSLEEP, RMDIR, 2, (void*)DIR1, (void*)NULL); in run_note_attrib_tests()
1291 execute_test(&test); in run_note_attrib_tests()
1293 init_test(&test, "4.2.10: unlink() file from dir", DIR1, 2, 1, NOTE_ATTRIB, NO_EVENT); in run_note_attrib_tests()
1294 test.t_known_failure = 1; in run_note_attrib_tests()
1296 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_attrib_tests()
1297 init_action(&(test.t_prep_actions[1]), NOSLEEP, CREAT, 2, (void*)pathbuf, (void*)NULL); in run_note_attrib_tests()
1298 init_action(&test.t_helpthreadact, SLEEP, UNLINK, 2, (void*)pathbuf, (void*)NULL); in run_note_attrib_tests()
1299 init_action(&test.t_cleanup_actions[0], NOSLEEP, RMDIR, 2, (void*)DIR1, (void*)NULL); in run_note_attrib_tests()
1300 execute_test(&test); in run_note_attrib_tests()
1302 init_test(&test, "4.2.11: mkfifo in a directory", DIR1, 1, 2, NOTE_ATTRIB, NO_EVENT); in run_note_attrib_tests()
1303 test.t_known_failure = 1; in run_note_attrib_tests()
1305 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_attrib_tests()
1306 init_action(&test.t_helpthreadact, SLEEP, MKFIFO, 1, (void*)pathbuf); in run_note_attrib_tests()
1307 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)pathbuf, (void*)NULL); in run_note_attrib_tests()
1308 init_action(&test.t_cleanup_actions[1], NOSLEEP, RMDIR, 2, (void*)DIR1, (void*)NULL); in run_note_attrib_tests()
1309 execute_test(&test); in run_note_attrib_tests()
1316 test_t test; in run_note_link_tests() local
1321 init_test(&test, "5.1.1: unlink() a file", FILE1, 1, 0, NOTE_LINK, YES_EVENT); in run_note_link_tests()
1322 test.t_nondeterministic = 1; in run_note_link_tests()
1323 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_link_tests()
1324 init_action(&test.t_helpthreadact, SLEEP, UNLINK, 2, (void*)FILE1, (void*)NULL); in run_note_link_tests()
1325 execute_test(&test); in run_note_link_tests()
1328 init_test(&test, "5.1.1.5: link A to B, watch A, remove B", FILE1, 2, 1, NOTE_LINK, YES_EVENT); in run_note_link_tests()
1329 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_link_tests()
1330 init_action(&(test.t_prep_actions[1]), NOSLEEP, HARDLINK, 2, (void*)FILE1, (void*)FILE2); in run_note_link_tests()
1331 init_action(&test.t_helpthreadact, SLEEP, UNLINK, 2, (void*)FILE2, (void*)NULL); in run_note_link_tests()
1332 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, NULL); in run_note_link_tests()
1333 execute_test(&test); in run_note_link_tests()
1335 init_test(&test, "5.1.2: link() to a file", FILE1, 1, 2, NOTE_LINK, YES_EVENT); in run_note_link_tests()
1337 test.t_nondeterministic = 1; in run_note_link_tests()
1339 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_link_tests()
1340 init_action(&test.t_helpthreadact, SLEEP, HARDLINK, 2, (void*)FILE1, (void*)FILE2); in run_note_link_tests()
1341 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, NULL); in run_note_link_tests()
1342 init_action(&test.t_cleanup_actions[1], NOSLEEP, UNLINK, 2, (void*)FILE2, NULL); in run_note_link_tests()
1343 execute_test(&test); in run_note_link_tests()
1346 init_test(&test, "5.1.3: make one dir in another", DIR1, 1, 2, NOTE_LINK, YES_EVENT); in run_note_link_tests()
1347 test.t_known_failure = 1; in run_note_link_tests()
1348 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_link_tests()
1349 init_action(&test.t_helpthreadact, SLEEP, MKDIR, 2, (void*)pathbuf, (void*)NULL); in run_note_link_tests()
1350 init_action(&test.t_cleanup_actions[0], NOSLEEP, RMDIR, 2, (void*)pathbuf, NULL); in run_note_link_tests()
1351 init_action(&test.t_cleanup_actions[1], NOSLEEP, RMDIR, 2, (void*)DIR1, NULL); in run_note_link_tests()
1352 execute_test(&test); in run_note_link_tests()
1355 init_test(&test, "5.1.4: rmdir a dir from within another", DIR1, 2, 1, NOTE_LINK, YES_EVENT); in run_note_link_tests()
1356 test.t_known_failure = 1; in run_note_link_tests()
1357 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_link_tests()
1358 init_action(&(test.t_prep_actions[1]), NOSLEEP, MKDIR, 2, (void*)pathbuf, (void*)NULL); in run_note_link_tests()
1359 init_action(&test.t_helpthreadact, SLEEP, RMDIR, 2, (void*)pathbuf, (void*)NULL); in run_note_link_tests()
1360 init_action(&test.t_cleanup_actions[0], NOSLEEP, RMDIR, 2, (void*)DIR1, NULL); in run_note_link_tests()
1361 execute_test(&test); in run_note_link_tests()
1365 init_test(&test, "5.1.5: rename dir A over dir B inside dir C", DIR1, 3, 2, NOTE_LINK, YES_EVENT); in run_note_link_tests()
1366 test.t_known_failure = 1; in run_note_link_tests()
1367 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_link_tests()
1368 init_action(&(test.t_prep_actions[1]), NOSLEEP, MKDIR, 2, (void*)pathbuf, (void*)NULL); in run_note_link_tests()
1369 init_action(&(test.t_prep_actions[2]), NOSLEEP, MKDIR, 2, (void*)otherpathbuf, (void*)NULL); in run_note_link_tests()
1370 init_action(&test.t_helpthreadact, SLEEP, RENAME, 2, (void*)pathbuf, (void*)otherpathbuf); in run_note_link_tests()
1371 init_action(&test.t_cleanup_actions[0], NOSLEEP, RMDIR, 2, (void*)otherpathbuf, NULL); in run_note_link_tests()
1372 init_action(&test.t_cleanup_actions[1], NOSLEEP, RMDIR, 2, (void*)DIR1, NULL); in run_note_link_tests()
1373 execute_test(&test); in run_note_link_tests()
1377 init_test(&test, "5.1.6: rename one dir into another", DIR1, 2, 2, NOTE_LINK, YES_EVENT); in run_note_link_tests()
1378 test.t_known_failure = 1; in run_note_link_tests()
1379 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_link_tests()
1380 init_action(&(test.t_prep_actions[1]), NOSLEEP, MKDIR, 2, (void*)DIR2, (void*)NULL); in run_note_link_tests()
1381 init_action(&test.t_helpthreadact, SLEEP, RENAME, 2, (void*)DIR2, (void*)pathbuf); in run_note_link_tests()
1382 init_action(&test.t_cleanup_actions[0], NOSLEEP, RMDIR, 2, (void*)pathbuf, NULL); in run_note_link_tests()
1383 init_action(&test.t_cleanup_actions[1], NOSLEEP, RMDIR, 2, (void*)DIR1, NULL); in run_note_link_tests()
1384 execute_test(&test); in run_note_link_tests()
1388 init_test(&test, "5.1.7: rename one dir out of another", DIR1, 2, 2, NOTE_LINK, YES_EVENT); in run_note_link_tests()
1389 test.t_known_failure = 1; in run_note_link_tests()
1390 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_link_tests()
1391 init_action(&(test.t_prep_actions[1]), NOSLEEP, MKDIR, 2, (void*)pathbuf, (void*)NULL); in run_note_link_tests()
1392 init_action(&test.t_helpthreadact, SLEEP, RENAME, 2, (void*)pathbuf, (void*)DIR2); in run_note_link_tests()
1393 init_action(&test.t_cleanup_actions[0], NOSLEEP, RMDIR, 2, (void*)DIR2, NULL); in run_note_link_tests()
1394 init_action(&test.t_cleanup_actions[1], NOSLEEP, RMDIR, 2, (void*)DIR1, NULL); in run_note_link_tests()
1395 execute_test(&test); in run_note_link_tests()
1397 init_test(&test, "5.1.8: rmdir a dir", DIR1, 1, 0, NOTE_LINK, YES_EVENT); in run_note_link_tests()
1398 test.t_nondeterministic = 1; in run_note_link_tests()
1399 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_link_tests()
1400 init_action(&test.t_helpthreadact, SLEEP, RMDIR, 2, (void*)DIR1, (void*)NULL); in run_note_link_tests()
1401 execute_test(&test); in run_note_link_tests()
1405 init_test(&test, "5.2.1: make a file in a dir", DIR1, 1, 2, NOTE_LINK, NO_EVENT); in run_note_link_tests()
1406 test.t_known_failure = 1; in run_note_link_tests()
1407 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_link_tests()
1408 init_action(&test.t_helpthreadact, SLEEP, CREAT, 2, (void*)pathbuf, (void*)NULL); in run_note_link_tests()
1409 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)pathbuf, NULL); in run_note_link_tests()
1410 init_action(&test.t_cleanup_actions[1], NOSLEEP, RMDIR, 2, (void*)DIR1, NULL); in run_note_link_tests()
1411 execute_test(&test); in run_note_link_tests()
1414 init_test(&test, "5.2.2: unlink a file in a dir", DIR1, 2, 1, NOTE_LINK, NO_EVENT); in run_note_link_tests()
1415 test.t_known_failure = 1; in run_note_link_tests()
1416 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_link_tests()
1417 init_action(&(test.t_prep_actions[1]), NOSLEEP, CREAT, 2, (void*)pathbuf, (void*)NULL); in run_note_link_tests()
1418 init_action(&test.t_helpthreadact, SLEEP, UNLINK, 2, (void*)pathbuf, (void*)NULL); in run_note_link_tests()
1419 init_action(&test.t_cleanup_actions[0], NOSLEEP, RMDIR, 2, (void*)DIR1, NULL); in run_note_link_tests()
1420 execute_test(&test); in run_note_link_tests()
1424 init_test(&test, "5.2.3: rename a file within a dir", DIR1, 2, 2, NOTE_LINK, NO_EVENT); in run_note_link_tests()
1425 test.t_known_failure = 1; in run_note_link_tests()
1426 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_link_tests()
1427 init_action(&(test.t_prep_actions[1]), NOSLEEP, CREAT, 2, (void*)pathbuf, (void*)NULL); in run_note_link_tests()
1428 init_action(&test.t_helpthreadact, SLEEP, RENAME, 2, (void*)pathbuf, (void*)otherpathbuf); in run_note_link_tests()
1429 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)otherpathbuf, NULL); in run_note_link_tests()
1430 init_action(&test.t_cleanup_actions[1], NOSLEEP, RMDIR, 2, (void*)DIR1, NULL); in run_note_link_tests()
1431 execute_test(&test); in run_note_link_tests()
1434 init_test(&test, "5.2.4: rename a file into a dir", DIR1, 2, 2, NOTE_LINK, NO_EVENT); in run_note_link_tests()
1435 test.t_known_failure = 1; in run_note_link_tests()
1436 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_link_tests()
1437 init_action(&(test.t_prep_actions[1]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_link_tests()
1438 init_action(&test.t_helpthreadact, SLEEP, RENAME, 2, (void*)FILE1, (void*)pathbuf); in run_note_link_tests()
1439 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)pathbuf, NULL); in run_note_link_tests()
1440 init_action(&test.t_cleanup_actions[1], NOSLEEP, RMDIR, 2, (void*)DIR1, NULL); in run_note_link_tests()
1441 execute_test(&test); in run_note_link_tests()
1444 init_test(&test, "5.2.5: make a symlink in a dir", DIR1, 1, 2, NOTE_LINK, NO_EVENT); in run_note_link_tests()
1445 test.t_known_failure = 1; in run_note_link_tests()
1446 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_link_tests()
1447 init_action(&test.t_helpthreadact, SLEEP, SYMLINK, 2, (void*)DOTDOT, (void*)pathbuf); in run_note_link_tests()
1448 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)pathbuf, NULL); in run_note_link_tests()
1449 init_action(&test.t_cleanup_actions[1], NOSLEEP, RMDIR, 2, (void*)DIR1, NULL); in run_note_link_tests()
1450 execute_test(&test); in run_note_link_tests()
1452 init_test(&test, "5.2.6: make a symlink to a dir", DIR1, 1, 2, NOTE_LINK, NO_EVENT); in run_note_link_tests()
1453 test.t_known_failure = 1; in run_note_link_tests()
1454 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_link_tests()
1455 init_action(&test.t_helpthreadact, SLEEP, SYMLINK, 2, (void*)DIR1, (void*)FILE1); in run_note_link_tests()
1456 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, NULL); in run_note_link_tests()
1457 init_action(&test.t_cleanup_actions[1], NOSLEEP, RMDIR, 2, (void*)DIR1, NULL); in run_note_link_tests()
1458 execute_test(&test); in run_note_link_tests()
1460 init_test(&test, "5.2.7: make a symlink to a file", FILE1, 1, 2, NOTE_LINK, NO_EVENT); in run_note_link_tests()
1461 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_link_tests()
1462 init_action(&test.t_helpthreadact, SLEEP, SYMLINK, 2, (void*)FILE1, (void*)FILE2); in run_note_link_tests()
1463 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE2, NULL); in run_note_link_tests()
1464 init_action(&test.t_cleanup_actions[1], NOSLEEP, UNLINK, 2, (void*)FILE1, NULL); in run_note_link_tests()
1465 execute_test(&test); in run_note_link_tests()
1471 test_t test; in run_note_rename_tests() local
1473 init_test(&test, "6.1.1: rename a file", FILE1, 1, 1, NOTE_RENAME, YES_EVENT); in run_note_rename_tests()
1474 test.t_nondeterministic = 1; in run_note_rename_tests()
1475 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_rename_tests()
1476 init_action(&test.t_helpthreadact, SLEEP, RENAME, 2, (void*)FILE1, (void*)FILE2); in run_note_rename_tests()
1477 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE2, NULL); in run_note_rename_tests()
1478 execute_test(&test); in run_note_rename_tests()
1480 init_test(&test, "6.1.2: rename a dir", DIR1, 1, 1, NOTE_RENAME, YES_EVENT); in run_note_rename_tests()
1481 test.t_nondeterministic = 1; in run_note_rename_tests()
1482 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_rename_tests()
1483 init_action(&test.t_helpthreadact, SLEEP, RENAME, 2, (void*)DIR1, (void*)DIR2); in run_note_rename_tests()
1484 init_action(&test.t_cleanup_actions[0], NOSLEEP, RMDIR, 2, (void*)DIR2, NULL); in run_note_rename_tests()
1485 execute_test(&test); in run_note_rename_tests()
1487 init_test(&test, "6.1.3: rename one file over another", FILE1, 2, 1, NOTE_RENAME, YES_EVENT); in run_note_rename_tests()
1488 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_rename_tests()
1489 init_action(&(test.t_prep_actions[1]), NOSLEEP, CREAT, 2, (void*)FILE2, (void*)NULL); in run_note_rename_tests()
1490 init_action(&test.t_helpthreadact, SLEEP, RENAME, 2, (void*)FILE1, (void*)FILE2); in run_note_rename_tests()
1491 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE2, NULL); in run_note_rename_tests()
1492 execute_test(&test); in run_note_rename_tests()
1494 init_test(&test, "6.1.4: rename one dir over another", DIR1, 2, 1, NOTE_RENAME, YES_EVENT); in run_note_rename_tests()
1495 test.t_nondeterministic = 1; in run_note_rename_tests()
1496 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_rename_tests()
1497 init_action(&(test.t_prep_actions[1]), NOSLEEP, MKDIR, 2, (void*)DIR2, (void*)NULL); in run_note_rename_tests()
1498 init_action(&test.t_helpthreadact, SLEEP, RENAME, 2, (void*)DIR1, (void*)DIR2); in run_note_rename_tests()
1499 init_action(&test.t_cleanup_actions[0], NOSLEEP, RMDIR, 2, (void*)DIR2, NULL); in run_note_rename_tests()
1500 execute_test(&test); in run_note_rename_tests()
1504 init_test(&test, "6.2.1: unlink a file", FILE1, 1, 0, NOTE_RENAME, NO_EVENT); in run_note_rename_tests()
1505 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_rename_tests()
1506 init_action(&test.t_helpthreadact, SLEEP, UNLINK, 2, (void*)FILE1, NULL); in run_note_rename_tests()
1507 execute_test(&test); in run_note_rename_tests()
1509 init_test(&test, "6.2.2: rmdir a dir", DIR1, 1, 0, NOTE_RENAME, NO_EVENT); in run_note_rename_tests()
1510 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_rename_tests()
1511 init_action(&test.t_helpthreadact, SLEEP, RMDIR, 2, (void*)DIR1, NULL); in run_note_rename_tests()
1512 execute_test(&test); in run_note_rename_tests()
1514 init_test(&test, "6.2.3: link() to a file", FILE1, 1, 2, NOTE_RENAME, NO_EVENT); in run_note_rename_tests()
1515 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_rename_tests()
1516 init_action(&test.t_helpthreadact, SLEEP, HARDLINK, 2, (void*)FILE1, (void*)FILE2); in run_note_rename_tests()
1517 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, NULL); in run_note_rename_tests()
1518 init_action(&test.t_cleanup_actions[1], NOSLEEP, UNLINK, 2, (void*)FILE2, NULL); in run_note_rename_tests()
1519 execute_test(&test); in run_note_rename_tests()
1521 init_test(&test, "6.2.4: rename one file over another: watch deceased", in run_note_rename_tests()
1523 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_rename_tests()
1524 init_action(&(test.t_prep_actions[1]), NOSLEEP, CREAT, 2, (void*)FILE2, (void*)NULL); in run_note_rename_tests()
1525 init_action(&test.t_helpthreadact, SLEEP, RENAME, 2, (void*)FILE1, (void*)FILE2); in run_note_rename_tests()
1526 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE2, NULL); in run_note_rename_tests()
1527 execute_test(&test); in run_note_rename_tests()
1529 init_test(&test, "6.2.5: rename one dir over another: watch deceased", in run_note_rename_tests()
1531 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_rename_tests()
1532 init_action(&(test.t_prep_actions[1]), NOSLEEP, MKDIR, 2, (void*)DIR2, (void*)NULL); in run_note_rename_tests()
1533 init_action(&test.t_helpthreadact, SLEEP, RENAME, 2, (void*)DIR1, (void*)DIR2); in run_note_rename_tests()
1534 init_action(&test.t_cleanup_actions[0], NOSLEEP, RMDIR, 2, (void*)DIR2, NULL); in run_note_rename_tests()
1535 execute_test(&test); in run_note_rename_tests()
1537 init_test(&test, "6.2.6: rename a file to itself", FILE1, 1, 1, NOTE_RENAME, NO_EVENT); in run_note_rename_tests()
1538 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_note_rename_tests()
1539 init_action(&test.t_helpthreadact, SLEEP, RENAME, 2, (void*)FILE1, (void*)FILE1); in run_note_rename_tests()
1540 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, NULL); in run_note_rename_tests()
1541 execute_test(&test); in run_note_rename_tests()
1543 init_test(&test, "6.2.7: rename a dir to itself", DIR1, 1, 1, NOTE_RENAME, NO_EVENT); in run_note_rename_tests()
1544 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKDIR, 2, (void*)DIR1, (void*)NULL); in run_note_rename_tests()
1545 init_action(&test.t_helpthreadact, SLEEP, RENAME, 2, (void*)DIR1, (void*)DIR1); in run_note_rename_tests()
1546 init_action(&test.t_cleanup_actions[0], NOSLEEP, RMDIR, 2, (void*)DIR1, NULL); in run_note_rename_tests()
1547 execute_test(&test); in run_note_rename_tests()
1553 test_t test; in run_note_revoke_tests() local
1554 init_test(&test, "7.1.1: revoke file", FILE1, 1, 1, NOTE_REVOKE, YES_EVENT); in run_note_revoke_tests()
1555 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 1, (void*)FILE1); in run_note_revoke_tests()
1556 init_action(&test.t_helpthreadact, SLEEP, REVOKE, 1, (void*)FILE1); in run_note_revoke_tests()
1557 init_action(&(test.t_cleanup_actions[0]), NOSLEEP, UNLINK, 1, (void*)FILE1); in run_note_revoke_tests()
1558 execute_test(&test); in run_note_revoke_tests()
1560 init_test(&test, "7.2.1: delete file", FILE1, 1, 0, NOTE_REVOKE, NO_EVENT); in run_note_revoke_tests()
1561 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 1, (void*)FILE1); in run_note_revoke_tests()
1562 init_action(&test.t_helpthreadact, SLEEP, UNLINK, 1, (void*)FILE1); in run_note_revoke_tests()
1563 execute_test(&test); in run_note_revoke_tests()
1570 test_t test; in run_evfilt_read_tests() local
1571 …init_test(&test, "8.1.1: how much data in file of length LENGTHEN_SIZE?", FILE1, 2, 1, EVFILT_READ… in run_evfilt_read_tests()
1572 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void*)NULL); in run_evfilt_read_tests()
1573 init_action(&(test.t_prep_actions[1]), NOSLEEP, LENGTHEN, 2, (void*)FILE1, (void*)NULL); in run_evfilt_read_tests()
1574 init_action(&test.t_helpthreadact, SLEEP, NOTHING, 0); in run_evfilt_read_tests()
1575 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, NULL); in run_evfilt_read_tests()
1576 execute_test(&test); in run_evfilt_read_tests()
1578 …init_test(&test, "8.1.2: block, then write to file", FILE1, 2, 1, EVFILT_READ, strlen(TEST_STRING)… in run_evfilt_read_tests()
1579 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 1, (void*)FILE1); in run_evfilt_read_tests()
1580 init_action(&(test.t_prep_actions[1]), NOSLEEP, TRUNC, 1, (void*)FILE1); in run_evfilt_read_tests()
1581 init_action(&test.t_helpthreadact, SLEEP, WRITE, 1, (void*)FILE1); in run_evfilt_read_tests()
1582 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, NULL); in run_evfilt_read_tests()
1583 execute_test(&test); in run_evfilt_read_tests()
1585 init_test(&test, "8.1.3: block, then extend", FILE1, 2, 1, EVFILT_READ, LENGTHEN_SIZE); in run_evfilt_read_tests()
1586 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 1, (void*)FILE1); in run_evfilt_read_tests()
1587 init_action(&(test.t_prep_actions[1]), NOSLEEP, TRUNC, 1, (void*)FILE1); in run_evfilt_read_tests()
1588 init_action(&test.t_helpthreadact, SLEEP, LENGTHEN, 1, (void*)FILE1); in run_evfilt_read_tests()
1589 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, NULL); in run_evfilt_read_tests()
1590 execute_test(&test); in run_evfilt_read_tests()
1592 …init_test(&test, "8.1.4: block, then seek to beginning", FILE1, 2, 1, EVFILT_READ, strlen(TEST_STR… in run_evfilt_read_tests()
1593 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 1, (void*)FILE1); in run_evfilt_read_tests()
1594 init_action(&(test.t_prep_actions[1]), NOSLEEP, WRITE, 1, (void*)FILE1); in run_evfilt_read_tests()
1595 test.t_read_to_end_first = 1; /* hack means that we've gotten to EOF before we block */ in run_evfilt_read_tests()
1596 init_action(&test.t_helpthreadact, SLEEP, LSEEK, 1, (void*)0); in run_evfilt_read_tests()
1597 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, NULL); in run_evfilt_read_tests()
1598 execute_test(&test); in run_evfilt_read_tests()
1601 …init_test(&test, "8.1.5: block, then write to fifo", FILE1, 1, 1, EVFILT_READ, strlen(TEST_STRING)… in run_evfilt_read_tests()
1602 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKFIFO, 1, (void*)FILE1); in run_evfilt_read_tests()
1603 test.t_file_is_fifo = 1; in run_evfilt_read_tests()
1604 init_action(&test.t_helpthreadact, SLEEP, WRITE, 1, (void*)FILE1); in run_evfilt_read_tests()
1605 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, NULL); in run_evfilt_read_tests()
1606 execute_test(&test); in run_evfilt_read_tests()
1609 init_test(&test, "8.2.1: just rename", FILE1, 2, 1, EVFILT_READ, NO_EVENT); in run_evfilt_read_tests()
1610 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 1, (void*)FILE1); in run_evfilt_read_tests()
1611 init_action(&(test.t_prep_actions[1]), NOSLEEP, TRUNC, 1, (void*)FILE1); in run_evfilt_read_tests()
1612 init_action(&test.t_helpthreadact, SLEEP, RENAME, 2, (void*)FILE1, (void*)FILE2); in run_evfilt_read_tests()
1613 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE2, NULL); in run_evfilt_read_tests()
1614 execute_test(&test); in run_evfilt_read_tests()
1616 init_test(&test, "8.2.2: delete file", FILE1, 2, 0, EVFILT_READ, NO_EVENT); in run_evfilt_read_tests()
1617 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 1, (void*)FILE1); in run_evfilt_read_tests()
1618 init_action(&(test.t_prep_actions[1]), NOSLEEP, TRUNC, 1, (void*)FILE1); in run_evfilt_read_tests()
1619 init_action(&test.t_helpthreadact, SLEEP, UNLINK, 1, (void*)FILE1); in run_evfilt_read_tests()
1620 execute_test(&test); in run_evfilt_read_tests()
1622 init_test(&test, "8.2.3: write to beginning", FILE1, 2, 1, EVFILT_READ, NO_EVENT); in run_evfilt_read_tests()
1623 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 1, (void*)FILE1); in run_evfilt_read_tests()
1624 init_action(&(test.t_prep_actions[1]), NOSLEEP, WRITE, 1, (void*)FILE1); in run_evfilt_read_tests()
1625 test.t_read_to_end_first = 1; /* hack means that we've gotten to EOF before we block */ in run_evfilt_read_tests()
1626 init_action(&test.t_helpthreadact, SLEEP, WRITE, 1, (void*)FILE1); in run_evfilt_read_tests()
1627 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 1, (void*)FILE1); in run_evfilt_read_tests()
1628 execute_test(&test); in run_evfilt_read_tests()
1630 init_test(&test, "8.1.4: block, then seek to current location", FILE1, 2, 1, EVFILT_READ, 0); in run_evfilt_read_tests()
1631 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 1, (void*)FILE1); in run_evfilt_read_tests()
1632 init_action(&(test.t_prep_actions[1]), NOSLEEP, WRITE, 1, (void*)FILE1); in run_evfilt_read_tests()
1633 test.t_read_to_end_first = 1; /* hack means that we've gotten to EOF before we block */ in run_evfilt_read_tests()
1634 init_action(&test.t_helpthreadact, SLEEP, LSEEK, 1, (void*)strlen(TEST_STRING)); in run_evfilt_read_tests()
1635 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, NULL); in run_evfilt_read_tests()
1636 execute_test(&test); in run_evfilt_read_tests()
1638 init_test(&test, "8.2.5: trying to read from empty fifo", FILE1, 1, 1, EVFILT_READ, 0); in run_evfilt_read_tests()
1639 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKFIFO, 1, (void*)FILE1); in run_evfilt_read_tests()
1640 test.t_file_is_fifo = 1; in run_evfilt_read_tests()
1641 init_action(&test.t_helpthreadact, SLEEP, NOTHING, 1, (void*)0); in run_evfilt_read_tests()
1642 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, NULL); in run_evfilt_read_tests()
1643 execute_test(&test); in run_evfilt_read_tests()
1672 test_t test; in run_evfilt_write_tests() local
1673 init_test(&test, "9.1.1: how much space in empty fifo?", FILE1, 1, 1, EVFILT_WRITE, FIFO_SPACE); in run_evfilt_write_tests()
1674 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKFIFO, 1, (void*)FILE1, (void*)NULL); in run_evfilt_write_tests()
1675 test.t_file_is_fifo = 1; in run_evfilt_write_tests()
1676 init_action(&test.t_helpthreadact, SLEEP, NOTHING, 0); in run_evfilt_write_tests()
1677 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, NULL); in run_evfilt_write_tests()
1678 execute_test(&test); in run_evfilt_write_tests()
1680 …init_test(&test, "9.1.2: how much space in slightly written fifo?", FILE1, 1, 1, EVFILT_WRITE, FIF… in run_evfilt_write_tests()
1681 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKFIFO, 1, (void*)FILE1, (void*)NULL); in run_evfilt_write_tests()
1682 test.t_file_is_fifo = 1; in run_evfilt_write_tests()
1683 test.t_write_some_data = 1; in run_evfilt_write_tests()
1684 init_action(&(test.t_helpthreadact), NOSLEEP, NOTHING, 0); in run_evfilt_write_tests()
1685 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, NULL); in run_evfilt_write_tests()
1686 execute_test(&test); in run_evfilt_write_tests()
1688 init_test(&test, "9.2.1: how much space in a full fifo?", FILE1, 1, 1, EVFILT_WRITE, 0); in run_evfilt_write_tests()
1689 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKFIFO, 1, (void*)FILE1, (void*)NULL); in run_evfilt_write_tests()
1690 test.t_nondeterministic = 1; in run_evfilt_write_tests()
1691 test.t_file_is_fifo = 1; in run_evfilt_write_tests()
1692 test.t_extra_sleep_hack = 1; in run_evfilt_write_tests()
1693 init_action(&(test.t_helpthreadact), NOSLEEP, FILLFD, 1, (void*)FILE1, (void*)NULL); in run_evfilt_write_tests()
1694 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, NULL); in run_evfilt_write_tests()
1695 execute_test(&test); in run_evfilt_write_tests()
1701 test_t test; in run_poll_tests() local
1702 …init_poll_test(&test, "10.1.1: does poll say I can write a regular file?", FILE1, 1, 1, POLLWRNORM… in run_poll_tests()
1703 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 1, (void*)FILE1, (void*)NULL); in run_poll_tests()
1704 init_action(&test.t_helpthreadact, SLEEP, NOTHING, 0); in run_poll_tests()
1705 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, NULL); in run_poll_tests()
1706 execute_test(&test); in run_poll_tests()
1708 …init_poll_test(&test, "10.1.2: does poll say I can write an empty FIFO?", FILE1, 1, 1, POLLWRNORM,… in run_poll_tests()
1709 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKFIFO, 1, (void*)FILE1, (void*)NULL); in run_poll_tests()
1710 test.t_file_is_fifo = 1; in run_poll_tests()
1711 init_action(&test.t_helpthreadact, SLEEP, NOTHING, 0); in run_poll_tests()
1712 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, NULL); in run_poll_tests()
1713 execute_test(&test); in run_poll_tests()
1715 …init_poll_test(&test, "10.1.3: does poll say I can read a nonempty FIFO?", FILE1, 1, 1, POLLRDNORM… in run_poll_tests()
1716 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKFIFO, 1, (void*)FILE1, (void*)NULL); in run_poll_tests()
1717 test.t_file_is_fifo = 1; in run_poll_tests()
1718 test.t_write_some_data = 1; in run_poll_tests()
1719 init_action(&test.t_helpthreadact, SLEEP, NOTHING, 0); in run_poll_tests()
1720 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, NULL); in run_poll_tests()
1721 execute_test(&test); in run_poll_tests()
1723 …init_poll_test(&test, "10.1.4: does poll say I can read a nonempty regular file?", FILE1, 2, 1, PO… in run_poll_tests()
1724 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 1, (void*)FILE1, (void*)NULL); in run_poll_tests()
1725 init_action(&(test.t_prep_actions[1]), NOSLEEP, LENGTHEN, 1, (void*)FILE1, (void*)NULL); in run_poll_tests()
1726 init_action(&test.t_helpthreadact, SLEEP, NOTHING, 0); in run_poll_tests()
1727 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, NULL); in run_poll_tests()
1728 execute_test(&test); in run_poll_tests()
1730 …init_poll_test(&test, "10.1.5: does poll say I can read an empty file?", FILE1, 1, 1, POLLRDNORM, … in run_poll_tests()
1731 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 1, (void*)FILE1, (void*)NULL); in run_poll_tests()
1732 init_action(&test.t_helpthreadact, SLEEP, NOTHING, 0); in run_poll_tests()
1733 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, NULL); in run_poll_tests()
1734 execute_test(&test); in run_poll_tests()
1739 …init_poll_test(&test, "10.2.2: does poll say I can read an empty FIFO?", FILE1, 1, 1, POLLRDNORM, … in run_poll_tests()
1740 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKFIFO, 1, (void*)FILE1, (void*)NULL); in run_poll_tests()
1741 test.t_file_is_fifo = 1; in run_poll_tests()
1742 init_action(&test.t_helpthreadact, SLEEP, NOTHING, 0); in run_poll_tests()
1743 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, NULL); in run_poll_tests()
1744 execute_test(&test); in run_poll_tests()
1746 …init_poll_test(&test, "10.2.3: does poll say I can write a full FIFO?", FILE1, 1, 1, POLLWRNORM, 0… in run_poll_tests()
1747 init_action(&(test.t_prep_actions[0]), NOSLEEP, MKFIFO, 1, (void*)FILE1, (void*)NULL); in run_poll_tests()
1748 test.t_nondeterministic = 1; in run_poll_tests()
1749 test.t_file_is_fifo = 1; in run_poll_tests()
1750 test.t_extra_sleep_hack = 1; in run_poll_tests()
1751 init_action(&(test.t_helpthreadact), NOSLEEP, FILLFD, 1, (void*)FILE1, (void*)NULL); in run_poll_tests()
1752 init_action(&test.t_cleanup_actions[0], NOSLEEP, UNLINK, 2, (void*)FILE1, NULL); in run_poll_tests()
1753 test.t_known_failure = 1; in run_poll_tests()
1754 execute_test(&test); in run_poll_tests()
1760 test_t test; in run_note_funlock_tests() local
1761 init_test(&test, "11.1.1: unlock file", FILE1, 1, 1, NOTE_FUNLOCK, YES_EVENT); in run_note_funlock_tests()
1762 test.t_nondeterministic = 1; in run_note_funlock_tests()
1763 init_action(&(test.t_prep_actions[0]), NOSLEEP, CREAT, 2, (void*)FILE1, (void *)NULL); in run_note_funlock_tests()
1764 init_action(&test.t_helpthreadact, SLEEP, FUNLOCK, 2, (void*)FILE1, (void *)NULL); in run_note_funlock_tests()
1765 init_action(&(test.t_cleanup_actions[0]), NOSLEEP, UNLINK, 2, (void*)FILE1, (void *)NULL); in run_note_funlock_tests()
1766 execute_test(&test); in run_note_funlock_tests()