"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "misc/cgo/testcarchive/testdata/main5.c" between
go1.19.src.tar.gz and go1.19.1.src.tar.gz

About: Google’s Go is a compiled, garbage-collected, concurrent programming language.
Latest stable release (1.19).

main5.c  (go1.19.src):main5.c  (go1.19.1.src)
skipping to change at line 32 skipping to change at line 32
if (argc < 2) { if (argc < 2) {
printf("Missing argument\n"); printf("Missing argument\n");
return 1; return 1;
} }
test = atoi(argv[1]); test = atoi(argv[1]);
verbose = (argc > 2); verbose = (argc > 2);
if (verbose) {
printf("calling RunGoroutines\n");
}
Noop(); Noop();
switch (test) { switch (test) {
case 1: { case 1: {
if (verbose) { if (verbose) {
printf("attempting segfault\n"); printf("attempting segfault\n");
} }
*nilp = 0; *nilp = 0;
break; break;
skipping to change at line 93 skipping to change at line 89
// Close the reading end. // Close the reading end.
close(fd[0]); close(fd[0]);
// Expect that write(2) fails (EPIPE) // Expect that write(2) fails (EPIPE)
if (write(fd[1], "some data", 9) != -1) { if (write(fd[1], "some data", 9) != -1) {
printf("write(2) unexpectedly succeeded\n"); printf("write(2) unexpectedly succeeded\n");
return 0; return 0;
} }
printf("did not receive SIGPIPE\n"); printf("did not receive SIGPIPE\n");
return 0; return 0;
} }
case 4: {
fprintf(stderr, "OK\n");
fflush(stderr);
if (verbose) {
printf("calling Block\n");
}
Block();
}
default: default:
printf("Unknown test: %d\n", test); printf("Unknown test: %d\n", test);
return 0; return 0;
} }
printf("FAIL\n"); printf("FAIL\n");
return 0; return 0;
} }
 End of changes. 2 change blocks. 
4 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)