CTests ctest.h has code that is not platform-agnostic. Also ctest sources use fopen() calls. Needs to be reworked.
@gapisback ci sta già lavorando.
Dal 25/1/2022.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
This item was recognized during review of PR #212 by Alex. The points noted are:
One issue that you foresaw is that ctest.h doesn't adhere to our platform rules. I think that's out of scope, but we should open an issue and fix that.
About this chunk of code (which was inline in the .c code but macro'ized as a result of a review comment):
267 #define vfprintf_usermsg(fh, message) \
268 do { \
269 va_list varargs; \
270 va_start(varargs, message); \
271 vfprintf((fh), (message), varargs); \
272 va_end(varargs); \
273 } while (0)
274
... the remark was: There is platform_error_log for this and I believe a way to specify the handle as well.
Revisit whether the call to vfprintf() on L271 can be changed to use platform_error_log() as suggested.
I want to note that this file is not platform-agnostic as is. Specifically, it uses some stuff that doesn't fly on certain platforms on which Splinter is also ported:
#include <inttypes.h> /* intmax_t, uintmax_t, PRI* /
#include <stddef.h> / size_t */
That seems straightforward to change using our platform definitions and some sed. This is the only ctest code file, right? We should open an issue and audit this. We have a special poison.h header to check for compliance.
A similar issue recognized during review of PR #224 is the following usages of fopen(), that is now being seen commonly in all unit-test sources:
108 // clang-format off
109 CTEST_SETUP(splinter)
110 {
111 Platform_stdout_fh = fopen("/tmp/unit_test.stdout", "a+");
112 Platform_stderr_fh = fopen("/tmp/unit_test.stderr", "a+");
113
Such references to fopen() should be platform'ized, so we don't run the risk that such code will not link on platforms where this stdlib function may not be available.
- Lingua principale
- C
- Stelle
- 733
- Fork
- 68
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di vmware/splinterdb
-
Error On Running ExamplesAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
vmware/splinterdb#600 · 5 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
vmware/splinterdb#597 ·
-
Is macOS support considered?Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
vmware/splinterdb#591 · 2 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
vmware/splinterdb#589 · 1 reazione ·
-
A segmentation fault in routing_filter_lookupForse di nuovo libera @ajhconway l’ha presa 1221 giorni fa e non c’è nessuna pull request aperta. Aperta
vmware/splinterdb#585 · 1 assegnatario ·
Tutte le issue di vmware/splinterdb
Issue simili
-
backlog
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
EchoTools/nevr-runtime#454 ·
I maintainer di solito rispondono entro 1 giorno
-
initramfs: -type f (#18686) skips the libcurl.so.4 symlink, libcurl no longer copied into initramfsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
UNIVERSE-HPC/course-material#283 ·
-
bug C/C++ code
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
webarkit/WebARKitLib#85 ·
I maintainer di solito rispondono entro 1 giorno