a0a004ee8f32b671a8a9b4d52b1eff11e55dd0f7
[p5sagit/p5-mst-13.2.git] / t / TEST
1 #!./perl
2
3 # This is written in a peculiar style, since we're trying to avoid
4 # most of the constructs we'll be testing for.  (This comment is
5 # probably obsolete on the avoidance side, though still currrent
6 # on the peculiarity side.)
7
8 # t/TEST and t/harness need to share code. The logical way to do this would be
9 # to have the common code in a file both require or use. However, t/TEST needs
10 # to still work, to generate test results, even if require isn't working, so
11 # we cannot do that. t/harness has no such restriction, so it is quite
12 # acceptable to have it require t/TEST.
13
14 # In which case, we need to stop t/TEST actually running tests, as all
15 # t/harness needs are its subroutines.
16
17
18 # directories with special sets of test switches
19 my %dir_to_switch =
20     (base => '',
21      comp => '',
22      run => '',
23      '../ext/File-Glob/t' => '-I.. -MTestInit', # FIXME - tests assume t/
24      );
25
26 my %temp_no_core =
27     ('../ext/Attribute-Handlers' => 1,
28      '../ext/B-Debug' => 1,
29      '../ext/Compress-Raw-Bzip2' => 1,
30      '../ext/Compress-Raw-Zlib' => 1,
31      '../ext/Devel-PPPort' => 1,
32      '../ext/Encode' => 1,
33      '../ext/I18N-Langinfo' => 'fixme',
34      '../ext/IO-Compress' => 1,
35      '../ext/IPC-SysV' => 1,
36      '../ext/MIME-Base64' => 1,
37      '../ext/Time-HiRes' => 1,
38      '../ext/Unicode-Normalize' => 1,
39     );
40
41 if ($::do_nothing) {
42     return 1;
43 }
44
45 # Location to put the Valgrind log.
46 my $Valgrind_Log = 'current.valgrind';
47
48 $| = 1;
49
50 # for testing TEST only
51 #BEGIN { require '../lib/strict.pm'; "strict"->import() };
52 #BEGIN { require '../lib/warnings.pm'; "warnings"->import() };
53
54 delete $ENV{PERL5LIB};
55 delete $ENV{PERLLIB};
56 delete $ENV{PERL5OPT};
57
58 # remove empty elements due to insertion of empty symbols via "''p1'" syntax
59 @ARGV = grep($_,@ARGV) if $^O eq 'VMS';
60 our $show_elapsed_time = $ENV{HARNESS_TIMER} || 0;
61
62 # Cheesy version of Getopt::Std.  We can't replace it with that, because we
63 # can't rely on require working.
64 {
65     my @argv = ();
66     foreach my $idx (0..$#ARGV) {
67         push( @argv, $ARGV[$idx] ), next unless $ARGV[$idx] =~ /^-(\S+)$/;
68         $::benchmark = 1 if $1 eq 'benchmark';
69         $::core    = 1 if $1 eq 'core';
70         $::verbose = 1 if $1 eq 'v';
71         $::torture = 1 if $1 eq 'torture';
72         $::with_utf8 = 1 if $1 eq 'utf8';
73         $::with_utf16 = 1 if $1 eq 'utf16';
74         $::taintwarn = 1 if $1 eq 'taintwarn';
75         $ENV{PERL_CORE_MINITEST} = 1 if $1 eq 'minitest';
76         if ($1 =~ /^deparse(,.+)?$/) {
77             $::deparse = 1;
78             $::deparse_opts = $1;
79         }
80     }
81     @ARGV = @argv;
82 }
83
84 chdir 't' if -f 't/TEST';
85
86 die "You need to run \"make test\" first to set things up.\n"
87   unless -e 'perl' or -e 'perl.exe' or -e 'perl.pm';
88
89 if ($ENV{PERL_3LOG}) { # Tru64 third(1) tool, see perlhack
90     unless (-x 'perl.third') {
91         unless (-x '../perl.third') {
92             die "You need to run \"make perl.third first.\n";
93         }
94         else {
95             print "Symlinking ../perl.third as perl.third...\n";
96             die "Failed to symlink: $!\n"
97                 unless symlink("../perl.third", "perl.third");
98             die "Symlinked but no executable perl.third: $!\n"
99                 unless -x 'perl.third';
100         }
101     }
102 }
103
104 # check leakage for embedders
105 $ENV{PERL_DESTRUCT_LEVEL} = 2 unless exists $ENV{PERL_DESTRUCT_LEVEL};
106
107 $ENV{EMXSHELL} = 'sh';        # For OS/2
108
109 if ($show_elapsed_time) { require Time::HiRes }
110
111 my %skip = (
112             '.' => 1,
113             '..' => 1,
114             'CVS' => 1,
115             'RCS' => 1,
116             'SCCS' => 1,
117             '.svn' => 1,
118            );
119
120 # Roll your own File::Find!
121 sub _find_tests {
122     my($dir) = @_;
123     opendir DIR, $dir or die "Trouble opening $dir: $!";
124     foreach my $f (sort { $a cmp $b } readdir DIR) {
125         next if $skip{$f};
126
127         my $fullpath = "$dir/$f";
128
129         if (-d $fullpath) {
130             _find_tests($fullpath);
131         } elsif ($f =~ /\.t$/) {
132             push @ARGV, $fullpath;
133         }
134     }
135 }
136
137
138 # Scan the text of the test program to find switches and special options
139 # we might need to apply.
140 sub _scan_test {
141     my($test, $type) = @_;
142
143     open(my $script, "<", $test) or die "Can't read $test.\n";
144     my $first_line = <$script>;
145
146     $first_line =~ tr/\0//d if $::with_utf16;
147
148     my $switch = "";
149     if ($first_line =~ /#!.*\bperl.*\s-\w*([tT])/) {
150         $switch = qq{"-$1"};
151     } else {
152         if ($::taintwarn) {
153             # not all tests are expected to pass with this option
154             $switch = '"-t"';
155         } else {
156             $switch = '';
157         }
158     }
159
160     my $file_opts = "";
161     if ($type eq 'deparse') {
162         # Look for #line directives which change the filename
163         while (<$script>) {
164             $file_opts .= ",-f$3$4"
165               if /^#\s*line\s+(\d+)\s+((\w+)|"([^"]+)")/;
166         }
167     }
168
169     return { file => $file_opts, switch => $switch };
170 }
171                   
172 sub _run_test {
173     my($harness, $test, $type) = @_;
174     if (!defined $type) {
175         # To conform to the interface expected by exec in TAP::Harness
176         $type = 'perl';
177     }
178
179     my $options = _scan_test($test, $type);
180     my $return_dir;
181
182     my $perl = './perl';
183     my $lib  = '../lib';
184     $test =~ /^(.+)\/[^\/]+/;
185     my $dir = $1;
186     my $ext_dir;
187
188     my $testswitch = $dir_to_switch{$dir};
189     if (!defined $testswitch) {
190         if ($test =~ s!^(\.\./ext/[^/]+)/t!t!) {
191             $ext_dir = $1;
192             $return_dir = '../../t';
193             $lib = '../../lib';
194             $perl = '../../t/perl';
195             $testswitch = "-I../.. -MTestInit=U2T,A";
196             if ($temp_no_core{$ext_dir}) {
197                 $testswitch = $testswitch . ',NC';
198             }
199             chdir $ext_dir or die "Can't chdir to '$ext_dir': $!";
200         } else {
201             $testswitch = '-I.. -MTestInit';  # -T will remove . from @INC
202         }
203     }
204
205     my $utf8 = $::with_utf8 ? '-I$lib -Mutf8' : '';
206
207     my $results;
208     if ($type eq 'deparse') {
209         my $deparse_cmd =
210           "$perl $testswitch $options->{switch} -I$lib -MO=-qq,Deparse,-sv1.,".
211           "-l$::deparse_opts$options->{file} ".
212           "$test > $test.dp ".
213           "&& $perl $testswitch $options->{switch} -I$lib $test.dp |";
214         open($results, $deparse_cmd)
215           or print "can't deparse '$deparse_cmd': $!.\n";
216     }
217     elsif ($type eq 'perl') {
218         my $redir = $^O eq 'VMS' ? '2>&1' : '';
219
220         if ($ENV{PERL_VALGRIND}) {
221             my $valgrind = $ENV{VALGRIND} // 'valgrind';
222             my $vg_opts = $ENV{VG_OPTS}
223               //  "--suppressions=perl.supp --leak-check=yes "
224                 . "--leak-resolution=high --show-reachable=yes "
225                   . "--num-callers=50"; 
226             $perl = "$valgrind --log-fd=3 $vg_opts $perl";
227             $redir = "3>$Valgrind_Log";
228         }
229
230         my $run = $perl . _quote_args("$testswitch $options->{switch} $utf8")
231           . " $test $redir|";
232         open($results, $run) or print "can't run '$run': $!.\n";
233     }
234
235     if ($return_dir) {
236         chdir $return_dir
237             or die "Can't chdir from '$ext_dir' to '$return_dir': $!";
238     }
239
240     # Our environment may force us to use UTF-8, but we can't be sure that
241     # anything we're reading from will be generating (well formed) UTF-8
242     # This may not be the best way - possibly we should unset ${^OPEN} up
243     # top?
244     binmode $results;
245
246     return $results;
247 }
248
249 sub _quote_args {
250     my ($args) = @_;
251     my $argstring = '';
252
253     foreach (split(/\s+/,$args)) {
254        # In VMS protect with doublequotes because otherwise
255        # DCL will lowercase -- unless already doublequoted.
256        $_ = q(").$_.q(") if ($^O eq 'VMS') && !/^\"/ && length($_) > 0;
257        $argstring .= ' ' . $_;
258     }
259     return $argstring;
260 }
261
262 sub _populate_hash {
263     return unless defined $_[0];
264     return map {$_, 1} split /\s+/, $_[0];
265 }
266
267 sub _tests_from_manifest {
268     my ($extensions, $known_extensions) = @_;
269     my %skip;
270     my %extensions = _populate_hash($extensions);
271     my %known_extensions = _populate_hash($known_extensions);
272
273     foreach (keys %known_extensions) {
274         $skip{$_}++ unless $extensions{$_};
275     }
276
277     my @results;
278     my $mani = '../MANIFEST';
279     if (open(MANI, $mani)) {
280         while (<MANI>) {
281             if (m!^(ext/(\S+)/+(?:[^/\s]+\.t|test\.pl)|lib/\S+?(?:\.t|test\.pl))\s!) {
282                 my $t = $1;
283                 my $extension = $2;
284                 if (!$::core || $t =~ m!^lib/[a-z]!) {
285                     if (defined $extension) {
286                         $extension =~ s!/t$!!;
287                         # XXX Do I want to warn that I'm skipping these?
288                         next if $skip{$extension};
289                         my $flat_extension = $extension;
290                         $flat_extension =~ s!-!/!g;
291                         next if $skip{$flat_extension}; # Foo/Bar may live in Foo-Bar
292                     }
293                     my $path = "../$t";
294                     push @results, $path;
295                     $::path_to_name{$path} = $t;
296                 }
297             }
298         }
299         close MANI;
300     } else {
301         warn "$0: cannot open $mani: $!\n";
302     }
303     return @results;
304 }
305
306 unless (@ARGV) {
307     # base first, as TEST bails out if that can't run
308     # then comp, to validate that require works
309     # then run, to validate that -M works
310     # then we know we can -MTestInit for everything else, making life simpler
311     foreach my $dir (qw(base comp run cmd io op uni mro)) {
312         _find_tests($dir);
313     }
314     _find_tests("lib") unless $::core;
315     # Config.pm may be broken for make minitest. And this is only a refinement
316     # for skipping tests on non-default builds, so it is allowed to fail.
317     # What we want to to is make a list of extensions which we did not build.
318     my $configsh = '../config.sh';
319     my ($extensions, $known_extensions);
320     if (-f $configsh) {
321         open FH, $configsh or die "Can't open $configsh: $!";
322         while (<FH>) {
323             if (/^extensions=['"](.*)['"]$/) {
324                 $extensions = $1;
325             }
326             elsif (/^known_extensions=['"](.*)['"]$/) {
327                 $known_extensions = $1;
328             }
329         }
330         if (!defined $known_extensions) {
331             warn "No known_extensions line found in $configsh";
332         }
333         if (!defined $extensions) {
334             warn "No extensions line found in $configsh";
335         }
336     }
337     # The "complex" constructions of list return from a subroutine, and push of
338     # a list, might fail if perl is really hosed, but they aren't needed for
339     # make minitest, and the building of extensions will likely also fail if
340     # something is that badly wrong.
341     push @ARGV, _tests_from_manifest($extensions, $known_extensions);
342     unless ($::core) {
343         _find_tests('pod');
344         _find_tests('x2p');
345         _find_tests('porting');
346         _find_tests('japh') if $::torture;
347         _find_tests('t/benchmark') if $::benchmark or $ENV{PERL_BENCHMARK};
348     }
349 }
350
351 if ($::deparse) {
352     _testprogs('deparse', '',   @ARGV);
353 }
354 elsif ($::with_utf16) {
355     for my $e (0, 1) {
356         for my $b (0, 1) {
357             print STDERR "# ENDIAN $e BOM $b\n";
358             my @UARGV;
359             for my $a (@ARGV) {
360                 my $u = $a . "." . ($e ? "l" : "b") . "e" . ($b ? "b" : "");
361                 my $f = $e ? "v" : "n";
362                 push @UARGV, $u;
363                 unlink($u);
364                 if (open(A, $a)) {
365                     if (open(U, ">$u")) {
366                         print U pack("$f", 0xFEFF) if $b;
367                         while (<A>) {
368                             print U pack("$f*", unpack("C*", $_));
369                         }
370                         close(U);
371                     }
372                     close(A);
373                 }
374             }
375             _testprogs('perl', '', @UARGV);
376             unlink(@UARGV);
377         }
378     }
379 }
380 else {
381     _testprogs('perl',    '',   @ARGV);
382 }
383
384 sub _testprogs {
385     my ($type, $args, @tests) = @_;
386
387     print <<'EOT' if ($type eq 'deparse');
388 ------------------------------------------------------------------------------
389 TESTING DEPARSER
390 ------------------------------------------------------------------------------
391 EOT
392
393     $::bad_files = 0;
394
395     foreach my $t (@tests) {
396       unless (exists $::path_to_name{$t}) {
397         my $tname = "t/$t";
398         $::path_to_name{$t} = $tname;
399       }
400     }
401     my $maxlen = 0;
402     foreach (@::path_to_name{@tests}) {
403         s/\.\w+\z/./;
404         my $len = length ;
405         $maxlen = $len if $len > $maxlen;
406     }
407     # + 3 : we want three dots between the test name and the "ok"
408     my $dotdotdot = $maxlen + 3 ;
409     my $valgrind = 0;
410     my $total_files = @tests;
411     my $good_files = 0;
412     my $tested_files  = 0;
413     my $totmax = 0;
414     my %failed_tests;
415
416     while (my $test = shift @tests) {
417         my $test_start_time = $show_elapsed_time ? Time::HiRes::time() : 0;
418
419         if ($test =~ /^$/) {
420             next;
421         }
422         if ($type eq 'deparse') {
423             if ($test eq "comp/redef.t") {
424                 # Redefinition happens at compile time
425                 next;
426             }
427             elsif ($test =~ m{lib/Switch/t/}) {
428                 # B::Deparse doesn't support source filtering
429                 next;
430             }
431         }
432         my $te = $::path_to_name{$test} . '.'
433                     x ($dotdotdot - length($::path_to_name{$test}));
434
435         if ($^O ne 'VMS') {  # defer printing on VMS due to piping bug
436             print $te;
437             $te = '';
438         }
439
440         my $results = _run_test(undef, $test, $type);
441
442         my $failure;
443         my $next = 0;
444         my $seen_leader = 0;
445         my $seen_ok = 0;
446         my $trailing_leader = 0;
447         my $max;
448         my %todo;
449         while (<$results>) {
450             next if /^\s*$/; # skip blank lines
451             if (/^1..$/ && ($^O eq 'VMS')) {
452                 # VMS pipe bug inserts blank lines.
453                 my $l2 = <RESULTS>;
454                 if ($l2 =~ /^\s*$/) {
455                     $l2 = <RESULTS>;
456                 }
457                 $_ = '1..' . $l2;
458             }
459             if ($::verbose) {
460                 print $_;
461             }
462             unless (/^\#/) {
463                 if ($trailing_leader) {
464                     # shouldn't be anything following a postfix 1..n
465                     $failure = 'FAILED--extra output after trailing 1..n';
466                     last;
467                 }
468                 if (/^1\.\.([0-9]+)( todo ([\d ]+))?/) {
469                     if ($seen_leader) {
470                         $failure = 'FAILED--seen duplicate leader';
471                         last;
472                     }
473                     $max = $1;
474                     %todo = map { $_ => 1 } split / /, $3 if $3;
475                     $totmax += $max;
476                     $tested_files++;
477                     if ($seen_ok) {
478                         # 1..n appears at end of file
479                         $trailing_leader = 1;
480                         if ($next != $max) {
481                             $failure = "FAILED--expected $max tests, saw $next";
482                             last;
483                         }
484                     }
485                     else {
486                         $next = 0;
487                     }
488                     $seen_leader = 1;
489                 }
490                 else {
491                     if (/^(not )?ok(?: (\d+))?[^\#]*(\s*\#.*)?/) {
492                         unless ($seen_leader) {
493                             unless ($seen_ok) {
494                                 $next = 0;
495                             }
496                         }
497                         $seen_ok = 1;
498                         $next++;
499                         my($not, $num, $extra, $istodo) = ($1, $2, $3, 0);
500                         $num = $next unless $num;
501
502                         if ($num == $next) {
503
504                             # SKIP is essentially the same as TODO for t/TEST
505                             # this still conforms to TAP:
506                             # http://search.cpan.org/dist/TAP/TAP.pod
507                             $extra and $istodo = $extra =~ /#\s*(?:TODO|SKIP)\b/;
508                             $istodo = 1 if $todo{$num};
509
510                             if( $not && !$istodo ) {
511                                 $failure = "FAILED at test $num";
512                                 last;
513                             }
514                         }
515                         else {
516                             $failure ="FAILED--expected test $next, saw test $num";
517                             last;
518                         }
519                     }
520                     elsif (/^Bail out!\s*(.*)/i) { # magic words
521                         die "FAILED--Further testing stopped" . ($1 ? ": $1\n" : ".\n");
522                     }
523                     else {
524                         # module tests are allowed extra output,
525                         # because Test::Harness allows it
526                         next if $test =~ /^\W*(ext|lib)\b/;
527                         $failure = "FAILED--unexpected output at test $next";
528                         last;
529                     }
530                 }
531             }
532         }
533         close $results;
534
535         if (not defined $failure) {
536             $failure = 'FAILED--no leader found' unless $seen_leader;
537         }
538
539         if ($ENV{PERL_VALGRIND}) {
540             my @valgrind;
541             if (-e $Valgrind_Log) {
542                 if (open(V, $Valgrind_Log)) {
543                     @valgrind = <V>;
544                     close V;
545                 } else {
546                     warn "$0: Failed to open '$Valgrind_Log': $!\n";
547                 }
548             }
549             if ($ENV{VG_OPTS} =~ /cachegrind/) {
550                 if (rename $Valgrind_Log, "$test.valgrind") {
551                     $valgrind++;
552                 } else {
553                     warn "$0: Failed to create '$test.valgrind': $!\n";
554                 }
555             }
556             elsif (@valgrind) {
557                 my $leaks = 0;
558                 my $errors = 0;
559                 for my $i (0..$#valgrind) {
560                     local $_ = $valgrind[$i];
561                     if (/^==\d+== ERROR SUMMARY: (\d+) errors? /) {
562                         $errors += $1;   # there may be multiple error summaries
563                     } elsif (/^==\d+== LEAK SUMMARY:/) {
564                         for my $off (1 .. 4) {
565                             if ($valgrind[$i+$off] =~
566                                 /(?:lost|reachable):\s+\d+ bytes in (\d+) blocks/) {
567                                 $leaks += $1;
568                             }
569                         }
570                     }
571                 }
572                 if ($errors or $leaks) {
573                     if (rename $Valgrind_Log, "$test.valgrind") {
574                         $valgrind++;
575                     } else {
576                         warn "$0: Failed to create '$test.valgrind': $!\n";
577                     }
578                 }
579             } else {
580                 warn "No valgrind output?\n";
581             }
582             if (-e $Valgrind_Log) {
583                 unlink $Valgrind_Log
584                     or warn "$0: Failed to unlink '$Valgrind_Log': $!\n";
585             }
586         }
587         if ($type eq 'deparse') {
588             unlink "./$test.dp";
589         }
590         if ($ENV{PERL_3LOG}) {
591             my $tpp = $test;
592             $tpp =~ s:^\.\./::;
593             $tpp =~ s:/:_:g;
594             $tpp =~ s:\.t$:.3log:;
595             rename("perl.3log", $tpp) ||
596                 die "rename: perl3.log to $tpp: $!\n";
597         }
598         if (not defined $failure and $next != $max) {
599             $failure="FAILED--expected $max tests, saw $next";
600         }
601
602         if( !defined $failure  # don't mask a test failure
603             and $? )
604         {
605             $failure = "FAILED--non-zero wait status: $?";
606         }
607
608         if (defined $failure) {
609             print "${te}$failure\n";
610             $::bad_files++;
611             if ($test =~ /^base/) {
612                 die "Failed a basic test ($test) -- cannot continue.\n";
613             }
614             ++$failed_tests{$test};
615         }
616         else {
617             if ($max) {
618                 my $elapsed;
619                 if ( $show_elapsed_time ) {
620                     $elapsed = sprintf( " %8.0f ms", (Time::HiRes::time() - $test_start_time) * 1000 );
621                 }
622                 else {
623                     $elapsed = "";
624                 }
625                 print "${te}ok$elapsed\n";
626                 $good_files++;
627             }
628             else {
629                 print "${te}skipped\n";
630                 $tested_files -= 1;
631             }
632         }
633     } # while tests
634
635     if ($::bad_files == 0) {
636         if ($good_files) {
637             print "All tests successful.\n";
638             # XXX add mention of 'perlbug -ok' ?
639         }
640         else {
641             die "FAILED--no tests were run for some reason.\n";
642         }
643     }
644     else {
645         my $pct = $tested_files ? sprintf("%.2f", ($tested_files - $::bad_files) / $tested_files * 100) : "0.00";
646         my $s = $::bad_files == 1 ? "" : "s";
647         warn "Failed $::bad_files test$s out of $tested_files, $pct% okay.\n";
648         for my $test ( sort keys %failed_tests ) {
649             print "\t$test\n";
650         }
651         warn <<'SHRDLU_1';
652 ### Since not all tests were successful, you may want to run some of
653 ### them individually and examine any diagnostic messages they produce.
654 ### See the INSTALL document's section on "make test".
655 SHRDLU_1
656         warn <<'SHRDLU_2' if $good_files / $total_files > 0.8;
657 ### You have a good chance to get more information by running
658 ###   ./perl harness
659 ### in the 't' directory since most (>=80%) of the tests succeeded.
660 SHRDLU_2
661         if (eval {require Config; import Config; 1}) {
662             if ($::Config{usedl} && (my $p = $::Config{ldlibpthname})) {
663                 warn <<SHRDLU_3;
664 ### You may have to set your dynamic library search path,
665 ### $p, to point to the build directory:
666 SHRDLU_3
667                 if (exists $ENV{$p} && $ENV{$p} ne '') {
668                     warn <<SHRDLU_4a;
669 ###   setenv $p `pwd`:\$$p; cd t; ./perl harness
670 ###   $p=`pwd`:\$$p; export $p; cd t; ./perl harness
671 ###   export $p=`pwd`:\$$p; cd t; ./perl harness
672 SHRDLU_4a
673                 } else {
674                     warn <<SHRDLU_4b;
675 ###   setenv $p `pwd`; cd t; ./perl harness
676 ###   $p=`pwd`; export $p; cd t; ./perl harness
677 ###   export $p=`pwd`; cd t; ./perl harness
678 SHRDLU_4b
679                 }
680                 warn <<SHRDLU_5;
681 ### for csh-style shells, like tcsh; or for traditional/modern
682 ### Bourne-style shells, like bash, ksh, and zsh, respectively.
683 SHRDLU_5
684             }
685         }
686     }
687     my ($user,$sys,$cuser,$csys) = times;
688     print sprintf("u=%.2f  s=%.2f  cu=%.2f  cs=%.2f  scripts=%d  tests=%d\n",
689         $user,$sys,$cuser,$csys,$tested_files,$totmax);
690     if ($ENV{PERL_VALGRIND}) {
691         my $s = $valgrind == 1 ? '' : 's';
692         print "$valgrind valgrind report$s created.\n", ;
693     }
694 }
695 exit ($::bad_files != 0);
696
697 # ex: set ts=8 sts=4 sw=4 noet: