func correctnessTests(configFile string, bloomFilterSz int, numDocs int, isMalicious bool, useMaster bool, inputDir string) {
    log.Println("Initializing client...")
    client.Setup(configFile, bloomFilterSz, numDocs)
    conn := client.OpenConnection()
    files,_ := ioutil.ReadDir(inputDir)
    numDocs = len(files)
    for docID, file := range files {
            var err error
            docID = docID % numDocs
            filename := inputDir + "/" + file.Name()
            if (isMalicious) {
                err = client.UpdateDocFile_malicious(conn, filename, docID, useMaster)
            } else {
                err = client.UpdateDocFile_semihonest(conn, filename, docID, useMaster)
            }
            if err != nil {
                log.Fatal(err)
            }
    }
    log.Println("Finished updates")
    time.Sleep(5000 * time.Millisecond)
    pass := true
    for docID, file := range files {
        keywords := client.GetKeywordsFromFile(inputDir + "/" + file.Name())
        for _, keyword := range keywords {
            var docs []byte
            if (isMalicious) {
                docs, _, _, _, _, _, _  = client.SearchKeyword_malicious(conn, keyword, useMaster)
            } else {
                docs, _ = client.SearchKeyword_semihonest(conn, keyword, useMaster)
            }
            if (docs[docID / 8] & (1 << (uint(docID) % 8)) == 0) {
                log.Printf("ERROR: did not find keyword %s in document %d\n", keyword, docID)
                pass = false
            }
        }
    }
    if (pass) {
        log.Printf("---- PASSED TESTS ----\n");
    } else {
        log.Printf("---- FAILED TESTS ----\n");
    }
    log.Println("Cleaning up...")
    client.CloseConnection(conn)
    client.Cleanup()
}
/* Run correctness tests.
package main
import (
    "bufio"
    "client"
    "log"
    "flag"
    "os"
    "io/ioutil"
    "io"
    "time"
    "sync"
    "strconv"
)