ioccc-src / mkiocccentry

Form an IOCCC submission as a compressed tarball file
Other
28 stars 6 forks source link

Enhancement: improve how make test and mkiocccentry_test. sh interact #904

Open xexyl opened 1 month ago

xexyl commented 1 month ago

Is there an existing issue for this?

Describe the bug

A good way to describe this is to show relevant output of make test:

Looking for feathers in tarball ...
drwxr-xr-x  0 501    20          0 Jul 11 15:26 12345678-1234-4321-abcd-1234567890ab-2/
-rw-r--r--  0 501    20       6101 Jul 11 15:26 12345678-1234-4321-abcd-1234567890ab-2/Makefile
-rw-r--r--  0 501    20          4 Jul 11 15:26 12345678-1234-4321-abcd-1234567890ab-2/extra2
-rw-r--r--  0 501    20       2891 Jul 11 15:26 12345678-1234-4321-abcd-1234567890ab-2/.auth.json
-rw-r--r--  0 501    20       2815 Jul 11 15:26 12345678-1234-4321-abcd-1234567890ab-2/foo
-rw-r--r--  0 501    20         61 Jul 11 15:26 12345678-1234-4321-abcd-1234567890ab-2/prog.c
-rw-r--r--  0 501    20       7670 Jul 11 15:26 12345678-1234-4321-abcd-1234567890ab-2/remarks.md
-rw-r--r--  0 501    20       5246 Jul 11 15:26 12345678-1234-4321-abcd-1234567890ab-2/bar
-rw-r--r--  0 501    20       1549 Jul 11 15:26 12345678-1234-4321-abcd-1234567890ab-2/.info.json
-rw-r--r--  0 501    20          4 Jul 11 15:26 12345678-1234-4321-abcd-1234567890ab-2/extra1
txzchk: test_ioccc/test_work/12345678-1234-4321-abcd-1234567890ab-2/../submit.12345678-1234-4321-abcd-1234567890ab-2.1720711561.txz size of 9092 bytes OK
No feathers stuck in tarball.
    https://www.ioccc.org/index.html#news

... the output above is the listing of the compressed tarball.

Now that we have formed the compressed tarball file, you
can remove the submission directory we have formed by executing:

    rm -rf test_ioccc/test_work/12345678-1234-4321-abcd-1234567890ab-2

If you are curious, you may examine the newly created compressed tarball
by running the following command:

    /opt/local/libexec/gnubin/tar -Jtvf test_ioccc/test_work/submit.12345678-1234-4321-abcd-1234567890ab-2.1720711561.txz

The IOCCC registration process and submit servers are not ready.  You cannot
register for the IOCCC nor use the IOCCC submit server at this time.
Please try again later, and monitor the IOCCC news for updates:

Sorry, tm Canada :-).

Observe the following:

What you expect

The correct output can be obtained by running mkiocccentry_test.sh itself:

[...]
No feathers stuck in tarball.

... the output above is the listing of the compressed tarball.

Now that we have formed the compressed tarball file, you
can remove the submission directory we have formed by executing:

    rm -rf test_ioccc/test_work/12345678-1234-4321-abcd-1234567890ab-2

If you are curious, you may examine the newly created compressed tarball
by running the following command:

    /opt/local/libexec/gnubin/tar -Jtvf test_ioccc/test_work/submit.12345678-1234-4321-abcd-1234567890ab-2.1720711598.txz

The IOCCC registration process and submit servers are not ready.  You cannot
register for the IOCCC nor use the IOCCC submit server at this time.
Please try again later, and monitor the IOCCC news for updates:

    https://www.ioccc.org/index.html#news

Sorry, tm Canada :-).

Environment

- OS: macOS Sonoma 14.5
- Device: MacBook Pro M1
- Compiler: Good question .. either the Apple clang or else .. here:

Using built-in specs.
COLLECT_GCC=/opt/local/bin/gcc
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/arm64-apple-darwin23/13.2.0/lto-wrapper
Target: arm64-apple-darwin23
Configured with: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc13/gcc13/work/gcc-13.2.0/configure --prefix=/opt/local --build=arm64-apple-darwin23 --enable-languages=c,c++,objc,obj-c++,lto,fortran,jit --libdir=/opt/local/lib/gcc13 --includedir=/opt/local/include/gcc13 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-13 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-13 --with-gxx-include-dir=/opt/local/include/gcc13/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-isl=/opt/local --with-zstd=/opt/local --enable-checking=release --disable-multilib --enable-lto --enable-libstdcxx-time --with-build-config=bootstrap-debug --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld-classic --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --enable-host-shared --with-darwin-extra-rpath=/opt/local/lib/libgcc --with-libiconv-prefix=/opt/local --disable-tls --with-gxx-libcxx-include-dir=/opt/local/libexec/gcc13/libc++/include/c++/v1 --with-pkgversion='MacPorts gcc13 13.2.0_3+stdlib_flag' --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.2.0 (MacPorts gcc13 13.2.0_3+stdlib_flag) 

bug_report.sh output

bug-report.20240711.083509.txt

Anything else?

It is unclear if this should actually be worried about as the mkiocccentry_test.sh script works on its own and that means the mkiocccentry(1) tool itself works on its own.

I don't know for sure but I have seen the fact that automatically replies (for the test script - a necessity) has caused strange output so it might be this. On the other hand why does running mkiocccentry_test.sh by itself not do this?

A very curious thing is that even though the mkiocccentry_test.sh script runs the mkiocccentry several times, with the test id twice, it only shows the Sorry part once. But why?

Again the question is whether this is an issue that needs to be resolved as the test script works itself and the test suite in full also works but it is an odd look and might seem wrong to some people (including admittedly me even though I know it works and I wrote bug_report.sh). This is not part of bug_report.sh but I am not sure why running mkiocccentry_test.sh directly does not trigger the problem, showing instead correct output, but the other ways show incorrect output.

Perhaps a parallel type of problem?

xexyl commented 1 month ago

Hmm ... upload of bug report went wrong. Trying to fix and then I must leave. If I can't fix quickly I will have to do later.

xexyl commented 1 month ago

Problem was I had typed manually the three backticks but the form does it already (or so it seems).

xexyl commented 1 month ago

Is this something worth looking into over the other repo? I can if you want me to (as I see you assigned it to me) but I imagine this is a much lower priority. Is that right?

lcn2 commented 1 month ago

Is this something worth looking into over the other repo? I can if you want me to (as I see you assigned it to me) but I imagine this is a much lower priority. Is that right?

A low priority bug fix, correct 👍

lcn2 commented 1 month ago

We believe we have addressed all of the current questions that still need answering at this time. If we've missed something or something else needs to be clarified, please ask again.

xexyl commented 1 month ago

We will hold off on the next release until this issue is resolved.

Hmm ... not sure why that's strictly necessary but I'm also not sure how to best go about it. I wonder. I guess this is less important than the other repo though? I'm now working on an FAQ about this toolkit actually, though. I hope I can finish it today but given the time I might have to continue tomorrow. Fortunately the guidelines already talk about the mkiocccentry tool itself a fair bit so I don't need to duplicate that. The other tools though will need more discussion (well maybe I put others in the guidelines too .. now I think on it I should check that).

lcn2 commented 1 month ago

So should this be closed as won't fix then?

We deleted our previous comment.

You could always add this as an issue to your jparse repo when you form it.

xexyl commented 1 month ago

So should this be closed as won't fix then?

I honestly don't know. It would be nicer if it didn't have this but since it's automated and most won't likely see it it might not matter much. The purist in me does not like it but I guess we have to ask the question: will it delay the next contest? If it does then is it worth it? My guess is not. But it could be fixed another time.

You could always add this as an issue to your jparse repo when you form it.

Sure but this is not specific to jparse and I don't know that jparse is part of it. As far as forming it I have already though it's only a simple Makefile, a simple C file and a README.md plus the same set of workflows for testing purposes - until it is time to import everything. This was done so that importing would be quicker at the time it should be.

lcn2 commented 1 month ago

So this is also a low priority enhancement and not a true bug?

xexyl commented 1 month ago

So this is also a low priority enhancement and not a true bug?

I don't know. I would argue it is a bug in a way but it does not break anything either: it just makes it look odd and it might make some people think it's wrong.

xexyl commented 1 month ago

Enhancemet - improve how ? (The typo is one thing but I'm confused on the other part.)

lcn2 commented 1 month ago

The GitHub apps kept crashing as we attempted to edit the title

xexyl commented 1 month ago

The GitHub apps kept crashing as we attempted to edit the title

Weird. Fixed a typo. Or about to.

lcn2 commented 1 week ago

We believe we have addressed all of the current questions that still need answering at this time. If we've missed something or something else needs to be clarified, please ask again.