aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/bitsliced-aes
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-02-01 21:43:47 +0100
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-02-01 21:48:33 +0100
commite029e033d52a850c135e286dea907a2b8468637b (patch)
treef5491de1b3cde237ab039d6b243547f1312620d4 /test/monniaux/bitsliced-aes
parent1dffd83e6b621c6ad8d820431339c5dd58e651d1 (diff)
downloadcompcert-kvx-e029e033d52a850c135e286dea907a2b8468637b.tar.gz
compcert-kvx-e029e033d52a850c135e286dea907a2b8468637b.zip
ugly hack to access _impure_thread_data (stdin, stdout, stderr...)
it works!
Diffstat (limited to 'test/monniaux/bitsliced-aes')
-rw-r--r--test/monniaux/bitsliced-aes/tests/tests.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/test/monniaux/bitsliced-aes/tests/tests.c b/test/monniaux/bitsliced-aes/tests/tests.c
index 0c564082..d3e464f7 100644
--- a/test/monniaux/bitsliced-aes/tests/tests.c
+++ b/test/monniaux/bitsliced-aes/tests/tests.c
@@ -10,7 +10,6 @@
#else
#include <stdio.h>
#endif
-extern FILE *fdopen(int fd, const char *mode);
void aes_ecb_test()
{
@@ -33,16 +32,14 @@ void aes_ecb_test()
printf("plain text: \n");
dump_hex((uint8_t * )input,16);
- FILE *err = fdopen(2, "w");
-
if (memcmp(pt_vector, input, 16) != 0)
{
- fprintf(err,"error: decrypted ciphertext is not the same as the input plaintext\n");
+ fprintf(stderr,"error: decrypted ciphertext is not the same as the input plaintext\n");
exit(1);
}
else if (memcmp(ct_vector, output, 16) != 0)
{
- fprintf(err,"error: ciphertext is not the same as the test vector\n");
+ fprintf(stderr,"error: ciphertext is not the same as the test vector\n");
exit(1);
}
else