KS and qui quadrado test to data of reliability

I am using parametric models to calculate some reliability items. The question is how to perform the adherence tests (Kolmogorov-Smirnov-KS Test and Chi-square-χ2). I tried using the function ks.tes (ex: ks.test (file $ tempo, "pweibull", shape = range, scale = alfa_wei)) and “chisq.test” (ex: chisq.test (rlnorm (n, mean = Y, sd = sy)). However the p-value is not correct, but in the ks test the statistics are correct (D). How do I perform these tests on R for reliability data?

To complement the question follows an example:
The data used were:

Tempo: 794, 676, 573, 484, 406, 339, 282, 233, 191, 156, 126, 102, 81, 64

Results R:

gama = 1.476715
alfa_wei= 357.5189

One-sample Kolmogorov-Smirnov test

data: arquivo$Tempo
D = 0.10253, p-value = 0.995
alternative hypothesis: two-sided

The correct result of the p-value should be:
D = 0,1006, p-value = 0,386

For the chi square test I tried to use the chisq.test function, however I was unsuccessful.